aboutsummaryrefslogtreecommitdiff
path: root/src/io.cpp
diff options
context:
space:
mode:
authorPjotr Prins2017-08-27 10:21:13 +0000
committerPjotr Prins2017-08-27 10:21:13 +0000
commit9b08127add884d8f9cf61b87b5c3706433e27dd6 (patch)
treef079e87219bc15b4e23dcc67e371918fb1f3a9c1 /src/io.cpp
parent3268896c20735ca9aa3c733c687ef6bbed760bcc (diff)
downloadpangemma-9b08127add884d8f9cf61b87b5c3706433e27dd6.tar.gz
-a
ReadFile_geno: stop warnings after 10x
Diffstat (limited to 'src/io.cpp')
-rw-r--r--src/io.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/io.cpp b/src/io.cpp
index 80adbe6..bfbfc15 100644
--- a/src/io.cpp
+++ b/src/io.cpp
@@ -659,6 +659,7 @@ bool ReadFile_geno(const string &file_geno, const set<string> &setSnps,
ns_test = 0;
file_pos = 0;
+ auto count_warnings = 0;
while (!safeGetline(infile, line).eof()) {
ch_ptr = strtok((char *)line.c_str(), " , \t");
rs = ch_ptr;
@@ -679,10 +680,12 @@ bool ReadFile_geno(const string &file_geno, const set<string> &setSnps,
}
if (mapRS2bp.count(rs) == 0) {
- if (debug) {
+ if (debug && count_warnings++ < 10) {
std::string msg = "Can't figure out position for ";
msg += rs;
debug_msg(msg);
+ if (count_warnings == 10)
+ debug_msg("Skipping similar warnings");
}
chr = "-9";
b_pos = -9;