This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Biobase: Eset Data Development Simple Example To Learn

Hi

I would like to learn how to create eSet data, can you help me to provide or provide a link on web that can help me to learn it easily. Please consider my limited knowledge in this field. Perhaps with help of small example would be appreciated: for example I have following data:

phenodata <- data.frame(X = rnorm(2000, 5, 2), Y = rnorm(2000, 10,2))
assayData <- data.frame(K = runif (2000, 0, 1), L = runif (2000, 0, 100))

I would appreciate it:

Thanks;

bioconductor

1 answer

You can not instantiate eSet objects because eSet is a virtual class. You can convince yourself by typing getClass("eSet"). However, you can create objects from the subclasses of eSet, that are not virtual: ExpressionSet, NChannelSet, ...

If you want to create an ExpressionSet for instance, you should probably use the constructor ExpressionSet(...) to do so. Have a look at the Examples section in ?ExpressionSet. Using new("ExpressionSet",...) would also work but is not the recommended way, unless you know what you are doing.

> assaydata <- matrix(rnorm(1000),100,10) ## matrix, not dataframe
> phenodata <- new("AnnotatedDataFrame",data=data.frame(A=letters[1:10],B=1:10))
> featuredata <- new("AnnotatedDataFrame",data=data.frame(a=1:100,b=100:1))
> eset <- ExpressionSet(assayData=assaydata,phenoData=phenodata,featureData=featuredata)
> eset
ExpressionSet (storageMode: lockedEnvironment)
assayData: 100 features, 10 samples 
  element names: exprs 
protocolData: none
phenoData
  sampleNames: 1 2 ... 10 (10 total)
  varLabels: A B
  varMetadata: labelDescription
featureData
  featureNames: 1 2 ... 100 (100 total)
  fvarLabels: a b
  fvarMetadata: labelDescription
experimentData: use 'experimentData(object)'
Annotation:

You might also be interested in ?readExpressionSet if you have you expression data and meta data in spreadsheet files.

Hope this helps.

Also, have a look at the Biobase vignettes.

Log in to answer this question.