rogerjms / bedtools

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

GFF features with length 1 cannot be intersected #122

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Create a GFF file with one record that has the start and end as the same 
number
2.Run bedtools intersect with -a and -b both as the same GFF file I created
3.bedtools reports no intersections

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

The GFF spec defines the start and end as:

(from http://genome.ucsc.edu/FAQ/FAQformat.html#format3)
start - The starting position of the feature in the sequence. The first base is 
numbered 1.
end - The ending position of the feature (inclusive)

The range for GFF format is defined as a closed interval, so representing a 
range of length 1 means the start and stop would have the same value. This is 
in contrast to the BED format, which uses half-open intervals.

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

BEDTools-Version-2.16.2, ArchLinux, Ubuntu Lucid

Please provide any additional information below.

It could be that the code is treating GFF file intervals as half-open instead 
of closed.

Original issue reported on code.google.com by bwbo...@lbl.gov on 30 May 2012 at 6:07

GoogleCodeExporter commented 9 years ago
This is strange, as this works fine for me.

{{{
$ cat test.gff
chr11   pseudogene  exon    86649   86649   .   -   .    gene_id "ENSG00000224777"; 
transcript_id "ENST00000424047"; exon_number "1"; gene_name "OR4F2P"; 
transcript_name "OR4F2P-001";

$ bedtools intersect -a test.gff -b test.gff 
chr11   pseudogene  exon    86649   86649   .   -   .    gene_id "ENSG00000224777"; 
transcript_id "ENST00000424047"; exon_number "1"; gene_name "OR4F2P"; 
transcript_name "OR4F2P-001";
}}}

Could you post the file you are using?

Original comment by aaronqui...@gmail.com on 31 May 2012 at 12:35

GoogleCodeExporter commented 9 years ago
Is this still an issue as I am unable to replicate it?  Closing - if you still 
have the issue, reopen it and post your file.

Thanks,
Aaron

Original comment by aaronqui...@gmail.com on 6 Jun 2012 at 11:36