Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to find an inherited method for function ‘species’ for signature ‘"character"’ #4

Open
gerardq675 opened this issue May 21, 2020 · 3 comments

Comments

@gerardq675
Copy link

Updated R to 4.0 and now am getting an error with the following code:

OrgDb = 'org.Hs.eg.db'
res@organism <- AnnotationDbi::species(OrgDb)
Unable to find an inherited method for function ‘species’ for signature ‘"character"’

Guessing it has something to do with stringtofactor changes?

@hpages
Copy link
Contributor

hpages commented Jun 3, 2020

sessionInfo() please?

I don't think this was ever meant to work.

I get the same thing with R 3.6 and BioC 3.10:

library(AnnotationDbi)
AnnotationDbi::species('org.Hs.eg.db')
# Error in (function (classes, fdef, mtable)  : 
#   unable to find an inherited method for function ‘species’ for signature ‘"character"’

Note that the following works though, in both BioC 3.10 (no longer supported) and BioC 3.11 (current release):

library(org.Hs.eg.db)
AnnotationDbi::species(org.Hs.eg.db)
# [1] "Homo sapiens"

@hbandukw
Copy link

hbandukw commented Aug 5, 2020

Hello,

I am having the same problem with many of the AnnotationDbi functions.
library(org.Mm.eg.db) AnnotationDbi::species(org.Mm.eg.db)

Error:
Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘species’ for signature ‘"character"’

I have been trying to use AnnotationDbi to get map EntrezIDs to GeneIDs but I keep running into this problem.

Mm <- org.Mm.eg.db gene_annos <- AnnotationDbi::select(Mm, keys = f_peakAnno_mappings$Genes, columns = c("ENTREZID", "SYMBOL"), keytype = "ENTREZID")
Where 'f_peakAnno_mappings' is a data frame with a column called 'Genes' that contains EntrezIDs that need to be mapped.

Genes      
1 497097    
2 497097    
3 497097    
4 497097    
5 497097    
6 497097

Error:
Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘mapIds’ for signature ‘"character"’.

My sessionInfo() is:

`R version 4.0.2 (2020-06-22)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Catalina 10.15.4

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

locale:
[1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8

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

other attached packages:
[1] biomaRt_2.44.1 org.Mm.eg.db_3.11.4 AnnotationDbi_1.50.3 IRanges_2.22.2 S4Vectors_0.26.1 Biobase_2.48.0 BiocGenerics_0.34.0 dplyr_1.0.1

loaded via a namespace (and not attached):
[1] reticulate_1.16 tidyselect_1.1.0 RSQLite_2.2.0 htmlwidgets_1.5.1
[5] grid_4.0.2 BiocParallel_1.22.0 Rtsne_0.15 scatterpie_0.1.4
[9] munsell_0.5.0 codetools_0.2-16 ica_1.0-2 future_1.18.0
[13] miniUI_0.1.1.1 colorspace_1.4-1 GOSemSim_2.14.1 knitr_1.29
[17] rstudioapi_0.11 Seurat_3.2.0 ROCR_1.0-11 tensor_1.5
[21] DOSE_3.14.0 listenv_0.8.0 urltools_1.7.3 GenomeInfoDbData_1.2.3
[25] polyclip_1.10-0 bit64_4.0.2 farver_2.0.3 downloader_0.4
[29] vctrs_0.3.2 generics_0.0.2 xfun_0.16 BiocFileCache_1.12.0
[33] R6_2.4.1 GenomeInfoDb_1.24.2 graphlayouts_0.7.0 rsvd_1.0.3
[37] bitops_1.0-6 spatstat.utils_1.17-0 fgsea_1.14.0 gridGraphics_0.5-0
[41] DelayedArray_0.14.1 assertthat_0.2.1 promises_1.1.1 scales_1.1.1
[45] ggraph_2.0.3 enrichplot_1.8.1 gtable_0.3.0 globals_0.12.5
[49] goftest_1.2-2 tidygraph_1.2.0 rlang_0.4.7 splines_4.0.2
[53] rtracklayer_1.48.0 lazyeval_0.2.2 europepmc_0.4 BiocManager_1.30.10
[57] reshape2_1.4.4 abind_1.4-5 GenomicFeatures_1.40.1 httpuv_1.5.4
[61] qvalue_2.20.0 clusterProfiler_3.16.0 tools_4.0.2 ggplotify_0.0.5
[65] ggplot2_3.3.2 gplots_3.0.4 ellipsis_0.3.1 RColorBrewer_1.1-2
[69] ggridges_0.5.2 Rcpp_1.0.5 plyr_1.8.6 progress_1.2.2
[73] zlibbioc_1.34.0 purrr_0.3.4 RCurl_1.98-1.2 prettyunits_1.1.1
[77] rpart_4.1-15 openssl_1.4.2 deldir_0.1-28 pbapply_1.4-2
[81] viridis_0.5.1 cowplot_1.0.0 zoo_1.8-8 SummarizedExperiment_1.18.2
[85] ggrepel_0.8.2 cluster_2.1.0 magrittr_1.5 data.table_1.13.0
[89] DO.db_2.9 lmtest_0.9-37 triebeard_0.3.0 RANN_2.6.1
[93] fitdistrplus_1.1-1 matrixStats_0.56.0 hms_0.5.3 patchwork_1.0.1
[97] mime_0.9 xtable_1.8-4 XML_3.99-0.5 gridExtra_2.3
[101] compiler_4.0.2 tibble_3.0.3 KernSmooth_2.23-17 crayon_1.3.4
[105] htmltools_0.5.0 mgcv_1.8-31 later_1.1.0.1 tidyr_1.1.1
[109] DBI_1.1.0 tweenr_1.0.1 ChIPseeker_1.24.0 dbplyr_1.4.4
[113] MASS_7.3-51.6 rappdirs_0.3.1 boot_1.3-25 Matrix_1.2-18
[117] gdata_2.18.0 igraph_1.2.5 TxDb.Hsapiens.UCSC.hg19.knownGene_3.2.2 GenomicRanges_1.40.0
[121] pkgconfig_2.0.3 rvcheck_0.1.8 GenomicAlignments_1.24.0 plotly_4.9.2.1
[125] xml2_1.3.2 XVector_0.28.0 stringr_1.4.0 digest_0.6.25
[129] sctransform_0.2.1 RcppAnnoy_0.0.16 spatstat.data_1.4-3 Biostrings_2.56.0
[133] leiden_0.3.3 fastmatch_1.1-0 uwot_0.1.8 curl_4.3
[137] gtools_3.8.2 shiny_1.5.0 Rsamtools_2.4.0 lifecycle_0.2.0
[141] nlme_3.1-148 jsonlite_1.7.0 viridisLite_0.3.0 askpass_1.1
[145] pillar_1.4.6 lattice_0.20-41 plotrix_3.7-8 fastmap_1.0.1
[149] httr_1.4.2 survival_3.2-3 GO.db_3.11.4 glue_1.4.1
[153] spatstat_1.64-1 png_0.1-7 bit_4.0.4 ggforce_0.3.2
[157] stringi_1.4.6 blob_1.2.1 caTools_1.18.0 memoise_1.1.0
[161] irlba_2.3.3 future.apply_1.6.0 ape_5.4 `

