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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue May 27 13:38:12 CEST 2014


Author: lckarssen
Date: 2014-05-27 13:38:11 +0200 (Tue, 27 May 2014)
New Revision: 1747

Modified:
   pkg/ProbABEL/doc/pacoxph.1
   pkg/ProbABEL/doc/palinear.1
   pkg/ProbABEL/doc/palogist.1
   pkg/ProbABEL/src/reg1.cpp
Log:
Improved the Doxygen documentation for the apply_model() function. Also improved the man pages w.r.t. the explanation of the options for interaction analysis.


Modified: pkg/ProbABEL/doc/pacoxph.1
===================================================================
--- pkg/ProbABEL/doc/pacoxph.1	2014-05-27 09:56:07 UTC (rev 1746)
+++ pkg/ProbABEL/doc/pacoxph.1	2014-05-27 11:38:11 UTC (rev 1747)
@@ -46,7 +46,7 @@
 .BI "\-g, \-\^\-ngpreds"  " NUMBER"
 How many predictor columns per marker (default 1 = MLDOSE; else use 2 for MLPROB).
 .TP
-.B "\-a, \-\^\-separat" " FILE"
+.BI "\-a, \-\^\-separat" " FILE"
 Character to separate fields (default is space).
 .TP
 .B \-r, \-\^\-score
@@ -58,19 +58,19 @@
 .B \-l \-\^\-allcov
 Report estimates for all covariates (large outputs!).
 .TP
-.B \-b, \-\^\-interaction
-Which covariate to use for interaction with SNP analysis (default is no interaction, 0).
+.BI "\-b, \-\^\-interaction" " NUMBER"
+Which covariate to use for interaction with SNP analysis (default is no interaction, 0). \fINUMBER\fR indicates the column number of the covariate.
 .TP
-.B \-k, \-\^\-interaction_only
+.BI "\-k, \-\^\-interaction_only" " NUMBER"
 Like
 .B \-\^\-interaction
-but without covariate acting in interaction with SNP (default is no interaction, 0).
+but excludes the covariate-only model term for the  covariate acting in interaction with the SNP (default is no interaction, 0).
 .TP
 .B \-\^\-help
 Print help.
 
 .SH "SEE ALSO"
-palinear(1), palogist(1)
+probabel(1), palinear(1), palogist(1)
 .SH BUGS
 The bugtracker is located at
 .br

Modified: pkg/ProbABEL/doc/palinear.1
===================================================================
--- pkg/ProbABEL/doc/palinear.1	2014-05-27 09:56:07 UTC (rev 1746)
+++ pkg/ProbABEL/doc/palinear.1	2014-05-27 11:38:11 UTC (rev 1747)
@@ -46,7 +46,7 @@
 .BI "\-g, \-\^\-ngpreds"  " NUMBER"
 How many predictor columns per marker (default 1 = MLDOSE; else use 2 for MLPROB).
 .TP
-.B "\-a, \-\^\-separat" " FILE"
+.BI "\-a, \-\^\-separat" " FILE"
 Character to separate fields (default is space).
 .TP
 .B \-r, \-\^\-score
@@ -58,13 +58,13 @@
 .B \-l \-\^\-allcov
 Report estimates for all covariates (large outputs!).
 .TP
-.B \-b, \-\^\-interaction
-Which covariate to use for interaction with SNP analysis (default is no interaction, 0).
+.BI "\-b, \-\^\-interaction" " NUMBER"
+Which covariate to use for interaction with SNP analysis (default is no interaction, 0). \fINUMBER\fR indicates the column number of the covariate.
 .TP
-.B \-k, \-\^\-interaction_only
+.BI "\-k, \-\^\-interaction_only" " NUMBER"
 Like
 .B \-\^\-interaction
-but without covariate acting in interaction with SNP (default is no interaction, 0).
+but excludes the covariate-only model term for the covariate acting in interaction with the SNP (default is no interaction, 0).
 .TP
 .BI "\-v, \-\^\-mmscore" " FILE"
 Score test in samples of related individuals. The FILE argument is the name of a file with the inverse of the variance-covariance matrix.

