[Bioc-devel] Importing get() method from GO.db

James MacDonald jmacdon at med.umich.edu
Wed Jul 1 04:38:12 CEST 2009


Hi,

My package is erroring out on a call to get(goid, GOTERM) because it doesn't know about the 'GOTermsAnnDbBimap' method for get(), and I am not sure how to import it. The error can be created by

library(affycoretools)
debug(affycoretools:::houtSel)
source("tmp.r")

using the attached file. Nothing but affycoretools is required for the tmp.r file.

On a clean start of R, I get:

> library(GO.db)
> showMethods(get)
Function: get (package base)
x="ANY", pos="ANY", envir="ANY"
x="ANY", pos="ANY", envir="AnnDbBimap"
x="ANY", pos="AnnDbBimap", envir="missing"
x="character", pos="character", envir="missing"
    (inherited from: x="ANY", pos="ANY", envir="ANY")
x="character", pos="missing", envir="environment"
    (inherited from: x="ANY", pos="ANY", envir="ANY")

> get(Lkeys(GOTERM)[5], GOTERM)
GOID: GO:0000007
Term: low-affinity zinc ion transmembrane transporter activity
Ontology: MF
Definition: Catalysis of the transfer of a solute or solutes from one
    side of a membrane to the other according to the reaction: Zn2+ =
    Zn2+, probably powered by proton motive force. In low affinity
    transport the transporter is able to bind the solute only if it is
    present at very high concentrations.
> showMethods(get)
Function: get (package base)
x="ANY", pos="ANY", envir="ANY"
x="ANY", pos="ANY", envir="AnnDbBimap"
x="ANY", pos="AnnDbBimap", envir="missing"
x="character", pos="GOTermsAnnDbBimap", envir="missing"
    (inherited from: x="ANY", pos="AnnDbBimap", envir="missing")
x="character", pos="character", envir="missing"
    (inherited from: x="ANY", pos="ANY", envir="ANY")
x="character", pos="missing", envir="environment"
    (inherited from: x="ANY", pos="ANY", envir="ANY")

But even trying the above trick to get the GOTermsAnnDbBimap method from within a function in my package results in the error:

Error in get(Lkeys(GOTERM)[5], GOTERM) : 
  use of NULL environment is defunct

TIA,

Jim



James W. MacDonald, M.S.
Biostatistician
Douglas Lab
5912 Buhl
1241 E. Catherine St.
Ann Arbor MI 48109-5618
734-615-7826
**********************************************************
Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues



More information about the Bioc-devel mailing list