Entering edit mode
9.9 years ago
GouthamAtla
12k
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.
It works after sorting both the files again. But I do not understand how the intersectBed is working without sorting.
The
intersect
tool has alternate, tree-based method for finding intersections without sorting. It is slower and requires more memory, however.That's interesting. Thanks.