Modified: pkg/ProbABEL/doc/palogist.1
===================================================================
--- pkg/ProbABEL/doc/palogist.1	2014-05-27 09:56:07 UTC (rev 1746)
+++ pkg/ProbABEL/doc/palogist.1	2014-05-27 11:38:11 UTC (rev 1747)
@@ -46,7 +46,7 @@
 .BI "\-g, \-\^\-ngpreds"  " NUMBER"
 How many predictor columns per marker (default 1 = MLDOSE; else use 2 for MLPROB).
 .TP
-.B "\-a, \-\^\-separat" " FILE"
+.BI "\-a, \-\^\-separat" " FILE"
 Character to separate fields (default is space).
 .TP
 .B \-r, \-\^\-score
@@ -58,18 +58,18 @@
 .B \-l \-\^\-allcov
 Report estimates for all covariates (large outputs!).
 .TP
-.B \-b, \-\^\-interaction
-Which covariate to use for interaction with SNP analysis (default is no interaction, 0).
+.BI "\-b, \-\^\-interaction" " NUMBER"
+Which covariate to use for interaction with SNP analysis (default is no interaction, 0). \fINUMBER\fR indicates the column number of the covariate.
 .TP
-.B \-k, \-\^\-interaction_only
+.BI "\-k, \-\^\-interaction_only" " NUMBER"
 Like
 .B \-\^\-interaction
-but without covariate acting in interaction with SNP (default is no interaction, 0).
+but excludes the covariate-only model term for the covariate acting in interaction with the SNP (default is no interaction, 0).
 .TP
 .BI "\-v, \-\^\-mmscore" " FILE"
 Score test in samples of related individuals. The FILE argument is the name of a file with the inverse correlation matrix. NOTE THAT THIS FEATURE IS STILL EXPERIMENTAL!
 .TP
-.B \-\^\-robust
+.B \-u, \-\^\-robust
 Report robust (a.k.a. sandwich, a.k.a. Hubert-White) standard errors.
 .TP
 .B \-\^\-help

Modified: pkg/ProbABEL/src/reg1.cpp
===================================================================
--- pkg/ProbABEL/src/reg1.cpp	2014-05-27 09:56:07 UTC (rev 1746)
+++ pkg/ProbABEL/src/reg1.cpp	2014-05-27 11:38:11 UTC (rev 1747)
@@ -34,24 +34,36 @@
 
 
 /**
+ * \brief Apply the genetic model to the design matrix X before
+ * running the regression.
  *
+ * This also includes taking care of an interaction term if the user
+ * requested that.
  *
- * if ngpreds==1 (dose data):
+ * Depending on the number of genetic predictors (ngpreds) the integer
+ * coding for the models has a different meaning:
+ *
+ * If ngpreds==1 (dose data):
  * \li model 0 = additive (1 df)
  *
- * if ngpreds==2 (prob data):
+ * If ngpreds==2 (prob data):
  * \li model 0 = 2 df
  * \li model 1 = additive (1 df)
  * \li model 2 = dominant (1 df)
  * \li model 3 = recessive (1 df)
  * \li model 4 = over-dominant (1 df)
- * @param X Design matrix, including SNP column
- * @param model
- * @param interaction
- * @param ngpreds
- * @param is_interaction_excluded
- * @param iscox
- * @param nullmodel
+ * @param X Design matrix, including SNP column(s).
+ * @param model Integer describing the genetic model to be
+ * applied. See the list above.
+ * @param interaction Column number of the covariate used in the
+ * interaction term.
+ * @param ngpreds Number of genetic predictors (1 for dosage data, 2
+ * for probability data).
+ * @param is_interaction_excluded Indicates whether the main term for
+ * the covariate used in the interaction term should be excluded from
+ * the model.
+ * @param iscox Indicates whether a CoxPH regression is being done.
+ * @param nullmodel Indicates whether the null model is being analysed.
  *
  * @return Matrix with the model applied to it.
  */
@@ -75,6 +87,8 @@
     {
         if (interaction != 0)
         {
+            // The user requested analysis with an interaction term,
+            // so ngpreds columns need to be added to the X matrix.
             mematrix<double> nX;
             nX.reinit(X.nrow, X.ncol + ngpreds);
             int csnp_p1 = nX.ncol - 2 * ngpreds;
@@ -154,7 +168,8 @@
         } // End if (interaction !=0)
         else
         {
-            // interaction == 0
+            // No interaction analysis, no need to add/change columns
+            // to/in X.
             return (X);
         }
     } // End: if (model == 0)



More information about the Genabel-commits mailing list