[BioC] subscript out of bounds halting error when Sweaving with weaver And GOstats' HyperGTest

Elliot Kleiman kleiman at rohan.sdsu.edu
Sat Oct 4 23:26:50 CEST 2008


Hi BioC,

I am trying to Sweave the results section of my masters thesis using
package 'weaver' as an alternative to simply loading a previously stored
R session of objects, i.e, load(file='file.RData'), into an R noweb
code chunk, ...

But when I Sweave (cache) with weaver and then call the GOstats' function,
'HyperGTest' inside a code chunk, I get the following weaver 'subscript
out of bounds' halting error,

$ # run weaver using bash script as described in doc 'weaver_howTo.pdf'
$ ./weaver.sh mythesis-results.Rnw
   ...
hgResultlst <- hyperGTest(hgParamslst  COMPUTING...
   ...
Error:  chunk 17 (label=perform.hypergeometric.testing)
Error in .subset2(x, i, exact = exact) : subscript out of bounds
Execution halted

Here's a snippet of code chunk 17, that weaver is complaining about,

<<perform.hypergeometric.testing, echo=FALSE, cache=TRUE>>=

# create list of GOHyperGParams objects for test="over" ...
hgParamslst <- list( BP = over.hgparamsBP, CC = over.hgparamsCC, MF =
over.hgparamsMF )

# perform hypergeometric testing, store results as list of
GOHyperGResults objects ...
hgResultlst <- lapply(hgParamslst, hyperGTest)
@

Note:
The above hypergeometric testing code runs without error in a regular
basic R session, i.e.,

> # create list of GOHyperGParams objects for test="over" ...
> hgParamslst <- list( BP = over.hgparamsBP, CC = over.hgparamsCC, MF = 
over.hgparamsMF )

> # perform hypergeometric testing, store results as list of 
GOHyperGResults objects ...
> hgResultlst <- lapply(hgParamslst, hyperGTest)

but chokes in weaver for some reason, and I don't know why? [its my
first time using weaver]

If anyone could provide me with any insights regarding this matter, that
would be totally
awesome!

Thanks,

... Elliot

RE: Although loading a previously stored R session of objects does work
with Sweaving,
it hides all the steps that are used to generate those objects, ..., and
so I thought maybe
weaver could provide a solution to this, by enabling code chunk caching
of my rather
time-intensive GOstats' hyperGTest function calls.

> # print-out sessionInfo()
> sessionInfo()
R version 2.7.2 (2008-08-25)
i686-pc-linux-gnu

locale:
LC_CTYPE=en_US;LC_NUMERIC=C;LC_TIME=en_US;LC_COLLATE=C;LC_MONETARY=C;LC_MESSAGES=en_US;LC_PAPER=en_US;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US;LC_IDENTIFICATION=C

attached base packages:
[1] splines   tools     stats     graphics  grDevices utils     datasets
[8] methods   base

other attached packages:
[1] GOstats_2.6.0        Category_2.6.0       genefilter_1.20.1
[4] survival_2.34-1      RBGL_1.16.0          GO.db_2.2.0
[7] graph_1.18.1         lumiRatV1_1.3.1      lumiRatAll.db_1.2.0
[10] lumi_1.6.3           mgcv_1.4-1           beadarray_1.8.0
[13] affy_1.18.2          preprocessCore_1.2.1 affyio_1.8.1
[16] geneplotter_1.18.0   annotate_1.18.0      xtable_1.5-3
[19] AnnotationDbi_1.2.2  RSQLite_0.7-0        DBI_0.2-4
[22] lattice_0.17-15      Biobase_2.0.1        limma_2.14.7

loaded via a namespace (and not attached):
[1] KernSmooth_2.22-22 RColorBrewer_1.0-2 cluster_1.11.11    grid_2.7.2

-- 
__________________________
MS graduate student
Program in Computational Science
San Diego State University
http://www.csrc.sdsu.edu/



More information about the Bioconductor mailing list