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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Dec 29 15:01:35 CET 2014


Author: lckarssen
Date: 2014-12-29 15:01:35 +0100 (Mon, 29 Dec 2014)
New Revision: 1901

Modified:
   pkg/ProbABEL/configure.ac
   pkg/ProbABEL/doc/ChangeLog
   pkg/ProbABEL/doc/ProbABEL_manual.tex
   pkg/ProbABEL/doc/pacoxph.1
   pkg/ProbABEL/doc/palinear.1
   pkg/ProbABEL/doc/palogist.1
   pkg/ProbABEL/doc/probabel.1
   pkg/ProbABEL/src/coxph_data.cpp
Log:
Merge the fix to the Cox PH module implemented in ProbABEL v0.4.4 into ProbABEL trunk.

This was done using the following command in the trunk directory:
   svn merge -r 1738:1900 svn+ssh://lckarssen@svn.r-forge.r-project.org/svnroot/genabel/branches/ProbABEL-v0.4.3-coxfix/ProbABEL

After that conflicts were resolved manually.



Modified: pkg/ProbABEL/configure.ac
===================================================================
--- pkg/ProbABEL/configure.ac	2014-12-22 16:14:33 UTC (rev 1900)
+++ pkg/ProbABEL/configure.ac	2014-12-29 14:01:35 UTC (rev 1901)
@@ -1,7 +1,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ([2.67])
-AC_INIT(ProbABEL, 0.4.3, genabel-devel at r-forge.wu-wien.ac.at)
+AC_INIT(ProbABEL, 0.4.4, genabel-devel at r-forge.wu-wien.ac.at)
 AM_INIT_AUTOMAKE([silent-rules subdir-objects])
 AM_SILENT_RULES([yes])
 AC_CONFIG_SRCDIR([src/mlinfo.h])

Modified: pkg/ProbABEL/doc/ChangeLog
===================================================================
--- pkg/ProbABEL/doc/ChangeLog	2014-12-22 16:14:33 UTC (rev 1900)
+++ pkg/ProbABEL/doc/ChangeLog	2014-12-29 14:01:35 UTC (rev 1901)
@@ -18,6 +18,17 @@
   with sed error. Thanks to forum user mmold for reporting the bug.
 
 
+***** v.0.4.4 (2014.11.07)
+* Fixed bug #5729 in the Cox PH module. Some checks for problems with the
+  regression were incorrectly implemented. Thanks to Matthias Wuttke from
+  the University Medical Centre Freiburg, Anne Grotenhuis from the Radboud
+  Medical Centre Nijmegen, and Luba Pardo and Joris Verkouteren from the
+  Erasmus Medical Centre Rotterdam for their time and effort in reporting
+  the bug, helping to identify the problem and testing the fix.
+* Backported fix of bug #5982: ProbABEL's make install fails on MacOS X
+  and FreeBSD with sed error. Thanks to forum user mmold for reporting the bug.
+
+
 ***** v.0.4.3 (2014.04.01)
 * Speed-up of a factor of ~ 2 for linear, logistic and Cox regression when
   using filevector input files.

Modified: pkg/ProbABEL/doc/ProbABEL_manual.tex
===================================================================
--- pkg/ProbABEL/doc/ProbABEL_manual.tex	2014-12-22 16:14:33 UTC (rev 1900)
+++ pkg/ProbABEL/doc/ProbABEL_manual.tex	2014-12-29 14:01:35 UTC (rev 1901)
@@ -1,6 +1,6 @@
 \documentclass[12pt,a4paper]{article}
 
-\title{Manual for ProbABEL v0.4.3}
+\title{Manual for ProbABEL v0.4.4}
 \author{\emph{Current Programmers:} Lennart Karssen$^{1,2}$, Maarten
   Kooyman$^2$, \\
   Yurii Aulchenko$^{1,3}$ \\
@@ -11,7 +11,7 @@
   $^{2}${\small Erasmus MC, Rotterdam}\\
   $^{3}${\small Institute of Cytology and Genetics SD RAS, Novosibirsk}
 }
-\date{April 1, 2014}
+\date{November 7, 2014}
 
 
 \usepackage[utf8]{inputenc}
@@ -461,7 +461,7 @@
 short explanation to the command line options:
 \begin{verbatim}
 user at server:~$ palogist --help
-probabel v. 0.4.3
+probabel v. 0.4.4
 (C) Yurii Aulchenko, Lennart C. Karssen, Maksim Struchalin, EMCR
 
 Using EIGEN version 3.1.2 for matrix operations
@@ -1026,7 +1026,7 @@
 \end{quote}
 A proper reference may look like
 \begin{quote}
-For the analysis of imputed data, we used \PA{} v.0.4.3
+For the analysis of imputed data, we used \PA{} v.0.4.4
 from the \texttt{GenABEL} suite of programs (Aulchenko \emph{et al.}, 2010).
 \end{quote}
 

Modified: pkg/ProbABEL/doc/pacoxph.1
===================================================================
--- pkg/ProbABEL/doc/pacoxph.1	2014-12-22 16:14:33 UTC (rev 1900)
+++ pkg/ProbABEL/doc/pacoxph.1	2014-12-29 14:01:35 UTC (rev 1901)
@@ -1,4 +1,4 @@
-.TH pacoxph 1 "01 April 2014" "ProbABEL 0.4.3"
+.TH pacoxph 1 "7 November 2014" "ProbABEL 0.4.4"
 .SH NAME
 pacoxph \- Perform Genome-Wide Association Analysis using a linear model
 .SH SYNOPSIS

