arq5x / bedtools

A powerful toolset for genome arithmetic.
http://code.google.com/p/bedtools/
GNU General Public License v2.0
140 stars 85 forks source link

Blank BED files throw an error #88

Open jsilter opened 11 years ago

jsilter commented 11 years ago

bedtools apparently throws an error when trying to read empty files, and treats them as though they cannot be opened. When I try to intersect 2 blank files, this is the result:

Error: The requested bed file (blank.bed) could not be opened. Exiting!

I think it would be better to treat the file as containing no features. This has come up in IGV integration, where sometimes one of the temporary files being operated on is blank. The correct result would vary depending on the command so it's much harder to fix on the IGV end.

arq5x commented 11 years ago

Thanks Jacob,

I will look into this asap.

Aaron