From c6108ca62d7235a2c3dddd9b6d38f785fa44881f Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Sun, 17 Dec 2017 16:06:50 +0000 Subject: BimbamKin: show error when genotypes do not match --- src/io.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/io.cpp') diff --git a/src/io.cpp b/src/io.cpp index 5c48aa6..a125342 100644 --- a/src/io.cpp +++ b/src/io.cpp @@ -1396,7 +1396,12 @@ bool BimbamKin(const string file_geno, const set ksnps, uint token_num = 0; for (auto x = tokens; x != rend; x++) token_num++; - enforce_str(token_num == ni_total + 3, line + " count fields"); + if (token_num != ni_total) { + cerr << line << endl; + cerr << token_num << " != " << ni_total << endl; + warning_msg("Columns in geno file do not match # individuals"); + } + enforce_msg(token_num < ni_total + 3,"not enough genotype fields"); } auto snp = *tokens; // first field -- cgit v1.2.3