Can't get bedtools intersect with split option to work with BED12 file with multiple blocks

297 views
Skip to first unread message

Saj Batra

unread,
Jan 13, 2017, 6:54:24 PM1/13/17
to bedtools-discuss
Hi All,
I expect the following intersection to produce no overlaps as the probe sequence does not overlap with any of the blocks. However I obtain 25 bases overlap. What am I doing wrong?
I'm using:
Tool: bedtools intersect (aka intersectBed)
Version: v2.26.0

Here are my input BED12 files:
cat toy_probe.bed
chr1 1000075 1000100 probe 1084 +1 1000075 1000075 255,0,0 1 25 0

cat toy_mrna.bed
chr1 1000000 1002000 mrna 1084 +1 1000000 1000000 255,0,0 5 40,400,160,200,300, 0,300,1000,1200,1700

/nfs/netaffx/tools/bedtools/bedtools2/bin/bedtools intersect -split -wao -a toy_probe.bed -b toy_mrna.bed
chr1 1000075 1000100 probe 1084 +1 1000075 1000075 255,0,0 1 25 0 chr1 1000000 1002000 mrna 1084 +1 1000000 1000000 255,0,0 5 40,400,160,200,300, 0,300,1000,1200,1700 25


Since probe only has 1 block, I've also tried running it with probe as a BED6 file as follows:
cat toy_probe2.bed
chr1 1000075 1000100 probe 1084 +1

/nfs/netaffx/tools/bedtools/bedtools2/bin/bedtools intersect -split -wao -a toy_probe2.bed -b toy_mrna.bed
chr1 1000075 1000100 probe 1084 +1 chr1 1000000 1002000 mrna 1084 +1 1000000 1000000 255,0,0 5 40,400,160,200,300, 0,300,1000,1200,1700 25

I'm also attaching a picture of the mrna, probe both aligned in the UCSC Genome Browser (HG38). The picture shows that there is no overlap between the mrna and probe.
Any ideas as to how to get this to not produce any overlap?

Thanks, Sajeev
Screen Shot 2017-01-13 at 12.20.44 PM.png

Saj Batra

unread,
Jan 18, 2017, 7:06:28 AM1/18/17
to bedtools-discuss
FYI -  I can now get the split option to work if I change the strand to "+"  (or "-" when necessary).  
However intersect seems to be ignoring strand information and I get overlaps for different strands.  
Anybody now how to fix that?  It seems like I need another filtering step?
Thanks

Aaron Quinlan

unread,
Jan 20, 2017, 6:07:54 PM1/20/17
to Saj Batra, bedtools...@googlegroups.com
Dear Sajeev,

If I understand correctly, the -s option will solve your issue.

Best,
Aaron
--
You received this message because you are subscribed to the Google Groups "bedtools-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bedtools-discu...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Saj Batra

unread,
Jan 22, 2017, 4:26:24 PM1/22/17
to Aaron Quinlan, bedtools...@googlegroups.com
Thanks Aaron, -s has solved my issue.
Cheers, Sajeev

To unsubscribe from this group and stop receiving emails from it, send an email to bedtools-discuss+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages