Visualization with CummeRbund - Jeanielmj/bioinformatics-workshop GitHub Wiki

In progress :(

CummeRbund

Running CummeRbund

Running on MGHPCC

Step 5. Explore differential analysis results with CummeRbund

A) First load R and enter R environment

module load R
R

B) Within R environment, set up cummeRbund

source("http://bioconductor.org/biocLite.R")
biocLite("cummeRbund")

C) Load cummeRbund library and read in the differential expression results.
If you save and exit the R environment and return, these commands must be executed again.

library(cummeRbund)
cuff_data <- readCufflinks('diff_out')

D) Use cummeRbund to visualize the differential expression results. NOTE: Any graphic outputs will be automatically saved as "Rplots.pdf" which can create problems when you want to create multiple plots with different names in the same process. To save different plots with different names, preface any of the commands below with the command:

pdf(file="myPlotName.pdf")

And after executing the necessary commands, add the line:

dev.off()

Thus, to use the csScatter command and save the results in a file called scatterplot.pdf, one would execute the following commands:

pdf(file="scatterplot.pdf")
 
csScatter(genes(cuff_data), 'C1', 'C2')
 
dev.off()

To pull out significantly differentially expressed genes and isoforms

gene_diff_data  <- diffData(genes(cuff_data))
sig_gene_data  <- subset(gene_diff_data, (significant ==  'yes'))
nrow(sig_gene_data)
isoform_diff_data <-diffData(isoforms(cuff_data))
sig_isoform_data <- subset(isoform_diff_data, (significant == 'yes'))
nrow(sig_isoform_data)

To draw a scatterplot

csScatter(genes(cuff_data), 'C1', 'C2')

To plot gene level and isoform level expression for gene regucalcin

mygene1 <- getGene(cuff_data,'regucalcin')
expressionBarplot(mygene1)
expressionBarplot(isoforms(mygene1))

To plot gene level and isoform level expression for gene Rala

mygene2 <- getGene(cuff_data, 'Rala')
expressionBarplot(mygene2)
expressionBarplot(isoforms(mygene2))

| Previous Section | This Section |:------------------------------------:|:--------------------------:|:--------------------------------------------:| | [Differential Analysis with Cuffdiff]]](/Jeanielmj/bioinformatics-workshop/wiki/[[Visualization-with-CummeRbund)