diff options
author | Pjotr Prins | 2017-08-26 10:00:18 +0000 |
---|---|---|
committer | Pjotr Prins | 2017-08-26 10:00:18 +0000 |
commit | be45bcca0ddc1d88066bd18a56ca57d588e41e99 (patch) | |
tree | b1b6865a2efde7baf2cbb9f66d438a0fb36aaeff /src/io.cpp | |
parent | ea21ba73273891261ba2e4d0d85729f308c54d72 (diff) | |
download | pangemma-be45bcca0ddc1d88066bd18a56ca57d588e41e99.tar.gz |
Debug: only output check on -debug
Diffstat (limited to 'src/io.cpp')
-rw-r--r-- | src/io.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -608,7 +608,7 @@ bool ReadFile_geno(const string &file_geno, const set<string> &setSnps, const double &r2_level, map<string, string> &mapRS2chr, map<string, long int> &mapRS2bp, map<string, double> &mapRS2cM, vector<SNPINFO> &snpInfo, - size_t &ns_test) { + size_t &ns_test, bool debug) { indicator_snp.clear(); snpInfo.clear(); @@ -679,10 +679,11 @@ bool ReadFile_geno(const string &file_geno, const set<string> &setSnps, } if (mapRS2bp.count(rs) == 0) { - std::string msg = "Can't figure out position for "; - msg += rs; - debug_msg(msg); - + if (debug) { + std::string msg = "Can't figure out position for "; + msg += rs; + debug_msg(msg); + } chr = "-9"; b_pos = -9; cM = -9; @@ -1633,7 +1634,7 @@ bool PlinkKin(const string &file_bed, vector<int> &indicator_snp, // genotype and calculate K. bool ReadFile_geno(const string file_geno, vector<int> &indicator_idv, vector<int> &indicator_snp, gsl_matrix *UtX, gsl_matrix *K, - const bool calc_K) { + const bool calc_K, bool debug) { igzstream infile(file_geno.c_str(), igzstream::in); if (!infile) { cout << "error reading genotype file:" << file_geno << endl; @@ -1737,7 +1738,7 @@ bool ReadFile_geno(const string &file_geno, vector<int> &indicator_idv, vector<int> &indicator_snp, vector<vector<unsigned char>> &Xt, gsl_matrix *K, const bool calc_K, const size_t ni_test, - const size_t ns_test) { + const size_t ns_test, bool debug) { igzstream infile(file_geno.c_str(), igzstream::in); if (!infile) { cout << "error reading genotype file:" << file_geno << endl; |