From 12fc63b3e6bf8cbb8b4cdd661bfa4378035aa1bb Mon Sep 17 00:00:00 2001 From: Aaron <aaronquinlan@gmail.com> Date: Thu, 1 Sep 2011 07:17:09 -0400 Subject: [PATCH] Gzip detected by file extension. Weak, but only approach that works at this point. --- src/utils/bedFile/bedFile.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/utils/bedFile/bedFile.cpp b/src/utils/bedFile/bedFile.cpp index f296b429..9faaffa5 100644 --- a/src/utils/bedFile/bedFile.cpp +++ b/src/utils/bedFile/bedFile.cpp @@ -135,12 +135,11 @@ void BedFile::Open(void) { else { _bedStream = new ifstream(bedFile.c_str(), ios::in); - if (isGzipFile(_bedStream) == true) { + //if (isGzipFile(_bedStream) == true) { + if(bedFile.substr(bedFile.find_last_of(".") + 1) == "gz") { delete _bedStream; _bedStream = new igzstream(bedFile.c_str(), ios::in); } - // bytes were consumed. rewind. - _bedStream->seekg(0); // can we open the file? if ( !(_bedStream->good()) ) { -- GitLab