[Genabel-commits] r1038 - in pkg/GenABEL: . R inst/unitTests man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Dec 3 23:52:23 CET 2012
Author: yurii
Date: 2012-12-03 23:52:22 +0100 (Mon, 03 Dec 2012)
New Revision: 1038
Modified:
pkg/GenABEL/CHANGES.LOG
pkg/GenABEL/DESCRIPTION
pkg/GenABEL/R/polygenic.R
pkg/GenABEL/R/zzz.R
pkg/GenABEL/inst/unitTests/report.html
pkg/GenABEL/inst/unitTests/report.txt
pkg/GenABEL/inst/unitTests/reportSummary.txt
pkg/GenABEL/inst/unitTests/runit.iterator.R
pkg/GenABEL/inst/unitTests/runit.polygenic.R
pkg/GenABEL/man/polygenic.Rd
Log:
switching to version 1.7-3, adding new option eigenOfRel to polygenic
Modified: pkg/GenABEL/CHANGES.LOG
===================================================================
--- pkg/GenABEL/CHANGES.LOG 2012-12-03 17:30:42 UTC (rev 1037)
+++ pkg/GenABEL/CHANGES.LOG 2012-12-03 22:52:22 UTC (rev 1038)
@@ -1,3 +1,14 @@
+*** v. 1.7-3 (2012.12.03)
+
+(2012.12.03, YA)
+- Changes in DESCRIPTION and version to denote new working
+version
+- added argument 'eigenOfRel' to 'polygenic' allowing passing
+the results of 'eigen' of the relationship matrix instead of the matrix
+itself (makes much faster evaluation). See unit test test.polygenic.eigenOfRel
+for use example
+- found out that impute2databel is broken, see bug report [#2418]
+
*** v. 1.7-2 (2012.10.14)
(2012.09.14, YA)
Modified: pkg/GenABEL/DESCRIPTION
===================================================================
--- pkg/GenABEL/DESCRIPTION 2012-12-03 17:30:42 UTC (rev 1037)
+++ pkg/GenABEL/DESCRIPTION 2012-12-03 22:52:22 UTC (rev 1038)
@@ -1,8 +1,8 @@
Package: GenABEL
Type: Package
Title: genome-wide SNP association analysis
-Version: 1.7-2
-Date: 2012-09-14
+Version: 1.7-3
+Date: 2012-12-03
Author: GenABEL project developers
Contact: GenABEL project developers <genabel.project at gmail.com>
Maintainer: Yurii Aulchenko <yurii at bionet.nsc.ru>
Modified: pkg/GenABEL/R/polygenic.R
===================================================================
--- pkg/GenABEL/R/polygenic.R 2012-12-03 17:30:42 UTC (rev 1037)
+++ pkg/GenABEL/R/polygenic.R 2012-12-03 22:52:22 UTC (rev 1038)
@@ -83,6 +83,11 @@
#' effect estimates based on FGLS expectation
#' @param llfun function to compute likelihood (default 'polylik_eigen', also
#' available -- but not recommended -- 'polylik')
+#' @param eigenOfRel results of eigen(relationship matrix = 2*kinship.matrix).
+#' Passing this can decrease computational time substantially if multiple traits
+#' are analysed using the same kinship matrix. This option will not work if any
+#' NA's are found in the trait and/or covariates and if the dimensions of the
+#' 'eigen'-object, trait, covariates, kinship do not match.
#' @param ... Optional arguments to be passed to \code{\link{nlm}} or (\code{\link{optim}})
#' minimisation function
#'
@@ -172,7 +177,7 @@
opt.method="nlm",scaleh2=1,quiet=FALSE,
steptol=1e-8, gradtol = 1e-8, optimbou = 8,
fglschecks=TRUE,maxnfgls=8,maxdiffgls=1e-4, patchBasedOnFGLS = TRUE,
- llfun = "polylik_eigen", ...) {
+ llfun = "polylik_eigen", eigenOfRel, ...) {
if (!missing(data)) if (is(data,"gwaa.data"))
{
checkphengen(data)
@@ -282,7 +287,10 @@
rm(tmp);gc()
if (llfun=="polylik") eigres <- eigen(ginv(relmat),symmetric=TRUE)
else if (llfun=="polylik_eigen") {
- eigres <- eigen(relmat,symmetric=TRUE)
+ if (!missing(eigenOfRel))
+ eigres <- eigenOfRel
+ else
+ eigres <- eigen(relmat,symmetric=TRUE)
if (any(eigres$values<0)) {
#eigres$values <- abs(eigres$values)
warning("some eigenvalues <=0, taking ABS for det; try option llfun='polylik'")
@@ -295,7 +303,21 @@
}
iniest <- iniest# + 0.001*iniest
+# check dimensions and no NA if eigenOfRel is specified
+ if (!missing(eigenOfRel)) {
+ if (!(is(eigenOfRel,"list") & all(names(eigenOfRel) == c("values","vectors")) ))
+ stop('eigenOfRel does not look like and eigen-generated object!')
+ nIds <- length(y)
+ if (dim(desmat)[1] != nIds) stop('dimensions of Y and X do not match')
+ if (dim(relmat)[1] != nIds) stop('dimensions of Y and kinship matrix do not match')
+ if (dim(eigres$vectors)[1] != nIds) stop('dimension 1 of eigen-vectors do not match other data')
+ if (dim(eigres$vectors)[2] != nIds) stop('dimension 2 of eigen-vectors do not match other data')
+ if (length(eigres$values) != nIds) stop('number of eigen-values does not match other data')
+ }
+# END check dimensions and no NA if eigenOfRel is specified
+
+
convFGLS <- NULL;
if (!missing(fixh2)) {
@@ -362,7 +384,12 @@
#
# iSigma <- ginv(h2*relmat + (1-h2)*diag(x=1,ncol=length(y),nrow=length(y)))
# start new
- if (llfun=="polylik") eigres <- eigen(relmat,symmetric=TRUE) # ensure eigres contain eigen of RelMat (not Inv(RelMat))
+ if (llfun=="polylik") {
+ if (!missing(eigenOfRel))
+ eigres <- eigenOfRel
+ else
+ eigres <- eigen(relmat,symmetric=TRUE) # ensure eigres contain eigen of RelMat (not Inv(RelMat))
+ }
es <- (eigres$value*h2+1.-h2)*parsave[npar]*sdy*sdy
iSigma <- (eigres$vec) %*% diag(1./es,ncol=length(es)) %*% t(eigres$vec)
# END new
@@ -479,7 +506,12 @@
if (fglschecks && missing(fixh2)) {
ginvsig <- iSigma # already computed it in FGLS checks
} else {
- if (llfun=="polylik") eigres <- eigen(relmat,symmetric=TRUE) # ensure eigres contain eigen of RelMat (not Inv(RelMat))
+ if (llfun=="polylik") {
+ if (!missing(eigenOfRel))
+ eigres <- eigenOfRel
+ else
+ eigres <- eigen(relmat,symmetric=TRUE) # ensure eigres contain eigen of RelMat (not Inv(RelMat))
+ }
es <- tvar*(eigres$value*h2+1.-h2)
#print(es[1:5])
#print(eigres$vec[1:5,1:5])
Modified: pkg/GenABEL/R/zzz.R
===================================================================
--- pkg/GenABEL/R/zzz.R 2012-12-03 17:30:42 UTC (rev 1037)
+++ pkg/GenABEL/R/zzz.R 2012-12-03 22:52:22 UTC (rev 1038)
@@ -4,8 +4,8 @@
#pkgDescription <- packageDescription(pkg)
#pkgVersion <- pkgDescription$Version
#pkgDate <- pkgDescription$Date
- pkgVersion <- "1.7-2"
- pkgDate <- "September 14, 2012"
+ pkgVersion <- "1.7-3"
+ pkgDate <- "December 03, 2012"
welcomeMessage <- paste(pkg," v. ",pkgVersion," (",pkgDate,") loaded\n",sep="")
# check if CRAN version is the same as loaded
cranVersion <- checkPackageVersionOnCRAN(pkg)
Modified: pkg/GenABEL/inst/unitTests/report.html
===================================================================
--- pkg/GenABEL/inst/unitTests/report.html 2012-12-03 17:30:42 UTC (rev 1037)
+++ pkg/GenABEL/inst/unitTests/report.html 2012-12-03 22:52:22 UTC (rev 1038)
@@ -1,10 +1,10 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/transitional.dtd">
-<html><head><title>RUNIT TEST PROTOCOL--Wed Jan 11 19:21:05 2012</title>
+<html><head><title>RUNIT TEST PROTOCOL--Mon Dec 3 21:50:27 2012</title>
</head>
-<body><h1 TRUE>RUNIT TEST PROTOCOL--Wed Jan 11 19:21:05 2012</h1>
+<body><h1 TRUE>RUNIT TEST PROTOCOL--Mon Dec 3 21:50:27 2012</h1>
<p>Number of test functions: 18</p>
-<p>Number of errors: 0</p>
+<p style=color:red>Number of errors: 1</p>
<p>Number of failures: 0</p>
<hr>
<h3 TRUE>1 Test suite</h3>
@@ -16,29 +16,43 @@
</tr>
<tr><td><a href="#GenABEL unit testing">GenABEL unit testing</a></td>
<td>18</td>
+<td bgcolor="red">1</td>
<td>0</td>
-<td>0</td>
</tr>
</table>
<hr>
+<h3 TRUE>Errors</h3>
+<table border="1" width="100%" >
+<tr><th width="30%">Test suite : test function</th>
+<th width="70%">message</th>
+</tr>
+<tr><td><a href="#GenABEL unit testing__Users_yuryaulchenko_eclipse_workspace_genabel_pkg_GenABEL_tests_.._inst_unitTests_runit.impute2xxx.R_test.impute2databel">GenABEL unit testing : test.impute2databel</a></td>
+<td>Error in .Call("iterator", tmp_fv at data, as.integer(0), as.integer(0), :
+ "iterator" not resolved from current namespace (GenABEL)
+</td>
+</tr>
+</table>
+<hr>
<h3 TRUE>Details</h3>
<p><a name="GenABEL unit testing"><h5 TRUE>Test Suite: GenABEL unit testing</h5>
-</a>Test function regexp: ^test.+<br/>Test file regexp: ^runit.+\.[rR]$<br/>Involved directory:<br/>/Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests<br/><ul><li><a href="/Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.convert.snp.R">Test file: runit.convert.snp.R</a><ul><li><a name="GenABEL unit testing__Users_yuryaulchenko_eclipse_workspace_genabel_pkg_GenABEL_tests_.._inst_unitTests_runit.convert.snp.R_test.convert.snp">test.convert.snp: (4 checks) ... OK (1.43 seconds)<br/></a></li></ul></li><li><a href="/Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.convert.snp.ped.R">Test file: runit.convert.snp.ped.R</a><ul><li><a name="GenABEL unit testing__Users_yuryaulchenko_eclipse_workspace_genabel_pkg_GenABEL_tests_.._inst_unitTests_runit.convert.snp.ped.R_test.convert.snp.ped">test.convert.snp.ped: (0 checks) ... OK (0.02 seconds)<br/></a></li></ul></li><li><a href="/Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.descriptives.trait.R">Test file: runit.descriptives.trait.R</a><ul><li><a name="GenABEL unit testing__Users_yuryaulchenko_eclipse_workspace_genabel_pkg_GenABEL_tests_.._inst_unitTests_runit.descriptives.trait.R_test.descriptives.trait">test.descriptives.trait: (1 checks) ... OK (0.47 seconds)<br/></a></li></ul></li><li><a href="/Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.exports.R">Test file: runit.exports.R</a><ul><li><a name="GenABEL unit testing__Users_yuryaulchenko_eclipse_workspace_genabel_pkg_GenABEL_tests_.._inst_unitTests_runit.exports.R_test.exports">test.exports: (50 checks) ... OK (1.21 seconds)<br/></a></li></ul></li><li><a href="/Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.findRelatives.R">Test file: runit.findRelatives.R</a><ul><li><a name="GenABEL unit testing__Users_yuryaulchenko_eclipse_workspace_genabel_pkg_GenABEL_tests_.._inst_unitTests_runit.findRelatives.R_test.findRelatives">test.findRelatives: (10 checks) ... OK (48.28 seconds)<br/></a></li></ul></li><li><a href="/Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.impute2xxx.R">Test file: runit.impute2xxx.R</a><ul><li><a name="GenABEL unit testing__Users_yuryaulchenko_eclipse_workspace_genabel_pkg_GenABEL_tests_.._inst_unitTests_runit.impute2xxx.R_test.impute2databel">test.impute2databel: (23 checks) ... OK (3.38 seconds)<br/></a></li></ul></li><li><a href="/Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.impute2xxx_large.R">Test file: runit.impute2xxx_large.R</a><ul><li><a name="GenABEL unit testing__Users_yuryaulchenko_eclipse_workspace_genabel_pkg_GenABEL_tests_.._inst_unitTests_runit.impute2xxx_large.R_test.impute2xxx_large">test.impute2xxx_large: (0 checks) ... OK (0.05 seconds)<br/></a></li></ul></li><li><a href="/Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.iterator.R">Test file: runit.iterator.R</a><ul><li><a name="GenABEL unit testing__Users_yuryaulchenko_eclipse_workspace_genabel_pkg_GenABEL_tests_.._inst_unitTests_runit.iterator.R_test.qtscore">test.qtscore: (0 checks) ... OK (0 seconds)<br/></a></li><li><a name="GenABEL unit testing__Users_yuryaulchenko_eclipse_workspace_genabel_pkg_GenABEL_tests_.._inst_unitTests_runit.iterator.R_test.summary_snp_data">test.summary_snp_data: (3 checks) ... OK (38.76 seconds)<br/></a></li></ul></li><li><a href="/Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.mach2databel.R">Test file: runit.mach2databel.R</a><ul><li><a name="GenABEL unit testing__Users_yuryaulchenko_eclipse_workspace_genabel_pkg_GenABEL_tests_.._inst_unitTests_runit.mach2databel.R_test.mach2databel">test.mach2databel: (8 checks) ... OK (1.09 seconds)<br/></a></li></ul></li><li><a href="/Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.merge.R">Test file: runit.merge.R</a><ul><li><a name="GenABEL unit testing__Users_yuryaulchenko_eclipse_workspace_genabel_pkg_GenABEL_tests_.._inst_unitTests_runit.merge.R_test.merge.bug1641">test.merge.bug1641: (0 checks) ... OK (0.83 seconds)<br/></a></li><li><a name="GenABEL unit testing__Users_yuryaulchenko_eclipse_workspace_genabel_pkg_GenABEL_tests_.._inst_unitTests_runit.merge.R_test.merge.bug1676">test.merge.bug1676: (2 checks) ... OK (0.27 seconds)<br/></a></li></ul></li><li><a href="/Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.mmscore.R">Test file: runit.mmscore.R</a><ul><li><a name="GenABEL unit testing__Users_yuryaulchenko_eclipse_workspace_genabel_pkg_GenABEL_tests_.._inst_unitTests_runit.mmscore.R_test.exports">test.exports: (1 checks) ... OK (4.09 seconds)<br/></a></li></ul></li><li><a href="/Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.polygenic.R">Test file: runit.polygenic.R</a><ul><li><a name="GenABEL unit testing__Users_yuryaulchenko_eclipse_workspace_genabel_pkg_GenABEL_tests_.._inst_unitTests_runit.polygenic.R_test.polygenic.Bug1322">test.polygenic.Bug1322: (2 checks) ... OK (2.54 seconds)<br/></a></li></ul></li><li><a href="/Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.polylik.R">Test file: runit.polylik.R</a><ul><li><a name="GenABEL unit testing__Users_yuryaulchenko_eclipse_workspace_genabel_pkg_GenABEL_tests_.._inst_unitTests_runit.polylik.R_test.polylik">test.polylik: (6 checks) ... OK (3.1 seconds)<br/></a></li></ul></li></li><li><a href="/Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.recodeChromosome.R">Test file: runit.recodeChromosome.R</a><ul><li><a name="GenABEL unit testing__Users_yuryaulchenko_eclipse_workspace_genabel_pkg_GenABEL_tests_.._inst_unitTests_runit.recodeChromosome.R_test.recodeChromosome">test.recodeChromosome: (8 checks) ... OK (0.22 seconds)<br/></a></li></ul></li><li><a href="/Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.sortmap.internal.R">Test file: runit.sortmap.internal.R</a><ul><li><a name="GenABEL unit testing__Users_yuryaulchenko_eclipse_workspace_genabel_pkg_GenABEL_tests_.._inst_unitTests_runit.sortmap.internal.R_test.sortmap.internal.bug1673">test.sortmap.internal.bug1673: (1 checks) ... OK (0 seconds)<br/></a></li></ul></li><li><a href="/Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.strandModify.R">Test file: runit.strandModify.R</a><ul><li><a name="GenABEL unit testing__Users_yuryaulchenko_eclipse_workspace_genabel_pkg_GenABEL_tests_.._inst_unitTests_runit.strandModify.R_test.strandModify">test.strandModify: (2 checks) ... OK (0.06 seconds)<br/></a></li></ul></li></ul><hr>
+</a>Test function regexp: ^test.+<br/>Test file regexp: ^runit.+\.[rR]$<br/>Involved directory:<br/>/Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests<br/><ul><li><a href="/Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.convert.snp.ped.R">Test file: runit.convert.snp.ped.R</a><ul><li><a name="GenABEL unit testing__Users_yuryaulchenko_eclipse_workspace_genabel_pkg_GenABEL_tests_.._inst_unitTests_runit.convert.snp.ped.R_test.convert.snp.ped">test.convert.snp.ped: (0 checks) ... OK (0.03 seconds)<br/></a></li></ul></li><li><a href="/Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.convert.snp.R">Test file: runit.convert.snp.R</a><ul><li><a name="GenABEL unit testing__Users_yuryaulchenko_eclipse_workspace_genabel_pkg_GenABEL_tests_.._inst_unitTests_runit.convert.snp.R_test.convert.snp">test.convert.snp: (4 checks) ... OK (1.08 seconds)<br/></a></li></ul></li><li><a href="/Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.descriptives.trait.R">Test file: runit.descriptives.trait.R</a><ul><li><a name="GenABEL unit testing__Users_yuryaulchenko_eclipse_workspace_genabel_pkg_GenABEL_tests_.._inst_unitTests_runit.descriptives.trait.R_test.descriptives.trait">test.descriptives.trait: (1 checks) ... OK (0.49 seconds)<br/></a></li></ul></li><li><a href="/Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.exports.R">Test file: runit.exports.R</a><ul><li><a name="GenABEL unit testing__Users_yuryaulchenko_eclipse_workspace_genabel_pkg_GenABEL_tests_.._inst_unitTests_runit.exports.R_test.exports">test.exports: (19 checks) ... OK (0.62 seconds)<br/></a></li></ul></li><li><a href="/Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.findRelatives.R">Test file: runit.findRelatives.R</a><ul><li><a name="GenABEL unit testing__Users_yuryaulchenko_eclipse_workspace_genabel_pkg_GenABEL_tests_.._inst_unitTests_runit.findRelatives.R_test.findRelatives">test.findRelatives: (10 checks) ... OK (54.73 seconds)<br/></a></li></ul></li><li><a href="/Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.impute2xxx_large.R">Test file: runit.impute2xxx_large.R</a><ul><li><a name="GenABEL unit testing__Users_yuryaulchenko_eclipse_workspace_genabel_pkg_GenABEL_tests_.._inst_unitTests_runit.impute2xxx_large.R_test.impute2xxx_large">test.impute2xxx_large: (0 checks) ... OK (0 seconds)<br/></a></li></ul></li><li><a href="/Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.impute2xxx.R">Test file: runit.impute2xxx.R</a><ul><li><a name="GenABEL unit testing__Users_yuryaulchenko_eclipse_workspace_genabel_pkg_GenABEL_tests_.._inst_unitTests_runit.impute2xxx.R_test.impute2databel"><u style=color:red>test.impute2databel: ERROR !! </u></a>Error in .Call("iterator", tmp_fv at data, as.integer(0), as.integer(0), :
+ "iterator" not resolved from current namespace (GenABEL)
+<br/></li></ul></li><li><a href="/Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.iterator.R">Test file: runit.iterator.R</a><ul><li><a name="GenABEL unit testing__Users_yuryaulchenko_eclipse_workspace_genabel_pkg_GenABEL_tests_.._inst_unitTests_runit.iterator.R_test.summary_snp_data">test.summary_snp_data: (3 checks) ... OK (4.14 seconds)<br/></a></li></ul></li><li><a href="/Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.mach2databel.R">Test file: runit.mach2databel.R</a><ul><li><a name="GenABEL unit testing__Users_yuryaulchenko_eclipse_workspace_genabel_pkg_GenABEL_tests_.._inst_unitTests_runit.mach2databel.R_test.mach2databel">test.mach2databel: (8 checks) ... OK (0.18 seconds)<br/></a></li></ul></li><li><a href="/Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.merge.R">Test file: runit.merge.R</a><ul><li><a name="GenABEL unit testing__Users_yuryaulchenko_eclipse_workspace_genabel_pkg_GenABEL_tests_.._inst_unitTests_runit.merge.R_test.merge.bug1641">test.merge.bug1641: (0 checks) ... OK (0.15 seconds)<br/></a></li><li><a name="GenABEL unit testing__Users_yuryaulchenko_eclipse_workspace_genabel_pkg_GenABEL_tests_.._inst_unitTests_runit.merge.R_test.merge.bug1676">test.merge.bug1676: (2 checks) ... OK (0.15 seconds)<br/></a></li></ul></li><li><a href="/Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.mmscore.R">Test file: runit.mmscore.R</a><ul><li><a name="GenABEL unit testing__Users_yuryaulchenko_eclipse_workspace_genabel_pkg_GenABEL_tests_.._inst_unitTests_runit.mmscore.R_test.exports">test.exports: (1 checks) ... OK (0.81 seconds)<br/></a></li></ul></li><li><a href="/Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.polygenic.R">Test file: runit.polygenic.R</a><ul><li><a name="GenABEL unit testing__Users_yuryaulchenko_eclipse_workspace_genabel_pkg_GenABEL_tests_.._inst_unitTests_runit.polygenic.R_test.polygenic.Bug1322">test.polygenic.Bug1322: (2 checks) ... OK (1.25 seconds)<br/></a></li><li><a name="GenABEL unit testing__Users_yuryaulchenko_eclipse_workspace_genabel_pkg_GenABEL_tests_.._inst_unitTests_runit.polygenic.R_test.polygenic.eigenOfRel">test.polygenic.eigenOfRel: (1 checks) ... OK (1.35 seconds)<br/></a></li></ul></li><li><a href="/Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.polylik.R">Test file: runit.polylik.R</a><ul><li><a name="GenABEL unit testing__Users_yuryaulchenko_eclipse_workspace_genabel_pkg_GenABEL_tests_.._inst_unitTests_runit.polylik.R_test.polylik">test.polylik: (6 checks) ... OK (8.92 seconds)<br/></a></li></ul></li></li><li><a href="/Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.recodeChromosome.R">Test file: runit.recodeChromosome.R</a><ul><li><a name="GenABEL unit testing__Users_yuryaulchenko_eclipse_workspace_genabel_pkg_GenABEL_tests_.._inst_unitTests_runit.recodeChromosome.R_test.recodeChromosome">test.recodeChromosome: (8 checks) ... OK (0.17 seconds)<br/></a></li></ul></li><li><a href="/Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.sortmap.internal.R">Test file: runit.sortmap.internal.R</a><ul><li><a name="GenABEL unit testing__Users_yuryaulchenko_eclipse_workspace_genabel_pkg_GenABEL_tests_.._inst_unitTests_runit.sortmap.internal.R_test.sortmap.internal.bug1673">test.sortmap.internal.bug1673: (1 checks) ... OK (0 seconds)<br/></a></li></ul></li><li><a href="/Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.strandModify.R">Test file: runit.strandModify.R</a><ul><li><a name="GenABEL unit testing__Users_yuryaulchenko_eclipse_workspace_genabel_pkg_GenABEL_tests_.._inst_unitTests_runit.strandModify.R_test.strandModify">test.strandModify: (2 checks) ... OK (0.06 seconds)<br/></a></li></ul></li></ul><hr>
<table border="0" width="80%" >
<tr><th>Name</th>
<th>Value</th>
</tr>
<tr><td>platform</td>
-<td>x86_64-apple-darwin11.2.0</td>
+<td>x86_64-apple-darwin9.8.0</td>
</tr>
<tr><td>arch</td>
<td>x86_64</td>
</tr>
<tr><td>os</td>
-<td>darwin11.2.0</td>
+<td>darwin9.8.0</td>
</tr>
<tr><td>system</td>
-<td>x86_64, darwin11.2.0</td>
+<td>x86_64, darwin9.8.0</td>
</tr>
<tr><td>status</td>
<td>Under development (unstable)</td>
@@ -47,26 +61,29 @@
<td>2</td>
</tr>
<tr><td>minor</td>
-<td>15.0</td>
+<td>16.0</td>
</tr>
<tr><td>year</td>
-<td>2011</td>
+<td>2012</td>
</tr>
<tr><td>month</td>
-<td>12</td>
+<td>11</td>
</tr>
<tr><td>day</td>
-<td>04</td>
+<td>01</td>
</tr>
<tr><td>svn rev</td>
-<td>57813</td>
+<td>61067</td>
</tr>
<tr><td>language</td>
<td>R</td>
</tr>
<tr><td>version.string</td>
-<td>R Under development (unstable) (2011-12-04 r57813)</td>
+<td>R Under development (unstable) (2012-11-01 r61067)</td>
</tr>
+<tr><td>nickname</td>
+<td>Unsuffered Consequences</td>
+</tr>
<tr><td>host</td>
<td>YAMacBookPro.local</td>
</tr>
Modified: pkg/GenABEL/inst/unitTests/report.txt
===================================================================
--- pkg/GenABEL/inst/unitTests/report.txt 2012-12-03 17:30:42 UTC (rev 1037)
+++ pkg/GenABEL/inst/unitTests/report.txt 2012-12-03 22:52:22 UTC (rev 1038)
@@ -1,12 +1,14 @@
-RUNIT TEST PROTOCOL -- Wed Jan 11 19:21:05 2012
+RUNIT TEST PROTOCOL -- Mon Dec 3 21:50:27 2012
***********************************************
Number of test functions: 18
-Number of errors: 0
+Number of errors: 1
Number of failures: 0
1 Test Suite :
-GenABEL unit testing - 18 test functions, 0 errors, 0 failures
+GenABEL unit testing - 18 test functions, 1 error, 0 failures
+ERROR in test.impute2databel: Error in .Call("iterator", tmp_fv at data, as.integer(0), as.integer(0), :
+ "iterator" not resolved from current namespace (GenABEL)
@@ -18,49 +20,51 @@
Involved directory:
/Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests
---------------------------
+Test file: /Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.convert.snp.ped.R
+test.convert.snp.ped: (0 checks) ... OK (0.03 seconds)
+---------------------------
Test file: /Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.convert.snp.R
-test.convert.snp: (4 checks) ... OK (1.43 seconds)
+test.convert.snp: (4 checks) ... OK (1.08 seconds)
---------------------------
-Test file: /Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.convert.snp.ped.R
-test.convert.snp.ped: (0 checks) ... OK (0.02 seconds)
----------------------------
Test file: /Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.descriptives.trait.R
-test.descriptives.trait: (1 checks) ... OK (0.47 seconds)
+test.descriptives.trait: (1 checks) ... OK (0.49 seconds)
---------------------------
Test file: /Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.exports.R
-test.exports: (50 checks) ... OK (1.21 seconds)
+test.exports: (19 checks) ... OK (0.62 seconds)
---------------------------
Test file: /Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.findRelatives.R
-test.findRelatives: (10 checks) ... OK (48.28 seconds)
+test.findRelatives: (10 checks) ... OK (54.73 seconds)
---------------------------
+Test file: /Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.impute2xxx_large.R
+test.impute2xxx_large: (0 checks) ... OK (0 seconds)
+---------------------------
Test file: /Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.impute2xxx.R
-test.impute2databel: (23 checks) ... OK (3.38 seconds)
+test.impute2databel: ERROR !!
+Error in .Call("iterator", tmp_fv at data, as.integer(0), as.integer(0), :
+ "iterator" not resolved from current namespace (GenABEL)
---------------------------
-Test file: /Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.impute2xxx_large.R
-test.impute2xxx_large: (0 checks) ... OK (0.05 seconds)
----------------------------
Test file: /Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.iterator.R
-test.qtscore: (0 checks) ... OK (0 seconds)
-test.summary_snp_data: (3 checks) ... OK (38.76 seconds)
+test.summary_snp_data: (3 checks) ... OK (4.14 seconds)
---------------------------
Test file: /Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.mach2databel.R
-test.mach2databel: (8 checks) ... OK (1.09 seconds)
+test.mach2databel: (8 checks) ... OK (0.18 seconds)
---------------------------
Test file: /Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.merge.R
-test.merge.bug1641: (0 checks) ... OK (0.83 seconds)
-test.merge.bug1676: (2 checks) ... OK (0.27 seconds)
+test.merge.bug1641: (0 checks) ... OK (0.15 seconds)
+test.merge.bug1676: (2 checks) ... OK (0.15 seconds)
---------------------------
Test file: /Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.mmscore.R
-test.exports: (1 checks) ... OK (4.09 seconds)
+test.exports: (1 checks) ... OK (0.81 seconds)
---------------------------
Test file: /Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.polygenic.R
-test.polygenic.Bug1322: (2 checks) ... OK (2.54 seconds)
+test.polygenic.Bug1322: (2 checks) ... OK (1.25 seconds)
+test.polygenic.eigenOfRel: (1 checks) ... OK (1.35 seconds)
---------------------------
Test file: /Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.polylik.R
-test.polylik: (6 checks) ... OK (3.1 seconds)
+test.polylik: (6 checks) ... OK (8.92 seconds)
---------------------------
Test file: /Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.recodeChromosome.R
-test.recodeChromosome: (8 checks) ... OK (0.22 seconds)
+test.recodeChromosome: (8 checks) ... OK (0.17 seconds)
---------------------------
Test file: /Users/yuryaulchenko/eclipse_workspace/genabel/pkg/GenABEL/tests/../inst/unitTests/runit.sortmap.internal.R
test.sortmap.internal.bug1673: (1 checks) ... OK (0 seconds)
Modified: pkg/GenABEL/inst/unitTests/reportSummary.txt
===================================================================
--- pkg/GenABEL/inst/unitTests/reportSummary.txt 2012-12-03 17:30:42 UTC (rev 1037)
+++ pkg/GenABEL/inst/unitTests/reportSummary.txt 2012-12-03 22:52:22 UTC (rev 1038)
@@ -1,9 +1,11 @@
-RUNIT TEST PROTOCOL -- Wed Jan 11 19:21:05 2012
+RUNIT TEST PROTOCOL -- Mon Dec 3 21:50:27 2012
***********************************************
Number of test functions: 18
-Number of errors: 0
+Number of errors: 1
Number of failures: 0
1 Test Suite :
-GenABEL unit testing - 18 test functions, 0 errors, 0 failures
+GenABEL unit testing - 18 test functions, 1 error, 0 failures
+ERROR in test.impute2databel: Error in .Call("iterator", tmp_fv at data, as.integer(0), as.integer(0), :
+ "iterator" not resolved from current namespace (GenABEL)
Modified: pkg/GenABEL/inst/unitTests/runit.iterator.R
===================================================================
--- pkg/GenABEL/inst/unitTests/runit.iterator.R 2012-12-03 17:30:42 UTC (rev 1037)
+++ pkg/GenABEL/inst/unitTests/runit.iterator.R 2012-12-03 22:52:22 UTC (rev 1038)
@@ -64,8 +64,3 @@
gc()
unlink("tmp.fv?")
}
-
-test.qtscore <- function()
-{
-}
-
Modified: pkg/GenABEL/inst/unitTests/runit.polygenic.R
===================================================================
--- pkg/GenABEL/inst/unitTests/runit.polygenic.R 2012-12-03 17:30:42 UTC (rev 1037)
+++ pkg/GenABEL/inst/unitTests/runit.polygenic.R 2012-12-03 22:52:22 UTC (rev 1038)
@@ -46,4 +46,19 @@
pol0 <- polygenic(height~sex+age,df[!is.na(snpX),],kin=gkin[!is.na(snpX),!is.na(snpX)],quiet=TRUE)
nUsedIds0 <- sum(pol0$measuredIDs)
checkEquals(nUsedIds1,nUsedIds0)
-}
\ No newline at end of file
+}
+
+test.polygenic.eigenOfRel <- function()
+{
+ data(ge03d2.clean)
+ completeIds <- complete.cases(phdata(ge03d2.clean)[,c("height","sex","age")])
+ df <- ge03d2.clean[sample(which(completeIds),250),autosomal(ge03d2.clean)]
+ gkin <- ibs(df,w="freq")
+ pol1 <- polygenic(height~sex+age,df,kin=gkin,quiet=TRUE)
+ gRel <- gkin
+ gRel[upper.tri(gRel)] <- t(gkin)[upper.tri(gkin)]
+ gRel <- gRel*2
+ eigRes <- eigen(gRel)
+ pol2 <- polygenic(height~sex+age,df,kin=gkin,quiet=TRUE,eigenOfRel=eigRes)
+ checkEquals(pol1[which(names(pol1)!="call")],pol2[which(names(pol2)!="call")])
+}
Modified: pkg/GenABEL/man/polygenic.Rd
===================================================================
--- pkg/GenABEL/man/polygenic.Rd 2012-12-03 17:30:42 UTC (rev 1037)
+++ pkg/GenABEL/man/polygenic.Rd 2012-12-03 22:52:22 UTC (rev 1038)
@@ -7,7 +7,8 @@
opt.method = "nlm", scaleh2 = 1, quiet = FALSE,
steptol = 1e-08, gradtol = 1e-08, optimbou = 8,
fglschecks = TRUE, maxnfgls = 8, maxdiffgls = 1e-04,
- patchBasedOnFGLS = TRUE, llfun = "polylik_eigen", ...)
+ patchBasedOnFGLS = TRUE, llfun = "polylik_eigen",
+ eigenOfRel, ...)
}
\arguments{
\item{formula}{Formula describing fixed effects to be
@@ -73,6 +74,14 @@
'polylik_eigen', also available -- but not recommended --
'polylik')}
+ \item{eigenOfRel}{results of eigen(relationship matrix =
+ 2*kinship.matrix). Passing this can decrease
+ computational time substantially if multiple traits are
+ analysed using the same kinship matrix. This option will
+ not work if any NA's are found in the trait and/or
+ covariates and if the dimensions of the 'eigen'-object,
+ trait, covariates, kinship do not match.}
+
\item{...}{Optional arguments to be passed to
\code{\link{nlm}} or (\code{\link{optim}}) minimisation
function}
More information about the Genabel-commits
mailing list