[Bioc-devel] add function to "annotate" package

Marc Carlson mcarlson at fhcrc.org
Fri Jul 15 20:31:41 CEST 2011


Hi Robert,

Have you seen the lookUp function (in annotate)?

?lookUp

   Marc


On 07/13/2011 11:47 AM, Robert M. Flight wrote:
> Would it make sense to add one extra level of convenience to the
> "getAnnMap" function in "annotate", that represents what I am sure is
> one of the largest number of uses of the bimaps as an environment,
> which is getting information about a particular set of genes or other
> identifier?
>
> getAnnotation<- function(id,annPackage,mapID,doUnlist=TRUE){
> 	annEnv<- getAnnMap(mapID, annPackage, load=TRUE)
>    tmpDat<- mget(id, annEnv, ifnotfound=NA)
>    if (doUnlist){
>    	tmpDat<- unlist(tmpDat, use.names=FALSE)
>    }
>    return(tmpDat)
> }
>
> # simple example, but I do this for a lot of different things frequently
> library(annotate)
> testEntrez<- c("1","10","100","1000")
> getAnnotation(testEntrez,"org.Hs.eg.db","SYMBOL")
>
> Thanks,
>
> -Robert
>
> Robert M. Flight, Ph.D.
> University of Louisville Bioinformatics Laboratory
> University of Louisville
> Louisville, KY
>
> PH 502-852-1809 (HSC)
> PH 502-852-0467 (Belknap)
> EM robert.flight at louisville.edu
> EM rflight79 at gmail.com
>
> Williams and Holland's Law:
>         If enough data is collected, anything may be proven by
> statistical methods.
>
> _______________________________________________
> Bioc-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel



More information about the Bioc-devel mailing list