[BioC] Error in validObject(.Object)

James W. MacDonald jmacdon at uw.edu
Thu Jun 19 19:03:34 CEST 2014


Hi Monique,

If you want to put the phenoData into your AffyBatch, then you also need 
to add the protocolData as well. The simplest thing is to just create an 
empty protocolData object, and use that:

protocolData(mydata) <- new("AnnotatedDataFrame", data = 
data.frame(row.names = row.names(pData(mydata))))

Best,

Jim



On 6/19/2014 12:38 PM, Surles, Monique wrote:
> Hi List,
>
> When trying to do a RMA or Mas5 analysis on my microarray data, the following error keeps coming up....Error in validObject(.Object) :
>    invalid class "ExpressionSet" object: sampleNames differ between phenoData and protocolDat".
>
> I went back and confirmed that the sample names are the same. I am using Windows 7 Professional(32 bit). Please assist... Is there something I am missing?  Your guidance is greatly appreciated.
> Please see session information below.
>
> R version 3.1.0 (2014-04-10) -- "Spring Dance"
> Copyright (C) 2014 The R Foundation for Statistical Computing
> Platform: x86_64-w64-mingw32/x64 (64-bit)
>
> R is free software and comes with ABSOLUTELY NO WARRANTY.
> You are welcome to redistribute it under certain conditions.
> Type 'license()' or 'licence()' for distribution details.
>
> R is a collaborative project with many contributors.
> Type 'contributors()' for more information and
> 'citation()' on how to cite R or R packages in publications.
>
> Type 'demo()' for some demos, 'help()' for on-line help, or
> 'help.start()' for an HTML browser interface to help.
> Type 'q()' to quit R.
>
>> source("http://www.bioconductor.org/biocLite.R")
> Bioconductor version 2.14 (BiocInstaller 1.14.2), ?biocLite for help
>> biocLite("affy")
> BioC_mirror: http://bioconductor.org
> Using Bioconductor version 2.14 (BiocInstaller 1.14.2), R version 3.1.0.
> Installing package(s) 'affy'
> trying URL 'http://bioconductor.org/packages/2.14/bioc/bin/windows/contrib/3.1/affy_1.42.2.zip'
> Content type 'application/zip' length 2914230 bytes (2.8 Mb)
> opened URL
> downloaded 2.8 Mb
>
> package 'affy' successfully unpacked and MD5 sums checked
>
> The downloaded binary packages are in
>          C:\Users\msurles\AppData\Local\Temp\RtmpI10rXE\downloaded_packages
> Old packages: 'VariantAnnotation'
> Update all/some/none? [a/s/n]:
> a
> trying URL 'http://bioconductor.org/packages/2.14/bioc/bin/windows/contrib/3.1/VariantAnnotation_1.10.3.zip'
> Content type 'application/zip' length 3808952 bytes (3.6 Mb)
> opened URL
> downloaded 3.6 Mb
>
> package 'VariantAnnotation' successfully unpacked and MD5 sums checked
>
> The downloaded binary packages are in
>          C:\Users\msurles\AppData\Local\Temp\RtmpI10rXE\downloaded_packages
>> library(affy)
> Loading required package: BiocGenerics
> Loading required package: parallel
>
> Attaching package: 'BiocGenerics'
>
> The following objects are masked from 'package:parallel':
>
>      clusterApply, clusterApplyLB, clusterCall, clusterEvalQ, clusterExport, clusterMap, parApply, parCapply,
>      parLapply, parLapplyLB, parRapply, parSapply, parSapplyLB
>
> The following object is masked from 'package:stats':
>
>      xtabs
>
> The following objects are masked from 'package:base':
>
>      anyDuplicated, append, as.data.frame, as.vector, cbind, colnames, do.call, duplicated, eval, evalq, Filter,
>      Find, get, intersect, is.unsorted, lapply, Map, mapply, match, mget, order, paste, pmax, pmax.int, pmin,
>      pmin.int, Position, rank, rbind, Reduce, rep.int, rownames, sapply, setdiff, sort, table, tapply, union,
>      unique, unlist
>
> Loading required package: Biobase
> Welcome to Bioconductor
>
>      Vignettes contain introductory material; view with 'browseVignettes()'. To cite Bioconductor, see
>      'citation("Biobase")', and for packages 'citation("pkgname")'.
>
>> biocLite("affycoretools")
> BioC_mirror: http://bioconductor.org
> Using Bioconductor version 2.14 (BiocInstaller 1.14.2), R version 3.1.0.
> Installing package(s) 'affycoretools'
> trying URL 'http://bioconductor.org/packages/2.14/bioc/bin/windows/contrib/3.1/affycoretools_1.36.1.zip'
> Content type 'application/zip' length 1052018 bytes (1.0 Mb)
> opened URL
> downloaded 1.0 Mb
>
> package 'affycoretools' successfully unpacked and MD5 sums checked
>
> The downloaded binary packages are in
>          C:\Users\msurles\AppData\Local\Temp\RtmpI10rXE\downloaded_packages
>> library(affycoretools)
> Loading required package: GO.db
> Loading required package: AnnotationDbi
> Loading required package: GenomeInfoDb
> Loading required package: DBI
>
> KernSmooth 2.23 loaded
> Copyright M. P. Wand 1997-2009
>
>> biocLite("limma")
> BioC_mirror: http://bioconductor.org
> Using Bioconductor version 2.14 (BiocInstaller 1.14.2), R version 3.1.0.
> Installing package(s) 'limma'
> trying URL 'http://bioconductor.org/packages/2.14/bioc/bin/windows/contrib/3.1/limma_3.20.5.zip'
> Content type 'application/zip' length 3580258 bytes (3.4 Mb)
> opened URL
> downloaded 3.4 Mb
>> setwd("C:/Users/msurles/desktop/my info/microarray analysis/stroke/UPR/R/data analysis/chp files")
>> getwd()
> [1] "C:/Users/msurles/desktop/my info/microarray analysis/stroke/UPR/R/data analysis/chp files"
>> mydata <- ReadAffy()#
>> sampleNames(mydata)
> [1] "AK02 24 hours_(HG-U133_Plus_2).CEL" "AK02 pre-occ_(HG-U133_Plus_2).CEL"  "AK06 24h post_(HG-U133_Plus_2).CEL"
> [4] "AK51 24hours_(HG-U133_Plus_2).CEL"  "AK51 pre-occ_(HG-U133_Plus_2).CEL"  "AM14 1hour_(HG-U133_Plus_2).CEL"
>   [7] "AM14 24hour_(HG-U133_Plus_2).CEL"   "AM14 2hour _(HG-U133_Plus_2).CEL"   "AM14 pre_(HG-U133_Plus_2).CEL"
> [10] "Monkey 1B_(HG-U133_Plus_2).CEL"     "Monkey 2B_(HG-U133_Plus_2).CEL"     "Monkey 3B_(HG-U133_Plus_2).CEL"
> [13] "Monkey 4B_(HG-U133_Plus_2).CEL"
>> pData(mydata)<-read.table("C:/users/msurles/desktop/my info/microarray analysis/stroke/UPR/R/data analysis/analysis needed/phenodata UPR.txt", header=T, row.names=1, sep="\t")
>> pData(mydata)
>                                   condition
> Monkey 1B_(HG-U133_Plus_2).CEL       pre-occ
> Monkey 2B_(HG-U133_Plus_2).CEL          1 hr
> Monkey 3B_(HG-U133_Plus_2).CEL          2 hr
> Monkey 4B_(HG-U133_Plus_2).CEL         24 hr
> AM14 1hour_(HG-U133_Plus_2).CEL         1 hr
> AM14 2hour _(HG-U133_Plus_2).CEL        2 hr
> AM14 24hour_(HG-U133_Plus_2).CEL       24 hr
> AM14 pre_(HG-U133_Plus_2).CEL        pre-occ
> AK06 24h post_(HG-U133_Plus_2).CEL     24 hr
> AK02 pre-occ_(HG-U133_Plus_2).CEL    pre-occ
> AK02 24 hours_(HG-U133_Plus_2).CEL     24 hr
> AK51 pre-occ_(HG-U133_Plus_2).CEL    pre-occ
> AK51 24hours_(HG-U133_Plus_2).CEL      24 hr
> eset <- rma(mydata)
> Background correcting
> Normalizing
> Calculating Expression
> Error in validObject(.Object) :
>    invalid class "ExpressionSet" object: sampleNames differ between phenoData and protocolData
>> eset1 <- mas5(mydata)
> background correction: mas
> PM/MM correction : mas
> expression values: mas
> background correcting...done.
> 54675 ids to be processed
> |                    |
> |####################|
> Error in validObject(.Object) :
>    invalid class "ExpressionSet" object: sampleNames differ between phenoData and protocolData
>
>
>
>
>
> Thank you
> Monique
> PhD student
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
>

-- 
James W. MacDonald, M.S.
Biostatistician
University of Washington
Environmental and Occupational Health Sciences
4225 Roosevelt Way NE, # 100
Seattle WA 98105-6099



More information about the Bioconductor mailing list