Dfference between intersectBed and multiIntersectBed
1
0
Entering edit mode
9.3 years ago

When I compare the two bed files using intersectBed and multiIntersectBEd, I see different results like:

multiIntersectBed -i R1_merge.bg R2_merge.bg | grep "gi|589289284|ref|NW_006711693.1|"

gi|589289284|ref|NW_006711693.1|    43585    43665    1    1    1    0
gi|589289284|ref|NW_006711693.1|    43585    43665    1    2    0    1
intersectBed -a R1_merge.bg -b R2_merge.bg | grep "gi|589289284|ref|NW_006711693.1|"

gi|589289284|ref|NW_006711693.1|    43585    43665

From multiIntersectBed, I am expecting something like:

gi|589289284|ref|NW_006711693.1|    43585    43665    2    1,2    1    1

Though the coordinates are the same, I do not understand why multiIntersectBed showing them in two separate lines ? I could not figure out the problem here.

genome bedtools • 2.9k views
ADD COMMENT
0
Entering edit mode

It works after sorting both the files again. But I do not understand how the intersectBed is working without sorting.

ADD REPLY
0
Entering edit mode

The intersect tool has alternate, tree-based method for finding intersections without sorting. It is slower and requires more memory, however.

ADD REPLY
0
Entering edit mode

That's interesting. Thanks.

ADD REPLY
1
Entering edit mode
9.1 years ago

Not to leave it as an open question, I'm answering it.

Intersectbed can also work without sorting the bed file. But multiintersectBed requires sorted bed file.

ADD COMMENT

Login before adding your answer.

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