Answers.Body: <p>There are several questions in your post I'll try to answer each one:</p>
  
  <blockquote>
    <p>Is there any way to calculate how deep the sequencing is ?</p>
  </blockquote>
  
  <p>See gringer's <a href="https://bioinformatics.stackexchange.com/a/2727/48">answer</a>. TLDR: The depth of the sequencing is how many times each position has been sequenced. </p>
  
  <blockquote>
    <p>What should be the optimum depth to get reliable data ?</p>
  </blockquote>
  
  <p>The optimum depth depends on what you want to do with that data. Usually,  30X or 50X is done, but in targeted sequencing you can sequence a lot more reaching 1000X (which would be really deep).</p>
  
  <blockquote>
    <p>Is there any way to tell about my sequencing depth ?</p>
  </blockquote>
  
  <p>If you know the length of the region sequenced and how many bases you have in the reads, you can calculate the general sequencing depth.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-29T16:57:38.093Z
Answers.LastActivityDate: 2017-10-30T10:17:59.063Z
Answers.LastEditDate: 2017-10-30T10:17:59.063Z
Answers.UserDisplayName: llrs
Answers.Body: <p>Sequencing depth is typically calculated as the <em>number of total bases sequenced</em> divided by the <em>number of bases in the target genome</em>. An Illumina sequencing run with 2x125 bp reads and 500 million read pairs sequenced would be a sequencing depth of about 40X (assuming my calculations are correct for a 3 billion base genome).</p>
  
  <p>The sequencing depth depends on how long each read is, as well as whether it is a paired-end sequencing run. 80,000 read pairs with each having 125 bp would be a coverage of 2000X for a 10 kbp viral genome (assuming the sample were entirely composed of that virus).</p>
  
  <p>The optimum depth changes depending on the application. A genotyping-by-sequencing analysis, combined with imputation, could work well with 96 samples at a 1X coverage (or possibly less). On the other end of the scale, a cell-free DNA analysis to identify structural variation in metastasing cancer may need a few thousand times coverage of the host DNA. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-28T21:04:40.773Z
Answers.LastActivityDate: 2017-10-29T02:26:10.997Z
Answers.LastEditDate: 2017-10-29T02:26:10.997Z
Answers.UserDisplayName: gringer
Answers.Body: <p>I found <a href="http://www.metagenomics.wiki/pdf/definition/coverage-read-depth" rel="noreferrer">a post useful for this topic</a>.</p>
  
  <p>It explains the difference of coverage and depth.  It also has a useful explanation on how to calculate coverage and depth.</p>
  
  <p><a href="https://i.sstatic.net/hZqvF.png" rel="noreferrer"><img src="https://i.sstatic.net/hZqvF.png" alt="enter image description here"></a></p>
  
  <p>Here is a copy of what the link says just encase the post is removed:</p>
  
  <blockquote>
    <p><strong>Depth of coverage</strong></p>
    
    <p><em>How strong is a genome "covered" by sequenced fragments (short reads)?</em> </p>
    
    <p>Per-base coverage is the average number of times a base of a genome is
    sequenced. The coverage depth of a genome is calculated as the number
    of bases of all short reads that match a genome divided by the length
    of this genome. It is often expressed as 1X, 2X, 3X,... (1, 2, or, 3
    times coverage).</p>
    
    <p><strong>Breadth of coverage</strong></p>
    
    <p><em>How much of a genome is "covered" by short reads? Are there regions that are not covered, even not by a single read?</em> </p>
    
    <p>Breadth of coverage is the percentage of bases of a reference genome
    that are covered with a certain depth. For example: 90% of a genome is
    covered at 1X depth; and still 70% is covered at 5X depth.</p>
  </blockquote>
  
  <h1>SAMtools: get breadth of coverage</h1>
  
  <p>Get breadth of coverage of a reference genome. </p>
  
  <p>How many bases of my reference genome are covered by my short reads sample at a level of 5X or higher?</p>
  
  <pre><code> # set shell variables to your file-names
  
   REF_GENOME_FILE=my_ref_genome.fna
   WGS_SAMPLE=my_short_read_sample.fastq 
   MIN_COVERAGE_DEPTH=5
  </code></pre>
  
  <ol>
  <li><p>Map short reads against reference genome (bowtie2)</p>
  
  <pre><code># create bowtie2 index database (database name: refgenome)
  
  bowtie2-build ${REF_GENOME_FILE} refgenome
  ls
  refgenome.1.bt2
  refgenome.2.bt2
  refgenome.3.bt2
  refgenome.4.bt2
  refgenome.rev.1.bt2
  refgenome.rev.2.bt2
  
  
  # map reads and sort bam file
  bowtie2 -x refgenome --no-unal -U ${WGS_SAMPLE} -S - -p 12 | \
  samtools view -bS - | \
  samtools sort -m 5G - mapping_result_sorted.bam
  
  -U ${WGS_SAMPLE} consider all reads as unpaired reads
  -S -             bowtie output in SAM format, write to standard out
  -x refgenome     use reference genome bowtie2-database
  --no-unal        suppress SAM records for reads that failed to align
  -p 12            use 12 processors
  </code></pre></li>
  <li><p>Get breadth of coverage (SAMtools)</p>
  
  <pre><code># create samtools index
  samtools index mapping_result_sorted.bam
  
  # get total number of bases covered at MIN_COVERAGE_DEPTH or higher
  samtools mpileup mapping_result_sorted.bam | awk -v 
  X="${MIN_COVERAGE_DEPTH}" '$4&gt;=X' | wc -l
  32876
  
  # get length of reference genome
  bowtie2-inspect -s refgenome | awk '{ FS = "\t" } ; BEGIN{L=0}; {L=L+$3}; 
  END{print L}'
  45678
  </code></pre></li>
  </ol>
  
  <p>Result: breadth of reference genome coverage
  total number of covered bases: 32876  (with >= 5X coverage depth)
  Depth of coverage (average per-base coverage): 0.719 X (32876 ÷ 45678) (total number of covered bases divided by reference genome length)
  percent: 71.9%  (0.719 × 100) (coverage breadth in percent)</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-31T07:39:42.387Z
