[BioC] org.*.eg.db problem

Vincent Carey stvjc at channing.harvard.edu
Wed Dec 1 18:10:23 CET 2010

I don't think this question is extremely clear, but you could probably
get around your concern by using get() while pasting the
organism-identifying token into some string template

get(paste("org.", [token1], ".eg", [token2], sep=""))

will retrieve a map for organism identified by token1 with targets of
type identified by token2 -- examples are "Mm", "CHRLOC" for these
tokens respectively

there are undoubtedly more elegant ways to proceed, depending on your
specific concern

On Wed, Dec 1, 2010 at 11:48 AM,  <arne.mueller at novartis.com> wrote:
> Hello,
> the org.*.eg.db environments cannot be used in a generic way :-( . Let's
> say I'm writing a function that needs an entire org.*.eg.db environment as
> argument, and the function doesn't care whether it's human, mouse rat or
> jellyfish. Inside my function I'd be required accessing the maps (e.g. for
> chromosomal location) without knowing the species. The problem is that you
> do need to know the species because the mapping names use the species
> abbreviation:
>> org.Mm.egCHRLOC
> CHRLOC map for Mouse (object of class "AnnDbMap")
> Why isn't this more generic so that one could just call egCHRLOC instead
> of org.Mm.egCHRLOC which makes code that uses this annotation having to
> know about the organism - why does it have to be be hard coded? Ideally
> I'd like to be able to do the following:
>> library(org.Mm.eg.db)
>> myGenomeAnnotationFunction(org.Mm.eg.db)  { # pass in as an environment?
>      # use the annotation environment to extract whatever information ...
> }
> How would you solve this when having to work with several species (if else
> ... ???)
>  thanks a lot for your help,
>  Arne
>        [[alternative HTML version deleted]]
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor

More information about the Bioconductor mailing list