Subsections


Read mapping and expression quantification

The following describes how reads are mapped, categorized, and assigned when quantifying gene and transcript expression:

Expression measures

Exons are defined as follows, depending on the selected reference type:

RPKM (Reads Per Kilobase of exon model per Million mapped reads) [Mortazavi et al., 2008] is calculated as:

$\displaystyle \emph{RPKM} = \frac{\emph{reads mapped to the feature}}{\emph{mapped reads (millions)} \times \emph{feature length (KB)}}
$

where:

For paired reads, when Count paired reads as two is unchecked, RPKM corresponds to FPKM (Fragments Per Kilobase of exon model per Million mapped fragments).

TPM (Transcripts Per Million) [Li et al., 2010a] is calculated as:

$\displaystyle \emph{TPM} = \frac{\emph{RPKM}}{\sum \emph{RPKM}} \cdot 10^6.
$

For a gene-level expression track, the sum is over the RPKM values of all genes in the track. For a transcript-level expression track, the sum is over the RPKM values of all transcripts in the track.

When 3' sequencing is selected, gene-level TPM is calculated as:

$\displaystyle \emph{TPM} = \frac{\emph{Total exon reads}}{\sum \emph{Total exon reads}} \cdot 10^6,
$

where the sum is over all genes in the track. The gene-level RPKM is set equal to TPM.

Tightly packed genes and genes in operons

Only reads that map completely within the gene boundaries are counted as mapping to the gene. Reads that extend beyond the gene boundaries are considered intergenic. This can be too conservative when genes are close to each other, organized in operons, or short, or when non-coding 5' regions are not included in the annotations. In such situations:

The EM estimation algorithm

The EM estimation algorithm is inspired by the RSEM [Li et al., 2010a] and eXpress [Roberts and Pachter, 2013] methods. It iteratively estimates the abundance of transcripts, and assigns reads to transcripts according to these abundances. The algorithm is described here for transcripts. The same procedure is applied to genes when the reference is annotated with genes only, and to reference sequences when One reference sequence per transcript is selected.

To illustrate the interpretation of abundance, consider the following two examples.

In the first example, we have a gene with two transcripts, $ t_1$ and $ t_2$, where $ t_2$ is twice as long as $ t_1$ (figure 34.40). $ t_2$ is also twice as abundant as $ t_1$. This means that of the three reads in the exon shared by both transcripts, two come from $ t_2$ and one comes from $ t_1$. $ t_2$ has a second exon, which generates two more reads. So $ t_2$ is twice as abundant as $ t_1$, but because it is twice as long, it generates four times as many reads.

Image rna_em_example1
Figure 34.40: The longer transcript $ t_2$ has twice the abundance of the shorter transcript $ t_1$, but four times the number of reads.

In the second example, the setup is the same, but now $ t_1$ is twice as abundant as $ t_2$ (figure 34.41). Because $ t_2$ is twice as long, both transcripts generate the same number of reads.

Image rna_em_example2
Figure 34.41: The longer transcript $ t_2$ has half the abundance of the shorter transcript $ t_1$, but the same number of reads.

To estimate the transcript abundances, we carry out an expectation-maximization procedure. Before explaining the procedure, we define the concept of a transcript set: the set of transcripts to which a read can map. In the above examples, the non-uniquely mapping reads can map to the transcript set $ a_1 = \{t_1, t_2\}$, and the uniquely mapping reads can map only to the transcript set $ a_2 = \{t_2\}$. The count of a transcript set is the number of reads that can map to exactly the transcripts in the set. In both examples, the count of $ a_1$ is 3, because 3 reads are shared between the transcripts. The count of $ a_2$ is 2 in the first example, and 1 in the second example.

The expectation-maximization algorithm proceeds as follows:

  1. The transcript abundances are initialized to the uniform distribution, that is, with $ n$ transcripts, each transcript starts with an abundance of $ 1/n$.

  2. Expectation step: the current transcript abundances are used to calculate the expected count of each transcript, that is, the number of reads expected to be assigned to it. For each transcript set that includes the transcript, the transcript is assigned a fraction of the count of the transcript set, proportional to its abundance relative to the total abundance of the transcripts in the transcript set.

  3. Maximization step: the currently assigned counts are used to re-compute the transcript abundances. For each transcript, the fraction of all reads currently assigned to it is divided by the transcript length, because longer transcripts are expected to generate proportionally more reads. The resulting values are then normalized so that the abundances of all transcripts sum to one.

  4. Repeat from the expectation step until convergence.

