This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Covarage X not per base coverage. As a whole

Hello,

Before anyone marks this post as "duplicated" from this post.

This post and plotCoverage from deeptools, gives us the mean coverage ( or coverage) per base. Thus, if I want a coverage, like 100X, which is typically for WES, ( I am trying to replicate results that effectively give 100X) from a quality- filter with removed duplicates.

Also, I have tried to cover the exon regions from the primary assembly, however, these results give me ~ 17 Coverage.

How can I convert whis per base mean coverage, to give me 100X more or less ?

Furthermore, plotCoverage, plots a log-like distribution, however, the results I want to obtain follows a normal distribution, with a mean of 100X

It has to be mentioned that this plot is in percetange region.

enter image description here

bedtools plotcoverage samtools

1 answer

samtools depth -b capture.bed -a in.bam | awk '{N+=int($3);} END {print N/NR;} '

This answer it does not help. It is the same as the link I provided. The only thing It approaches to my answer is with bedtools:

bedtools coverage -hist -b 152611.qual.rmdup.bam -a exones.sort.bed -g hg19.genome -sorted -header >hist.txt

Similar as in here But in the link, they put the options -b as the captured.bed i.e the region of interest. However, on mu line, is the other way around, Furthemore, do you know why do they compute 1-cumsum ?

Log in to answer this question.