Skip to content

[Bioc-devel] [BioC] error with AffyQCReport

4 messages · James W. MacDonald, Mark Kimpel, Wolfgang Huber

#
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]

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:

  
    
#
Hi Mark,
Mark W Kimpel wrote:
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

  
    
#
Jim,

Nope, I don't think that's it. I have 29 CEL files. I also looked at 
nchar instead of length. Here's the output:

affy.object<-ReadAffy(phenoData = adf)
 > paste(experiment.designator, "AffyQCReport.pdf", sep=".")
[1] "RL02.AffyQCReport.pdf"
 > length(paste(experiment.designator, "AffyQCReport.pdf", sep="."))
[1] 1
 > nchar(paste(experiment.designator, "AffyQCReport.pdf", sep="."))
[1] 21
 > length(list.celfiles())
[1] 29
 >
James W. MacDonald wrote:

  
    
2 days later
#
Dear Mark,

I don't have the input data that you used to get your error, and I
couldn't reproduce it by running the script
affyQCReport/inst/scripts/DilutionExample.R which is in the package.

It looks though as if it has to do with the way that your affy.object is
constructed.  The call to "boxplot" is not dispatched to the AffyBatch
method "boxplot" but rather to "boxplot.default".

Mark, could you post your input data so others can reproduce your
problem and try to figure out what is going. You could also check
yourself by going into this level of the call stack:
  2: signalDist(object)
and see what class "object" is and why it then calls the wrong boxplot
method.

 Best wishes
 Wolfgang