diff options
author | Pjotr Prins | 2017-08-27 10:21:13 +0000 |
---|---|---|
committer | Pjotr Prins | 2017-08-27 10:21:13 +0000 |
commit | 9b08127add884d8f9cf61b87b5c3706433e27dd6 (patch) | |
tree | f079e87219bc15b4e23dcc67e371918fb1f3a9c1 /src/io.cpp | |
parent | 3268896c20735ca9aa3c733c687ef6bbed760bcc (diff) | |
download | pangemma-9b08127add884d8f9cf61b87b5c3706433e27dd6.tar.gz |
-a
ReadFile_geno: stop warnings after 10x
Diffstat (limited to 'src/io.cpp')
-rw-r--r-- | src/io.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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; |