[Genabel-commits] r995 - branches/ProbABEL-refactoring/ProbABEL/src pkg/ProbABEL/src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Nov 1 21:46:32 CET 2012


Author: lckarssen
Date: 2012-11-01 21:46:32 +0100 (Thu, 01 Nov 2012)
New Revision: 995

Modified:
   branches/ProbABEL-refactoring/ProbABEL/src/gendata.cpp
   pkg/ProbABEL/src/data.h
Log:
ProbABEL: Improved error message (in both trunk and the refactoring branch) when data in the phenotype file and the dosage or probability file doesn't match. 



Modified: branches/ProbABEL-refactoring/ProbABEL/src/gendata.cpp
===================================================================
--- branches/ProbABEL-refactoring/ProbABEL/src/gendata.cpp	2012-10-29 21:14:17 UTC (rev 994)
+++ branches/ProbABEL-refactoring/ProbABEL/src/gendata.cpp	2012-11-01 20:46:32 UTC (rev 995)
@@ -137,10 +137,9 @@
 		}
 		if (tmpid != idnames[k])
 		{
-		    fprintf(stderr,
-			    "phenofile and dosefile did not match at line %d ",
-			    i + 2);
-		    cerr << "(" << tmpid << " != " << idnames[k] << ")\n";
+		    cerr << "phenotype file and dose or probability file "
+			 << "did not match at line " << i+2 << "(" << tmpid
+			 << " != " << idnames[k] << ")" << endl;
 		    infile.close();
 		    exit(1);
 		}

Modified: pkg/ProbABEL/src/data.h
===================================================================
--- pkg/ProbABEL/src/data.h	2012-10-29 21:14:17 UTC (rev 994)
+++ pkg/ProbABEL/src/data.h	2012-11-01 20:46:32 UTC (rev 995)
@@ -414,14 +414,16 @@
 		if (tmpstr.find("->") != string::npos) {
 		    sscanf(tmp,"%[^->]->%s", ttt, tmpn);
 		    tmpid = tmpn;
+		    // fprintf(stdout,"%s;%s;%s;%s;%s\n",tmp,ttt,tmpn,tmpid.c_str(),idnames[k].c_str());
 		} else {
 		    tmpid = tmpstr;
-		    //fprintf(stdout,"%s;%s;%s;%s;%s\n",tmp,ttt,tmpn,tmpid.c_str(),idnames[k].c_str());
+		    // fprintf(stdout,"%s;%s;%s;%s;%s\n",tmp,ttt,tmpn,tmpid.c_str(),idnames[k].c_str());
 		}
 		if (tmpid != idnames[k])
 		{
-		    fprintf(stderr,"phenofile and dosefile did not match at line %d ",i+2);
-		    cerr << "(" << tmpid << " != " << idnames[k] << ")\n";
+		    cerr << "phenotype file and dose or probability file "
+			 << "did not match at line " << i+2 << "(" << tmpid
+			 << " != " << idnames[k] << ")" << endl;
 		    infile.close();
 		    exit(1);
 		}



More information about the Genabel-commits mailing list