Modified: pkg/ProbABEL/doc/palinear.1
===================================================================
--- pkg/ProbABEL/doc/palinear.1	2014-12-22 16:14:33 UTC (rev 1900)
+++ pkg/ProbABEL/doc/palinear.1	2014-12-29 14:01:35 UTC (rev 1901)
@@ -1,4 +1,4 @@
-.TH palinear 1 "01 April 2014" "ProbABEL 0.4.3"
+.TH palinear 1 "7 November 2014" "ProbABEL 0.4.4"
 .SH NAME
 palinear \- Perform Genome-Wide Association Analysis using a linear model
 .SH SYNOPSIS

Modified: pkg/ProbABEL/doc/palogist.1
===================================================================
--- pkg/ProbABEL/doc/palogist.1	2014-12-22 16:14:33 UTC (rev 1900)
+++ pkg/ProbABEL/doc/palogist.1	2014-12-29 14:01:35 UTC (rev 1901)
@@ -1,4 +1,4 @@
-.TH palogist 1 "01 April 2014" "ProbABEL 0.4.3"
+.TH palogist 1 "7 November 2014" "ProbABEL 0.4.4"
 .SH NAME
 palogist \- Perform Genome-Wide Association Analysis using a linear model
 .SH SYNOPSIS

Modified: pkg/ProbABEL/doc/probabel.1
===================================================================
--- pkg/ProbABEL/doc/probabel.1	2014-12-22 16:14:33 UTC (rev 1900)
+++ pkg/ProbABEL/doc/probabel.1	2014-12-29 14:01:35 UTC (rev 1901)
@@ -1,4 +1,4 @@
-.TH ProbABEL 1 "01 April 2014" "ProbABEL 0.4.3"
+.TH ProbABEL 1 "7 November 2014" "ProbABEL 0.4.4"
 .SH NAME
 probabel \- Wrapper around the three ProbABEL binaries, simplifying their use
 .SH SYNOPSIS

Modified: pkg/ProbABEL/src/coxph_data.cpp
===================================================================
--- pkg/ProbABEL/src/coxph_data.cpp	2014-12-22 16:14:33 UTC (rev 1900)
+++ pkg/ProbABEL/src/coxph_data.cpp	2014-12-29 14:01:35 UTC (rev 1901)
@@ -464,16 +464,23 @@
     // iterations that were used. Store it in niter.
     niter = maxiterinput;
 
+
     // Check the results of the Cox fit; mirrored from the same checks
-    // in coxph_fit.S from the R survival package
+    // in coxph.fit.S and coxph.R from the R survival package.
 
-    bool setToZero = false;
+    bool setToNAN = false;
 
-    if (flag < X.nrow && niter > 0) {
+    // Based on coxph.fit.S lines with 'which.sing' and coxph.R line
+    // with if(any(is.NA(coefficients))). These lines set coefficients
+    // to NA if flag < nvar (with nvar = ncol(x)) and MAXITER >
+    // 0. coxph.R then checks for any NAs in the coefficients and
+    // outputs the warning message if NAs were found.
+    if (flag < X.nrow && MAXITER > 0) {
         cerr << "Warning for " << snpinfo.name[cursnp]
              << ": X matrix deemed to be singular,"
              << " setting beta and se to 'NaN'\n";
-        setToZero = true;
+
+        setToNAN = true;
     }
 
     if (niter >= MAXITER)
@@ -488,26 +495,46 @@
         cerr << "Warning for " << snpinfo.name[cursnp]
              << ": Cox regression ran out of iterations and did not converge,"
              << " setting beta and se to 'NaN'\n";
-        setToZero = true;
+        setToNAN = true;
     } else {
         VectorXd ueigen = u.data;
         MatrixXd imateigen = imat.data;
         VectorXd infs = ueigen.transpose() * imateigen;
+        infs = infs.cwiseAbs();
         VectorXd betaeigen = beta.data;
-        if ( infs.norm() > EPS ||
-             infs.norm() > sqrt(EPS) * betaeigen.norm() )
-        {
+        bool problems = false;
+
+        assert(betaeigen.size() == infs.size());
+
+        // We check the beta's for all coefficients
+        // (incl. covariates), maybe stick to only checking the SNP
+        // coefficient?
+        for (int i = 0; i < infs.size(); i++) {
+            if (infs[i] > EPS &&
+                infs[i] > sqrt(EPS) * abs(betaeigen[i])) {
+                problems = true;
+            }
+        }
+
+        if (problems) {
             cerr << "Warning for " << snpinfo.name[cursnp]
                  << ": beta may be infinite,"
                  << " setting beta and se to 'NaN'\n";
 
-            setToZero = true;
+            setToNAN = true;
         }
+
+        // cout << "beta values for SNP: " << snpinfo.name[cursnp]
+        //      << " are: " << betaeigen << std::endl;
+        cerr << "Warning for " << snpinfo.name[cursnp]
+             << ": can't check for infinite betas."
+             << " Please compile ProbABEL with Eigen support to fix this."
+             << endl;
     }
 
     for (int i = 0; i < X.nrow; i++)
     {
-        if (setToZero)
+        if (setToNAN)
         {
             // Cox regression failed
             sebeta[i] = NAN;



More information about the Genabel-commits mailing list