Hi Aditya,
On 6/22/2014 8:41 AM, Aditya [guest] wrote:
> i am new to Bioconductor and I want to analyze dataset GSE23343,
> which contain 17 samples (7 normal and 10 T2D) i am following
>
http://koti.mbnet.fi/tuimala/oppaat/r2.pdf book, on page number 102
> gene set test using KEGG is there. kindly let me know the problom in
> my code. why i am encountering this problom ? Error in
.getNull(null,
> data, n, model) : argument "null" could not be coerced into a matrix
>
>
>
> -- output of sessionInfo():
>
>> dat<-ReadAffy() dat
>
> AffyBatch object size of arrays=1164x1164 features (14 kb)
> cdf=HG-U133_Plus_2 (54675 affyids) number of samples=17 number of
> genes=54675 annotation=hgu133plus2 notes=
>> dat2<-rma(dat)
> Background correcting Normalizing Calculating Expression
>> dat.m<-exprs(dat2) library(hgu133plus2.db)
> Loading required package: org.Hs.eg.db Loading required package: DBI
>
>
>> pathway2probe<-get("hgu133plus2PATH2PROBE")
>> kegg<-as.list(pathway2probe) library(globaltest)
>> groups<-c(0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1)
>> test.kegg<-gt(as.matrix(dat.m), groups, kegg)
This is not the code on p. 102. On that page they use a function
called
'globaltest' which apparently has been deprecated. So you cannot just
assume that gt() works the same as globaltest(), and blindly
substitute
the functions. Instead, you have to read the help page to see what
this
function is expecting.
The API for gt() is:
gt(response, alternative, null, data, test.value,
model = c("linear", "logistic", "cox", "poisson", "multinomial"),
levels, directional = FALSE, standardize = FALSE, permutations = 0,
subsets, weights, alias, x = FALSE, trace)
If you don't name your arguments, then R will use positional argument
matching. So you are passing in your data in the 'response' position,
your groups vector in the 'alternative' position, and your kegg list
in
the 'null' position.
So none of your arguments are in the correct position, and it appears
none of them are even correct arguments, except for the input data.
The book you are following is from 2008, so you could always install a
very old version of R and Bioconductor if you want to follow that
code.
Alternatively you can try to figure out how to use the modern version
of
globaltest. I would recommend starting with the vignette:
http://bioconductor.org/packages/release/bioc/vignettes/globaltest/ins
t/doc/GlobalTest.pdf
Best,
Jim
> Error in .getNull(null, data, n, model) : argument "null" could not
> be coerced into a matrix
>
>
> -- Sent via the guest posting facility at bioconductor.org.
>
> _______________________________________________ Bioconductor mailing
> list Bioconductor at r-project.org
>
https://stat.ethz.ch/mailman/listinfo/bioconductor Search the
> archives:
>
http://news.gmane.org/gmane.science.biology.informatics.conductor
>
--
James W. MacDonald, M.S.
Biostatistician
University of Washington
Environmental and Occupational Health Sciences
4225 Roosevelt Way NE, # 100
Seattle WA 98105-6099