This is a test version of Biostars. For the public version, visit https://www.biostars.org.
depth calculation for targeted resequencing

hi I am new to NGS. In a targeted re sequencing experiment using molecular inversion probes. how can we calculate the Target coverage (depth in X). How is it different from exome depth calculations

sequencing depth of coverage

Thank you for reply. So if the output of depth calculations shows like this at each site (for 10 bases) 289,581,581,581,581,581,581,581,581, 581 is my depth of coverage for the interval = interval read depth/10 X, (in this case 551.8X) ?

Correct. BTW, samtools depth defaults to not printing positions with 0 coverage. I think there's a flag to get around that (-aa or something like that), but keep that in mind if you need to calculate a bunch of regions in an automated fashion.

Devon is right mentioning that, because if you're willing to get the average depth then you have to consider 0 coverage regions too. you may want to have a look to bedtools' genomecov to continue learning about extracting depth of coverage information, or to picard's CollectHsMetrics which calculates directly the mean target coverage.

2 answers

the concept depth of coverage, being the number of reads at each particular position of the genome, is independent of the experiment you run. if you have aligned reads in a bam file you can extract the depth of coverage or read depth in many different ways already discussed in Biostarts. my favourite one is samtools depth -b target.bed file.bam, as it's one of the fastest methods although it's limited to 8000x.

As an update you can use

To get the mean depth of coverage

bedtools coverage -a $bedfile-b $bamfile -mean > mean.bedgraph

output the per base read depth for each region in the BED file using bedtools

bedtools coverage -a $bedfile -b $bamfile -d > per.base.depth.bedgraph

calculate coverage at each position in a bed file using samtools depth

samtools depth -b $bedfile -aa $bamfile > $bamfile.depth.txt

Log in to answer this question.