We’ll be using the RSEM package to do some expression analysis. To install it:
cd /root
curl -O http://deweylab.biostat.wisc.edu/rsem/src/rsem-1.2.5.tar.gz
tar xzvf rsem-1.2.5.tar.gz
cd rsem-1.2.5
make
And now add this directory into your PATH, which is where Unix looks for things to run:
echo 'export PATH=$PATH:/root/rsem-1.2.5' >> /root/.bashrc
source /root/.bashrc
If you didn’t install bowtie on this machine already (e.g. as part of Doing a small de novo mRNAseq assembly with Trinity), RSEM needs it; do:
cd /root
curl -O -L http://sourceforge.net/projects/bowtie-bio/files/bowtie/0.12.7/bowtie-0.12.7-linux-x86_64.zip
unzip bowtie-0.12.7-linux-x86_64.zip
cd bowtie-0.12.7
cp bowtie bowtie-build bowtie-inspect /usr/local/bin
Go to a working directory on /mnt:
cd /mnt
mkdir rsem
cd rsem
Now, grab the reference transcriptome:
curl https://s3.amazonaws.com/public.ged.msu.edu/coral-mini-assembly.fa.gz | gunzip > coral.fa
and some reads:
curl -O http://athyra.idyll.org/~t/larva-ct-800k.fq.gz
curl -O http://athyra.idyll.org/~t/settled-ct-800k.fq.gz
You’ll need to uncompress the reads:
gunzip *.gz
Now, prepare the reference for RSEM:
rsem-prepare-reference coral.fa coral
Here, ‘coral.fa’ can be one of several files (comma-separated) in case you have multiple different reference data sets. In this case it’s the transcriptome you generated, but there are lots of options (see the docs for rsem-prepare-reference).
And, finally, calculate the expression levels for the ‘settled’ and ‘larva’ data sets:
rsem-calculate-expression settled-ct-800k.fq coral settled
rsem-calculate-expression larva-ct-800k.fq coral larva
(See the rsem-calculate-expression docs for more info.)
This outputs a couple files; the two most interesting, for now, are ‘larva.genes.results’ and ‘settled.genes.results’. These contain the following data:
head larva.genes.results
should show you
gene_id transcript_id(s) length effective_length expected_count TPM FPKM
comp0_c0_seq1 comp0_c0_seq1 291.00 291.00 3.00 102.12 164.47
...
If you’ve installed Dropbox (see ../tutorials-2013/installing-dropbox), you can now copy the files to Dropbox:
cp larva.genes.results settled.genes.results ~/Dropbox/
and you can open them directly in Excel as tab-delimited files.
This file can be edited directly through the Web. Anyone can update and fix errors in this document with few clicks -- no downloads needed.
For an introduction to the documentation format please see the reST primer.