<p>The read length is irrelevant when calculating the mean coverage statistic. It's simply the <em>total number of bases sequenced</em> divided by the <em>target Xome length</em>.</p>

<p>In the example provided in the question, $L*N$ is equivalently expressed as $\sum^{N} l_x$, or the total length of sequenced reads. For equal-length reads, this is easier to calculate as <em>number of reads</em> $*$ <em>length of reads</em>, but the full sum is necessary if read lengths are not equal.</p>

<p>For what it's worth, this value, $L*N$, is also equivalent to the average read length multiplied by the number of reads, i.e.</p>

<p>$$\frac{\sum^{N} l_x}{N} * N$$</p>

<p>... which makes it a bit more obvious why the total length of sequenced bases is <em>very slightly</em> easier to calculate.</p>

<p>In answer to the second part of the question, $N$ should ideally correspond to only the sequences that are from the reference. For an assembly, only the reads that were used to create the assembly should count when considering coverage. When there's no likelihood of contamination (and especially for RNASeq with variable coverage per transcript), a statistic using the total number of reads should be good enough for most purposes that I can think of. High-throughput sequencing is such a fuzzy process that a few tens of millions of bases here or there shouldn't make a difference.</p>

CC BY-SA 3.0
2017-10-31T09:49:04.327Z
2017-10-31T10:06:54.310Z
2017-10-31T10:06:54.310Z
gringer
<p>Say your aim is to calculate the coverage of an RNA-seq experiment generated with long-read sequencing (so, uneven read length). </p>

<p>Up to now, I relied on the <a href="https://www.illumina.com/documents/products/technotes/technote_coverage_calculation.pdf" rel="nofollow noreferrer">Lander/Waterman equation</a>: </p>

<p><span class="math-container">$$C = L*N / G$$</span></p>

<p>where: </p>

<p><span class="math-container">$C$</span> = final coverage <br>
<span class="math-container">$G$</span> = haploid genome (or transcriptome) length<br>
<span class="math-container">$L$</span> = read length<br>
<span class="math-container">$N$</span> = number of reads<br></p>

<p>I have two major conceptual issues with this formula: </p>

<ul>
<li><span class="math-container">$L$</span> is uneven in this case. Should we use the median/mean read length instead? If so, side question: if the RNA-seq experiment was executed following the <a href="http://www.pacb.com/wp-content/uploads/Procedure-Checklist-Isoform-Sequencing-Iso-Seq-Analysis-using-the-Clontech-SMARTer-PCR-cDNA-Synthesis-Kit-and-SageELF-Size-Selection-System.pdf" rel="nofollow noreferrer">size-fractionated protocol</a> (PacBio), is it advisable to merge all the fractions prior to coverage calculation or should it be calculated separately for each fraction?</li>
<li>Should <span class="math-container">$N$</span> consist of the mapped reads to the reference or simply the number of reads as found in the subreads whole dataset?</li>
</ul>

<rna-seq><transcriptome><long-reads><pacbio><coverage>
Coverage calculation: long reads (RNA-seq)
# Coverage calculation: long reads (RNA-seq)

(Asked by: username_0 on 2017-10-31)

Say your aim is to calculate the coverage of an RNA-seq experiment generated with long-read sequencing (so, uneven read length).

Up to now, I relied on the [Lander/Waterman equation](https://www.illumina.com/documents/products/technotes/technote_coverage_calculation.pdf):

$$C = L\*N / G$$

where:

$C$ = final coverage   
$G$ = haploid genome (or transcriptome) length  
$L$ = read length  
$N$ = number of reads

I have two major conceptual issues with this formula:

* $L$ is uneven in this case. Should we use the median/mean read length instead? If so, side question: if the RNA-seq experiment was executed following the [size-fractionated protocol](http://www.pacb.com/wp-content/uploads/Procedure-Checklist-Isoform-Sequencing-Iso-Seq-Analysis-using-the-Clontech-SMARTer-PCR-cDNA-Synthesis-Kit-and-SageELF-Size-Selection-System.pdf) (PacBio), is it advisable to merge all the fractions prior to coverage calculation or should it be calculated separately for each fraction?
* Should $N$ consist of the mapped reads to the reference or simply the number of reads as found in the subreads whole dataset?

**Tags:** rna-seq, transcriptome, long-reads, pacbio, coverage

---

## 1 answers

### Answer by username_1 on 2017-10-31. Score: 6 | Accepted answer

The read length is irrelevant when calculating the mean coverage statistic. It's simply the *total number of bases sequenced* divided by the *target Xome length*.

In the example provided in the question, $L\*N$ is equivalently expressed as $\sum^{N} l\_x$, or the total length of sequenced reads. For equal-length reads, this is easier to calculate as *number of reads* $\*$ *length of reads*, but the full sum is necessary if read lengths are not equal.

For what it's worth, this value, $L\*N$, is also equivalent to the average read length multiplied by the number of reads, i.e.

$$\frac{\sum^{N} l\_x}{N} \* N$$

... which makes it a bit more obvious why the total length of sequenced bases is *very slightly* easier to calculate.

In answer to the second part of the question, $N$ should ideally correspond to only the sequences that are from the reference. For an assembly, only the reads that were used to create the assembly should count when considering coverage. When there's no likelihood of contamination (and especially for RNASeq with variable coverage per transcript), a statistic using the total number of reads should be good enough for most purposes that I can think of. High-throughput sequencing is such a fuzzy process that a few tens of millions of bases here or there shouldn't make a difference.


---

