[BioC] Problem with invalid GO term in HyperGResult object - NOT solved

Martin Morgan mtmorgan at fhcrc.org
Mon Sep 24 18:16:34 CEST 2007


James MacDonald <jmacdon at med.umich.edu> writes:

> Hi Jenny,
>
> You want multiassign() in Biobase.
>
> Something like this should do the trick:
>
> tmp  <- eapply(ath1121501MULTIHIT,
> 	function(ids) if(length(ids) >1) "multiple" else ids)
> ath112150ACCNUM <- new.env(hash=TRUE, parent=.GlobalEnv)
> multiassign(tmp, envir=ath112150ACCNUM)

or l2e ('list to environment'; also from Biobase).

> ath112150ACCNUM <- l2e(tmp)

Probably in Jim's use it makes sense to have parent=emptyenv(),
otherwise you can 'get' symbols that are defined in the global
environment rather than the environment you're looking in.

> x <- 1
> safer <- new.env(parent=emptyenv())
> unsafe <- new.env(parent=.GlobalEnv)
> get("x", safer)
Error in get("x", safer) : variable "x" was not found
> get("x", unsafe) # look in 'parent', i.e., .GlobalEnv
[1] 1
> get("l2e", unsafe) # parents of .GlobalEnv include the search() path
function (vals, envir) 
{
    if (missing(envir)) 
        envir <- new.env(hash = TRUE, parent = emptyenv(), size = .new_env_size(length(vals)))
    .Call("listToEnv", vals, envir, PACKAGE = "Biobase")
}
<environment: namespace:Biobase>

Martin

> Best,
>
> Jim
>
>
>
> Jenny Drnevich wrote:
>> Hi Herve,
>> 
>> Thanks for looking into this. Unfortunately, your fix didn't quite work:
>> 
>> 
>>> You can compute the ath1121501ACCNUM yourself with:
>>>
>>>> ath1121501ACCNUM <- eapply(ath1121501MULTIHIT,
>>>                              function(ids) if (length(ids) > 1) 
>>> "multiple" else ids)
>> 
>> This changes ath1121501ACCNUM from an environment to a list, and to 
>> use hyperGTest(), it needs to be an environment. I know very little 
>> about environments, and the simple as.environment() didn't work, so I 
>> don't know how to fix it.
>> 
>> Thanks,
>> Jenny
>> 
>> 
>> 
>>> Let me know if you find any other problem.
>>>
>>> Thanks!
>>> H.
>>>
>>>
>>>> Thanks,
>>>> Jenny
>>>>
>>>>> sessionInfo()
>>>> R version 2.6.0 Under development (unstable) (2007-08-28 r42679)
>>>> 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     datasets
>>>> [8] methods   base
>>>>
>>>> other attached packages:
>>>>  [1] limma_2.11.13        ath1121501_1.99.10   GOstats_2.3.17
>>>>  [4] Category_2.3.39      genefilter_1.15.11   survival_2.32
>>>>  [7] RBGL_1.13.6          annotate_1.15.11     xtable_1.5-1
>>>> [10] GO.db_1.99.3         AnnotationDbi_0.99.1 RSQLite_0.6-2
>>>> [13] DBI_0.2-3            graph_1.15.20        Biobase_1.15.34
>>>>
>>>> loaded via a namespace (and not attached):
>>>> [1] cluster_1.11.7     simpleaffy_2.13.01
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> 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
>> 
>> _______________________________________________
>> Bioconductor mailing list
>> 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
>
> -- 
> James W. MacDonald, MS
> Biostatistician
> UMCCC cDNA and Affymetrix Core
> University of Michigan
> 1500 E Medical Center Drive
> 7410 CCGC
> Ann Arbor MI 48109
> 734-647-5623
>
> _______________________________________________
> Bioconductor mailing list
> 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

-- 
Martin Morgan
Bioconductor / Computational Biology
http://bioconductor.org



More information about the Bioconductor mailing list