I've been dealing with comparison between two bed files using intersectBed -a -b
command.
I'm just wondering, is there any commands in Bedtools which can help us compare multiple bed files?
Say, I have 3 bed files (A,B,C). I want to identify those regions where any two of the three (AB,BC,AC)overlaps reciprocally 50%.....
thx
edit:
Just find this post right now.Maybe I didn't express quite well a couple of months ago.
I mean to find those overlappings which spans at least 50% of EACH of the multiple bed files.
So I don't quite understand cat AB BC AC > ABC.common
Means to find the overlapping part of all the three?
I myself try to solve the problem like below:
intersectBed -a 2 -b 3 > 23
intersectBed -a 1 -b 3 > 13
intersectBed -a 1 -b 2 > 12
intersectBed -a 1 -b 23 -f 0.50|sort > 23_1
intersectBed -a 2 -b 13 -f 0.50|sort > 13_2
intersectBed -a 3 -b 12 -f 0.50|sort > 12_3
comm -1 -2 23_1 13_2 > test
comm -1 -2 test 1_3 > final result
I don't know if I'm on the right track.
thx