Count reads per allele handling overlapping reads
1
1
Entering edit mode
3.8 years ago

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

bam-readcount overlapping-reads PE data • 847 views
ADD COMMENT
1
Entering edit mode
3.8 years ago

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.

ADD COMMENT

Login before adding your answer.

Traffic: 2314 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6