I’m currently working on trying a few types of gene expression analysis with the E5 RNAseq and sRNAseq data we have for A. Pulchra, P. evermanni, and P. meandrina, but before I can do any analysis work we need abundance count matrices for the RNAseq data from each of the three species. This notebook post is a write up of the steps involved in quantifying transcript abundances using kallisto. I’ll only be going step-by-step through the code used for P. meandrina, but the workflow is the same for all three species, and the rendered code for all three species is linked below.
Rendered code (.md files):
- A. pulchra
- P. evermanni
- P. meandrina
Required Inputs:
- Trimmed RNAseq reads (e.g. .fastq.gz)
- Transcriptome fasta (e.g. *.fasta, *.fna, *.fa)
Output:
- Counts matrix representing the abundance of sequenced transcripts
Tools/software:
- kallisto v.0.50.1
- TrinityRNASeq v.2.12.0
Kallisto Workflow
Download trimmed reads and transcriptome
If you don’t already have them in an accessible directory, download the trimmed RNAseq reads and transcriptome file you’ll be using
Build kallisto index
The first step is to build a kallisto index. In this step, kallisto takes your reference transcriptome as input and breaks each transcript into “k-mers,” or shorter sequences that are k nucleotides long. It then “indexes” these k-mers, storing each k-mer and its transcript association in a data structure for more efficient retrieval during the pseudoalignment step.
Sample quantification
Next is quantification, which take both the index you just constructed and your trimmed RNAseq read, and makes use of pseudoalignment, a process that is much faster and more efficient than aligning each full read to a full transcript. Briefly, each read is broken up into k-mers, which are then mapped to the index to see which indexed transcript k-mers may match the read k-mers. Kallisto then calculates a probability score for each read/transcript pair, evaluating the likelihood that a given read originated from each transcript. These scores are then used to estimate transcript abundance.
Build count matrix for all samples
The kallisto quantification process can only take one sample (i.e., one pair of reads) at a time, so as a last step we build a counts matrix that lists the transcript abundances for all of our samples in a single file.
Summary
A. pulchra:
sample 140 – 47M reads processed (61.4% mapped)
sample 145 – 42M reads processed (65.3% mapped)
sample 150 – 43M reads processed (47.0% mapped)
sample 173 – 47M reads processed (60.7% mapped)
sample 178 – 42M reads processed (59.3% mapped)
P. evermanni:
sample 71 – 50M reads processed (35.3% mapped)
sample 73 – 51M reads processed (29.8% mapped)
sample 76 – 49M reads processed (35.6% mapped)
sample 79 – 49M reads processed (31.9% mapped)
sample 82 – 48M reads processed (37.3% mapped)
P. meandrina:
sample 47 – 54M reads processed (26.1% mapped)
sample 48 – 51M reads processed (25.3% mapped)
sample 50 – 55M reads processed (31.1% mapped)
sample 53 – 53M reads processed (31.8% mapped)
sample 57 – 42M reads processed (21.7% mapped)