Overview
In this lab, we'll look at how to use cummeRbund to visualize our gene expression results from cuffdiff. CummeRbund is part of the tuxedo pipeline and it is an R package that is capable of plotting the results generated by cuffdiff.
...
Figure from: Differential gene and transcript expression analysis of RNA-seq experiments with TopHat and Cufflinks, Trapnell et al, Nature Protocols, 2013.
Introduction
CummeRbund is powerful package with many different functions. Cuffdiff produces a lot of output files and all the output files are related by sets by IDs.
Code Block | ||
---|---|---|
| ||
#If you have a local copy: ls -l diffcuffdiff_outresults -rwxr-x--- 1 daras G-801020 2691192 Aug 21 12:20 isoform_exp.diff : Differential expression testing for transcripts -rwxr-x--- 1 daras G-801020 1483520 Aug 21 12:20 gene_exp.diff : Differential expression testing for genes -rwxr-x--- 1 daras G-801020 1729831 Aug 21 12:20 tss_group_exp.diff: Differential expression testing for primary transcripts -rwxr-x--- 1 daras G-801020 1369451 Aug 21 12:20 cds_exp.diff : Differential expression testing for coding sequences -rwxr-x--- 1 daras G-801020 3277177 Aug 21 12:20 isoforms.fpkm_tracking -rwxr-x--- 1 daras G-801020 1628659 Aug 21 12:20 genes.fpkm_tracking -rwxr-x--- 1 daras G-801020 1885773 Aug 21 12:20 tss_groups.fpkm_tracking -rwxr-x--- 1 daras G-801020 1477492 Aug 21 12:20 cds.fpkm_tracking -rwxr-x--- 1 daras G-801020 1349574 Aug 21 12:20 splicing.diff : Differential splicing tests -rwxr-x--- 1 daras G-801020 1158560 Aug 21 12:20 promoters.diff : Differential promoter usage -rwxr-x--- 1 daras G-801020 919690 Aug 21 12:20 cds.diff : Differential coding output |
...
- readCufflinks- Most important function designed to read all the output files that cuffdiff generates into an R data object (of class CuffSet).
- cuff_data <- readCufflinks(diff_out)
- CummeRbund has at least 6 classes that it will place different parts of your data in.
- Now you can access information using different functions: gene information using genes(cuff_data), your isoform level output using isoforms(cuff_data), TSS related groups using tss(cuff_data) and so forth
What can you do with cummeRbund?
- Global statistics on data for quality, dispersion, distribution of gene expression scores etc.
- Plot things for specific features or genes
...
Figures from http://compbio.mit.edu/cummeRbund/manual_2_0.html
Get your data
MAKE SURE YOU ARE IN THE IDEV SESSION FOR THIS!
...
Code Block |
---|
pdf(file="scatterplot.pdf") csScatter(genes(cuff_data), 'C1', 'C2') dev.off() #How does this plot look? What is it telling us? |
The resultant plot is here.
...
Code Block | ||
---|---|---|
| ||
#Below command is equivalent to looking at the gene_exp.diff file that we spent a lot of time parsing yesterday gene_diff_data <- diffData(genes(cuff_data)) #Do gene_diff_data followed by tab to see all the variables in this data object sig_gene_data <- subset(gene_diff_data, (significant == 'yes')) up_gene_data <- subset(sig_gene_data, (log2_fold_change > 1)) #How many nrow(up_gene_data) #Pause here to consider a mistake I made yesterday down_gene_data <- subset(upsig_gene_data, (log2_fold_change < -1)) nrow(up_gene_data) |
...
Code Block | ||
---|---|---|
| ||
pdf(file="rala.pdf") mygene2 <- getGene(cuff_data, 'Rala') expressionBarplot(mygene2) expressionBarplot(isoforms(mygene2)) dev.off() |
Take cummeRbund for a spin...
CummeRbund is powerful package with many different functions. Above was an illustration of a few of them. Try any of the suggested exercises below to further explore the differential expression results with different cummeRbund functions.
...