[Genabel-commits] r1757 - pkg/ProbABEL/checks/R-tests

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Jun 24 17:36:51 CEST 2014


Author: lckarssen
Date: 2014-06-24 17:36:51 +0200 (Tue, 24 Jun 2014)
New Revision: 1757

Modified:
   pkg/ProbABEL/checks/R-tests/run_models_in_R_palinear.R
Log:
Quick fix of the layout of a comment.


Modified: pkg/ProbABEL/checks/R-tests/run_models_in_R_palinear.R
===================================================================
--- pkg/ProbABEL/checks/R-tests/run_models_in_R_palinear.R	2014-06-24 09:39:39 UTC (rev 1756)
+++ pkg/ProbABEL/checks/R-tests/run_models_in_R_palinear.R	2014-06-24 15:36:51 UTC (rev 1757)
@@ -36,10 +36,14 @@
 ## (SNP 6 in the info file). ProbABEL lists them all as 0.0, R lists
 ## them as:
 prob.dom.PA[6, 2:4] <- c(NaN, NaN, 0.0)
-#for 2df model the last SNP is interchangeable: EIGEN calculates the beta for the other SNP than R. This causes the beta to have the wrong sign. This part of change the position of the snp beta(and swaps sign) and SE if beta and other SE are 0
-if (sum(abs(prob.2df.PA[6, 2:3]))==0){
-prob.2df.PA[6, 2:3] <-c(prob.2df.PA[6, 4]*-1,prob.2df.PA[6, 5])
-prob.2df.PA[6, 4:5] <- c(NA, NA)
+
+## For the 2df model the last SNP is interchangeable: ProbABEL
+## calculates the beta for the other SNP than R. This causes the beta
+## to have the wrong sign. This part changes the position of the SNP
+## beta (and swaps sign) and SE if beta and the other SE are 0.
+if (sum(abs(prob.2df.PA[6, 2:3])) == 0){
+    prob.2df.PA[6, 2:3] <- c(prob.2df.PA[6, 4] * -1, prob.2df.PA[6, 5])
+    prob.2df.PA[6, 4:5] <- c(NA, NA)
 }
 
 ####
@@ -127,7 +131,6 @@
 }
 colnames(prob.2df.R) <- cols2df
 rownames(prob.2df.R) <- NULL
-
 stopifnot( all.equal(prob.2df.PA, prob.2df.R, tol=tol) )
 cat("2df\n")
 



More information about the Genabel-commits mailing list