[BioC] How can I combine rows from two different exprSet's into a new exprSet?

Martin Morgan mtmorgan at fhcrc.org
Fri Apr 20 19:34:50 CEST 2007


Hi John --

"John Cumbers" <johncumbers at gmail.com> writes:

> Hello,
> I'm stuck trying to combine two different sets of samples from two different
> exprSet objects into one exprSet object.
>
> If I use cbind then I just get a matrix out.
> gds1329Train <-
> cbind(gds1329esetAT[,1:3],gds1329esetBT[,1:8],gds1329esetLT[,1:13])
>
> If I use combine then this does not work
> gds1329Train <-
> combine(gds1329esetAT[,1:3],gds1329esetBT[,1:8],gds1329esetLT[,1:13])
> Error in function (classes, fdef, mtable)  :
> unable to find an inherited method for function "combine", for signature
> "exprSet", "missing"

This is a little complicated.

There are no 'combine' methods defined on exprSet

> showMethods('combine')
Function: combine (package Biobase)
x="AnnotatedDataFrame", y="AnnotatedDataFrame"
x="AssayData", y="AssayData"
x="data.frame", y="data.frame"
x="eSet", y="eSet"
x="MIAME", y="MIAME"
x="phenoData", y="ANY"
x="phenoData", y="phenoData"

One strategy would be to convert your exprSet to ExpressionSet

obj <- as(gds1329Train, "ExpressionSet")

and then (because of a bug in the current implementation of combine)

tmp <- combine(obj[,1:3], obj[,4:6])
res <- combine(tmp, obj[,7:9])

The drawback is that whatever downstream operations you would like to
perform need to work with ExpressionSet (most now should), or you need
to 'back-convert' (by hand, maybe creating a new exprSet from the
relevant components of 'res')

Another strategy is to basically implement a 'combine' method for
exprSet. This means pulling the exprSet apart into it's different
parts, figuring out what it means to 'combine' each part, and then
piecing exprSet back together. This might be tedious to do in general,
but not so bad for your particular data.

Sorry that this is not too much help.

Martin

> What I want is for gds1329Train to remain an exprSet so that I can use mfilt
> on it.
>
> any help much appreciated,
> Best,
> John
>
>
>
>
>
> -- 
> John Cumbers,  Graduate Student
> Biology and Medicine
> Brown University, Box G-W
> Providence, Rhode Island, 02912, USA
> Tel USA: +1 401 523 8190,  Fax: +1 401 863-2166
> UK to USA: 0207 617 7824
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor

-- 
Martin Morgan
Bioconductor / Computational Biology
http://bioconductor.org



More information about the Bioconductor mailing list