Hello,
Is anyone aware of a way to extract per base read depth/per base genome coverage directly from a SAM file without making use of applications such as bedtools or SAMtools?
As in, which columns in the SAM file contain the relevant information required to calculate per base read depth, and how would they be processed?
I have tried calculating read depth from POS and TLEN, but encountered negative mapping intervals for some reads at the start of chromosomes (e.g: POS = 10, TLEN = -150).
Any suggestions?
Kind Regards
It there anything wrong with SAMtools? SAMtools
depth
is exactly what you need.Hi, I haven't tried SAMtools, but have been using bedtools
genomecov
, which works for me. I am simply curious as to how these tools extract the relevant information from the BAM/SAM format, and if there is a straightforward formula that they use to do so.