[Genabel-commits] r1907 - in pkg/ProbABEL: doc src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Jan 4 23:07:48 CET 2015


Author: lckarssen
Date: 2015-01-04 23:07:47 +0100 (Sun, 04 Jan 2015)
New Revision: 1907

Modified:
   pkg/ProbABEL/doc/ChangeLog
   pkg/ProbABEL/src/phedata.cpp
Log:
Fix bug #6010 in ProbABEL: The model displayed by ProbABEL is wrong when the interaction_only option is used.

This is related (identical?) to bug #5883, which was fixed in r1803, but it seems the fix there was only partial.


Modified: pkg/ProbABEL/doc/ChangeLog
===================================================================
--- pkg/ProbABEL/doc/ChangeLog	2015-01-04 20:12:27 UTC (rev 1906)
+++ pkg/ProbABEL/doc/ChangeLog	2015-01-04 22:07:47 UTC (rev 1907)
@@ -11,9 +11,10 @@
 ** Overall runtime using above settings is 5
 * Handles multiple variants of NaN (NA,Na,Nan,na,nan) correct while reading of
   mldose/mlprob files
-* Fixed bug #5883: The main effect is displayed in the output with the
-  `interaction_only` option. Thanks to Maksim Struchalin for fixing it and
-  to Farid Radmanesh for reporting it.
+* Fixed bugs #5883 & #6010: The main effect is displayed in the output with the
+  `interaction_only` option. Thanks to Maksim Struchalin & Lennart Karssen for
+  fixing it and to Farid Radmanesh for reporting it. This was only a display
+  error, computations were not affected.
 * Fixed bug #5982: ProbABEL's make install fails on MacOS X and FreeBSD
   with sed error. Thanks to forum user mmold for reporting the bug.
 

Modified: pkg/ProbABEL/src/phedata.cpp
===================================================================
--- pkg/ProbABEL/src/phedata.cpp	2015-01-04 20:12:27 UTC (rev 1906)
+++ pkg/ProbABEL/src/phedata.cpp	2015-01-04 22:07:47 UTC (rev 1907)
@@ -53,9 +53,9 @@
  * @param npeople Number of people to use in the analysis. If set to
  * 0, then all individuals in the phenotype file will be used. If > 0
  * (i.e. set using the --nids command line option, see
- * cmdvars::set_variables()) only the first npeople will be use.
- * @param interaction Column specifying which phenotype is selected to
- * interact with the SNP (default: 0, i.e. no interaction)
+ * cmdvars::set_variables()) only the first npeople will be used.
+ * @param interaction Column specifying which phenotype/covariate is
+ * selected to interact with the SNP (default: 0, i.e. no interaction).
  * @param iscox Are we running a Cox PH regression?
  */
 void phedata::setphedata(const char * fname, const int noutc,
@@ -68,7 +68,6 @@
     char *tmp  = new char[BFS];
     std::string interaction_cov_name;
     noutcomes = noutc;
-    is_interaction_excluded = false;
 
     int nphenocols = 0;
     const int savenpeople = npeople;
@@ -143,16 +142,13 @@
 #if COXPH
     model = model + " ) ~ ";
 #else
-    model = model + " ) ~ mu + ";
+    model = model + " ) ~ mu";
     model_terms[n_model_terms++] = "mu";
 #endif
 
     if (nphenocols > noutcomes + 1)
     {
-        infile >> tmp;
-        model = model + tmp;
-        model_terms[n_model_terms++] = tmp;
-        for (int i = (2 + noutcomes); i < nphenocols; i++)
+        for (int i = (2 + noutcomes); i <= nphenocols; i++)
         {
             infile >> tmp;
             std::cout << "nphenocols=" << nphenocols << "\n";
@@ -164,6 +160,7 @@
             if (n_model_terms == interaction && is_interaction_excluded)
                {
                    interaction_cov_name = tmp;
+                   n_model_terms++;
                    continue;
                }
 



More information about the Genabel-commits mailing list