[BioC] Error in QAReport function of package affyQCReport
Mark W Kimpel
mwkimpel at gmail.com
Sun Jul 29 08:23:30 CEST 2007
I believe I have identified at least one potential contributor to the
problem. In my .Rprofile, the very last like is
"require(affycoretools)". I have this because affycoretools loads so
many of the packages I use every day. When I start R without .Rprofile,
QCReport works fine, but when I use .Rprofile, I get the following slew
of error messages, which I sheepishly have to admit I have been ignoring
because I wasn't having any problems. Of note is the lines:
"The following object(s) are masked from package:affy :
barplot,"
It looks to me like some of the base packages are loading after affy and
this is causing problems.
However, now that I have gotten QCReport to run, I am having trouble
with affyQAReport. I am running R on a Linux machine with 4GB of RAM,
and when I run affyQAReport on 80 rat2302 arrays I get an out of memory
message. When I subset the affybatch down to 16 arrays, I get the
following error
"affyQAReport(affyB = affy.batch.sub, output = "pdf", outdir =
"~/Genomics/TL01-05/affyQA", overwrite = FALSE, repName =
"affyQAreport.pdf")
Error in affyQAReport(affyB = affy.batch.sub, output = "pdf", outdir =
"~/Genomics/TL01-05/affyQA", :
could not find function "dist2"
I agree that this is odd behavior. If you think I should reinstall R and
packages, I'll do it. Below is the full output of my R startup if I have
.Rprofile in play and load affycoretools on bootup.
Mark
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.
Loading required package: utils
[1] "packages do not need updated"
Loading required package: RSPerl
Error in dyn.load(file, ...) :
unable to load shared library
'/home/mkimpel/R_HOME/R-devel/R-build/site-library/RSPerl/libs/RSPerl.so':
/home/mkimpel/R_HOME/R-devel/R-build/site-library/RSPerl/libs/RSPerl.so:
undefined symbol: Rf_initEmbeddedR
In addition: There were 18 warnings (use warnings() to see them)
sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `./WriteXLS.pl --CSVpath=CSVFILES.tmp/ --CSVfiles=*.csv
paste(oldwd, TestReport.xls, sep='/')'
Loading required package: affycoretools
Loading required package: affy
Loading required package: Biobase
Loading required package: tools
Welcome to Bioconductor
Vignettes contain introductory material. To view, type
'openVignette()'. To cite Bioconductor, see
'citation("Biobase")' and for packages 'citation(pkgname)'.
Loading required package: affyio
Loading required package: preprocessCore
Loading required package: limma
Loading required package: GOstats
Loading required package: graph
Loading required package: GO
Loading required package: annotate
Loading required package: AnnotationDbi
Loading required package: DBI
Loading required package: RSQLite
Loading required package: RBGL
Loading required package: Category
Loading required package: KEGG
Loading required package: genefilter
Loading required package: survival
Loading required package: stats
Attaching package: 'stats'
The following object(s) are masked from package:affy :
update
Loading required package: graphics
Attaching package: 'graphics'
The following object(s) are masked from package:affy :
barplot,
boxplot,
hist,
image
Loading required package: splines
Loading required package: biomaRt
Loading required package: XML
Attaching package: 'XML'
The following object(s) are masked from package:graph :
addNode
Loading required package: RCurl
Attaching package: 'biomaRt'
The following object(s) are masked from package:annotate :
getGO
Loading required package: gcrma
Loading required package: matchprobes
Loading required package: xtable
Loading required package: annaffy
Attaching package: 'affycoretools'
The following object(s) are masked _by_ .GlobalEnv :
vennCounts2,
vennSelect
> if(!exists("baseenv", mode="function")) baseenv <- function() NULL
> options(STERM='iESS', editor='emacsclient')
>
---
Mark W. Kimpel MD ** Neuroinformatics ** Dept. of Psychiatry
Indiana University School of Medicine
15032 Hunter Court, Westfield, IN 46074
(317) 490-5129 Work, & Mobile & VoiceMail
(317) 663-0513 Home (no voice mail please)
******************************************************************
Robert Gentleman wrote:
> Hi Mark,
>
> Let's see if we cannot fix some of the problems and hopefully life
> will get better.
>
>
> Mark W Kimpel wrote:
>> Seth and Robert,
>>
>> Looks like I may have more than one problem. To clarify one point
>> first, in my original post I was using affy.batch.sub, which consisted
>> of just some of the arrays from my affy.batch. To make sure I'm not
>> having a problem with subsetting, in my subsequent posts I am using
>> the affybatch object created just today with ReadAffy. No old versions
>> here, just what comes out of my sessionInfo().
>>
>> As you can see below, there may be a problem with my boxplot method
>> but also with the affybatch object. The latter is of class AffyBatch
>> but is not a valid object.
>>
>> Thanks, Mark
>>
>> > class(affy.batch)
>> [1] "AffyBatch"
>> attr(,"package")
>> [1] "affy"
>>
>> > require(affy)
>> > showMethods("boxplot")
>> Error in get(if (inherited) ".AllMTable" else ".MTable", envir = env) :
>> variable ".AllMTable" was not found
>
> there is something very odd about this - I have not seen it before,
> but it suggests that you might need to do a clean re-install of R and
> packages as something in the methods package (I think) is very confused.
> Not good news, I know, but you should not have this problem. And just to
> be sure this happens if you just start up R, load the affy library and
> then issue the commands above? That is what you need to check.
>
>
> Does this only happen for boxplot? What if you look at
> showMethods(exprs) or something of that nature?
>
>>
>> Enter a frame number, or 0 to exit
>>
>> 1: showMethods("boxplot")
>> 2: .showMethodsTable(getGeneric(f, where = where), includeDefs,
>> inherited, cla
>> 3: get(if (inherited) ".AllMTable" else ".MTable", envir = env)
>>
>>
>> > validObject(affy.batch)
>> Error in validObject(affy.batch) :
>> invalid class "AffyBatch" object: sampleNames differ between
>> assayData and phenoData
>
> This is a bit easier to fix. Simply change the sampleNames on one of
> the two structures to be the same as the others.
>
> Basically this is saying that the column names for your expression
> data do not agree with the row names of the phenotypic data. They might
> be different, or they might be out of order. You should look at both
> again using the AffyBatch example data:
>
> colnames(exprs(affybatch.example))
> rownames(pData(affybatch.example))
>
> need to be the same. If they are not then you need to figure out why
> not and fix them (maybe they are not in the same order, or one of them
> might be missing).
>
> I hope that helps
>
> Robert
>
>>
>> Enter a frame number, or 0 to exit
>>
>> 1: validObject(affy.batch)
>>
>> > par(mfrow=c(2, 1))
>> > ArrayIndex = as.character(1:length(sampleNames(affy.batch)))
>> >
>> boxplot(affy.batch,names=ArrayIndex,ylab="Log2(Intensity)",xlab="Array
>> Index")
>> Error in attr(groups, "names") <- names :
>> 'names' attribute [80] must be the same length as the vector [1]
>>
>> Enter a frame number, or 0 to exit
>>
>> 1: boxplot(affy.batch, names = ArrayIndex, ylab = "Log2(Intensity)",
>> xlab = "A
>> 2: boxplot(affy.batch, names = ArrayIndex, ylab = "Log2(Intensity)",
>> xlab = "A
>> 3: boxplot.default(affy.batch, names = ArrayIndex, ylab =
>> "Log2(Intensity)", x
>>
>> Selection:
>>
>> ---
>>
>> Mark W. Kimpel MD ** Neuroinformatics ** Dept. of Psychiatry
>> Indiana University School of Medicine
>>
>> 15032 Hunter Court, Westfield, IN 46074
>>
>> (317) 490-5129 Work, & Mobile & VoiceMail
>> (317) 663-0513 Home (no voice mail please)
>>
>> ******************************************************************
>>
>> Robert Gentleman wrote:
>>> It looks to me like you are using a function named QCReport, not
>>> QAReport (and indeed there is no such thing - you might look at
>>> affyQAReport, which is in the same package but is very different).
>>>
>>> You can try to see what is happening by looking at the code from
>>> signalDist:
>>>
>>> par(mfrow=c(2, 1))
>>> ArrayIndex = as.character(1:length(sampleNames(object)))
>>> boxplot(object,names=ArrayIndex,ylab="Log2(Intensity)",xlab="Array
>>> Index")
>>>
>>>
>>> where instead of object you use affy.batch.sub. The code looks pretty
>>> straightforward, so I don't know what the problem might be. It is a
>>> bit odd, it seems to me to use integers in place of the sample names...
>>>
>>> I used the affybatch.example and it worked for me.. ( one issue with
>>> that was
>>> Warning message:
>>> In data.row.names(row.names, rowsi, i) :
>>> some row.names duplicated:
>>> 2,26,51,76,101,126,151,176,201,226,251,276,301,326,351,376,401,426,451,476,501,526,551,576,601,626,651,676,701,726,751,776,801,826,
>>>
>>> ....
>>>
>>> which we may need to look at).
>>>
>>> best wishes
>>> Robert
>>>
>>>
>>> Mark W Kimpel wrote:
>>>> I am running into an error when I run QAReport on an affybatch
>>>> object. Below is my sessionInfo and output. I am using the devel
>>>> versions of R and BioC, all newly updated. Please advise.
>>>>
>>>> Thanks,
>>>> Mark
>>>>
>>>> Browse[1]> sessionInfo()
>>>> R version 2.6.0 Under development (unstable) (2007-06-30 r42095)
>>>> i686-pc-linux-gnu
>>>>
>>>> locale:
>>>> LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=en_US.UTF-8;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C
>>>>
>>>>
>>>> attached base packages:
>>>> [1] grDevices datasets splines graphics stats tools utils
>>>> [8] methods base
>>>>
>>>> other attached packages:
>>>> [1] hgu95av2cdf_1.17.0 rat2302cdf_1.17.0 affyQCReport_1.15.2
>>>> [4] geneplotter_1.15.2 lattice_0.16-2 RColorBrewer_1.0-1
>>>> [7] affyPLM_1.13.6 affydata_1.11.2 simpleaffy_2.11.21
>>>> [10] affycoretools_1.9.2 annaffy_1.9.1 xtable_1.4-6
>>>> [13] gcrma_2.9.1 matchprobes_1.9.10 biomaRt_1.11.4
>>>> [16] RCurl_0.8-1 XML_1.9-0 GOstats_2.3.8
>>>> [19] Category_2.3.16 genefilter_1.15.3 survival_2.32
>>>> [22] KEGG_1.17.0 RBGL_1.13.3 annotate_1.15.2
>>>> [25] AnnotationDbi_0.0.83 RSQLite_0.6-0 DBI_0.2-3
>>>> [28] GO_1.17.0 graph_1.15.10 limma_2.11.9
>>>> [31] affy_1.15.7 preprocessCore_0.99.12 affyio_1.5.6
>>>> [34] Biobase_1.15.21
>>>>
>>>> loaded via a namespace (and not attached):
>>>> [1] cluster_1.11.7 grid_2.6.0 KernSmooth_2.22-20
>>>>
>>>> > affy.batch.sub
>>>> AffyBatch object
>>>> size of arrays=834x834 features (14 kb)
>>>> cdf=Rat230_2 (31099 affyids)
>>>> number of samples=16
>>>> number of genes=31099
>>>> annotation=rat2302
>>>> notes=
>>>> > QCReport(affy.batch.sub)
>>>> Error in attr(groups, "names") <- names :
>>>> 'names' attribute [16] must be the same length as the vector [1]
>>>>
>>>> Enter a frame number, or 0 to exit
>>>>
>>>> 1: QCReport(affy.batch.sub)
>>>> 2: signalDist(object)
>>>> 3: boxplot(object, names = ArrayIndex, ylab = "Log2(Intensity)",
>>>> xlab = "Array
>>>> 4: boxplot.default(object, names = ArrayIndex, ylab =
>>>> "Log2(Intensity)", xlab
>>>>
>>>> Selection: 4
>>>> Called from: eval(expr, envir, enclos)
>>>> Browse[1]> ls()
>>>> [1] "add" "args" "at" "border" "col"
>>>> [6] "groups" "horizontal" "log" "n" "namedargs"
>>>> [11] "names" "notch" "outline" "pars" "plot"
>>>> [16] "range" "*tmp*" "varwidth" "width" "x"
>>>> Browse[1]> names
>>>> [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12"
>>>> "13" "14" "15"
>>>> [16] "16"
>>>> Browse[1]> names(group)
>>>> NULL
>>>> Browse[1]> names(groups)
>>>> [1] ""
>>>> Browse[1]> names(groups) <- names
>>>> Error during wrapup: 'names' attribute [16] must be the same length
>>>> as the vector [1]
>>>> Browse[1]>
>>>
>>
>
More information about the Bioconductor
mailing list