Any help will be greatly appreciated.
Hina

@mjsteinbaugh
Copy link

mjsteinbaugh commented Aug 20, 2020

Argh, I seem to be hitting this error now with clusterProfiler gseGO():

gseGO(
    geneList = gene_list,
    ont = "BP",
    OrgDb = "org.Hs.eg.db",
    keyType = "ENSEMBL"
)
Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function 'species' for signature '"character"'

I'll work on posting a bug report on the Bioconductor support forum as well.
@GuangchuangYu any thoughts on how to fix this?

sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Catalina 10.15.6

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages:
 [1] org.Hs.eg.db_3.11.4         AnnotationDbi_1.50.3       
 [3] pathview_1.28.1             DOSE_3.14.0                
 [5] clusterProfiler_3.16.1      acidgsea_0.3.2             
 [7] tximport_1.16.1             DESeqAnalysis_0.3.5        
 [9] DESeq2_1.28.1               acidplots_0.2.32           
[11] bcbioRNASeq_0.3.35          basejump_0.12.12           
[13] SummarizedExperiment_1.18.2 DelayedArray_0.14.1        
[15] matrixStats_0.56.0          Biobase_2.48.0             
[17] GenomicRanges_1.40.0        GenomeInfoDb_1.24.2        
[19] IRanges_2.22.2              S4Vectors_0.26.1           
[21] BiocGenerics_0.34.0         forcats_0.5.0              
[23] stringr_1.4.0               dplyr_1.0.1                
[25] purrr_0.3.4                 readr_1.3.1                
[27] tidyr_1.1.1                 tibble_3.0.3               
[29] ggplot2_3.3.2               tidyverse_1.3.0            
[31] magrittr_1.5                bb8_0.2.27                 

