problem with duplicateCorrelation and ExpressionSet objects
2
0
Entering edit mode
Jenny Drnevich ★ 2.2k
@jenny-drnevich-382
Last seen 10.3 years ago
Hi Gordon, The gcrma.pres object from the previous example was created by subsetting an object created by gcrma() on an AffyBatch object (code below). I get the same error if I use the original ExpressionSet object created by gcrma() and if I use an ExpressionSet object created by rma(). I would assume that rma() and gcrma() would output real ExpressionSet objects?!? Actually, calling as.matrix() on any of my ExpressionSet objects works fine on it's own, but somehow not within duplicateCorrelation (see code) - how can this be? Thanks, Jenny > raw <- ReadAffy() > gcrma.all <- gcrma(raw) > gcrma.pres <- gcrma.all[num.pres>0,] > corfit <- duplicateCorrelation(gcrma.pres,design,ndups=1,block=c(2,2,1,1,3,3)) Error in as.vector(x, mode) : cannot coerce to vector > corfit <- duplicateCorrelation(gcrma.all,design,ndups=1,block=c(2,2,1,1,3,3)) Error in as.vector(x, mode) : cannot coerce to vector > rma.all <- rma(raw) Background correcting Normalizing Calculating Expression > corfit <- duplicateCorrelation(rma.all,design,ndups=1,block=c(2,2,1,1,3,3)) Error in as.vector(x, mode) : cannot coerce to vector > temp <- as.matrix(rma.all) #this works fine, but somehow not in duplicateCorrelation!!! From the debugger: Browse[1]> M <- as.matrix(object) Error in as.vector(x, mode) : cannot coerce to vector >class(raw) [1] "AffyBatch" attr(,"package") [1] "affy" > class(gcrma.all) [1] "ExpressionSet" attr(,"package") [1] "Biobase" > class(gcrma.pres) [1] "ExpressionSet" attr(,"package") [1] "Biobase" > typeof(raw) [1] "S4" > typeof(gcrma.all) [1] "S4" > typeof(gcrma.pres) [1] "S4" At 05:59 PM 5/16/2007, Gordon K Smyth wrote: >Dear Jenny, > >limma already has an as.matrix method for ExpressionSet >objects. I've just run the following code >which demonstrates that duplicateCorrelation() does work on such objects: > > > library(Biobase) > > library(limma) > > x <- matrix(rnorm(50*4),50,4) > > y <- new("ExpressionSet",exprs=x) > > dupcor <- duplicateCorrelation(y,ndups=2) > Loading required package: statmod > > dupcor$consensus > [1] -0.07112392 > >I suspect that your data object is not actually an ExpressionSet >object, although perhaps it is >something which inherits from ExpressionSet. I can't tell from your >code where you object has >come from or what class it is. > >Because as.matrix() is an S3 generic, there is a problem with S4 >objects which inherit from >ExpressionSet. Can you give more information about how your problem arises? > >Best wishes >Gordon > >On Thu, May 17, 2007 5:15 am, Jenny Drnevich wrote: > > Hi Gordon and others, > > > > I just tried calling duplicateCorrelation on an ExpressionSet object > > with the newest versions of R, Bioconductor and limma (codes and > > sessionInfo() below) and it won't work. I don't think the problem > > lies with duplicateCorrelation() itself, rather that as.matrix() does > > not work for ExpressionSet objects whereas it did work for exprSet > > objects. The help file for duplicateCorrelation has this description > > for the input object: > > > > "a numeric matrix of expression values, or any data object from which > > as.matrix will extract a suitable matrix such as an > > > <mk:@msitstore:c:\progra~1\r\r-25~1.0\library\limma\chtml\limma.chm: :="" malist.html="">MAList, > > marrayNorm or exprSet object." > > > > The code and error: > > > > > corfit <- > > duplicateCorrelation(gcrma.pres,design,ndups=1,block=c(2,2,1,1,3,3)) > > Error in as.vector(x, mode) : cannot coerce to vector > > > > From debugging duplicateCorrelation, the problem is in the very > > first line of code: > > > > Browse[1]> M <- as.matrix(object) > > Error in as.vector(x, mode) : cannot coerce to vector > > > > > > If you don't intend as.matrix() to work for ExpressionSet objects, > > then the code for duplicateCorrelation maybe should be changed. Of > > course, the easy work-around is to pass exprs(gcrma.pres) to > > duplicateCorrelation. > > > > Cheers, > > Jenny > > > > > sessionInfo() > > R version 2.5.0 (2007-04-23) > > 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" "tools" "stats" "graphics" "grDevices" "utils" > > [7] "datasets" "methods" "base" > > > > other attached packages: > > hgu133plus2probe hgu133plus2cdf affyQCReport geneplotter > > "1.16.0" "1.16.0" "1.14.0" "1.14.0" > > RColorBrewer simpleaffy made4 scatterplot3d > > "0.2-3" "2.10.11" "1.10.0" "0.3-24" > > ade4 affyPLM affydata affycoretools > > "1.4-3" "1.12.0" "1.11.2" "1.8.0" > > annaffy xtable gcrma matchprobes > > "1.8.1" "1.4-3" "2.8.0" "1.8.0" > > biomaRt RCurl XML GOstats > > "1.10.0" "0.8-0" "1.7-1" "2.2.1" > > Category Matrix lattice genefilter > > "2.2.2" "0.9975-11" "0.15-4" "1.14.1" > > survival KEGG RBGL annotate > > "2.31" "1.16.0" "1.12.0" "1.14.1" > > GO graph limma affy > > "1.16.0" "1.14.0" "2.10.0" "1.14.0" > > affyio Biobase RWinEdt > > "1.4.0" "1.14.0" "1.7-5" > > > > > > > > > Jenny Drnevich, Ph.D. > > > > Functional Genomics Bioinformatics Specialist > > W.M. Keck Center for Comparative and Functional Genomics > > Roy J. Carver Biotechnology Center > > University of Illinois, Urbana-Champaign > > > > 330 ERML > > 1201 W. Gregory Dr. > > Urbana, IL 61801 > > USA > > > > ph: 217-244-7355 > > fax: 217-265-5066 > > e-mail: drnevich at uiuc.edu Jenny Drnevich, Ph.D. Functional Genomics Bioinformatics Specialist W.M. Keck Center for Comparative and Functional Genomics Roy J. Carver Biotechnology Center University of Illinois, Urbana-Champaign 330 ERML 1201 W. Gregory Dr. Urbana, IL 61801 USA ph: 217-244-7355 fax: 217-265-5066 e-mail: drnevich at uiuc.edu
GO Survival cdf Biobase graph limma gcrma annaffy affyPLM simpleaffy biomaRt Category • 2.1k views
ADD COMMENT
0
Entering edit mode
@gordon-smyth
Last seen 23 minutes ago
WEHI, Melbourne, Australia
Hi Jenny, Well may you ask, how this could be. Just to make it more interesting, you'll find that the problem disappears if you don't have the Matrix package attached to your session. Thanks to Martin Morgan for correctly diagnosing the problem. The problem arises because (i) I forgot to declare the as.matrix method for ExpressionSet objects in the limma NAMESPACE and (ii) the Matrix package declares as.matrix to be an S4 generic causing a conflict with limma. I have corrected the limma NAMESPACE in limma 2.10.4 and 2.11.4. This means that you will be able to re-install limma soon from either the BioC release or devel branches and be protected from this error. In the meantime, just make sure that you don't have the Matrix package loaded when using duplicateCorrelation() or lmFit() in limma. Best wishes Gordon At 05:16 AM 18/05/2007, Jenny Drnevich wrote: >Hi Gordon, > >The gcrma.pres object from the previous example was created by >subsetting an object created by gcrma() on an AffyBatch object (code >below). I get the same error if I use the original ExpressionSet >object created by gcrma() and if I use an ExpressionSet object >created by rma(). I would assume that rma() and gcrma() would output >real ExpressionSet objects?!? Actually, calling as.matrix() on any >of my ExpressionSet objects works fine on it's own, but somehow not >within duplicateCorrelation (see code) - how can this be? > >Thanks, >Jenny > > > > raw <- ReadAffy() > > > gcrma.all <- gcrma(raw) > > > gcrma.pres <- gcrma.all[num.pres>0,] > > > corfit <- > duplicateCorrelation(gcrma.pres,design,ndups=1,block=c(2,2,1,1,3,3)) >Error in as.vector(x, mode) : cannot coerce to vector > > > corfit <- > duplicateCorrelation(gcrma.all,design,ndups=1,block=c(2,2,1,1,3,3)) >Error in as.vector(x, mode) : cannot coerce to vector > > > rma.all <- rma(raw) >Background correcting >Normalizing >Calculating Expression > > > corfit <- duplicateCorrelation(rma.all,design,ndups=1,block=c(2,2,1,1,3,3)) >Error in as.vector(x, mode) : cannot coerce to vector > > > temp <- as.matrix(rma.all) > #this works fine, but somehow not in > duplicateCorrelation!!! From the debugger: > >Browse[1]> M <- as.matrix(object) >Error in as.vector(x, mode) : cannot coerce to vector > > > >class(raw) >[1] "AffyBatch" >attr(,"package") >[1] "affy" > > > class(gcrma.all) >[1] "ExpressionSet" >attr(,"package") >[1] "Biobase" > > > class(gcrma.pres) >[1] "ExpressionSet" >attr(,"package") >[1] "Biobase" > > > typeof(raw) >[1] "S4" > > > typeof(gcrma.all) >[1] "S4" > > > typeof(gcrma.pres) >[1] "S4" > >At 05:59 PM 5/16/2007, Gordon K Smyth wrote: >>Dear Jenny, >> >>limma already has an as.matrix method for ExpressionSet >>objects. I've just run the following code >>which demonstrates that duplicateCorrelation() does work on such objects: >> >> > library(Biobase) >> > library(limma) >> > x <- matrix(rnorm(50*4),50,4) >> > y <- new("ExpressionSet",exprs=x) >> > dupcor <- duplicateCorrelation(y,ndups=2) >> Loading required package: statmod >> > dupcor$consensus >> [1] -0.07112392 >> >>I suspect that your data object is not actually an ExpressionSet >>object, although perhaps it is >>something which inherits from ExpressionSet. I can't tell from >>your code where you object has >>come from or what class it is. >> >>Because as.matrix() is an S3 generic, there is a problem with S4 >>objects which inherit from >>ExpressionSet. Can you give more information about how your problem arises? >> >>Best wishes >>Gordon >> >>On Thu, May 17, 2007 5:15 am, Jenny Drnevich wrote: >> > Hi Gordon and others, >> > >> > I just tried calling duplicateCorrelation on an ExpressionSet object >> > with the newest versions of R, Bioconductor and limma (codes and >> > sessionInfo() below) and it won't work. I don't think the problem >> > lies with duplicateCorrelation() itself, rather that as.matrix() does >> > not work for ExpressionSet objects whereas it did work for exprSet >> > objects. The help file for duplicateCorrelation has this description >> > for the input object: >> > >> > "a numeric matrix of expression values, or any data object from which >> > as.matrix will extract a suitable matrix such as an >> > >> <mk:@msitstore:c:\progra~1\r\r-25~1.0\library\limma\chtml\limma.chm ::="" malist.html="">MAList, >> > marrayNorm or exprSet object." >> > >> > The code and error: >> > >> > > corfit <- >> > duplicateCorrelation(gcrma.pres,design,ndups=1,block=c(2,2,1,1,3,3)) >> > Error in as.vector(x, mode) : cannot coerce to vector >> > >> > From debugging duplicateCorrelation, the problem is in the very >> > first line of code: >> > >> > Browse[1]> M <- as.matrix(object) >> > Error in as.vector(x, mode) : cannot coerce to vector >> > >> > >> > If you don't intend as.matrix() to work for ExpressionSet objects, >> > then the code for duplicateCorrelation maybe should be changed. Of >> > course, the easy work-around is to pass exprs(gcrma.pres) to >> > duplicateCorrelation. >> > >> > Cheers, >> > Jenny >> > >> > > sessionInfo() >> > R version 2.5.0 (2007-04-23) >> > 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" "tools" "stats" "graphics" "grDevices" "utils" >> > [7] "datasets" "methods" "base" >> > >> > other attached packages: >> > hgu133plus2probe hgu133plus2cdf affyQCReport geneplotter >> > "1.16.0" "1.16.0" "1.14.0" "1.14.0" >> > RColorBrewer simpleaffy made4 scatterplot3d >> > "0.2-3" "2.10.11" "1.10.0" "0.3-24" >> > ade4 affyPLM affydata affycoretools >> > "1.4-3" "1.12.0" "1.11.2" "1.8.0" >> > annaffy xtable gcrma matchprobes >> > "1.8.1" "1.4-3" "2.8.0" "1.8.0" >> > biomaRt RCurl XML GOstats >> > "1.10.0" "0.8-0" "1.7-1" "2.2.1" >> > Category Matrix lattice genefilter >> > "2.2.2" "0.9975-11" "0.15-4" "1.14.1" >> > survival KEGG RBGL annotate >> > "2.31" "1.16.0" "1.12.0" "1.14.1" >> > GO graph limma affy >> > "1.16.0" "1.14.0" "2.10.0" "1.14.0" >> > affyio Biobase RWinEdt >> > "1.4.0" "1.14.0" "1.7-5" >> > > >> > >> > >> > Jenny Drnevich, Ph.D. >> > >> > Functional Genomics Bioinformatics Specialist >> > W.M. Keck Center for Comparative and Functional Genomics >> > Roy J. Carver Biotechnology Center >> > University of Illinois, Urbana-Champaign >> > >> > 330 ERML >> > 1201 W. Gregory Dr. >> > Urbana, IL 61801 >> > USA >> > >> > ph: 217-244-7355 >> > fax: 217-265-5066 >> > e-mail: drnevich at uiuc.edu > >Jenny Drnevich, Ph.D. > >Functional Genomics Bioinformatics Specialist >W.M. Keck Center for Comparative and Functional Genomics >Roy J. Carver Biotechnology Center >University of Illinois, Urbana-Champaign > >330 ERML >1201 W. Gregory Dr. >Urbana, IL 61801 >USA > >ph: 217-244-7355 >fax: 217-265-5066 >e-mail: drnevich at uiuc.edu
ADD COMMENT
0
Entering edit mode
Hi Gordon, I'm still having the problem with duplicateCorrelation on an ExpressionSet object, even though I upgraded to limma 2.10.4. Additionally, the 'fix' of not having the Matrix package loaded doesn't work either, unless there's a difference between never having loaded the package and detaching the package... Am I doing something wrong? Thanks, Jenny > gcrma.no1 <- gcrma(raw[,-1]) > detach(package:Matrix) > corfit <- duplicateCorrelation(gcrma.no1,design.no1,ndups=1,block=targets$pair[- 1]) Error in as.vector(x, mode) : cannot coerce to vector > sessionInfo() R version 2.5.0 (2007-04-23) 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" "tools" "stats" "graphics" "grDevices" "utils" [7] "datasets" "methods" "base" other attached packages: bovineprobe bovinecdf affyQCReport geneplotter RColorBrewer "1.16.0" "1.16.0" "1.14.0" "1.14.0" "0.2-3" simpleaffy made4 scatterplot3d ade4 affyPLM "2.10.11" "1.10.0" "0.3-24" "1.4-3" "1.12.0" affydata affycoretools annaffy xtable gcrma "1.11.2" "1.8.0" "1.8.1" "1.4-3" "2.8.1" matchprobes biomaRt RCurl XML GOstats "1.8.1" "1.10.0" "0.8-0" "1.7-1" "2.2.3" Category lattice genefilter survival KEGG "2.2.3" "0.15-4" "1.14.1" "2.31" "1.16.0" RBGL annotate GO graph limma "1.12.0" "1.14.1" "1.16.0" "1.14.1" "2.10.4" affy affyio Biobase RWinEdt "1.14.1" "1.4.0" "1.14.0" "1.7-5" > At 02:32 AM 5/18/2007, Gordon Smyth wrote: >Hi Jenny, > >Well may you ask, how this could be. Just to make it more >interesting, you'll find that the problem disappears if you don't >have the Matrix package attached to your session. > >Thanks to Martin Morgan for correctly diagnosing the problem. The >problem arises because (i) I forgot to declare the as.matrix method >for ExpressionSet objects in the limma NAMESPACE and (ii) the Matrix >package declares as.matrix to be an S4 generic causing a conflict with limma. > >I have corrected the limma NAMESPACE in limma 2.10.4 and 2.11.4. >This means that you will be able to re-install limma soon from >either the BioC release or devel branches and be protected from this >error. In the meantime, just make sure that you don't have the >Matrix package loaded when using duplicateCorrelation() or lmFit() in limma. > >Best wishes >Gordon > >At 05:16 AM 18/05/2007, Jenny Drnevich wrote: >>Hi Gordon, >> >>The gcrma.pres object from the previous example was created by >>subsetting an object created by gcrma() on an AffyBatch object >>(code below). I get the same error if I use the original >>ExpressionSet object created by gcrma() and if I use an >>ExpressionSet object created by rma(). I would assume that rma() >>and gcrma() would output real ExpressionSet objects?!? Actually, >>calling as.matrix() on any of my ExpressionSet objects works fine >>on it's own, but somehow not within duplicateCorrelation (see code) >>- how can this be? >> >>Thanks, >>Jenny >> >> >> > raw <- ReadAffy() >> >> > gcrma.all <- gcrma(raw) >> >> > gcrma.pres <- gcrma.all[num.pres>0,] >> >> > corfit <- >> duplicateCorrelation(gcrma.pres,design,ndups=1,block=c(2,2,1,1,3,3)) >>Error in as.vector(x, mode) : cannot coerce to vector >> >> > corfit <- >> duplicateCorrelation(gcrma.all,design,ndups=1,block=c(2,2,1,1,3,3)) >>Error in as.vector(x, mode) : cannot coerce to vector >> >> > rma.all <- rma(raw) >>Background correcting >>Normalizing >>Calculating Expression >> >> > corfit <- >> duplicateCorrelation(rma.all,design,ndups=1,block=c(2,2,1,1,3,3)) >>Error in as.vector(x, mode) : cannot coerce to vector >> >> > temp <- as.matrix(rma.all) >> #this works fine, but somehow not in >> duplicateCorrelation!!! From the debugger: >> >>Browse[1]> M <- as.matrix(object) >>Error in as.vector(x, mode) : cannot coerce to vector >> >> >> >class(raw) >>[1] "AffyBatch" >>attr(,"package") >>[1] "affy" >> >> > class(gcrma.all) >>[1] "ExpressionSet" >>attr(,"package") >>[1] "Biobase" >> >> > class(gcrma.pres) >>[1] "ExpressionSet" >>attr(,"package") >>[1] "Biobase" >> >> > typeof(raw) >>[1] "S4" >> >> > typeof(gcrma.all) >>[1] "S4" >> >> > typeof(gcrma.pres) >>[1] "S4" >> >>At 05:59 PM 5/16/2007, Gordon K Smyth wrote: >>>Dear Jenny, >>> >>>limma already has an as.matrix method for ExpressionSet >>>objects. I've just run the following code >>>which demonstrates that duplicateCorrelation() does work on such objects: >>> >>> > library(Biobase) >>> > library(limma) >>> > x <- matrix(rnorm(50*4),50,4) >>> > y <- new("ExpressionSet",exprs=x) >>> > dupcor <- duplicateCorrelation(y,ndups=2) >>> Loading required package: statmod >>> > dupcor$consensus >>> [1] -0.07112392 >>> >>>I suspect that your data object is not actually an ExpressionSet >>>object, although perhaps it is >>>something which inherits from ExpressionSet. I can't tell from >>>your code where you object has >>>come from or what class it is. >>> >>>Because as.matrix() is an S3 generic, there is a problem with S4 >>>objects which inherit from >>>ExpressionSet. Can you give more information about how your problem arises? >>> >>>Best wishes >>>Gordon >>> >>>On Thu, May 17, 2007 5:15 am, Jenny Drnevich wrote: >>> > Hi Gordon and others, >>> > >>> > I just tried calling duplicateCorrelation on an ExpressionSet object >>> > with the newest versions of R, Bioconductor and limma (codes and >>> > sessionInfo() below) and it won't work. I don't think the problem >>> > lies with duplicateCorrelation() itself, rather that as.matrix() does >>> > not work for ExpressionSet objects whereas it did work for exprSet >>> > objects. The help file for duplicateCorrelation has this description >>> > for the input object: >>> > >>> > "a numeric matrix of expression values, or any data object from which >>> > as.matrix will extract a suitable matrix such as an >>> > >>> <mk:@msitstore:c:\progra~1\r\r-25~1.0\library\limma\chtml\limma.ch m::="" malist.html="">MAList, >>> > marrayNorm or exprSet object." >>> > >>> > The code and error: >>> > >>> > > corfit <- >>> > duplicateCorrelation(gcrma.pres,design,ndups=1,block=c(2,2,1,1,3,3)) >>> > Error in as.vector(x, mode) : cannot coerce to vector >>> > >>> > From debugging duplicateCorrelation, the problem is in the very >>> > first line of code: >>> > >>> > Browse[1]> M <- as.matrix(object) >>> > Error in as.vector(x, mode) : cannot coerce to vector >>> > >>> > >>> > If you don't intend as.matrix() to work for ExpressionSet objects, >>> > then the code for duplicateCorrelation maybe should be changed. Of >>> > course, the easy work-around is to pass exprs(gcrma.pres) to >>> > duplicateCorrelation. >>> > >>> > Cheers, >>> > Jenny >>> > >>> > > sessionInfo() >>> > R version 2.5.0 (2007-04-23) >>> > 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" "tools" "stats" "graphics" "grDevices" "utils" >>> > [7] "datasets" "methods" "base" >>> > >>> > other attached packages: >>> > hgu133plus2probe hgu133plus2cdf affyQCReport geneplotter >>> > "1.16.0" "1.16.0" "1.14.0" "1.14.0" >>> > RColorBrewer simpleaffy made4 scatterplot3d >>> > "0.2-3" "2.10.11" "1.10.0" "0.3-24" >>> > ade4 affyPLM affydata affycoretools >>> > "1.4-3" "1.12.0" "1.11.2" "1.8.0" >>> > annaffy xtable gcrma matchprobes >>> > "1.8.1" "1.4-3" "2.8.0" "1.8.0" >>> > biomaRt RCurl XML GOstats >>> > "1.10.0" "0.8-0" "1.7-1" "2.2.1" >>> > Category Matrix lattice genefilter >>> > "2.2.2" "0.9975-11" "0.15-4" "1.14.1" >>> > survival KEGG RBGL annotate >>> > "2.31" "1.16.0" "1.12.0" "1.14.1" >>> > GO graph limma affy >>> > "1.16.0" "1.14.0" "2.10.0" "1.14.0" >>> > affyio Biobase RWinEdt >>> > "1.4.0" "1.14.0" "1.7-5" >>> > > >>> > >>> > >>> > Jenny Drnevich, Ph.D. >>> > >>> > Functional Genomics Bioinformatics Specialist >>> > W.M. Keck Center for Comparative and Functional Genomics >>> > Roy J. Carver Biotechnology Center >>> > University of Illinois, Urbana-Champaign >>> > >>> > 330 ERML >>> > 1201 W. Gregory Dr. >>> > Urbana, IL 61801 >>> > USA >>> > >>> > ph: 217-244-7355 >>> > fax: 217-265-5066 >>> > e-mail: drnevich at uiuc.edu >> >>Jenny Drnevich, Ph.D. >> >>Functional Genomics Bioinformatics Specialist >>W.M. Keck Center for Comparative and Functional Genomics >>Roy J. Carver Biotechnology Center >>University of Illinois, Urbana-Champaign >> >>330 ERML >>1201 W. Gregory Dr. >>Urbana, IL 61801 >>USA >> >>ph: 217-244-7355 >>fax: 217-265-5066 >>e-mail: drnevich at uiuc.edu Jenny Drnevich, Ph.D. Functional Genomics Bioinformatics Specialist W.M. Keck Center for Comparative and Functional Genomics Roy J. Carver Biotechnology Center University of Illinois, Urbana-Champaign 330 ERML 1201 W. Gregory Dr. Urbana, IL 61801 USA ph: 217-244-7355 fax: 217-265-5066 e-mail: drnevich at uiuc.edu
ADD REPLY
0
Entering edit mode
Dear Jenny, I am unable to reproduce your error, despite installing and loading all the same packages that you have loaded in your session (except for RWinEdt which I am unable to install in R 2.5.0). For me to help you further, you would need to provide a reproducible example of the problem. That is, you need to provide an example of code which can be run by someone other than yourself which produces the same error. I give below a complete R session which I have just run, showing that duplicateCorrelation works fine for me. I have limma 2.11.4 loaded, but that is the same as 2.10.4. Best wishes Gordon === R session starts ========== > library(bovineprobe) Loading required package: matchprobes 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: affy Loading required package: affyio > library(bovinecdf) > library(affyQCReport) Loading required package: simpleaffy Loading required package: genefilter Loading required package: survival Loading required package: splines Loading required package: xtable Loading required package: affyPLM Loading required package: affydata Loading required package: gcrma Loading required package: RColorBrewer Loading required package: geneplotter Loading required package: annotate Loading required package: lattice KernSmooth 2.22 installed Copyright M. P. Wand 1997 > library(geneplotter) > library(RColorBrewer) > library(simpleaffy) > library(made4) Loading required package: ade4 Loading required package: scatterplot3d > library(scatterplot3d) > library(ade4) > library(affyPLM) > library(affydata) > library(affycoretools) Loading required package: limma Loading required package: GOstats Loading required package: graph Loading required package: GO Loading required package: RBGL Loading required package: Category Loading required package: KEGG Loading required package: Matrix 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: annaffy > library(annaffy) > library(xtable) > library(gcrma) > library(matchprobes) > library(biomaRt) > library(RCurl) > library(XML) > library(GOstats) > library(Category) > library(lattice) > library(genefilter) > library(survival) > library(KEGG) > library(RBGL) > library(annotate) > library(GO) > library(graph) > library(limma) > library(affy) > library(affyio) > library(Biobase) > > setwd("changed for confidentiality") > library(limma) > targets <- readTargets() > library(affy) > x <- ReadAffy(filenames=targets$FileName) > y <- gcrma(x) Attaching package: 'mouse4302cdf' The following object(s) are masked from package:bovinecdf : i2xy, xy2i Adjusting for optical effect..........Done. Computing affinities.Done. Adjusting for non-specific binding..........Done. Normalizing Calculating Expression > design <- model.matrix(~factor(targets$CellType)) > corfit <- duplicateCorrelation(y,design,ndups=1,block=c(1,1,1,2,2,2,2,2,2,2)) Loading required package: statmod > sessionInfo() R version 2.5.0 (2007-04-23) i386-pc-mingw32 locale: LC_COLLATE=English_Australia.1252;LC_CTYPE=English_Australia.1252;LC_M ONETARY=English_Australia.1252;LC_NUMERIC=C;LC_TIME=English_Australia. 1252 attached base packages: [1] "splines" "tools" "stats" "graphics" "grDevices" "utils" "datasets" "methods" "base" other attached packages: statmod mouse4302probe mouse4302cdf affycoretools annaffy biomaRt RCurl XML "1.3.0" "1.16.0" "1.16.0" "1.8.0" "1.8.1" "1.10.0" "0.8-0" "1.7-1" GOstats Category Matrix KEGG RBGL GO graph limma "2.2.3" "2.2.3" "0.99875-1" "1.16.0" "1.12.0" "1.16.0" "1.14.1" "2.11.4" made4 scatterplot3d ade4 affyQCReport geneplotter lattice annotate RColorBrewer "1.10.0" "0.3-24" "1.4-3" "1.14.0" "1.14.0" "0.15-5" "1.14.1" "0.2-3" affyPLM gcrma affydata xtable simpleaffy genefilter survival bovinecdf "1.12.0" "2.8.1" "1.11.2" "1.4-6" "2.10.11" "1.14.1" "2.31" "1.16.0" bovineprobe matchprobes affy affyio Biobase "1.16.0" "1.8.1" "1.14.0" "1.4.0" "1.14.0" ============= R session ends =============== At 01:52 AM 25/05/2007, Jenny Drnevich wrote: >Hi Gordon, > >I'm still having the problem with duplicateCorrelation on an >ExpressionSet object, even though I upgraded to limma 2.10.4. >Additionally, the 'fix' of not having the Matrix package loaded >doesn't work either, unless there's a difference between never >having loaded the package and detaching the package... Am I doing >something wrong? > >Thanks, >Jenny > > > gcrma.no1 <- gcrma(raw[,-1]) > > > detach(package:Matrix) > > > corfit <- > duplicateCorrelation(gcrma.no1,design.no1,ndups=1,block=targets$pair [-1]) >Error in as.vector(x, mode) : cannot coerce to vector > > > sessionInfo() >R version 2.5.0 (2007-04-23) >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" "tools" "stats" "graphics" "grDevices" "utils" >[7] "datasets" "methods" "base" > >other attached packages: > bovineprobe bovinecdf affyQCReport geneplotter RColorBrewer > "1.16.0" "1.16.0" "1.14.0" "1.14.0" "0.2-3" > simpleaffy made4 scatterplot3d ade4 affyPLM > "2.10.11" "1.10.0" "0.3-24" "1.4-3" "1.12.0" > affydata affycoretools annaffy xtable gcrma > "1.11.2" "1.8.0" "1.8.1" "1.4-3" "2.8.1" > matchprobes biomaRt RCurl XML GOstats > "1.8.1" "1.10.0" "0.8-0" "1.7-1" "2.2.3" > Category lattice genefilter survival KEGG > "2.2.3" "0.15-4" "1.14.1" "2.31" "1.16.0" > RBGL annotate GO graph limma > "1.12.0" "1.14.1" "1.16.0" "1.14.1" "2.10.4" > affy affyio Biobase RWinEdt > "1.14.1" "1.4.0" "1.14.0" "1.7-5"
ADD REPLY
0
Entering edit mode
Thanks Gordon and Seth, I won't be back in the office until Tuesday, so I'll play around with it then to see if I can get a reproducible example if I can't figure out where I've made a mistake... Cheers, Jenny At 05:10 PM 5/24/2007, Gordon Smyth wrote: >Dear Jenny, > >I am unable to reproduce your error, despite installing and loading >all the same packages that you have loaded in your session (except >for RWinEdt which I am unable to install in R 2.5.0). For me to help >you further, you would need to provide a reproducible example of the >problem. That is, you need to provide an example of code which can >be run by someone other than yourself which produces the same error. > >I give below a complete R session which I have just run, showing >that duplicateCorrelation works fine for me. I have limma 2.11.4 >loaded, but that is the same as 2.10.4. > >Best wishes >Gordon > >=== R session starts ========== > > > library(bovineprobe) >Loading required package: matchprobes >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: affy >Loading required package: affyio > > library(bovinecdf) > > library(affyQCReport) >Loading required package: simpleaffy >Loading required package: genefilter >Loading required package: survival >Loading required package: splines >Loading required package: xtable >Loading required package: affyPLM >Loading required package: affydata >Loading required package: gcrma >Loading required package: RColorBrewer >Loading required package: geneplotter >Loading required package: annotate >Loading required package: lattice >KernSmooth 2.22 installed >Copyright M. P. Wand 1997 > > library(geneplotter) > > library(RColorBrewer) > > library(simpleaffy) > > library(made4) >Loading required package: ade4 >Loading required package: scatterplot3d > > library(scatterplot3d) > > library(ade4) > > library(affyPLM) > > library(affydata) > > library(affycoretools) >Loading required package: limma >Loading required package: GOstats >Loading required package: graph >Loading required package: GO >Loading required package: RBGL >Loading required package: Category >Loading required package: KEGG >Loading required package: Matrix >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: annaffy > > library(annaffy) > > library(xtable) > > library(gcrma) > > library(matchprobes) > > library(biomaRt) > > library(RCurl) > > library(XML) > > library(GOstats) > > library(Category) > > library(lattice) > > library(genefilter) > > library(survival) > > library(KEGG) > > library(RBGL) > > library(annotate) > > library(GO) > > library(graph) > > library(limma) > > library(affy) > > library(affyio) > > library(Biobase) > > > > setwd("changed for confidentiality") > > library(limma) > > targets <- readTargets() > > library(affy) > > x <- ReadAffy(filenames=targets$FileName) > > y <- gcrma(x) > >Attaching package: 'mouse4302cdf' > > > The following object(s) are masked from package:bovinecdf : > > i2xy, > xy2i > >Adjusting for optical effect..........Done. >Computing affinities.Done. >Adjusting for non-specific binding..........Done. >Normalizing >Calculating Expression > > design <- model.matrix(~factor(targets$CellType)) > > corfit <- > duplicateCorrelation(y,design,ndups=1,block=c(1,1,1,2,2,2,2,2,2,2)) >Loading required package: statmod > > sessionInfo() >R version 2.5.0 (2007-04-23) >i386-pc-mingw32 > >locale: >LC_COLLATE=English_Australia.1252;LC_CTYPE=English_Australia.1252;LC_ MONETARY=English_Australia.1252;LC_NUMERIC=C;LC_TIME=English_Australia .1252 > >attached base packages: >[1] "splines" "tools" "stats" "graphics" "grDevices" >"utils" "datasets" "methods" "base" > >other attached packages: > statmod > mouse4302probe mouse4302cdf affycoretools annaffy > biomaRt RCurl XML > "1.3.0" "1.16.0" "1.16.0" "1.8.0" > "1.8.1" "1.10.0" "0.8-0" "1.7-1" > GOstats Category Matrix KEGG RBGL > GO graph limma > "2.2.3" "2.2.3" "0.99875-1" "1.16.0" > "1.12.0" "1.16.0" "1.14.1" "2.11.4" > made4 scatterplot3d ade4 affyQCReport > geneplotter lattice annotate RColorBrewer > "1.10.0" "0.3-24" "1.4-3" "1.14.0" > "1.14.0" "0.15-5" "1.14.1" "0.2-3" > affyPLM gcrma affydata xtable > simpleaffy genefilter survival bovinecdf > "1.12.0" "2.8.1" "1.11.2" "1.4-6" > "2.10.11" "1.14.1" "2.31" "1.16.0" > bovineprobe matchprobes affy affyio Biobase > "1.16.0" "1.8.1" "1.14.0" "1.4.0" "1.14.0" > >============= R session ends =============== > >At 01:52 AM 25/05/2007, Jenny Drnevich wrote: >>Hi Gordon, >> >>I'm still having the problem with duplicateCorrelation on an >>ExpressionSet object, even though I upgraded to limma 2.10.4. >>Additionally, the 'fix' of not having the Matrix package loaded >>doesn't work either, unless there's a difference between never >>having loaded the package and detaching the package... Am I doing >>something wrong? >> >>Thanks, >>Jenny >> >> > gcrma.no1 <- gcrma(raw[,-1]) >> >> > detach(package:Matrix) >> >> > corfit <- >> duplicateCorrelation(gcrma.no1,design.no1,ndups=1,block=targets$pai r[-1]) >>Error in as.vector(x, mode) : cannot coerce to vector >> >> > sessionInfo() >>R version 2.5.0 (2007-04-23) >>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" "tools" "stats" "graphics" "grDevices" "utils" >>[7] "datasets" "methods" "base" >> >>other attached packages: >> bovineprobe bovinecdf affyQCReport geneplotter RColorBrewer >> "1.16.0" "1.16.0" "1.14.0" "1.14.0" "0.2-3" >> simpleaffy made4 scatterplot3d ade4 affyPLM >> "2.10.11" "1.10.0" "0.3-24" "1.4-3" "1.12.0" >> affydata affycoretools annaffy xtable gcrma >> "1.11.2" "1.8.0" "1.8.1" "1.4-3" "2.8.1" >> matchprobes biomaRt RCurl XML GOstats >> "1.8.1" "1.10.0" "0.8-0" "1.7-1" "2.2.3" >> Category lattice genefilter survival KEGG >> "2.2.3" "0.15-4" "1.14.1" "2.31" "1.16.0" >> RBGL annotate GO graph limma >> "1.12.0" "1.14.1" "1.16.0" "1.14.1" "2.10.4" >> affy affyio Biobase RWinEdt >> "1.14.1" "1.4.0" "1.14.0" "1.7-5"
ADD REPLY
0
Entering edit mode
Hi Gordon, I think I've gotten a reproducible example - below is an entire R session. I cut down the packages I had loaded to only those necessary (except for RWinEdt, but I also tried it without and the same thing happens). If I only load gcrma and limma (+ dependencies), duplicateCorrelation works fine on an ExpressionSet object. However, if I load Matrix, then it doesn't work, so somehow there's still a conflict with the Matrix NAMESPACE? Let me know if I need to try anything else... Jenny R version 2.5.0 (2007-04-23) Copyright (C) 2007 The R Foundation for Statistical Computing ISBN 3-900051-07-0 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. Natural language support but running in an English locale 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. > library(RWinEdt) > library(gcrma) 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: affy Loading required package: affyio Loading required package: matchprobes Loading required package: splines > library(limma) > > setwd("C:/statistics/Sergio") > > raw <- ReadAffy(celfile.path="C:/statistics/Sergio/CELfiles2nd") > raw AffyBatch object size of arrays=732x732 features (9 kb) cdf=Bovine (24128 affyids) number of samples=14 number of genes=24128 annotation=bovine notes= > gcrma.all <- gcrma(raw) Adjusting for optical effect..............Done. Computing affinities.Done. Adjusting for non-specific binding..............Done. Normalizing Calculating Expression > > targets <- readTargets("targets2.txt") > > temp <- as.numeric(factor(targets$trt)) > temp[temp==2] <- 0 > design.all <- cbind(int=1,HydVnorm=temp) > > corfit <- duplicateCorrelation(gcrma.all,design.all,ndups=1,block=targets$pair) Loading required package: statmod > library(Matrix) Loading required package: lattice > > corfit <- duplicateCorrelation(gcrma.all,design.all,ndups=1,block=targets$pair) Error in as.vector(x, mode) : cannot coerce to vector > > sessionInfo() R version 2.5.0 (2007-04-23) 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" "tools" "stats" "graphics" "grDevices" "utils" [7] "datasets" "methods" "base" other attached packages: Matrix lattice statmod bovineprobe bovinecdf limma "0.9975-11" "0.15-4" "1.3.0" "1.16.0" "1.16.0" "2.10.4" gcrma matchprobes affy affyio Biobase RWinEdt "2.8.1" "1.8.1" "1.14.1" "1.4.0" "1.14.0" "1.7-5" > At 05:10 PM 5/24/2007, Gordon Smyth wrote: >Dear Jenny, > >I am unable to reproduce your error, despite installing and loading >all the same packages that you have loaded in your session (except >for RWinEdt which I am unable to install in R 2.5.0). For me to help >you further, you would need to provide a reproducible example of the >problem. That is, you need to provide an example of code which can >be run by someone other than yourself which produces the same error. > >I give below a complete R session which I have just run, showing >that duplicateCorrelation works fine for me. I have limma 2.11.4 >loaded, but that is the same as 2.10.4. > >Best wishes >Gordon > >=== R session starts ========== > > > library(bovineprobe) >Loading required package: matchprobes >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: affy >Loading required package: affyio > > library(bovinecdf) > > library(affyQCReport) >Loading required package: simpleaffy >Loading required package: genefilter >Loading required package: survival >Loading required package: splines >Loading required package: xtable >Loading required package: affyPLM >Loading required package: affydata >Loading required package: gcrma >Loading required package: RColorBrewer >Loading required package: geneplotter >Loading required package: annotate >Loading required package: lattice >KernSmooth 2.22 installed >Copyright M. P. Wand 1997 > > library(geneplotter) > > library(RColorBrewer) > > library(simpleaffy) > > library(made4) >Loading required package: ade4 >Loading required package: scatterplot3d > > library(scatterplot3d) > > library(ade4) > > library(affyPLM) > > library(affydata) > > library(affycoretools) >Loading required package: limma >Loading required package: GOstats >Loading required package: graph >Loading required package: GO >Loading required package: RBGL >Loading required package: Category >Loading required package: KEGG >Loading required package: Matrix >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: annaffy > > library(annaffy) > > library(xtable) > > library(gcrma) > > library(matchprobes) > > library(biomaRt) > > library(RCurl) > > library(XML) > > library(GOstats) > > library(Category) > > library(lattice) > > library(genefilter) > > library(survival) > > library(KEGG) > > library(RBGL) > > library(annotate) > > library(GO) > > library(graph) > > library(limma) > > library(affy) > > library(affyio) > > library(Biobase) > > > > setwd("changed for confidentiality") > > library(limma) > > targets <- readTargets() > > library(affy) > > x <- ReadAffy(filenames=targets$FileName) > > y <- gcrma(x) > >Attaching package: 'mouse4302cdf' > > > The following object(s) are masked from package:bovinecdf : > > i2xy, > xy2i > >Adjusting for optical effect..........Done. >Computing affinities.Done. >Adjusting for non-specific binding..........Done. >Normalizing >Calculating Expression > > design <- model.matrix(~factor(targets$CellType)) > > corfit <- > duplicateCorrelation(y,design,ndups=1,block=c(1,1,1,2,2,2,2,2,2,2)) >Loading required package: statmod > > sessionInfo() >R version 2.5.0 (2007-04-23) >i386-pc-mingw32 > >locale: >LC_COLLATE=English_Australia.1252;LC_CTYPE=English_Australia.1252;LC_ MONETARY=English_Australia.1252;LC_NUMERIC=C;LC_TIME=English_Australia .1252 > >attached base packages: >[1] "splines" "tools" "stats" "graphics" "grDevices" >"utils" "datasets" "methods" "base" > >other attached packages: > statmod > mouse4302probe mouse4302cdf affycoretools annaffy > biomaRt RCurl XML > "1.3.0" "1.16.0" "1.16.0" "1.8.0" > "1.8.1" "1.10.0" "0.8-0" "1.7-1" > GOstats Category Matrix KEGG RBGL > GO graph limma > "2.2.3" "2.2.3" "0.99875-1" "1.16.0" > "1.12.0" "1.16.0" "1.14.1" "2.11.4" > made4 scatterplot3d ade4 affyQCReport > geneplotter lattice annotate RColorBrewer > "1.10.0" "0.3-24" "1.4-3" "1.14.0" > "1.14.0" "0.15-5" "1.14.1" "0.2-3" > affyPLM gcrma affydata xtable > simpleaffy genefilter survival bovinecdf > "1.12.0" "2.8.1" "1.11.2" "1.4-6" > "2.10.11" "1.14.1" "2.31" "1.16.0" > bovineprobe matchprobes affy affyio Biobase > "1.16.0" "1.8.1" "1.14.0" "1.4.0" "1.14.0" > >============= R session ends =============== > >At 01:52 AM 25/05/2007, Jenny Drnevich wrote: >>Hi Gordon, >> >>I'm still having the problem with duplicateCorrelation on an >>ExpressionSet object, even though I upgraded to limma 2.10.4. >>Additionally, the 'fix' of not having the Matrix package loaded >>doesn't work either, unless there's a difference between never >>having loaded the package and detaching the package... Am I doing >>something wrong? >> >>Thanks, >>Jenny >> >> > gcrma.no1 <- gcrma(raw[,-1]) >> >> > detach(package:Matrix) >> >> > corfit <- >> duplicateCorrelation(gcrma.no1,design.no1,ndups=1,block=targets$pai r[-1]) >>Error in as.vector(x, mode) : cannot coerce to vector >> >> > sessionInfo() >>R version 2.5.0 (2007-04-23) >>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" "tools" "stats" "graphics" "grDevices" "utils" >>[7] "datasets" "methods" "base" >> >>other attached packages: >> bovineprobe bovinecdf affyQCReport geneplotter RColorBrewer >> "1.16.0" "1.16.0" "1.14.0" "1.14.0" "0.2-3" >> simpleaffy made4 scatterplot3d ade4 affyPLM >> "2.10.11" "1.10.0" "0.3-24" "1.4-3" "1.12.0" >> affydata affycoretools annaffy xtable gcrma >> "1.11.2" "1.8.0" "1.8.1" "1.4-3" "2.8.1" >> matchprobes biomaRt RCurl XML GOstats >> "1.8.1" "1.10.0" "0.8-0" "1.7-1" "2.2.3" >> Category lattice genefilter survival KEGG >> "2.2.3" "0.15-4" "1.14.1" "2.31" "1.16.0" >> RBGL annotate GO graph limma >> "1.12.0" "1.14.1" "1.16.0" "1.14.1" "2.10.4" >> affy affyio Biobase RWinEdt >> "1.14.1" "1.4.0" "1.14.0" "1.7-5" Jenny Drnevich, Ph.D. Functional Genomics Bioinformatics Specialist W.M. Keck Center for Comparative and Functional Genomics Roy J. Carver Biotechnology Center University of Illinois, Urbana-Champaign 330 ERML 1201 W. Gregory Dr. Urbana, IL 61801 USA ph: 217-244-7355 fax: 217-265-5066 e-mail: drnevich at uiuc.edu
ADD REPLY
0
Entering edit mode
Hi Jenny, Your example may be reproducible by you, but it's not runnable by me because I don't have you data. As I said in my previous email, you need to construct an example which can be run by someone else. This means that you need to do one of the following: use public data, or generate data, or provide data. As I demonstrated in my previous email, I've already run an example closely analogous to yours and found no problem. So analogy is not good enough, we need to run your exact code. If RWinEdt isn't needed for the example, please don't include it. I cannot help you with any session which includes RWinEdt. By the way, the lattice and Matrix packages have version numbers less than 1.0, meaning that their authors do not yet consider them to be fully reliable. Bioconductor packages are not included in the release if they are still at this stage. Best wishes Gordon On Wed, May 30, 2007 2:58 am, Jenny Drnevich wrote: > Hi Gordon, > > I think I've gotten a reproducible example - below is an entire R > session. I cut down the packages I had loaded to only those necessary > (except for RWinEdt, but I also tried it without and the same thing > happens). If I only load gcrma and limma (+ dependencies), > duplicateCorrelation works fine on an ExpressionSet object. However, > if I load Matrix, then it doesn't work, so somehow there's still a > conflict with the Matrix NAMESPACE? Let me know if I need to try > anything else... > > Jenny > > R version 2.5.0 (2007-04-23) > Copyright (C) 2007 The R Foundation for Statistical Computing > ISBN 3-900051-07-0 > > 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. > > Natural language support but running in an English locale > > 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. > > > library(RWinEdt) > > library(gcrma) > 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: affy > Loading required package: affyio > Loading required package: matchprobes > Loading required package: splines > > library(limma) > > > > setwd("C:/statistics/Sergio") > > > > raw <- ReadAffy(celfile.path="C:/statistics/Sergio/CELfiles2nd") > > raw > AffyBatch object > size of arrays=732x732 features (9 kb) > cdf=Bovine (24128 affyids) > number of samples=14 > number of genes=24128 > annotation=bovine > notes= > > gcrma.all <- gcrma(raw) > Adjusting for optical effect..............Done. > Computing affinities.Done. > Adjusting for non-specific binding..............Done. > Normalizing > Calculating Expression > > > > targets <- readTargets("targets2.txt") > > > > temp <- as.numeric(factor(targets$trt)) > > temp[temp==2] <- 0 > > design.all <- cbind(int=1,HydVnorm=temp) > > > > corfit <- > duplicateCorrelation(gcrma.all,design.all,ndups=1,block=targets$pair) > Loading required package: statmod > > > library(Matrix) > Loading required package: lattice > > > > corfit <- > duplicateCorrelation(gcrma.all,design.all,ndups=1,block=targets$pair) > Error in as.vector(x, mode) : cannot coerce to vector > > > > sessionInfo() > R version 2.5.0 (2007-04-23) > 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" "tools" "stats" "graphics" "grDevices" "utils" > [7] "datasets" "methods" "base" > > other attached packages: > Matrix lattice statmod bovineprobe bovinecdf limma > "0.9975-11" "0.15-4" "1.3.0" "1.16.0" "1.16.0" "2.10.4" > gcrma matchprobes affy affyio Biobase RWinEdt > "2.8.1" "1.8.1" "1.14.1" "1.4.0" "1.14.0" "1.7-5" > > > > At 05:10 PM 5/24/2007, Gordon Smyth wrote: >>Dear Jenny, >> >>I am unable to reproduce your error, despite installing and loading >>all the same packages that you have loaded in your session (except >>for RWinEdt which I am unable to install in R 2.5.0). For me to help >>you further, you would need to provide a reproducible example of the >>problem. That is, you need to provide an example of code which can >>be run by someone other than yourself which produces the same error. >> >>I give below a complete R session which I have just run, showing >>that duplicateCorrelation works fine for me. I have limma 2.11.4 >>loaded, but that is the same as 2.10.4. >> >>Best wishes >>Gordon
ADD REPLY
0
Entering edit mode
Dear Jenny, I have double-checked by re-installing limma 2.10.4 from Bioconductor, and it seems that I failed to commit all the necessary files to the Release branch. My apologies. I have now committed limma 2.10.5 which should be correct and complete. I append a small reproducible example to show that the problem is fixed in limma 2.10.5. Best wishes Gordon > library(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)'. > library(Matrix) Loading required package: lattice > library(limma) > x <- matrix(rnorm(100*4),100,4) > y <- new("ExpressionSet",exprs=x) > cofit <- duplicateCorrelation(y,ndups=1,block=c(1,1,2,2)) Loading required package: statmod > sessionInfo() R version 2.5.0 (2007-04-23) i386-pc-mingw32 locale: LC_COLLATE=English_Australia.1252;LC_CTYPE=English_Australia.1252;LC_M ONETARY=English_Australia.1252;LC_NUMERIC=C;LC_TIME=English_Australia. 1252 attached base packages: [1] "tools" "stats" "graphics" "grDevices" "utils" "datasets" "methods" "base" other attached packages: statmod limma Matrix lattice Biobase "1.3.0" "2.10.5" "0.99875-1" "0.15-5" "1.14.0" At 02:58 AM 30/05/2007, Jenny Drnevich wrote: >Hi Gordon, > >I think I've gotten a reproducible example - below is an entire R >session. I cut down the packages I had loaded to only those >necessary (except for RWinEdt, but I also tried it without and the >same thing happens). If I only load gcrma and limma (+ >dependencies), duplicateCorrelation works fine on an ExpressionSet >object. However, if I load Matrix, then it doesn't work, so somehow >there's still a conflict with the Matrix NAMESPACE? Let me know if I >need to try anything else... > >Jenny
ADD REPLY
0
Entering edit mode
Hi Gordon, Sorry about my confusion in not having usable data in my example. I just upgraded to limma 2.10.5, and now duplicateCorrelation() is working fine for ExpressionSets. Thanks for all your help, Jenny At 07:50 PM 5/29/2007, Gordon Smyth wrote: >Dear Jenny, > >I have double-checked by re-installing limma 2.10.4 from >Bioconductor, and it seems that I failed to commit all the necessary >files to the Release branch. My apologies. I have now committed >limma 2.10.5 which should be correct and complete. > >I append a small reproducible example to show that the problem is >fixed in limma 2.10.5. > >Best wishes >Gordon > > > library(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)'. > > > library(Matrix) >Loading required package: lattice > > library(limma) > > x <- matrix(rnorm(100*4),100,4) > > y <- new("ExpressionSet",exprs=x) > > cofit <- duplicateCorrelation(y,ndups=1,block=c(1,1,2,2)) >Loading required package: statmod > > sessionInfo() >R version 2.5.0 (2007-04-23) >i386-pc-mingw32 > >locale: >LC_COLLATE=English_Australia.1252;LC_CTYPE=English_Australia.1252;LC_ MONETARY=English_Australia.1252;LC_NUMERIC=C;LC_TIME=English_Australia .1252 > >attached base packages: >[1] "tools" "stats" "graphics" "grDevices" >"utils" "datasets" "methods" "base" > >other attached packages: > statmod limma Matrix lattice Biobase > "1.3.0" "2.10.5" "0.99875-1" "0.15-5" "1.14.0" > >At 02:58 AM 30/05/2007, Jenny Drnevich wrote: >>Hi Gordon, >> >>I think I've gotten a reproducible example - below is an entire R >>session. I cut down the packages I had loaded to only those >>necessary (except for RWinEdt, but I also tried it without and the >>same thing happens). If I only load gcrma and limma (+ >>dependencies), duplicateCorrelation works fine on an ExpressionSet >>object. However, if I load Matrix, then it doesn't work, so somehow >>there's still a conflict with the Matrix NAMESPACE? Let me know if >>I need to try anything else... >> >>Jenny Jenny Drnevich, Ph.D. Functional Genomics Bioinformatics Specialist W.M. Keck Center for Comparative and Functional Genomics Roy J. Carver Biotechnology Center University of Illinois, Urbana-Champaign 330 ERML 1201 W. Gregory Dr. Urbana, IL 61801 USA ph: 217-244-7355 fax: 217-265-5066 e-mail: drnevich at uiuc.edu
ADD REPLY
0
Entering edit mode
Seth Falcon ★ 7.4k
@seth-falcon-992
Last seen 10.3 years ago
Jenny Drnevich <drnevich at="" uiuc.edu=""> writes: > Hi Gordon, > > I'm still having the problem with duplicateCorrelation on an > ExpressionSet object, even though I upgraded to limma 2.10.4. > Additionally, the 'fix' of not having the Matrix package loaded > doesn't work either, unless there's a difference between never having > loaded the package and detaching the package... Am I doing something > wrong? There is a difference between having a fresh R session in which a package has never been loaded and an R session in which you have detached a package. Unfortunately, package loading/attaching is not a completely reversible operation in all cases (some of the limitations are even at the OS level when shared libraries are involved). You can use loadedNamespaces() to see what namespaces are loaded and I suspect that Matrix remains loaded even after you have detached it. Why? Well, because you have Category attached which Depends on Matrix. I think this is worth further investigation, because it seems to me that the changes Gordon made should have solved this problem with or without Matrix being loaded. + seth -- Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research Center http://bioconductor.org
ADD COMMENT

Login before adding your answer.

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