Genomicus / bedtools

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

closestBed unexpected (lack of) output when missing nearest feature #144

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
With test.gff,
#+BEGIN_EXAMPLE
  B   ALN mRNA    14388   19203   7708    +   .   ID=mRNA00003
  D   ALN mRNA    10097   14913   7273    +   .   ID=mRNA00007
#+END_EXAMPLE

and test-tags-0.gff,
#+BEGIN_EXAMPLE
  A   paraclu TSS_region  384 453 .   -   .   ID=B02S5189287_5;NAME=5
  A   paraclu TSS_region  13769   13834   .   -   .   ID=D02S5390004_29;NAME=29
#+END_EXAMPLE

and test-tags-1.gff,
#+BEGIN_EXAMPLE
  B   paraclu TSS_region  384 453 .   -   .   ID=B02S5189287_5
  D   paraclu TSS_region  13769   13834   .   -   .   ID=D02S5390004_29
#+END_EXAMPLE

I get output as I expect from
#+BEGIN_SRC sh
 closestBed -b test-tags-0.gff -a test.gff -s -d -D b -t first
#+END_SRC

#+RESULTS:
: B ALN mRNA    14388   19203   7708    +   .   ID=mRNA00003    .   .   .   -1  
-1  -1  .   .   .   -1
: D ALN mRNA    10097   14913   7273    +   .   ID=mRNA00007    .   .   .   -1  
-1  -1  .   .   .   -1

But I unexpectedly get nil-output from
#+BEGIN_SRC sh
 closestBed -b test-tags-1.gff -a test.gff -s -d -D b -t first
#+END_SRC

I would have expected identical output as in the first example since none of 
the candidate regions in 'b' gff qualify as they are on the wrong strand and I 
have -s.

Program: closestBed (v2.14.2)
> lsb_release -a
LSB Version:    
:core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia
32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch
Distributor ID: RedHatEnterpriseServer
Description:    Red Hat Enterprise Linux Server release 5.8 (Tikanga)
Release:        5.8
Codename:       Tikanga

Thanks a lot for help

Original issue reported on code.google.com by henning....@gmail.com on 21 Dec 2012 at 2:22

GoogleCodeExporter commented 9 years ago
Please try the latest version (2.17.0), as there have been several algorithmic 
changes to the 'closest' function.

Original comment by aaronqui...@gmail.com on 21 Dec 2012 at 2:28

GoogleCodeExporter commented 9 years ago

Original comment by aaronqui...@gmail.com on 26 Dec 2012 at 8:42

GoogleCodeExporter commented 9 years ago
Back from holiday, thanks for reply and sorry for the delay. I experience the 
same issue with 2.17.0

#+BEGIN_SRC sh
  bedtools closest -b test-tags-1.gff -a test.gff -s -d -D b -t first
#+END_SRC
gives nil-output

but 

#+BEGIN_SRC sh
  bedtools closest -b test-tags-0.gff -a test.gff -s -d -D b -t first
#+END_SRC

#+RESULTS: 
: B       ALN     mRNA    14388   19203   7708    +       .       ID=mRNA00003  
  .       .       .       -1      -1      -1      .       .       .       -1
: D       ALN     mRNA    10097   14913   7273    +       .       ID=mRNA00007  
  .       .       .       -1      -1      -1      .       .       .       -1

Original comment by henning....@gmail.com on 3 Jan 2013 at 9:15