Problem select / ensembl package
2
0
Entering edit mode
yinnahm • 0
@5459c359
Last seen 3.0 years ago
Mexico

I want to get the annotation for a list of genes whose identifier is ensembl, but when I try to use select it give an error. Then I used the example from the documentation to get some annotations and the error was the same. I do not understand what is wrong

BiocManager::install("EnsDb.Hsapiens.v86", force=TRUE)
library(EnsDb.Hsapiens.v86)
edb <- EnsDb.Hsapiens.v86
library(dplyr)
select(edb, keys = c("BCL2", "BCL2L11"), keytype = "GENENAME",
       columns = c("GENEID", "GENENAME", "TXID", "TXBIOTYPE"))

##ERROR

Error in UseMethod("select") : 
  no applicable method for 'select' applied to an object of class "EnsDb" 

sessionInfo( )
R version 4.1.1 (2021-08-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19041)

Matrix products: default

locale:
[1] LC_COLLATE=Spanish_Spain.1252 
[2] LC_CTYPE=Spanish_Spain.1252   
[3] LC_MONETARY=Spanish_Spain.1252
[4] LC_NUMERIC=C                  
[5] LC_TIME=Spanish_Spain.1252    

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

other attached packages:
 [1] dplyr_1.0.7               EnsDb.Hsapiens.v86_2.99.0
 [3] ensembldb_2.16.4          AnnotationFilter_1.16.0  
 [5] GenomicFeatures_1.44.2    AnnotationDbi_1.54.1     
 [7] Biobase_2.52.0            GenomicRanges_1.44.0     
 [9] GenomeInfoDb_1.28.4       IRanges_2.26.0           
[11] S4Vectors_0.30.2          BiocGenerics_0.38.0      

loaded via a namespace (and not attached):
 [1] MatrixGenerics_1.4.3        httr_1.4.2                 
 [3] bit64_4.0.5                 assertthat_0.2.1           
 [5] BiocManager_1.30.16         BiocFileCache_2.0.0        
 [7] blob_1.2.2                  GenomeInfoDbData_1.2.6     
 [9] Rsamtools_2.8.0             yaml_2.2.1                 
[11] progress_1.2.2              pillar_1.6.4               
[13] RSQLite_2.2.8               lattice_0.20-45            
[15] glue_1.4.2                  digest_0.6.28              
[17] XVector_0.32.0              Matrix_1.3-4               
[19] XML_3.99-0.8                pkgconfig_2.0.3            
[21] biomaRt_2.48.3              zlibbioc_1.38.0            
[23] purrr_0.3.4                 BiocParallel_1.26.2        
[25] tibble_3.1.5                KEGGREST_1.32.0            
[27] generics_0.1.1              ellipsis_0.3.2             
[29] cachem_1.0.6                SummarizedExperiment_1.22.0
[31] lazyeval_0.2.2              magrittr_2.0.1             
[33] crayon_1.4.1                memoise_2.0.0              
[35] fansi_0.5.0                 xml2_1.3.2                 
[37] tools_4.1.1                 prettyunits_1.1.1          
[39] hms_1.1.1                   BiocIO_1.2.0               
[41] lifecycle_1.0.1             matrixStats_0.61.0         
[43] stringr_1.4.0               DelayedArray_0.18.0        
[45] Biostrings_2.60.2           compiler_4.1.1             
[47] rlang_0.4.12                grid_4.1.1                 
[49] RCurl_1.98-1.5              rstudioapi_0.13            
[51] rjson_0.2.20                rappdirs_0.3.3             
[53] bitops_1.0-7                restfulr_0.0.13            
[55] DBI_1.1.1                   curl_4.3.2                 
[57] R6_2.5.1                    GenomicAlignments_1.28.0   
[59] rtracklayer_1.52.1          fastmap_1.1.0              
[61] bit_4.0.4                   utf8_1.2.2                 
[63] filelock_1.0.2              ProtGenerics_1.24.0        
[65] stringi_1.7.5               Rcpp_1.0.7                 
[67] vctrs_0.3.8                 png_0.1-7                  
[69] dbplyr_2.1.1                tidyselect_1.1.1
ensembldb • 1.4k views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 7 hours ago
United States

Looks like select is being masked by the tidyverse. Try using the fully qualified name ensembldb::select

ADD COMMENT
0
Entering edit mode

For example

> select(EnsDb.Hsapiens.v75, head(keys(EnsDb.Hsapiens.v75)), "SYMBOL")
Error in UseMethod("select") : 
  no applicable method for 'select' applied to an object of class "EnsDb"
> ensembldb::select(EnsDb.Hsapiens.v75, head(keys(EnsDb.Hsapiens.v75)), "SYMBOL")
           GENEID   SYMBOL
1 ENSG00000000003   TSPAN6
2 ENSG00000000005     TNMD
3 ENSG00000000419     DPM1
4 ENSG00000000457    SCYL3
5 ENSG00000000460 C1orf112
6 ENSG00000000938      FGR
ADD REPLY
0
Entering edit mode
yinnahm • 0
@5459c359
Last seen 3.0 years ago
Mexico

ensembldb::select works perfect

Thanks!!!

ADD COMMENT

Login before adding your answer.

Traffic: 687 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6