loaded via a namespace (and not attached):
  [1] tidyselect_1.1.0              RSQLite_2.2.0                
  [3] BiocParallel_1.22.0           scatterpie_0.1.4             
  [5] munsell_0.5.0                 withr_2.2.0                  
  [7] colorspace_1.4-1              GOSemSim_2.14.1              
  [9] pipette_0.4.13                knitr_1.29                   
 [11] rstudioapi_0.11               SingleCellExperiment_1.10.1  
 [13] labeling_0.3                  KEGGgraph_1.48.0             
 [15] urltools_1.7.3                GenomeInfoDbData_1.2.3       
 [17] polyclip_1.10-0               bit64_4.0.2                  
 [19] farver_2.0.3                  pheatmap_1.0.12              
 [21] downloader_0.4                vctrs_0.3.2                  
 [23] generics_0.0.2                acidgenerics_0.3.10          
 [25] xfun_0.16                     BiocFileCache_1.12.1         
 [27] R6_2.4.1                      graphlayouts_0.7.0           
 [29] locfit_1.5-9.4                acidbase_0.1.13              
 [31] AnnotationFilter_1.12.0       gridGraphics_0.5-0           
 [33] bitops_1.0-6                  fgsea_1.14.0                 
 [35] assertthat_0.2.1              promises_1.1.1               
 [37] scales_1.1.1                  vroom_1.2.1                  
 [39] ggraph_2.0.3                  enrichplot_1.8.1             
 [41] gtable_0.3.0                  tidygraph_1.2.0              
 [43] ensembldb_2.12.1              rlang_0.4.7                  
 [45] genefilter_1.70.0             splines_4.0.2                
 [47] rtracklayer_1.48.0            lazyeval_0.2.2               
 [49] europepmc_0.4                 broom_0.7.0                  
 [51] BiocManager_1.30.10           yaml_2.2.1                   
 [53] reshape2_1.4.4                modelr_0.1.8                 
 [55] GenomicFeatures_1.40.1        backports_1.1.8              
 [57] httpuv_1.5.4                  qvalue_2.20.0                
 [59] syntactic_0.4.2               tools_4.0.2                  
 [61] ggplotify_0.0.5               ellipsis_0.3.1               
 [63] RColorBrewer_1.1-2            goalie_0.4.8                 
 [65] sessioninfo_1.1.1             ggridges_0.5.2               
 [67] Rcpp_1.0.5                    plyr_1.8.6                   
 [69] progress_1.2.2                zlibbioc_1.34.0              
 [71] RCurl_1.98-1.2                prettyunits_1.1.1            
 [73] openssl_1.4.2                 viridis_0.5.1                
 [75] cowplot_1.0.0                 haven_2.3.1                  
 [77] ggrepel_0.8.2                 fs_1.5.0                     
 [79] data.table_1.13.0             DO.db_2.9                    
 [81] triebeard_0.3.0               reprex_0.3.0                 
 [83] ProtGenerics_1.20.0           evaluate_0.14                
 [85] hms_0.5.3                     mime_0.9                     
 [87] xtable_1.8-4                  XML_3.99-0.5                 
 [89] readxl_1.3.1                  gridExtra_2.3                
 [91] compiler_4.0.2                biomaRt_2.44.1               
 [93] crayon_1.3.4                  htmltools_0.5.0              
 [95] later_1.1.0.1                 geneplotter_1.66.0           
 [97] lubridate_1.7.9               DBI_1.1.0                    
 [99] tweenr_1.0.1                  dbplyr_1.4.4                 
[101] MASS_7.3-51.6                 rappdirs_0.3.1               
[103] Matrix_1.2-18                 cli_2.0.2                    
[105] igraph_1.2.5                  pkgconfig_2.0.3              
[107] rvcheck_0.1.8                 GenomicAlignments_1.24.0     
[109] xml2_1.3.2                    annotate_1.66.0              
[111] XVector_0.28.0                rvest_0.3.6                  
[113] digest_0.6.25                 graph_1.66.0                 
[115] Biostrings_2.56.0             rmarkdown_2.3                
[117] cellranger_1.1.0              fastmatch_1.1-0              
[119] edgeR_3.30.3                  curl_4.3                     
[121] shiny_1.5.0                   Rsamtools_2.4.0              
[123] lifecycle_0.2.0               jsonlite_1.7.0               
[125] viridisLite_0.3.0             askpass_1.1                  
[127] limma_3.44.3                  fansi_0.4.1                  
[129] pillar_1.4.6                  lattice_0.20-41              
[131] KEGGREST_1.28.0               fastmap_1.0.1                
[133] httr_1.4.2                    survival_3.2-3               
[135] GO.db_3.11.4                  interactiveDisplayBase_1.26.3
[137] glue_1.4.1                    UpSetR_1.4.0                 
[139] png_0.1-7                     Rgraphviz_2.32.0             
[141] BiocVersion_3.11.1            bit_4.0.4                    
[143] ggforce_0.3.2                 stringi_1.4.6                
[145] bcbioBase_0.6.14              blob_1.2.1                   
[147] AnnotationHub_2.20.2          memoise_1.1.0

GuangchuangYu added a commit to YuLab-SMU/clusterProfiler that referenced this issue Sep 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants