[Bioc-devel] [BioC] error with AffyQCReport
Hi Mark,
Mark W Kimpel wrote:
Wolfgang,
I installed a fresh build of R 2.5.0-devel 2 days ago and updated all my
devel packages today. I get the same error. See my debugging output
below. Note that read.AnnotatedDataFrame.ordered is my own function to
keep me from accidentally not ordering my text file in the same order as
my cel.files. The last I knew read.phenoData did not include this
feature and I really screwed up an analysis because of it. Anyway, my
function code it immediately below. I'm copying to BioC-devel list as
that might be the best place to continue this.
Thanks,
Mark
#reads in unsorted phenodata type file and makes and adf. "adf.txt" MUST
have celfiles names without ".CEL" as sample names in first column
########################################################################
read.AnnotatedDataFrame.ordered.func<-function(adf.file="adf.txt")
{
require(affy, quiet=TRUE)
adf<-read.AnnotatedDataFrame(adf.file, header=TRUE, sep="\t", row.names=1)
cel.files<-list.celfiles()
pos<-pmatch(rownames(pData(adf)), cel.files)
adf<-adf[pos,]
adf
}
############################################################
#Session output
> #QC > adf<-read.AnnotatedDataFrame.ordered.func() > > affy.object<-ReadAffy(phenoData=adf) > > QCReport(object=affy.object,file=paste(experiment.designator,
"AffyQCReport.pdf", sep=".")) Error in attr(groups, "names") <- names : 'names' attribute [29] must be the same length as the vector [1]
What exactly is 'experiment.designator'? I can get this function to work (although I get a different warning I am trying to track down). What do you get when you do paste(experiment.designator, "AffyQCReport.pdf", sep=".") at an R prompt? From the error I am betting you get something of length 29. Best, Jim
Enter a frame number, or 0 to exit 1: QCReport(object = affy.object, file = paste(experiment.designator, "AffyQCReport.pdf", sep = ".")) 2: signalDist(object) 3: boxplot(object, names = ArrayIndex, ylab = "Log2(Intesity)", xlab = "Array Index") 4: boxplot.default(object, names = ArrayIndex, ylab = "Log2(Intesity)", xlab = "Array Index") Selection: 4 Called from: eval(expr, envir, enclos) Browse[1]> ls() [1] "*tmp*" "add" "args" "at" "border" "col" "groups" "horizontal" "log" "n" "namedargs" [12] "names" "notch" "outline" "pars" "plot" "range" "varwidth" "width" "x" Browse[1]> names [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" Browse[1]> groups [[1]] AffyBatch object size of arrays=834x834 features (182056 kb) cdf=Rat230_2 (31099 affyids) number of samples=29 number of genes=695556 annotation=rat2302 notes= Browse[1]> c Enter a frame number, or 0 to exit 1: QCReport(object = affy.object, file = paste(experiment.designator, "AffyQCReport.pdf", sep = ".")) 2: signalDist(object) 3: boxplot(object, names = ArrayIndex, ylab = "Log2(Intesity)", xlab = "Array Index") 4: boxplot.default(object, names = ArrayIndex, ylab = "Log2(Intesity)", xlab = "Array Index") Selection: 0
> sessionInfo()
R version 2.5.0 Under development (unstable) (2007-01-31 r40628) i386-pc-mingw32 locale: LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252 attached base packages: [1] "splines" "stats" "graphics" "grDevices" "datasets" "utils" "tools" "methods" "base" other attached packages: rat2302cdf affyQCReport lattice geneplotter RColorBrewer affyPLM gcrma matchprobes affydata xtable simpleaffy "1.15.0" "1.13.16" "0.14-16" "1.12.0" "0.2-3" "1.11.13" "2.7.1" "1.7.4" "1.11.1" "1.4-3" "2.9.1" affycoretools biomaRt RCurl XML GOstats Category genefilter survival KEGG RBGL annotate "1.6.0" "1.6.3" "0.8-0" "1.4-1" "2.1.11" "2.1.11" "1.13.8" "2.31" "1.15.1" "1.11.4" "1.13.6" GO graph limma affy affyio Biobase "1.15.1" "1.13.5" "2.9.9" "1.13.14" "1.3.3" "1.13.34" Wolfgang Huber wrote:
Dear Mark, the parts of Biobase and of the affyQCReport packages that may be involved in your problem have changed quite a lot since the 1.9 release. Would you mind trying to see whether you get the same (or another) problem with a current R-devel and the devel versions of the packages? Otherwise we may end up chasing bugs that are long gone... Best wishes Wolfgang W Kimpel wrote:
I am getting an error with QCReport of package affyQCReport. Debugging info and sessionInfo() follows. It looks to me like the group attributes is not being extracted properly from the affyObject. SampleNames that match the CEL files are stored in the first column of Data. I am using the current version of R and BioC packages, not the devel versions. Thanks, Mark
?QCReport paste(experiment.designator, "AffyQCReport.pdf", sep=".")
[1] "RL02.AffyQCReport.pdf"
QCReport(object=affy.object,file=paste(experiment.designator,
"AffyQCReport.pdf", sep="."))
Error in attr(groups, "names") <- names : 'names' attribute [29] must be
the same length as the vector [1]
Enter a frame number, or 0 to exit
1: QCReport(object = affy.object, file = paste(experiment.designator,
"AffyQCReport.pdf", sep = "."))
2: signalDist(object)
3: boxplot(object, names = ArrayIndex, ylab = "Log2(Intesity)", xlab =
"Array Index")
4: boxplot.default(object, names = ArrayIndex, ylab = "Log2(Intesity)",
xlab = "Array Index")
Selection: 2
Called from: eval(expr, envir, enclos)
Browse[1]> ls()
[1] "ArrayIndex" "object"
Browse[1]> ArrayIndex
[1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13"
"14" "15" "16" "17" "18" "19" "20" "21" "22" "23" "24" "25" "26" "27"
"28" "29"
Browse[1]> object
AffyBatch object
size of arrays=834x834 features (157603 kb)
cdf=Rat230_2 (31099 affyids)
number of samples=29
number of genes=31099
annotation=rat2302
Browse[1]> c
Enter a frame number, or 0 to exit
1: QCReport(object = affy.object, file = paste(experiment.designator,
"AffyQCReport.pdf", sep = "."))
2: signalDist(object)
3: boxplot(object, names = ArrayIndex, ylab = "Log2(Intesity)", xlab =
"Array Index")
4: boxplot.default(object, names = ArrayIndex, ylab = "Log2(Intesity)",
xlab = "Array Index")
Selection: 3
Called from: eval(expr, envir, enclos)
Browse[1]> boxplot
function (x, ...)
UseMethod("boxplot")
<environment: namespace:graphics>
Browse[1]> ls()
[1] "x"
Browse[1]> x
AffyBatch object
size of arrays=834x834 features (157603 kb)
cdf=Rat230_2 (31099 affyids)
number of samples=29
number of genes=31099
annotation=rat2302
Browse[1]> c
Enter a frame number, or 0 to exit
1: QCReport(object = affy.object, file = paste(experiment.designator,
"AffyQCReport.pdf", sep = "."))
2: signalDist(object)
3: boxplot(object, names = ArrayIndex, ylab = "Log2(Intesity)", xlab =
"Array Index")
4: boxplot.default(object, names = ArrayIndex, ylab = "Log2(Intesity)",
xlab = "Array Index")
Selection: 4
Called from: eval(expr, envir, enclos)
Browse[1]> ls()
[1] "*tmp*" "add" "args" "at" "border"
"col" "groups" "horizontal" "log" "n"
"namedargs"
[12] "names" "notch" "outline" "pars" "plot"
"range" "varwidth" "width" "x"
Browse[1]> dim(x)
NULL
Browse[1]> names
[1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13"
"14" "15" "16" "17" "18" "19" "20" "21" "22" "23" "24" "25" "26" "27"
"28" "29"
Browse[1]> attr(groups,names)
Error during wrapup: exactly one attribute 'name' must be given
Browse[1]> groups
[[1]]
AffyBatch object
size of arrays=834x834 features (157603 kb)
cdf=Rat230_2 (31099 affyids)
number of samples=29
number of genes=31099
annotation=rat2302
Browse[1]> c
Enter a frame number, or 0 to exit
1: QCReport(object = affy.object, file = paste(experiment.designator,
"AffyQCReport.pdf", sep = "."))
2: signalDist(object)
3: boxplot(object, names = ArrayIndex, ylab = "Log2(Intesity)", xlab =
"Array Index")
4: boxplot.default(object, names = ArrayIndex, ylab = "Log2(Intesity)",
xlab = "Array Index")
Selection: 0
sessionInfo()
R version 2.4.1 (2006-12-18)
i386-pc-mingw32
locale:
LC_COLLATE=English_United States.1252;LC_CTYPE=English_United
States.1252;LC_MONETARY=English_United
States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252
attached base packages:
[1] "splines" "stats" "graphics" "grDevices" "datasets"
"utils" "tools" "methods" "base"
other attached packages:
rat2302cdf affyQCReport simpleaffy affycoretools
biomaRt RCurl XML GOstats Category
genefilter survival
"1.14.0" "1.12.0" "2.8.0" "1.6.0"
"1.8.1" "0.8-0" "1.2-0" "2.0.4" "2.0.3"
"1.12.0" "2.30"
KEGG RBGL annotate GO
graph RWinEdt limma affy affyio Biobase
"1.14.1" "1.10.0" "1.12.1" "1.14.1"
"1.12.0" "1.7-5" "2.9.1" "1.12.2" "1.2.0"
"1.12.2"
James W. MacDonald, M.S. Biostatistician Affymetrix and cDNA Microarray Core University of Michigan Cancer Center 1500 E. Medical Center Drive 7410 CCGC Ann Arbor MI 48109 734-647-5623 ********************************************************** Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues.