This is a test version of Biostars. For the public version, visit https://www.biostars.org.
getting base count (coverage) based on BAM file with strand information

Hi all,

I want to know if there is an convenient way to get the base count from a BAM file with strand information,

for example, on chr1:1-1, the depth of coverage is 1000, from IGV we could know the site is heterozygous, and the depth for each allele is A: 250(+), 250(-), C: 250(+), 250(-), from which we could know the site is definitely a heterozygous variant without any strand bias or allele drop off.

Best

bam strand

in IGV you can color the reads by strand. For your purpose, is not this enough?

1 answer

you could use my tool sam2tsv : https://github.com/lindenb/jvarkit/wiki/SAM2Tsv#output , use awk+bit-operation to extract the strand from the flag column, cut columns, 'sort|uniq -c'

Log in to answer this question.