Bed_intersect -s empty output
2
0
Entering edit mode
9.4 years ago

Hi!,

I have problems with bedintersect.

I need to intersect two bed files like these:

A.bed

chr1    10568    10571    -    5
chr1    10568    10571    -    5
chr1    10568    10571    -    5
chr1    10568    10571    -    5
chr1    11804    11900    +    2
chr1    11804    11900    +    2
chr1    11804    11900    +    2
chr1    11804    11900    +    2
chr1    16720    16745    +    2
chr1    16720    16745    +    2

B.bed

chr1    11373    12727    NR_046018    DDX11L1    +    Ex1*
chr1    11873    12227    NR_046018    DDX11L1    +    Ex1
chr1    12112    13221    NR_046018    DDX11L1    +    Ex2*
chr1    12227    12612    NR_046018    DDX11L1    +    In
chr1    12612    12721    NR_046018    DDX11L1    +    Ex2
chr1    12720    14909    NR_046018    DDX11L1    +    Ex3Last*
chr1    12721    13220    NR_046018    DDX11L1    +    In

if I run this line:

intersectBed -a A.bed -b B.bed -s -c >out

it return an empty file; If I run:

intersectBed -a A.bed -b B.bed  -c >out

it return a file with the overlapping coordinates.

Any suggestions for this problem?

bedtools software-error • 2.2k views
ADD COMMENT
0
Entering edit mode
9.4 years ago

The strand is expected to be in the 6th column for BED format. Your first file violates that rule. Use awk or perl to add two dummy columns this placing the strand in the 6th column.

ADD COMMENT
0
Entering edit mode

I try this, but it does not work!

ADD REPLY
0
Entering edit mode

Can you show what your A.bed file looks like after you have corrected the file such that the strand is the 6th column?

ADD REPLY
0
Entering edit mode
9.4 years ago

I try this, but it does not work!

ADD COMMENT

Login before adding your answer.

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