Entering edit mode
Hello,
I am having a problem trying to pull GO (or EVIDENCE but not ONTOLOGY) terms from an OrgDB package from AnnotationHub; it's getting confused on the GO and GOALL keytypes:
> BiocManager::version()
[1] ‘3.11’
> library(AnnotationHub)
> ah <- AnnotationHub()
snapshotDate(): 2020-04-27
> query(ah, c("OrgDb", "Daphnia"))
AnnotationHub with 1 record
...
# retrieve record with 'object[["AH81226"]]'
> org.Dm.eg.db <- ah[["AH81226"]]
> temp <- select(org.Dm.eg.db, keys = keys(org.Dm.eg.db, keytype = "ENTREZID"),
+ keytype = "ENTREZID", columns = c("GO"))
Error in FUN(X[[i]], ...) :
Two fields in the source DB have the same name.
> keytypes(org.Dm.eg.db)
[1] "ACCNUM" "ALIAS" "ENTREZID" "EVIDENCE"
[5] "EVIDENCEALL" "GENENAME" "GID" "GO"
[9] "GOALL" "ONTOLOGY" "ONTOLOGYALL" "PMID"
[13] "REFSEQ" "SYMBOL"
#check the others:
> temp <- select(org.Dm.eg.db, keys = keys(org.Dm.eg.db, keytype = "ENTREZID"),
+ keytype = "ENTREZID", columns = c("EVIDENCE"))
Error in FUN(X[[i]], ...) :
Two fields in the source DB have the same name.
> temp <- select(org.Dm.eg.db, keys = keys(org.Dm.eg.db, keytype = "ENTREZID"),
+ keytype = "ENTREZID", columns = c("ONTOLOGY"))
'select()' returned 1:many mapping between keys and columns
Didn't this same error happen in the pre-built OrgDB right when 3.11 was released? That appears to be fixed:
> library(org.Mm.eg.db)
> temp <- select(org.Mm.eg.db, keys = keys(org.Mm.eg.db, keytype = "ENTREZID"),
+ keytype = "ENTREZID", columns = c("GO"))
'select()' returned 1:many mapping between keys and columns
Thanks!
> sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats4 parallel stats graphics grDevices utils datasets
[8] methods base
other attached packages:
[1] org.Mm.eg.db_3.11.4 AnnotationDbi_1.50.1 IRanges_2.22.2
[4] S4Vectors_0.26.1 Biobase_2.48.0 AnnotationHub_2.20.0
[7] BiocFileCache_1.12.0 dbplyr_1.4.4 BiocGenerics_0.34.0
loaded via a namespace (and not attached):
[1] Rcpp_1.0.5 later_1.1.0.1
[3] pillar_1.4.6 compiler_4.0.2
[5] BiocManager_1.30.10 tools_4.0.2
[7] digest_0.6.25 bit_1.1-15.2
[9] RSQLite_2.2.0 memoise_1.1.0
[11] lifecycle_0.2.0 tibble_3.0.3
[13] pkgconfig_2.0.3 rlang_0.4.7
[15] shiny_1.5.0 DBI_1.1.0
[17] rstudioapi_0.11 curl_4.3
[19] yaml_2.2.1 xfun_0.15
[21] fastmap_1.0.1 dplyr_1.0.0
[23] httr_1.4.2 generics_0.0.2
[25] vctrs_0.3.2 rappdirs_0.3.1
[27] bit64_0.9-7.1 tidyselect_1.1.0
[29] glue_1.4.1 R6_2.4.1
[31] purrr_0.3.4 blob_1.2.1
[33] magrittr_1.5 promises_1.1.1
[35] htmltools_0.5.0 ellipsis_0.3.1
[37] assertthat_0.2.1 xtable_1.8-4
[39] mime_0.9 interactiveDisplayBase_1.26.3
[41] httpuv_1.5.4 tinytex_0.24
[43] crayon_1.3.4 BiocVersion_3.11.1
Thanks, Jim! It did fix it. (Unfortunately for me, Daphnia magna only has GO terms for 61 genes). Looking forward to seeing you virtually next week at BioC2020...