Skip to content

Instantly share code, notes, and snippets.

View jpaulLD's full-sized avatar

Joshua Paul jpaulLD

  • Invitae
  • San Francisco, CA
View GitHub Profile
@jpaulLD
jpaulLD / empty_file.patch
Created November 9, 2012 22:14
bedtools patch to accomodate empty files
diff -rupN bedtools-master/src/utils/bedFile/bedFile.cpp bedtools-master-jp/src/utils/bedFile/bedFile.cpp
--- bedtools-master/src/utils/bedFile/bedFile.cpp 2012-11-05 03:48:10.000000000 -0800
+++ bedtools-master-jp/src/utils/bedFile/bedFile.cpp 2012-11-09 13:52:15.000000000 -0800
@@ -101,7 +101,7 @@ void BedFile::Open(void) {
delete _bedStream;
_bedStream = new igzstream(bedFile.c_str(), ios::in);
}
- if ( !(_bedStream->good()) ) {
+ if ( (_bedStream->bad()) ) {
cerr << "Error: The requested bed file ("