bedtools intersect by position & stand not working even with common regions
0
0
Entering edit mode
14 months ago
Alewa ▴ 170

i want to extract only sites (strand aware) that appear in both D-A-3_modpileup_5mC.chr1.bed and consensus_HighQual_motif_sites.bed but it's not working even though they have overlapping sites.

bedtools intersect -a D-A-3_modpileup_5mC.chr1.bed -b consensus_HighQual_motif_sites.bed -s

Here's common site with same strand

$ cat consensus_HighQual_motif_sites.bed | grep "3003225"
chr1    3003225 3003226 +

$ cat D-A-3_modpileup_5mC.chr1.bed | grep "3003226"
chr1    3003225 3003226 +       m       12      25.00   3       9       0       0       0       01
chr1    3003226 3003227 -       m       13      38.46   5       8       0       2       1       00
chr1    63003225        63003226        -       m       19      52.63   10      9       0       001       2
chr1    193003225       193003226       -       m       11      0.00    0       11      0       000       0

it's a bed file

cat -t consensus_HighQual_motif_sites.bed | head
chr1^I3003225^I3003226^I+
chr1^I3003226^I3003227^I-
chr1^I3003338^I3003339^I+
chr1^I3003339^I3003340^I-
chr1^I3003378^I3003379^I+
chr1^I3003379^I3003380^I-
chr1^I3003581^I3003582^I+
chr1^I3003582^I3003583^I-
chr1^I3003639^I3003640^I+
chr1^I3003640^I3003641^I-
bedtools genomic intersect bedops intervals • 720 views
ADD COMMENT
1
Entering edit mode

are you sure bedtools can handle the non-standard location of strand information?

ADD REPLY
1
Entering edit mode

thanks for hint!

ADD REPLY

Login before adding your answer.

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