aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPjotr Prins2017-12-17 16:06:50 +0000
committerPjotr Prins2017-12-17 16:06:50 +0000
commitc6108ca62d7235a2c3dddd9b6d38f785fa44881f (patch)
tree973f0ab683ce06a865bcbfeaf81474b51db26351
parent9eb514a5a0b548f645943646912f39ca14d71ed6 (diff)
downloadpangemma-c6108ca62d7235a2c3dddd9b6d38f785fa44881f.tar.gz
BimbamKin: show error when genotypes do not match
-rw-r--r--src/io.cpp7
1 files changed, 6 insertions, 1 deletions
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<string> 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