Bedtools intersect A contains B and vise versa
1
0
Entering edit mode
8.7 years ago
Medhat 9.7k

Is there is any options when using

bedtools intersect -a A.bed -b B.bed

to detect if line in A contains line in B and vice verse "I do not know if -f could help me in this!!"

for example

A.bed

chr1 100 200
chr1 150 300

B.bed

chr1 110 150
chr1 180 350

the result shall be A contains B (assuming I am using -wb)

chr1 100 200 chr1 110 150
sequence bedtools • 2.5k views
ADD COMMENT
0
Entering edit mode

What is the expected output ?

ADD REPLY
0
Entering edit mode

the result shall be A contains B (assuming I am using -wb )

chr1 100 200 chr1 110 150

ADD REPLY
1
Entering edit mode
8.7 years ago
PoGibas 5.1k
# minimal overlap fraction
# bedtools intersect -f
bedtools intersect -b B.bed -a A.bed -wo -f 1​
chr1    110     150     
chr1    100     200     40
ADD COMMENT
0
Entering edit mode

Thanks but it does not work like that , I think the one that will work is,

-a b.bed -b a.bed -wo -f 1
chr1    110    150    
chr1    100    200    40
ADD REPLY

Login before adding your answer.

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