[BioC] Problem with Hopach: "Error in dmat[ord, ]"

Samuel GRANJEAUD - IR/ICIM granjeau at tagc.univ-mrs.fr
Wed Oct 7 11:26:08 CEST 2009


Dear Paolo,

I experienced same problem. A simple test is 'example(hopach)'. From a 
fresh R session, it works fine. If you load Matrix library, it will 
failed. So, looks like some incompatibilities (rcond or xtabs or ...?).

Regards,
Samuel

Paolo Innocenti wrote:
> Dear Vincent and list,
>
> hopefully I managed to provide a non-working example. It looks like 
> the lme4 (the lme4-required package Matrix in particular) causes some 
> incompatibilities:
>
> library(lme4)
> require(hopach)
> data(golub)
> vars <- apply(golub, 1, var)
> subset <- vars > quantile(vars, (nrow(golub) - 200)/nrow(golub))
> golub.subset <- golub[subset, ]
> gnames.subset <- golub.gnames[subset, ]
> gene.dist <- distancematrix(golub.subset, "cosangle")
> gene.hobj <- hopach(golub.subset, dmat = gene.dist)
>
>
> produces this on my computer:
>
> > library(Matrix)
> Loading required package: lattice
>
> Attaching package: 'Matrix'
>
>
>     The following object(s) are masked from package:stats :
>
>      xtabs
>
>
>     The following object(s) are masked from package:base :
>
>      rcond
>
> > require(hopach)
> Loading required package: hopach
> Loading required package: cluster
> Loading required package: Biobase
>
> Welcome to Bioconductor
>
>   Vignettes contain introductory material. To view, type
>   'openVignette()'. To cite Bioconductor, see
>   'citation("Biobase")' and for packages 'citation(pkgname)'.
>
> > data(golub)
> > vars <- apply(golub, 1, var)
> > subset <- vars > quantile(vars, (nrow(golub) - 200)/nrow(golub))
> > golub.subset <- golub[subset, ]
> > gnames.subset <- golub.gnames[subset, ]
> > gene.dist <- distancematrix(golub.subset, "cosangle")
> > gene.hobj <- hopach(golub.subset, dmat = gene.dist)
> Error in dmat[ord, ] :
>   element 1 is empty;
>    the part of the args list of 'is.logical' being evaluated was:
>    (j)
> > sessionInfo()
> R version 2.9.0 (2009-04-17)
> x86_64-unknown-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=C;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] stats     graphics  grDevices utils     datasets  methods   base
>
> other attached packages:
> [1] hopach_2.4.0       Biobase_2.4.1      cluster_1.11.13 
> Matrix_0.999375-24
> [5] lattice_0.17-22
>
> loaded via a namespace (and not attached):
> [1] grid_2.9.0  tools_2.9.0
>
>
>
> While the same code - without calling lme4 - works smoothly.
> Can anyone suggest a workaround?
>
> Best,
> paolo
>
>
> Vincent Carey wrote:
>> alas, i cannot replicate this with the devel version
>>
>>  > sessionInfo()
>> R version 2.10.0 Under development (unstable) (2009-04-06 r48294)
>> i386-apple-darwin9.6.0
>>
>> locale:
>> C
>>
>> attached base packages:
>> [1] stats     graphics  grDevices datasets  utils     methods   base   
>> other attached packages:
>> [1] hopach_2.5.0    Biobase_2.3.10  cluster_1.11.12
>>
>> loaded via a namespace (and not attached):
>> [1] tools_2.10.0
>>
>> in which your example runs to completion.
>> On Wed, May 20, 2009 at 6:30 AM, Paolo Innocenti 
>> <paolo.innocenti at ebc.uu.se <mailto:paolo.innocenti at ebc.uu.se>> wrote:
>>
>>     Hi all,
>>
>>     I'm experiencing this problem with hopach package. The following
>>     code runs just fine in a fresh session, but gives an error (see
>>     below) in my working directory:
>>
>>      > require(hopach)
>>      > data(golub)
>>      > vars <- apply(golub, 1, var)
>>      > subset <- vars > quantile(vars, (nrow(golub) - 200)/nrow(golub))
>>      > golub.subset <- golub[subset, ]
>>      > gnames.subset <- golub.gnames[subset, ]
>>      > gene.dist <- distancematrix(golub.subset, "cosangle")
>>      > gene.hobj <- hopach(golub.subset, dmat = gene.dist)
>>     Error in dmat[ord, ] :
>>      element 1 is empty;
>>       the part of the args list of 'is.logical' being evaluated was:
>>       (j)
>>      > traceback()
>>     4: dmat[ord, ]
>>     3: dmat[ord, ]
>>     2: orderelements(cuttree, data, rel = ord, d, dmat)
>>     1: hopach(golub.subset, dmat = gene.dist)
>>      > sessionInfo()
>>     R version 2.9.0 (2009-04-17)
>>     x86_64-unknown-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=C;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] stats     graphics  grDevices datasets  utils     methods   base
>>
>>     other attached packages:
>>     [1] hopach_2.4.0    Biobase_2.4.1   cluster_1.11.13 RSQLite_0.7-1
>>     [5] DBI_0.2-4
>>
>>     loaded via a namespace (and not attached):
>>      [1] affy_1.22.0           affyio_1.12.0         AnnotationDbi_1.6.0
>>      [4] drosophila2.db_2.2.11 grid_2.9.0            lattice_0.17-22
>>      [7] lme4_0.999375-28      Matrix_0.999375-26    MCMCglmm_1.09
>>     [10] preprocessCore_1.6.0  tools_2.9.0
>>
>>
>>     The "real" code I am running, that gives the same error message, is
>>     the following:
>>
>>      > hopach.eset.antag <- eset[which(featureNames(eset) %in% rtop.int
>>     <http://rtop.int>$ID),]
>>      > antag.dist.matrix <- distancematrix(exprs(hopach.eset.antag),
>>     "cosangle")
>>      > hopach.clusters.antag <- hopach(hopach.eset.antag,
>>     dmat=antag.dist.matrix)
>>     Error in dmat[ord, ] :
>>      element 1 is empty;
>>       the part of the args list of 'is.logical' being evaluated was:
>>       (j)
>>
>>     I haven't found the same error reported in the ML.
>>     Cheers,
>>     paolo
>>
>>
>>
>>     --     Paolo Innocenti
>>     Department of Animal Ecology, EBC
>>     Uppsala University
>>     Norbyvägen 18D
>>     75236 Uppsala, Sweden
>>
>>     _______________________________________________
>>     Bioconductor mailing list
>>     Bioconductor at stat.math.ethz.ch 
>> <mailto:Bioconductor at stat.math.ethz.ch>
>>     https://stat.ethz.ch/mailman/listinfo/bioconductor
>>     Search the archives:
>>     http://news.gmane.org/gmane.science.biology.informatics.conductor
>>
>>
>>
>>
>> -- 
>> Vincent Carey, PhD
>> Biostatistics, Channing Lab
>> 617 525 2265
>



More information about the Bioconductor mailing list