Error when running script on latest BioC: "ExpressionSet" object: sampleNames differ between phenoData and protocolData
1
0
Entering edit mode
@dirk-swanevelder-4063
Last seen 10.5 years ago
Hi Everyone, I'm having troubles with a script that previously worked after an upgrade to the latest R and Bioconductor (2.6) versions. The "Rawdata.RData" is produced. The else loop portion works, i.e. ReadAffy(), if the "Target.txt" file is removed. The filenames are read from the Target file (tested). * * *> **base<-getwd() * *>DATA<-paste(base,"/Raw and Normalized R datasets/",sep=""); DATA * *>dir.create(DATA,showWarnings=TRUE,recursive=FALSE) * *>if (file.exists("Target.txt")) {* * >pd<-read.AnnotatedDataFrame("Target.txt",sep="\t",header=TRUE,row.nam es=1); * *>data<-ReadAffy(filenames=pData(pd)$FileName);* *>data@phenoData<-pd;* *>save(data,file=paste(DATA,"Rawdata.RData",sep="")); } else {* *>data<-ReadAffy()* *>save(data,file=paste(DATA,"Rawdata.RData",sep="")) }* *>esetRMA<-rma(data); * Calculating Expression Error in validObject(.Object) : invalid class "ExpressionSet" object: sampleNames differ between phenoData and protocolData Calls: rma ... callNextMethod -> eval -> eval -> .nextMethod -> validObject Execution halted *Target.txt file (tab delimited):* SlideNumber FileName Target TechRep BioRep sampleNames 1 TUG 1.CEL 1 0 1 Tug1 2 TUG 2.CEL 1 0 2 Tug2 3 TUG 3.CEL 1 0 3 Tug3 4 TUG DN1_1.CEL 2 0 1 TugDn_1 5 TUG DN1_2.CEL 2 0 2 TugDn_2 *Libraries used in the script* library(affy) library(gcrma) library(limma) library(Biobase) library(affyPLM) library(marray) library(annaffy) library(geneplotter) library(made4) library(multtest) library(vsn) library(graphics) library(IDPmisc) Kind regards and many thanx for helping, Dirk [[alternative HTML version deleted]]
• 3.1k views
ADD COMMENT
0
Entering edit mode
@vincent-j-carey-jr-4
Last seen 3 days ago
United States
Read the error message. The following tasks will help see how to solve the problem > library(Biobase) > data(sample.ExpressionSet) > sampleNames(sample.ExpressionSet) [1] "A" "B" "C" "D" "E" "F" "G" "H" "I" "J" "K" "L" "M" "N" "O" "P" "Q" "R" "S" [20] "T" "U" "V" "W" "X" "Y" "Z" > sampleNames(assayData(sample.ExpressionSet)) [1] "A" "B" "C" "D" "E" "F" "G" "H" "I" "J" "K" "L" "M" "N" "O" "P" "Q" "R" "S" [20] "T" "U" "V" "W" "X" "Y" "Z" > sampleNames(phenoData(sample.ExpressionSet)) [1] "A" "B" "C" "D" "E" "F" "G" "H" "I" "J" "K" "L" "M" "N" "O" "P" "Q" "R" "S" [20] "T" "U" "V" "W" "X" "Y" "Z" > sampleNames(phenoData(sample.ExpressionSet))[1] = "ZZ" > validObject(sample.ExpressionSet) Error in validObject(sample.ExpressionSet) : invalid class "ExpressionSet" object: 1: sampleNames differ between assayData and phenoData invalid class "ExpressionSet" object: 2: sampleNames differ between phenoData and protocolData > sampleNames(phenoData(sample.ExpressionSet))[1] = "A" > validObject(sample.ExpressionSet) [1] TRUE You need, and the above code shows you have convenient facilities for, achieving agreement in sample names for two components of your expression data -- the assayData and the sample-level "phenoData". It is critical that these names be appropriate to both facets of the expression data, thus the object validator fails when discrepancies are noted. Whence the discrepancies arose is not discernible from your notes. > sessionInfo() R version 2.11.0 Patched (2010-05-01 r51901) x86_64-apple-darwin10.3.0 locale: [1] C attached base packages: [1] stats graphics grDevices datasets tools utils methods [8] base other attached packages: [1] affy_1.26.0 Biobase_2.8.0 weaver_1.14.0 codetools_0.2-2 [5] digest_0.4.2 loaded via a namespace (and not attached): [1] affyio_1.16.0 preprocessCore_1.10.0 On Wed, May 5, 2010 at 11:27 AM, Dirk Swanevelder < dirk.swanevelder@googlemail.com> wrote: > Hi Everyone, > > > > I'm having troubles with a script that previously worked after an upgrade > to > the latest R and Bioconductor (2.6) versions. The "Rawdata.RData" is > produced. The else loop portion works, i.e. ReadAffy(), if the "Target.txt" > file is removed. The filenames are read from the Target file (tested). > > * * > > *> **base<-getwd() > * > > *>DATA<-paste(base,"/Raw and Normalized R datasets/",sep=""); DATA * > > *>dir.create(DATA,showWarnings=TRUE,recursive=FALSE) * > > > > *>if (file.exists("Target.txt")) {* > > * > > >pd<-read.AnnotatedDataFrame("Target.txt",sep="\t",header=TRUE,row.n ames=1); > * > > *>data<-ReadAffy(filenames=pData(pd)$FileName);* > > *>data@phenoData<-pd;* > > *>save(data,file=paste(DATA,"Rawdata.RData",sep="")); } else {* > > *>data<-ReadAffy()* > > *>save(data,file=paste(DATA,"Rawdata.RData",sep="")) }* > > *>esetRMA<-rma(data); * > > > > Calculating Expression > Error in validObject(.Object) : > invalid class "ExpressionSet" object: sampleNames differ between phenoData > and protocolData > Calls: rma ... callNextMethod -> eval -> eval -> .nextMethod -> validObject > Execution halted > > > > > > *Target.txt file (tab delimited):* > > SlideNumber FileName Target TechRep BioRep sampleNames > 1 TUG 1.CEL 1 0 1 Tug1 > 2 TUG 2.CEL 1 0 2 Tug2 > 3 TUG 3.CEL 1 0 3 Tug3 > 4 TUG DN1_1.CEL 2 0 1 TugDn_1 > 5 TUG DN1_2.CEL 2 0 2 TugDn_2 > > > > *Libraries used in the script* > > library(affy) > > library(gcrma) > > library(limma) > > library(Biobase) > > library(affyPLM) > > library(marray) > > library(annaffy) > > library(geneplotter) > > library(made4) > > library(multtest) > > library(vsn) > > library(graphics) > > library(IDPmisc) > > Kind regards and many thanx for helping, > > Dirk > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor@stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > [[alternative HTML version deleted]]
ADD COMMENT

Login before adding your answer.

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