bedtools coverage double-counting
1
1
Entering edit mode
7.6 years ago
igor 13k

I am using bedtools coverage to calculate coverage at various regions, but I also want to know how many reads are overlapping any of the regions. Sometimes the regions are close, so the reads span more than one and those reads get counted twice. Is there any way to prevent that or maybe an alternate method that can do that?

bedtools • 2.0k views
ADD COMMENT
0
Entering edit mode

Have a look also at htseq-count, it has options to decide what to do with ambiguous overlaps. And also featureCounts (about which I have no experience though).

ADD REPLY
2
Entering edit mode
7.6 years ago

You could use bedtools intersect with the -c flag to report the number of overlaps for each read, then change any values >1 to 1 and sum (or filter out the reads with zero overlap and count the number of unfiltered reads).

ADD COMMENT
1
Entering edit mode

bedtools intersect -c seems a good strategy to first get reads overlapping one and only one feature (i.e. count = 1). Then you need covergeBed to actually count the (now unambiguous) reads in each feature.

ADD REPLY

Login before adding your answer.

Traffic: 1787 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