[BioC] Annotate package not working

James W. MacDonald jmacdon at uw.edu
Thu Jan 9 20:45:22 CET 2014


Hi Ryan,

I can't reproduce your error:

> library(annotate)
> entrez.ids <- as.character(1:10)
> lookUp(entrez.ids,
+        data="org.Hs.eg",
+        what="SYMBOL")
$`1`
[1] "A1BG"

$`2`
[1] "A2M"

$`3`
[1] "A2MP1"

$`4`
[1] NA

$`5`
[1] NA

$`6`
[1] NA

$`7`
[1] NA

$`8`
[1] NA

$`9`
[1] "NAT1"

$`10`
[1] "NAT2"

> sessionInfo()
R version 3.0.2 (2013-09-25)
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] parallel  stats     graphics  grDevices utils     datasets  methods
[8] base

other attached packages:
[1] annotate_1.40.0      org.Hs.eg.db_2.10.1  RSQLite_0.11.4
[4] DBI_0.2-7            AnnotationDbi_1.25.2 Biobase_2.22.0
[7] BiocGenerics_0.8.0

loaded via a namespace (and not attached):
[1] IRanges_1.20.6 stats4_3.0.2   XML_3.98-1.1   xtable_1.7-1

You might have some package higher in your search path that re-defines 
mget() somehow.

Anyway, you might consider switching to select(), as it is much more 
powerful/useful than lookUp():

> select(org.Hs.eg.db, entrez.ids, "SYMBOL")
   ENTREZID SYMBOL
1         1   A1BG
2         2    A2M
3         3  A2MP1
4         4   <NA>
5         5   <NA>
6         6   <NA>
7         7   <NA>
8         8   <NA>
9         9   NAT1
10       10   NAT2

Best,

Jim




On Thursday, January 09, 2014 2:31:28 PM, Ryan C. Thompson wrote:
> Hi all,
>
> I'm having some trouble using the "lookUp" function in the "annotate"
> package. Every time I try to call it, I get the following error:
>
> Error in as.list.default(envir) :
>   no method for coercing this S4 class to a vector
>
> I can generate this error with the following short test case:
>
> library(org.Hs.eg.db)
> library(annotate)
> entrez.ids <- as.character(1:10)
> lookUp(entrez.ids,
>        data="org.Hs.eg",
>        what="SYMBOL")
>
> Alternatively, simply running the example from the lookUp help page
> also produces the error.
>
> Can anyone help me get this working again?
>
> -Ryan Thompson
>
> _______________________________________________
> 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

--
James W. MacDonald, M.S.
Biostatistician
University of Washington
Environmental and Occupational Health Sciences
4225 Roosevelt Way NE, # 100
Seattle WA 98105-6099



More information about the Bioconductor mailing list