error creating new exprSet
2
0
Entering edit mode
@kfbargadehues-1528
Last seen 10.2 years ago
Dear list, I tried to create a new exprSet from my filtered Affy genelist using R 2.3.0 with affy "1.10.0" simpleaffy "2.6.0" genefilter "1.10.0" and I got the folowing error: good.eset = new("exprSet", exprs = good) Error in validObject(.Object) : invalid class "exprSet" object: number of exprs columns different from number of pData rows But dim(good) [1] 7420 20 dim(pData(data)) [1] 20 1 I moved then to R version 2.2.0, 2005-10-06 affy "1.8.1" simpleaffy "2.4.2" genefilter "1.8.0" and the very same commands gave me no error. >good.eset = new("exprSet", exprs = good) >good.eset Expression Set (exprSet) with 7420 genes 20 samples phenoData object with 0 variables and 0 cases varLabels Have I missed some critical changes in the new versions of the packages?
affy affy • 893 views
ADD COMMENT
0
Entering edit mode
@martin-morgan-1513
Last seen 4 months ago
United States
The change is in the Biobase package, which affy et al rely on. Biobase now checks to make sure the objects it creates are valid, in this case that the number of exprs columns (i.e., samples) equals the number of pData rows. When you say > good.eset = new("exprSet", exprs = good) exprSet sees that it's supposed to create an instance with 20 samples, but how can it create the corresponding phenoData? From this: > dim(pData(data)) it looks like you have a phenoData object that you want to associate with your exprs data. So... good.eset = new("exprSet", exprs=good, phenoData=data) (perhaps data is an exprSet, and you need to provide phenoData(data) as the value of phenoData) should do the trick. Notice that in the old version >good.eset = new("exprSet", exprs = good) >good.eset Expression Set (exprSet) with 7420 genes 20 samples phenoData object with 0 variables and 0 cases varLabels you've generated an invalid exprSet -- no description of the phenotypes associated with your samples! Hope that helps Martin kfbargad at ehu.es writes: > Dear list, > > I tried to create a new exprSet from my filtered Affy genelist using R > 2.3.0 with > affy "1.10.0" > simpleaffy "2.6.0" > genefilter "1.10.0" > > and I got the folowing error: > > good.eset = new("exprSet", exprs = good) > Error in validObject(.Object) : invalid class "exprSet" object: number > of exprs columns different from number of pData rows > > But > dim(good) > [1] 7420 20 > dim(pData(data)) > [1] 20 1 > > I moved then to R version 2.2.0, 2005-10-06 > affy "1.8.1" > simpleaffy "2.4.2" > genefilter "1.8.0" > > and the very same commands gave me no error. >>good.eset = new("exprSet", exprs = good) >>good.eset > Expression Set (exprSet) with > 7420 genes > 20 samples > phenoData object with 0 variables and 0 cases > varLabels > > > Have I missed some critical changes in the new versions of the > packages? > > _______________________________________________ > 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
ADD COMMENT
0
Entering edit mode
Martin Morgan wrote: > The change is in the Biobase package, which affy et al rely > on. Biobase now checks to make sure the objects it creates are valid, > in this case that the number of exprs columns (i.e., samples) equals > the number of pData rows. > > When you say > >>good.eset = new("exprSet", exprs = good) > > exprSet sees that it's supposed to create an instance with 20 samples, > but how can it create the corresponding phenoData? If you don't have any real phenotype data, then this will generate a dummy phenotype object with the sample number: pheno <- read.phenoData(NULL, colnames(data), FALSE) good.eset <- new("exprSet", exprs=good, phenoData=pheno) The resulting phenotype data is just a "sample number" (i.e. column number in the data matrix/array). > > Notice that in the old version > >>good.eset = new("exprSet", exprs = good) >>good.eset > > Expression Set (exprSet) with > 7420 genes > 20 samples > phenoData object with 0 variables and 0 cases > varLabels > > you've generated an invalid exprSet -- no description of the > phenotypes associated with your samples! Wouldn't it make sense to modify the new("exprSet") code to have the phenoData argument default to this: read.phenoData(NULL, colnames(data), FALSE) Peter
ADD REPLY
0
Entering edit mode
Seth Falcon ★ 7.4k
@seth-falcon-992
Last seen 10.2 years ago
Peter <bioconductor-mailinglist at="" maubp.freeserve.co.uk=""> writes: > If you don't have any real phenotype data, then this will generate a > dummy phenotype object with the sample number: > > pheno <- read.phenoData(NULL, colnames(data), FALSE) > good.eset <- new("exprSet", exprs=good, phenoData=pheno) > > The resulting phenotype data is just a "sample number" (i.e. column > number in the data matrix/array). One of the main ideas of the exprSet class is to organize expression values _and_ sample data (phenotype info). In other words, I don't think the common case is one in which there is no phenotype data other than an ID. As you have found, the case of ID only can be handled by the current code. If there are others who would find such a default useful, please speak up, otherwise I would suggest a smaller helper function to create new exprSet instances for your particular use case. Best, + seth
ADD COMMENT

Login before adding your answer.

Traffic: 807 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6