[BioC] error creating new exprSet

Peter bioconductor-mailinglist at maubp.freeserve.co.uk
Thu Jun 15 23:34:52 CEST 2006

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)
> 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)


More information about the Bioconductor mailing list