Below, we illustrate how the expectation-maximization algorithm converges to the expected abundances for the above two examples, where transcript 1 is $ t_1$ and transcript 2 is $ t_2$.

Example 1:
Initially: transcript 2 abundance = 0.50, count: 0.00, transcript 1 abundance = 0.50, count: 0.00
After 1 round: transcript 2 abundance = 0.54, count: 3.50, transcript 1 abundance = 0.46, count: 1.50
After 2 rounds: transcript 2 abundance = 0.57, count: 3.62, transcript 1 abundance = 0.43, count: 1.38
After 3 rounds: transcript 2 abundance = 0.59, count: 3.70, transcript 1 abundance = 0.41, count: 1.30
After 4 rounds: transcript 2 abundance = 0.60, count: 3.76, transcript 1 abundance = 0.40, count: 1.24
After 5 rounds: transcript 2 abundance = 0.62, count: 3.81, transcript 1 abundance = 0.38, count: 1.19
After 6 rounds: transcript 2 abundance = 0.62, count: 3.85, transcript 1 abundance = 0.38, count: 1.15
After 7 rounds: transcript 2 abundance = 0.63, count: 3.87, transcript 1 abundance = 0.37, count: 1.13
After 8 rounds: transcript 2 abundance = 0.64, count: 3.90, transcript 1 abundance = 0.36, count: 1.10
After 9 rounds: transcript 2 abundance = 0.64, count: 3.92, transcript 1 abundance = 0.36, count: 1.08
After 10 rounds: transcript 2 abundance = 0.65, count: 3.93, transcript 1 abundance = 0.35, count: 1.07
After 11 rounds: transcript 2 abundance = 0.65, count: 3.94, transcript 1 abundance = 0.35, count: 1.06
After 12 rounds: transcript 2 abundance = 0.65, count: 3.95, transcript 1 abundance = 0.35, count: 1.05
After 13 rounds: transcript 2 abundance = 0.66, count: 3.96, transcript 1 abundance = 0.34, count: 1.04
After 14 rounds: transcript 2 abundance = 0.66, count: 3.97, transcript 1 abundance = 0.34, count: 1.03
After 15 rounds: transcript 2 abundance = 0.66, count: 3.97, transcript 1 abundance = 0.34, count: 1.03

Example 2:
Initially: transcript 2 abundance = 0.50, count: 0.00, transcript 1 abundance = 0.50, count: 0.00
After 1 round: transcript 2 abundance = 0.45, count: 2.50, transcript 1 abundance = 0.55, count: 1.50
After 2 rounds: transcript 2 abundance = 0.42, count: 2.36, transcript 1 abundance = 0.58, count: 1.64
After 3 rounds: transcript 2 abundance = 0.39, count: 2.26, transcript 1 abundance = 0.61, count: 1.74
After 4 rounds: transcript 2 abundance = 0.37, count: 2.18, transcript 1 abundance = 0.63, count: 1.82
After 5 rounds: transcript 2 abundance = 0.36, count: 2.12, transcript 1 abundance = 0.64, count: 1.88
After 6 rounds: transcript 2 abundance = 0.35, count: 2.08, transcript 1 abundance = 0.65, count: 1.92
After 7 rounds: transcript 2 abundance = 0.35, count: 2.06, transcript 1 abundance = 0.65, count: 1.94
After 8 rounds: transcript 2 abundance = 0.34, count: 2.04, transcript 1 abundance = 0.66, count: 1.96
After 9 rounds: transcript 2 abundance = 0.34, count: 2.03, transcript 1 abundance = 0.66, count: 1.97
After 10 rounds: transcript 2 abundance = 0.34, count: 2.02, transcript 1 abundance = 0.66, count: 1.98
After 11 rounds: transcript 2 abundance = 0.34, count: 2.01, transcript 1 abundance = 0.66, count: 1.99
After 12 rounds: transcript 2 abundance = 0.34, count: 2.01, transcript 1 abundance = 0.66, count: 1.99
After 13 rounds: transcript 2 abundance = 0.33, count: 2.01, transcript 1 abundance = 0.67, count: 1.99
After 14 rounds: transcript 2 abundance = 0.33, count: 2.00, transcript 1 abundance = 0.67, count: 2.00
After 15 rounds: transcript 2 abundance = 0.33, count: 2.00, transcript 1 abundance = 0.67, count: 2.00

Once the algorithm has converged, each non-uniquely mapping read is randomly assigned to one of the transcripts in its transcript set, with probabilities proportional to the abundances of these transcripts. The Total columns of the expression tracks reflect these assignments. The RPKM and TPM values are then calculated from the assigned counts, as described in Expression measures.