Hello!
I need counting amount of reads supporting each allele (i.e. A=1, T=0, C=1, G=200, N=0) at each desired position of a bam with PE data (paired-end NGS data).
The most similar tool which I have found for this task is bam-readcount which basically does what I want but it double counts overlapping reads (i.e. reads from small fragments were R1 and R2 overlap). Maybe a way to handle different base per read in overlapping reads would be counting 0.5 per base...
Does anybody know an alternative tool for this purpose?
Thanks in advance,
Pau
P.D: I would like to avoid merging overlapping reads before counting if possible
1 answer
I have found my own workaround. I post it in case it can be useful to someone.
Although it is not what I asked for, it's enough, or even better, in my case (since it also solves another question I posted few weeks ago). There's a very useful tool called fgbio with a particular a function called ClipBam that with the argument --clip-overlapping-reads clips approximately half the overlapping bases from each read. After clipping my bam, I can then use bam-readcount without worrying about the overlapping reads.
Log in to answer this question.