Hello,
I recently asked samtools on github this: https://github.com/samtools/samtools/issues/1662
I have whole exome sequences; I have aligned them to hg38. I want to work out the % coverage across the reference genome at the points that the bed file states were sequenced. I may be wrong but samtools coverage seems to provide these results in your example samtools coverage -r chr1:1M-12M input.bam
However, rather than just a part of the chromosome I would like to do this using the regions of the exome capture stated in the bed file.
I may be misunderstanding the use of samtools coverage, so apologies if that is the case. I have used samtools depth to work out the average depth but would like some sort of coverage across the parts of the whole exome regions to go alongside.
I was told that bedcov would be a good way to do this, so I've ran it and have an output file that looks something like this (ignore line gaps):
NC_000001.11 12080 12251 19722
NC_000001.11 12080 12251 19722
NC_000001.11 24260 24532 38887
I assume the second and third column are locations in the given capture. But I'm not sure what the final column is, does anyone have an idea?
Thanks! Amy
http://www.htslib.org/doc/samtools-bedcov.html
Thanks Pierre, and does that differ from samtools depth? Which 'computes the read depth at each position or region'? Sorry lots of tools seem similar, it can get confusing. Thanks!
samtools depth reports the depth per base. samtools bedcovs report the sum of depth per interval.