[BioC] Annotate package not working
Ryan C. Thompson
rct at thompsonclan.org
Thu Jan 9 21:28:01 CET 2014
Here is a transcript where I start an R session, source my bug
reproducing script, and then run sessionInfo():
$ R --vanilla
R version 3.0.2 (2013-09-25) -- "Frisbee Sailing"
Copyright (C) 2013 The R Foundation for Statistical Computing
Platform: x86_64-unknown-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> source("annotation-bug.R")
Loading required package: AnnotationDbi
Loading required package: BiocGenerics
Loading required package: parallel
Attaching package: ‘BiocGenerics’
The following objects are masked from ‘package:parallel’:
clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB
The following object is masked from ‘package:stats’:
xtabs
The following objects are masked from ‘package:base’:
anyDuplicated, append, as.data.frame, as.vector, cbind, colnames,
duplicated, eval, evalq, Filter, Find, get, intersect, is.unsorted,
lapply, Map, mapply, match, mget, order, paste, pmax, pmax.int,
pmin, pmin.int, Position, rank, rbind, Reduce, rep.int, rownames,
sapply, setdiff, sort, table, tapply, union, unique, unlist
Loading required package: Biobase
Welcome to Bioconductor
Vignettes contain introductory material; view with
'browseVignettes()'. To cite Bioconductor, see
'citation("Biobase")', and for packages 'citation("pkgname")'.
Loading required package: DBI
Error in as.list.default(envir) :
no method for coercing this S4 class to a vector
In addition: Warning message:
In namespaceImportMethods(ns, loadNamespace(j <- imp[[1L]], c(lib.loc, :
No generic function found corresponding to requested imported methods
for "as.list" from package "AnnotationDbi" (malformed exports?)
> 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.24.0 Biobase_2.22.0
[7] BiocGenerics_0.8.0
loaded via a namespace (and not attached):
[1] colorspace_1.2-4 IRanges_1.20.6 stats4_3.0.2 XML_3.98-1.1
[5] xtable_1.7-2
On Thu 09 Jan 2014 11:45:22 AM PST, James W. MacDonald wrote:
>
> 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