mosdepth
mosdepth copied to clipboard
mosDepth vs plotCoverage
--Hi,
I encounter differences between the plotCoverage tool and mosdepth (see attachment) and i don't know why. I use the following commands:
plotCoverage --bamfiles SRR6823381.bam --BED Exome-Agilent.bed -p max -o coverage_plotCoverage.png mosdepth --by Exome-Agilent.bed SRR098401_mosdepth -x -t 24 SRR6823381.bam python scripts/plot-dist.py *.mosdepth.global.dist.txt
thanks
Mosdepth gives you the CDF (cumulative). It loosk like the other tools is giving you the PDF (point).
So the mosdepth plot tells you that about 50% of the genome is covered to at least 250X (go over to 250 and up to ~0.5)
The other plot is showing that that ~0.27% of the bases are covered at exactly 250X (over to 250, up to ~0.0027)
-- I think i used the wrong file, i should have taken the 'mosdepth.region.dist.txt' file: python scripts/plot-dist.py -o dist_region.html *.mosdepth.region.dist.txt now the result is closer to plotCoverage output (see attachment).
For computing WES coverage do you think i need to use the -n parameter or not ? last question: is it possible to modify the text of the legend on the graphs ?
thank you.
the -n option only determines if the per-base bed.gz output is written. it does not affect the other files.
you can modify the legend by editing the plot-dist.py script.
-- it seems to be in line 71 ($showlegend) but i don't know how to change this variable.