Answers.Text: Nice picture! Could you include the relevant parts of the linked page in the answer to make the answer self sustained (and avoid having to go one link further).
Answers.UserDisplayName: llrs
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-01T03:30:27.897Z
Answers.Text: Thanks for the answer Samantha. This exactly answers my question.
Answers.UserDisplayName: LoveVirology
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-30T19:19:01.320Z
Answers.LastActivityDate: 2017-11-01T17:28:45.277Z
Answers.LastEditDate: 2017-11-01T17:28:45.277Z
Answers.UserDisplayName: Samantha
Body: <p>People talk about deep sequencing. Is there any way to calculate how deep the sequencing is ? What should be the optimum depth to get reliable data ?</p>
  
  <p>I am doing whole genome sequencing of a virus genome which is 10 kb long. I got 80000 reads from Illumina sequencing. Is there any way to tell about my sequencing depth ? </p>
  
Tags: <ngs><covid-19><sars-cov-2>
Title: What is deep sequencing?
ThreadText: # What is deep sequencing?
  
  (Asked by: username_0 on 2017-10-28)
  
  People talk about deep sequencing. Is there any way to calculate how deep the sequencing is ? What should be the optimum depth to get reliable data ?
  
  I am doing whole genome sequencing of a virus genome which is 10 kb long. I got 80000 reads from Illumina sequencing. Is there any way to tell about my sequencing depth ?
  
  **Tags:** ngs, covid-19, sars-cov-2
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_3 on 2017-10-30. Score: 11 | Accepted answer
  
  I found [a post useful for this topic](http://www.metagenomics.wiki/pdf/definition/coverage-read-depth).
  
  It explains the difference of coverage and depth. It also has a useful explanation on how to calculate coverage and depth.
  
  [![enter image description here](https://i.sstatic.net/hZqvF.png)](https://i.sstatic.net/hZqvF.png)
  
  Here is a copy of what the link says just encase the post is removed:
  
  > **Depth of coverage**
  >
  > *How strong is a genome "covered" by sequenced fragments (short reads)?*
  >
  > Per-base coverage is the average number of times a base of a genome is
  > sequenced. The coverage depth of a genome is calculated as the number
  > of bases of all short reads that match a genome divided by the length
  > of this genome. It is often expressed as 1X, 2X, 3X,... (1, 2, or, 3
  > times coverage).
  >
  > **Breadth of coverage**
  >
  > *How much of a genome is "covered" by short reads? Are there regions that are not covered, even not by a single read?*
  >
  > Breadth of coverage is the percentage of bases of a reference genome
  > that are covered with a certain depth. For example: 90% of a genome is
  > covered at 1X depth; and still 70% is covered at 5X depth.
  
  # SAMtools: get breadth of coverage
  
  Get breadth of coverage of a reference genome.
  
  How many bases of my reference genome are covered by my short reads sample at a level of 5X or higher?
  
  ```
   # set shell variables to your file-names
  
   REF_GENOME_FILE=my_ref_genome.fna
   WGS_SAMPLE=my_short_read_sample.fastq 
   MIN_COVERAGE_DEPTH=5
  
  ```
  
  1. Map short reads against reference genome (bowtie2)
  
     ```
     # create bowtie2 index database (database name: refgenome)
  
     bowtie2-build ${REF_GENOME_FILE} refgenome
     ls
     refgenome.1.bt2
     refgenome.2.bt2
     refgenome.3.bt2
     refgenome.4.bt2
     refgenome.rev.1.bt2
     refgenome.rev.2.bt2
  
     # map reads and sort bam file
     bowtie2 -x refgenome --no-unal -U ${WGS_SAMPLE} -S - -p 12 | \
     samtools view -bS - | \
     samtools sort -m 5G - mapping_result_sorted.bam
  
     -U ${WGS_SAMPLE} consider all reads as unpaired reads
     -S -             bowtie output in SAM format, write to standard out
     -x refgenome     use reference genome bowtie2-database
     --no-unal        suppress SAM records for reads that failed to align
     -p 12            use 12 processors
  
     ```
  2. Get breadth of coverage (SAMtools)
  
     ```
     # create samtools index
     samtools index mapping_result_sorted.bam
  
     # get total number of bases covered at MIN_COVERAGE_DEPTH or higher
     samtools mpileup mapping_result_sorted.bam | awk -v 
     X="${MIN_COVERAGE_DEPTH}" '$4>=X' | wc -l
     32876
  
     # get length of reference genome
     bowtie2-inspect -s refgenome | awk '{ FS = "\t" } ; BEGIN{L=0}; {L=L+$3}; 
     END{print L}'
     45678
  
     ```
  
  Result: breadth of reference genome coverage
  total number of covered bases: 32876 (with >= 5X coverage depth)
  Depth of coverage (average per-base coverage): 0.719 X (32876 ÷ 45678) (total number of covered bases divided by reference genome length)
  percent: 71.9% (0.719 × 100) (coverage breadth in percent)
  
  > **Comments:**
  > **username_1**: Nice picture! Could you include the relevant parts of the linked page in the answer to make the answer self sustained (and avoid having to go one link further).  
  > **username_0**: Thanks for the answer username_3. This exactly answers my question.  
  
  ---
  
  ### Answer by username_1 on 2017-10-29. Score: 9
  
  There are several questions in your post I'll try to answer each one:
  
  > Is there any way to calculate how deep the sequencing is ?
  
  See username_2's [answer](https://bioinformatics.stackexchange.com/a/2727/48). TLDR: The depth of the sequencing is how many times each position has been sequenced.
  
  > What should be the optimum depth to get reliable data ?
  
  The optimum depth depends on what you want to do with that data. Usually, 30X or 50X is done, but in targeted sequencing you can sequence a lot more reaching 1000X (which would be really deep).
  
  > Is there any way to tell about my sequencing depth ?
  
  If you know the length of the region sequenced and how many bases you have in the reads, you can calculate the general sequencing depth.
  
  
  ---
  
  ### Answer by username_2 on 2017-10-28. Score: 8
  
  Sequencing depth is typically calculated as the *number of total bases sequenced* divided by the *number of bases in the target genome*. An Illumina sequencing run with 2x125 bp reads and 500 million read pairs sequenced would be a sequencing depth of about 40X (assuming my calculations are correct for a 3 billion base genome).
  
  The sequencing depth depends on how long each read is, as well as whether it is a paired-end sequencing run. 80,000 read pairs with each having 125 bp would be a coverage of 2000X for a 10 kbp viral genome (assuming the sample were entirely composed of that virus).
  
  The optimum depth changes depending on the application. A genotyping-by-sequencing analysis, combined with imputation, could work well with 96 samples at a 1X coverage (or possibly less). On the other end of the scale, a cell-free DNA analysis to identify structural variation in metastasing cancer may need a few thousand times coverage of the host DNA.
  
  
  ---
  
  