[Genabel-commits] r1805 - pkg/ProbABEL/src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Aug 22 14:07:24 CEST 2014


Author: lckarssen
Date: 2014-08-22 14:07:24 +0200 (Fri, 22 Aug 2014)
New Revision: 1805

Modified:
   pkg/ProbABEL/src/phedata.cpp
Log:
Fixed some cppline warnings introduced in r1803. The warnings were all about code layout (see also GenABEL coding style guide as well as the one from Google).


Modified: pkg/ProbABEL/src/phedata.cpp
===================================================================
--- pkg/ProbABEL/src/phedata.cpp	2014-08-22 09:14:57 UTC (rev 1804)
+++ pkg/ProbABEL/src/phedata.cpp	2014-08-22 12:07:24 UTC (rev 1805)
@@ -148,11 +148,6 @@
     model_terms[n_model_terms++] = "mu";
 #endif
 
-
-
-
-
-
     if (nphenocols > noutcomes + 1)
     {
         infile >> tmp;
@@ -161,18 +156,22 @@
         for (int i = (2 + noutcomes); i < nphenocols; i++)
         {
             infile >> tmp;
-            std::cout << "nphenocols="<<nphenocols<<"\n";
-            std::cout<<"i="<<i<<", is_interaction_excluded="<<is_interaction_excluded<<", interaction="<<interaction<<", n_model_terms="<<n_model_terms<<"\n";
-            if(n_model_terms == interaction  && is_interaction_excluded)
+            std::cout << "nphenocols=" << nphenocols << "\n";
+            std::cout << "i=" << i
+                      << ", is_interaction_excluded="
+                      << is_interaction_excluded
+                      << ", interaction=" << interaction
+                      << ", n_model_terms=" << n_model_terms << "\n";
+            if (n_model_terms == interaction && is_interaction_excluded)
                {
-               strcpy(interaction_cov_name, tmp);
-               continue;
+                   strcpy(interaction_cov_name, tmp);
+                   continue;
                }
 
             model = model + " + ";
             model = model + tmp;
             model_terms[n_model_terms++] = tmp;
-            std::cout << "model="<<model<<"\n";
+            std::cout << "model=" << model << "\n";
         }
     }
     model = model + " + SNP_A1";
@@ -180,27 +179,31 @@
     {
         if (iscox)
         {
-           if(!is_interaction_excluded) model = model + " + " + model_terms[interaction - 1] + "*SNP_A1";
-           else model = model + " + " + interaction_cov_name + "*SNP_A1";
+           if (!is_interaction_excluded)
+           {
+               model = model + " + "
+                   + model_terms[interaction - 1]
+                   + "*SNP_A1";
+           }
+           else
+           {
+               model = model + " + " + interaction_cov_name + "*SNP_A1";
+           }
         }
         else
         {
-            if(!is_interaction_excluded) model = model + " + " + model_terms[interaction] + "*SNP_A1";
-            else model = model + " + " + interaction_cov_name + "*SNP_A1";
+            if (!is_interaction_excluded)
+            {
+                model = model + " + " + model_terms[interaction] + "*SNP_A1";
+            }
+            else
+            {
+                model = model + " + " + interaction_cov_name + "*SNP_A1";
+            }
         }
     }
     model_terms[n_model_terms++] = "SNP_A1";
 
-
-
-
-
-
-
-
-
-
-
 #if LOGISTIC
     std::cout << "Logistic ";
 #elif LINEAR



More information about the Genabel-commits mailing list