From b9bd9a86c9af3b6bc36b756b462b60bcbf512308 Mon Sep 17 00:00:00 2001
From: Aaron <aaronquinlan@gmail.com>
Date: Tue, 19 May 2009 09:15:46 -0400
Subject: [PATCH] Allowed empty lines in bedFile.cpp

---
 src/utils/bedFile/bedFile.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/utils/bedFile/bedFile.cpp b/src/utils/bedFile/bedFile.cpp
index 9bed68e0..663cacd0 100755
--- a/src/utils/bedFile/bedFile.cpp
+++ b/src/utils/bedFile/bedFile.cpp
@@ -299,12 +299,12 @@ bool BedFile::parseBedLine (BED &bed, const vector<string> &lineVector, const in
 		cerr << "Only one BED field detected: " << lineNum << ".  Verify that your files are TAB-delimited.  Exiting..." << endl;
 		exit(1);		
 	}
-	else if (lineVector.size() != this->bedType) {
+	else if ((lineVector.size() != this->bedType) && (lineVector.size() != 0)) {
 		cerr << "Differing number of BED fields encountered at line: " << lineNum << ".  Exiting..." << endl;
 		exit(1);
 	}
-	else if (lineVector.size() < 3) {
-		cerr << "TAB delimited BED file with at least 3 fields (chrom, start, end) is required.  Exiting..." << endl;
+	else if ((lineVector.size() < 3) && (lineVector.size() != 0)) {
+		cerr << "TAB delimited BED file with at least 3 fields (chrom, start, end) is required at line: "<< lineNum << ".  Exiting..." << endl;
 		exit(1);
 	}
 	return false;
-- 
GitLab