[Bioc-devel] maanova::matest: subscript out of bounds if argument test.method = c(0, x, y, z)
Philip Lijnzaad
p.lijnzaad at umcutrecht.nl
Wed Jun 3 17:40:34 CEST 2009
Dear Keith,
I found a nasty bug in matest(). The test.method argument (which has a default
of c(1,0,1,1)) needs to always at least include 1 as the first argument.
However, I only need the F2-derived p.values (anything more takes up space and
time), so I specified test.method=c(0,1,0,0). If I do this, the F1 is not
determined, but this is in fact also needed to establish the data for the
NULL model. Otherwise, the hsidx index (around line 216 and 219 in matest.R)
will be empty:
hsidx = ftest$F1$Fobs <= qf(critical,ftest$dfnu ,ftest$dfde)
leading to
sdata$data = sdata$data[hsidx==1,]
(around line 226) yielding an madata object with zero-dimensional data,
ultimately resulting in an subscript out of bounds somewhere else.
This bug has been there since at least maanova version 1.4.1, and is still
there in the latest developement version (maanova 1.15, BioC-2.5).
Solving it is trivial (always do the F1 test, and only add it to the output if
test.method[1]==1).
Kind regards,
Philip
--
Philip Lijnzaad, PhD
Holstege Genomics Laboratory
Dept. of Biomedical Genetics
University Medical Center (UMC), Utrecht
Stratenum room 2.211 (on Mondays and Thursdays not in after 15.00)
MSN chat (*NOT* email): philip_lijnzaad at hotmail.com
P.O. Box 85060, 3508 AB Utrecht
(Universiteitsweg 100, 3584 CG Utrecht)
The Netherlands
tel: +31 (0)8875 68464
fax: +31 (0)8875 68479
More information about the Bioc-devel
mailing list