intersectBed: -s option not working while intersecting a bam file

34 views
Skip to first unread message

Amit Anand

unread,
Feb 27, 2012, 6:06:19 AM2/27/12
to bedtools-discuss
Hi Aaron,


I have just started using Bedtools.
I am having problem while using -s option in following conditions,

intersectBed -abam a.bam -b b.bed -s -bed -wb


In essence I want to intersect this bam file to get an output with
enforced strandedness and with original features of b.bed, in bed
format.

Please help me with this.

Thank you,

Amit

Aaron Quinlan

unread,
Feb 28, 2012, 9:30:42 AM2/28/12
to bedtools...@googlegroups.com
Hi Amit,

Please try the version in the repository [1], as it works for me:

bedtools intersect -abam HG00739.chr20.possrt.bam -b simrep.bed -s -bed -wb | head
22 16059465 16059496 SRR069529.42985603/1 15 + 16059451 16059552 0,0,0 1 101, 0, 22 16059465 16059496 trf 53 +
22 16059485 16059496 SRR069529.103215282/2 0 + 16059485 16059586 0,0,0 1 101, 0, 22 16059465 16059496 trf 53 +
22 16060479 16060493 SRR069529.112563411/1 46 + 16060392 16060493 0,0,0 1 101, 0, 22 16060479 16060524 trf 90 +
22 16060479 16060493 SRR069529.112563411/1 46 + 16060392 16060493 0,0,0 1 101, 0, 22 16060479 16060592 trf 120 +
22 16060490 16060524 SRR069529.105005265/2 60 + 16060490 16060593 0,0,0 1 103, 0, 22 16060479 16060524 trf 90 +
22 16060490 16060592 SRR069529.105005265/2 60 + 16060490 16060593 0,0,0 1 103, 0, 22 16060479 16060592 trf 120 +
22 16060517 16060593 SRR069529.105005265/2 60 + 16060490 16060593 0,0,0 1 103, 0, 22 16060517 16060609 trf 129 +
22 16060491 16060524 SRR069529.8032613/1 37 + 16060491 16060571 0,0,0 1 80, 0, 22 16060479 16060524 trf 90 +
22 16060491 16060571 SRR069529.8032613/1 37 + 16060491 16060571 0,0,0 1 80, 0, 22 16060479 16060592 trf 120 +
22 16060517 16060571 SRR069529.8032613/1 37 + 16060491 16060571 0,0,0 1 80, 0, 22 16060517 16060609 trf 129 +

[1] https://github.com/arq5x/bedtools

Best,
Aaron

Reply all
Reply to author
Forward
0 new messages