Cannot instantiate ExpressionSet
1
0
Entering edit mode
21 months ago
hansrupp • 0

Hello,

I am a beginner with bioinformatics.. I am trying to follow https://app.datacamp.com/learn/courses/differential-expression-analysis-with-limma-in-r

library(tidyverse)
rm(list=ls())
BiocManager::install("breastCancerVDX")
#https://bioconductor.org/packages/release/data/experiment/html/breastCancerVDX.html
library(breastCancerVDX)
library(Biobase)

# load the dataset
data(vdx)
eset <- ExpressionSet(assayData = exprs(vdx),
                      phenoData = AnnotatedDataFrame(pData(vdx)),
                      featureData = AnnotatedDataFrame(data.frame(featureNames(vdx))))

This returns:

Error in validObject(.Object) : invalid class “ExpressionSet” object: featureNames differ between assayData and featureData

However:

identical(featureNames(vdx), rownames(exprs(vdx)) TRUE

How can I fix this?

Many thanks,

Hans

ExpressionSet Bioconductor • 596 views
ADD COMMENT
1
Entering edit mode
21 months ago
Basti ★ 2.0k

identical(data.frame(featureNames(vdx)), rownames(exprs(vdx))) is FALSE because you convert a vector to a data.frame so the rownames will be 1,2,...nrows

I suggest you to add a step to create featureData :

featureData=data.frame(featureNames(vdx))
rownames(featureData)=featureNames(vdx)
eset <- ExpressionSet(assayData = exprs(vdx),
                      phenoData = AnnotatedDataFrame(pData(vdx)),
                      featureData = AnnotatedDataFrame(featureData))
ADD COMMENT

Login before adding your answer.

Traffic: 2587 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