[Bioc-devel] exprSet to ExpressionSet issue

Martin Morgan mtmorgan at fhcrc.org
Fri Oct 6 19:18:28 CEST 2006

Biobase provides an 'as' method to convert exprSet to
ExpressionSet. Unfortunately, the development (from r19607,
2006-09-04) and just released versions did not convert
varLabels(phenoData(exprSet)) from 'list' to 'character' before
creating varMetadata(ExpressionSet)[["labelDescription"]]

> library(Biobase)
> data(sample.exprSet)
> obj <- as(sample.exprSet, "ExpressionSet") 
> str(varMetadata(obj)[["labelDescription"]])
List of 3
 $ sex  : chr "Female/Male"
 $ type : chr "Case/Control"
 $ score: chr "Testing Score"

This is fixed in the devel version of Biobase, and will be patched in
the released version in the next several days; some data pacakges have
content with this undesireable structure, and will be updated as well.

Instances of exprSet updated to ExpressionSet can be corrected with

> varMetadata(obj)[["labelDescription"]] <-
+    as.character(varMetadata(obj)[["labelDescription"]])

so that

> str(varMetadata(obj)[["labelDescription"]])
 chr [1:3] "Female/Male" "Case/Control" "Testing Score"

Martin T. Morgan
Bioconductor / Computational Biology

More information about the Bioc-devel mailing list