aboutsummaryrefslogtreecommitdiff
path: root/src/lmm.cpp
diff options
context:
space:
mode:
authorPjotr Prins2017-10-06 07:54:01 +0000
committerPjotr Prins2017-10-06 07:54:01 +0000
commitdf161be507ac0ad1d67a6528ebc664acec89fc9c (patch)
tree1ac1b8d216f024d8a0eac40d4a67f9f41e9ea86a /src/lmm.cpp
parent45aed16d2a5a39bb02beec8fde16d86185cd413f (diff)
downloadpangemma-df161be507ac0ad1d67a6528ebc664acec89fc9c.tar.gz
Oops: fixed logic problem after removing Oxford data
Diffstat (limited to 'src/lmm.cpp')
-rw-r--r--src/lmm.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/lmm.cpp b/src/lmm.cpp
index 50fb64c..db06fcd 100644
--- a/src/lmm.cpp
+++ b/src/lmm.cpp
@@ -1164,6 +1164,7 @@ void Calcab(const gsl_matrix *W, const gsl_vector *y, const gsl_vector *x,
void LMM::AnalyzeGene(const gsl_matrix *U, const gsl_vector *eval,
const gsl_matrix *UtW, const gsl_vector *Utx,
const gsl_matrix *W, const gsl_vector *x) {
+ debug_msg(file_gene);
igzstream infile(file_gene.c_str(), igzstream::in);
if (!infile) {
cout << "error reading gene expression file:" << file_gene << endl;
@@ -1272,7 +1273,7 @@ void LMM::AnalyzeBimbam(const gsl_matrix *U, const gsl_vector *eval,
const gsl_matrix *UtW, const gsl_vector *Uty,
const gsl_matrix *W, const gsl_vector *y,
const set<string> gwasnps) {
- debug_msg("entering");
+ debug_msg(file_geno);
clock_t time_start = clock();
// LOCO support
@@ -1369,6 +1370,8 @@ void LMM::AnalyzeBimbam(const gsl_matrix *U, const gsl_vector *eval,
continue;
char *ch_ptr = strtok((char *)line.c_str(), " , \t");
+ enforce_msg(ch_ptr, "Parsing BIMBAM genofile"); // just to be sure
+
auto snp = string(ch_ptr);
// check whether SNP is included in gwasnps (used by LOCO)
if (process_gwasnps && gwasnps.count(snp) == 0)
@@ -1436,8 +1439,8 @@ void LMM::AnalyzeBimbam(const gsl_matrix *U, const gsl_vector *eval,
void LMM::AnalyzePlink(const gsl_matrix *U, const gsl_vector *eval,
const gsl_matrix *UtW, const gsl_vector *Uty,
const gsl_matrix *W, const gsl_vector *y) {
- debug_msg("entering");
string file_bed = file_bfile + ".bed";
+ debug_msg(file_bed);
ifstream infile(file_bed.c_str(), ios::binary);
if (!infile) {
cout << "error reading bed file:" << file_bed << endl;
@@ -2109,8 +2112,8 @@ void LMM::AnalyzePlinkGXE(const gsl_matrix *U, const gsl_vector *eval,
const gsl_matrix *UtW, const gsl_vector *Uty,
const gsl_matrix *W, const gsl_vector *y,
const gsl_vector *env) {
- debug_msg("entering");
string file_bed = file_bfile + ".bed";
+ debug_msg(file_bed);
ifstream infile(file_bed.c_str(), ios::binary);
if (!infile) {
cout << "error reading bed file:" << file_bed << endl;