Intersect versus Count Overlapping Intervals
1
0
Entering edit mode
9.3 years ago

Hello All,

I am analyzing a CLIP-Seq, and I have been working with Bedtools for about 2 months now, so I am still a novice. I recently created a series of windows around splice junctions, and I wanted to know how many CLIP tags were in each window. I created a window 50 bp surrounding a splice junction (25 on each side), and I used two different tools to look at the number of tags in this region.

First I used "intersect: intersect clip-tags on window," and my output was a list of 7,267 chromosome coordinates that I presume represent clip-tag regions that intersected with the window.

I also tried bedtools intersect-count (and count overlapping intervals in Galaxy; they gave the same result): Count how many clip-tags overlap window," and my output said that 12,866 clip tags overlapped this region.

I don't understand why these numbers are not the same. I just want to know how many clip tags overlap this bin, and what the difference is between these tools.

Thank you for your help,

Courtney

Bedtools Galaxy • 3.2k views
ADD COMMENT
0
Entering edit mode
9.3 years ago

It sounds like there are 7,267 loci on your genome that intersects 12,866 tags. The two numbers aren't counting the same things. Multiple tags can intersect the same loci.

ADD COMMENT
0
Entering edit mode

That was my first thought too, but I don't think that is the problem. When I intersect, I tell the program to keep clip-tags that intersect the window, so my output is 7,267 clip-tags. I know it is the clip-tags because that file has other columns that the window file does not and the output matches the format of the clip-tags bed file.

When I use count, the output is the window coordinates, with a new column: the number of clip-tags that intersected the window.

That is why I'm confused. If count tells me that 12,866 tags overlap this window, but then when I intersect the clip-tags on the window and tell the computer to get rid of any clip-tags that are not in the window, it only gives me 7,267 clip tags. So why were the rest filtered out?

ADD REPLY

Login before adding your answer.

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