rogerjms / bedtools

Automatically exported from code.google.com/p/bedtools
0 stars 0 forks source link

intersectBed -wb option prints a & b instead of just b #91

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

>ls
one.bed  two.bed

>cat one.bed 
chr1    100 200

>cat two.bed 
chr1    100 150
chr1    200 300

>intersectBed -wa -a one.bed -b two.bed 
chr1    100 200

> intersectBed -wb -a one.bed -b two.bed 
chr1    100 150 chr1    100 150

What is the expected output? What do you see instead?

Expected output: just b lines
Actual output: a lines, b lines

What version of the product are you using? On what operating system?

intersectBed (v2.13.1)

uname -a

Linux dave-Latitude-E6520 2.6.38-11-generic #50-Ubuntu SMP Mon Sep 12 21:17:25 
UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

Please provide any additional information below.

intersectBed help lists options as:

    -wa Write the original entry in A for each overlap.

    -wb Write the original entry in B for each overlap.

Ie there is no mention that A/B should behave differently.

Original issue reported on code.google.com by davm...@gmail.com on 6 Oct 2011 at 3:36

GoogleCodeExporter commented 9 years ago
Thanks.  This is a documentation issue, not a bug.  The intent for -wb is, in 
addition to reporting the overlapping interval in A (i.e., not the original A 
feature as -wa does), it will report the original, complete B feature.  I 
believe the manual illustrates this, but the command line help is vague. 

Original comment by aaronqui...@gmail.com on 6 Oct 2011 at 4:34

GoogleCodeExporter commented 9 years ago
For me, the most intuitive way would be:

    -wa Write the original entry in A for each overlap.

    -wb Write the original entry in B for each overlap.

    -wab    Write both (current behavior of -wb)

Original comment by davm...@gmail.com on 7 Oct 2011 at 3:52

GoogleCodeExporter commented 9 years ago

Original comment by aaronqui...@gmail.com on 29 Nov 2011 at 1:16