ah <- AnnotationHub() Error in UseMethod("filter_"): no applicable method for 'filter_' applied to an object of class "c('tbl_SQLiteConnection', 'tbl_dbi', 'tbl_sql', 'tbl_lazy', 'tbl')"
2
3
Entering edit mode
@e94f8f5c
Last seen 4 weeks ago
Germany

I have been trying to create an EnsDb object using AnnotationHub. This code had worked just fine for me till today. Now when I run the following code I get the error

library(ensembldb)
library(dplyr)
library(AnnotationHub)

## Load the annotation resource.
ah <-  AnnotationHub()

## Query for all available EnsDb databases
query(ah, "EnsDb")

ahDb <- query(ah, pattern = c("Homo sapiens", "EnsDb", 97))
Error in UseMethod("filter_"): no applicable method for 'filter_' applied to an object of class "c('tbl_SQLiteConnection', 'tbl_dbi', 'tbl_sql', 'tbl_lazy', 'tbl')"
Traceback:

1. AnnotationHub()
2. .Hub("AnnotationHub", hub, cache, proxy, localHub, ...)
3. .create_cache(.class, url, cache, proxy, localHub)
4. .updateHubDB(hub_bfc, .class, url, proxy, localHub)
5. bfcquery(bfc, paste0(tolower(.class), ".sqlite3"), field = "rname", 
 .     exact = TRUE)
6. bfcquery(bfc, paste0(tolower(.class), ".sqlite3"), field = "rname", 
 .     exact = TRUE)
7. bfcinfo(x, rids)
8. bfcinfo(x, rids)
9. .sql_get_resource_table(x, rids)
10. tryCatch({
  .     con <- .sql_connect_RO(.sql_dbfile(bfc))
  .     src <- src_dbi(con)
  .     tbl <- tbl(src, "resource")
  .     if (missing(rids)) {
  .     }
  .     else if (length(rids) == 0) {
  .         tbl <- tbl %>% filter_(~rid == NA_character_)
  .     }
  .     else if (length(rids) == 1) {
  .         tbl <- tbl %>% filter_(~rid == rids)
  .     }
  .     else {
  .         tbl <- tbl %>% filter_(~rid %in% rids)
  .     }
  .     meta <- setdiff(dbListTables(con), .RESERVED$TABLES)
  .     for (m in meta) tbl <- left_join(tbl, tbl(src, m), by = "rid")
  .     tbl <- tbl %>% collect
  . }, finally = {
  .     dbDisconnect(con)
  . })
11. tryCatchList(expr, classes, parentenv, handlers)
12. tbl %>% filter_(~rid == NA_character_)
13. withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
14. eval(quote(`_fseq`(`_lhs`)), env, env)
15. eval(quote(`_fseq`(`_lhs`)), env, env)
16. `_fseq`(`_lhs`)
17. freduce(value, `_function_list`)
18. withVisible(function_list[[k]](value))
19. function_list[[k]](value)
20. filter_(., ~rid == NA_character_)

Thank you in advance

Best,

Georgia

Here is my sessionInfo()

sessionInfo( )

R version 3.6.1 (2019-07-05)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.2 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/atlas/libblas.so.3.10.3
LAPACK: /usr/lib/x86_64-linux-gnu/atlas/liblapack.so.3.10.3

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] grid      parallel  stats4    stats     graphics  grDevices utils    
 [8] datasets  methods   base     

other attached packages:
 [1] httr_1.4.2             forcats_0.5.0          stringr_1.4.0         
 [4] purrr_0.3.4            readr_1.3.1            tidyverse_1.3.0       
 [7] AnnotationHub_2.16.1   BiocFileCache_1.10.2   dbplyr_2.0.0          
[10] ensembldb_2.8.1        AnnotationFilter_1.8.0 GenomicFeatures_1.38.2
[13] AnnotationDbi_1.48.0   Biobase_2.46.0         ggbio_1.32.0          
[16] ggpubr_0.4.0           Gviz_1.28.3            GenomicRanges_1.38.0  
[19] GenomeInfoDb_1.22.1    IRanges_2.20.2         S4Vectors_0.24.4      
[22] BiocGenerics_0.32.0    scales_1.1.1           gridExtra_2.3         
[25] edgeR_3.26.8           limma_3.42.2           pheatmap_1.0.12       
[28] RColorBrewer_1.1-2     ggrepel_0.8.2          ggplot2_3.3.2         
[31] tibble_3.0.4           tidyr_1.1.2            dplyr_1.0.2.9000      

loaded via a namespace (and not attached):
  [1] tidyselect_1.1.0              RSQLite_2.2.1                
  [3] htmlwidgets_1.5.2             BiocParallel_1.20.1          
  [5] devtools_2.3.2                munsell_0.5.0                
  [7] pbdZMQ_0.3-3                  withr_2.3.0                  
  [9] colorspace_1.4-1              OrganismDbi_1.26.0           
 [11] knitr_1.30                    uuid_0.1-4                   
 [13] rstudioapi_0.11               ggsignif_0.6.0               
 [15] repr_1.1.0                    GenomeInfoDbData_1.2.2       
 [17] bit64_4.0.5                   rprojroot_1.3-2              
 [19] vctrs_0.3.4                   generics_0.1.0               
 [21] xfun_0.17                     biovizBase_1.32.0            
 [23] R6_2.5.0                      locfit_1.5-9.4               
 [25] bitops_1.0-6                  reshape_0.8.8                
 [27] DelayedArray_0.12.3           assertthat_0.2.1             
 [29] promises_1.1.1                nnet_7.3-14                  
 [31] gtable_0.3.0                  processx_3.4.4               
 [33] rlang_0.4.8                   splines_3.6.1                
 [35] rtracklayer_1.46.0            rstatix_0.6.0                
 [37] lazyeval_0.2.2                dichromat_2.0-0              
 [39] broom_0.7.0                   checkmate_2.0.0              
 [41] BiocManager_1.30.10           yaml_2.2.1                   
 [43] reshape2_1.4.4                abind_1.4-5                  
 [45] modelr_0.1.8                  backports_1.2.0              
 [47] httpuv_1.5.4                  Hmisc_4.4-1                  
 [49] RBGL_1.60.0                   usethis_1.6.3                
 [51] tools_3.6.1                   ellipsis_0.3.1               
 [53] sessioninfo_1.1.1             Rcpp_1.0.5                   
 [55] plyr_1.8.6                    base64enc_0.1-3              
 [57] progress_1.2.2                zlibbioc_1.32.0              
 [59] RCurl_1.98-1.2                ps_1.4.0                     
 [61] prettyunits_1.1.1             rpart_4.1-15                 
 [63] openssl_1.4.3                 SummarizedExperiment_1.16.1  
 [65] haven_2.3.1                   cluster_2.1.0                
 [67] fs_1.5.0                      magrittr_1.5                 
 [69] data.table_1.13.2             openxlsx_4.2.2               
 [71] reprex_0.3.0                  ProtGenerics_1.16.0          
 [73] matrixStats_0.57.0            pkgload_1.1.0                
 [75] hms_0.5.3                     mime_0.9                     
 [77] evaluate_0.14                 xtable_1.8-4                 
 [79] XML_3.99-0.3                  rio_0.5.16                   
 [81] jpeg_0.1-8.1                  readxl_1.3.1                 
 [83] testthat_3.0.0                compiler_3.6.1               
 [85] biomaRt_2.42.1                crayon_1.3.4                 
 [87] htmltools_0.5.0               later_1.1.0.1                
 [89] Formula_1.2-3                 lubridate_1.7.9              
 [91] DBI_1.1.0                     rappdirs_0.3.1               
 [93] Matrix_1.2-18                 car_3.0-9                    
 [95] cli_2.1.0                     pkgconfig_2.0.3              
 [97] GenomicAlignments_1.22.1      foreign_0.8-74               
 [99] IRdisplay_0.7.0               xml2_1.3.2                   
[101] XVector_0.26.0                rvest_0.3.6                  
[103] VariantAnnotation_1.30.1      callr_3.5.1                  
[105] digest_0.6.27                 graph_1.62.0                 
[107] Biostrings_2.54.0             cellranger_1.1.0             
[109] htmlTable_2.1.0               curl_4.3                     
[111] shiny_1.5.0                   Rsamtools_2.2.3              
[113] lifecycle_0.2.0               jsonlite_1.7.1               
[115] carData_3.0-4                 desc_1.2.0                   
[117] askpass_1.1                   BSgenome_1.52.0              
[119] fansi_0.4.1                   pillar_1.4.6                 
[121] lattice_0.20-41               GGally_2.0.0                 
[123] fastmap_1.0.1                 pkgbuild_1.1.0               
[125] survival_3.2-3                remotes_2.2.0                
[127] interactiveDisplayBase_1.22.0 glue_1.4.2                   
[129] zip_2.1.1                     png_0.1-7                    
[131] bit_4.0.4                     stringi_1.5.3                
[133] blob_1.2.1                    latticeExtra_0.6-29          
[135] memoise_1.1.0.9000            IRkernel_1.1.1
AnnotationHub dplyr • 15k views
ADD COMMENT
1
Entering edit mode
@martin-morgan-1513
Last seen 4 months ago
United States

This does not happen in a current version of Bioconductor,

> BiocManager::version()
[1] '3.12'
> BiocManager::valid()
[1] TRUE

so i suggest you update your installation (this includes updating R to version 4.0.3)

I think the problem can be avoided in your version of R / Bioconductor by loading dplyr after the query

library(ensembldb)
library(AnnotationHub)

## Load the annotation resource.
ah <-  AnnotationHub()

## Query for all available EnsDb databases
query(ah, "EnsDb")

ahDb <- query(ah, pattern = c("Homo sapiens", "EnsDb", 97))

library(dplyr)
ADD COMMENT
1
Entering edit mode

Thank you for your quick response :) . Loading the dplyr after the query did not make a difference in my case and had the same error. Updating R and Bioconductor would be sure an option but what worked in my case was to reinstall an older version of dplyr (version 0.8) as well as dbplyr (version 1.3) and then reinstall AnnotationHub specifying the Bioconductor version.

    #Install previous version of dplyr (0.8) 
    devtools::install_github("hadley/dplyr@v0.8.0")

    #Install previous version of dbplyr (1.3)
    devtools::install_url(https://cran.r-project.org/src/contrib/Archive/dbplyr/dbplyr_1.3.0.tar.gz)

    #Install AnnotationHub for Bioconductor 3.10 
    BiocManager::install("AnnotationHub", version = "3.10", dependencies = TRUE)

    library(AnnotationHub)

    #Load the annotation resource
    ah <- AnnotationHub()   

    #Query for all available EnsDb databases  
    query(ah, "EnsDb")

    ahDb <- query(ah, pattern = c("Homo sapiens", "EnsDb", 97))

Best wishes,

Georgia

ADD REPLY
0
Entering edit mode

georgiakatsoula93

Hello,

I have thee same problem.

I can not go through the code of ah<-AnnotationHub().

Would you please check it for me?

Thank you in advance for your great help!

Best,

Yue

> library(ensembldb)
> library(AnnotationHub)
> ah <-  AnnotationHub()
Error in UseMethod("filter_") : 
no applicable method for 'filter_' applied to an object of class "c('tbl_SQLiteConnection', 'tbl_dbi', 'tbl_sql', 'tbl_lazy', 'tbl')"
> 
> sessionInfo()
R version 3.6.3 (2020-02-29)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.5 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1

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

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

other attached packages:
 [1] AnnotationHub_2.18.0    BiocFileCache_1.10.2    dbplyr_2.0.0            ensembldb_2.10.2        AnnotationFilter_1.10.0 GenomicFeatures_1.38.2  AnnotationDbi_1.48.0   
 [8] Biobase_2.46.0          GenomicRanges_1.38.0    GenomeInfoDb_1.22.1     IRanges_2.20.2          S4Vectors_0.24.4        BiocGenerics_0.32.0     limma_3.42.2           

loaded via a namespace (and not attached):
  [1] ProtGenerics_1.18.0           bitops_1.0-6                  matrixStats_0.57.0            bit64_4.0.5                   RColorBrewer_1.1-2           
  [6] progress_1.2.2                httr_1.4.2                    tools_3.6.3                   backports_1.2.0               R6_2.5.0                     
 [11] rpart_4.1-15                  lazyeval_0.2.2                Hmisc_4.4-2                   DBI_1.1.0                     colorspace_2.0-0             
 [16] nnet_7.3-14                   tidyselect_1.1.0              gridExtra_2.3                 prettyunits_1.1.1             DESeq2_1.26.0                
 [21] bit_4.0.4                     curl_4.3                      compiler_3.6.3                htmlTable_2.1.0               DelayedArray_0.12.3          
 [26] rtracklayer_1.46.0            scales_1.1.1                  checkmate_2.0.0               genefilter_1.68.0             askpass_1.1                  
 [31] rappdirs_0.3.1                Rsamtools_2.2.3               stringr_1.4.0                 digest_0.6.27                 foreign_0.8-76               
 [36] XVector_0.26.0                base64enc_0.1-3               jpeg_0.1-8.1                  pkgconfig_2.0.3               htmltools_0.5.0              
 [41] fastmap_1.0.1                 htmlwidgets_1.5.2             rlang_0.4.9                   rstudioapi_0.13               RSQLite_2.2.1                
 [46] shiny_1.5.0                   generics_0.1.0                BiocParallel_1.20.1           dplyr_0.8.0                   RCurl_1.98-1.2               
 [51] magrittr_2.0.1                GenomeInfoDbData_1.2.2        Formula_1.2-4                 Matrix_1.2-18                 Rcpp_1.0.5                   
 [56] munsell_0.5.0                 lifecycle_0.2.0               yaml_2.2.1                    stringi_1.5.3                 SummarizedExperiment_1.16.1  
 [61] zlibbioc_1.32.0               grid_3.6.3                    blob_1.2.1                    promises_1.1.1                crayon_1.3.4                 
 [66] lattice_0.20-41               Biostrings_2.54.0             splines_3.6.3                 annotate_1.64.0               hms_0.5.3                    
 [71] locfit_1.5-9.4                knitr_1.30                    pillar_1.4.7                  geneplotter_1.64.0            biomaRt_2.42.1               
 [76] BiocVersion_3.10.1            XML_3.99-0.3                  glue_1.4.2                    latticeExtra_0.6-29           BiocManager_1.30.10          
 [81] data.table_1.13.2             httpuv_1.5.4                  png_0.1-7                     vctrs_0.3.5                   gtable_0.3.0                 
 [86] openssl_1.4.3                 purrr_0.3.4                   assertthat_0.2.1              ggplot2_3.3.2                 xfun_0.19                    
 [91] mime_0.9                      xtable_1.8-4                  later_1.1.0.1                 survival_3.2-7                tibble_3.0.4                 
 [96] GenomicAlignments_1.22.1      memoise_1.1.0                 cluster_2.1.0                 interactiveDisplayBase_1.24.0 ellipsis_0.3.1      
ADD REPLY
2
Entering edit mode

Update your R / Bioconductor installation to R version 4.0.3 and Bioconductor version 3.12.

ADD REPLY
0
Entering edit mode

Hello Martin Morgan,

Thank you so much for your great help!

Thank you again!

Best,

Yue

> install.packages("AnnotationHub")
Warning message:
package ‘AnnotationHub’ is not available for this version of R

A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages 

> sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.5 LTS

Matrix products: default
BLAS:   /home/li/R-4.0.3/lib/libRblas.so
LAPACK: /home/li/R-4.0.3/lib/libRlapack.so

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] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_4.0.3
ADD REPLY
2
Entering edit mode

This is a Bioconductor package, so follow the installation instructions on the package landing page

if (!requireNamespace("BiocManager", quietly = TRUE))
    install.packages("BiocManager")

BiocManager::install("AnnotationHub")

Still having problems? Make sure your version is correct and installation valid

BiocManager::version()  # 3.12
BiocManager::valid()    # TRUE
ADD REPLY
0
Entering edit mode

Hello Martin Morgan,

Thank you so much for your great help!

Thank you again and really appreciated!

Best,

Yue

> library(ensembldb)
> library(dplyr)
> library(AnnotationHub)
> ah <-  AnnotationHub()
snapshotDate(): 2020-10-27
> query(ah, "EnsDb")
AnnotationHub with 1990 records
# snapshotDate(): 2020-10-27
# $dataprovider: Ensembl
# $species: Homo sapiens, Xiphophorus maculatus, Xenopus tropicalis, Vicugna...
# $rdataclass: EnsDb
# additional mcols(): taxonomyid, genome, description,
#   coordinate_1_based, maintainer, rdatadateadded, preparerclass, tags,
#   rdatapath, sourceurl, sourcetype 
# retrieve records with, e.g., 'object[["AH53185"]]' 

        title                                       
 AH53185 | Ensembl 87 EnsDb for Anolis Carolinensis    
 AH53186 | Ensembl 87 EnsDb for Ailuropoda Melanoleuca 
 AH53187 | Ensembl 87 EnsDb for Astyanax Mexicanus     
 AH53188 | Ensembl 87 EnsDb for Anas Platyrhynchos     
 AH53189 | Ensembl 87 EnsDb for Bos Taurus             
 ...       ...                                         
 AH83357 | Ensembl 101 EnsDb for Xiphophorus couchianus
 AH83358 | Ensembl 101 EnsDb for Xiphophorus maculatus 
 AH83359 | Ensembl 101 EnsDb for Xenopus tropicalis    
 AH83360 | Ensembl 101 EnsDb for Zonotrichia albicollis
 AH83361 | Ensembl 101 EnsDb for Zalophus californianus
> ahDb <- query(ah, pattern = c("Homo sapiens", "EnsDb", 97))


> sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.5 LTS

Matrix products: default
BLAS:   /home/li/R-4.0.3/lib/libRblas.so
LAPACK: /home/li/R-4.0.3/lib/libRlapack.so

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] stats4    parallel  stats     graphics  grDevices utils     datasets 
[8] methods   base     

other attached packages:
[1] AnnotationHub_2.22.0    BiocFileCache_1.14.0    dbplyr_2.0.0           
[4] dplyr_1.0.2             ensembldb_2.14.0        AnnotationFilter_1.14.0
[7] GenomicFeatures_1.42.1  AnnotationDbi_1.52.0    Biobase_2.50.0         
[10] GenomicRanges_1.42.0    GenomeInfoDb_1.26.1     IRanges_2.24.0         
[13] S4Vectors_0.28.0        BiocGenerics_0.36.0    

loaded via a namespace (and not attached):
[1] MatrixGenerics_1.2.0          httr_1.4.2                   
[3] bit64_4.0.5                   shiny_1.5.0                  
[5] assertthat_0.2.1              interactiveDisplayBase_1.28.0
[7] askpass_1.1                   BiocManager_1.30.10          
[9] blob_1.2.1                    GenomeInfoDbData_1.2.4       
[11] Rsamtools_2.6.0               yaml_2.2.1                   
[13] progress_1.2.2                BiocVersion_3.12.0           
[15] pillar_1.4.7                  RSQLite_2.2.1                
[17] lattice_0.20-41               glue_1.4.2                   
[19] digest_0.6.27                 promises_1.1.1               
[21] XVector_0.30.0                htmltools_0.5.0              
[23] httpuv_1.5.4                  Matrix_1.2-18                
[25] XML_3.99-0.5                  pkgconfig_2.0.3              
[27] biomaRt_2.46.0                zlibbioc_1.36.0              
[29] xtable_1.8-4                  purrr_0.3.4                  
[31] later_1.1.0.1                 BiocParallel_1.24.1          
[33] tibble_3.0.4                  openssl_1.4.3                
[35] generics_0.1.0                ellipsis_0.3.1               
[37] withr_2.3.0                   SummarizedExperiment_1.20.0  
[39] lazyeval_0.2.2                magrittr_2.0.1               
[41] crayon_1.3.4                  mime_0.9                     
[43] memoise_1.1.0                 xml2_1.3.2                   
[45] tools_4.0.3                   prettyunits_1.1.1            
[47] hms_0.5.3                     lifecycle_0.2.0              
[49] matrixStats_0.57.0            stringr_1.4.0                
[51] DelayedArray_0.16.0           Biostrings_2.58.0            
[53] compiler_4.0.3                rlang_0.4.9                  
[55] grid_4.0.3                    RCurl_1.98-1.2               
[57] rappdirs_0.3.1                bitops_1.0-6                 
[59] DBI_1.1.0                     curl_4.3                     
[61] R6_2.5.0                      GenomicAlignments_1.26.0     
[63] rtracklayer_1.50.0            fastmap_1.0.1                
[65] bit_4.0.4                     ProtGenerics_1.22.0          
[67] stringi_1.5.3                 Rcpp_1.0.5                   
[69] vctrs_0.3.5                   tidyselect_1.1.0             
ADD REPLY
0
Entering edit mode

Thanks this was very useful. Just a note that there is a typo in the 2nd command which forwrdas the installation to dplyr archive instead of dbplyr.

#Install previous version of dbplyr (1.3)
devtools::install_url("http://cran.r-project.org/src/contrib/Archive/dplyr/dbplyr1.3.0.tar.gz")
ADD REPLY
0
Entering edit mode

Thank you indeed, I edited my previous answer, the correct is:

devtools::install_url(https://cran.r-project.org/src/contrib/Archive/dbplyr/dbplyr_1.3.0.tar.gz )

for installing a previous version of dbplyr. I had to downgrade dbplyr too to have a previous version of dplyr working for me.

Best, Georgia

ADD REPLY
0
Entering edit mode

The url is still wrong. It's missing an underscore. You want:

http://cran.r-project.org/src/contrib/Archive/dbplyr/dbplyr_1.3.0.tar.gz

Also, latest minfi required dplyr 0.8.2 so I downgraded to that. That also works.

ADD REPLY
0
Entering edit mode

No the last one is right.. I do not see which underscore you mean here, worked fine for me

ADD REPLY
0
Entering edit mode

Hi, I am running into similar problem, I am trying to run honeybadge and when I try to run a code similar to this

hb$setGexpMats(gexp, ref, mart.obj, filter=FALSE, scale=FALSE, verbose=TRUE)

get this error

Initializing expression matrices ... Normalizing gene expression for 7652 genes and 161 cells ... Error in UseMethod("filter_") : no applicable method for 'filter_' applied to an object of class "c('tbl_SQLiteConnection', 'tbl_dbi', 'tbl_sql', 'tbl_lazy', 'tbl')"

ADD REPLY
0
Entering edit mode

I'm unfamiliar with honeybadge. dplyr made updates this past year deprecating methods. The underlying packgae has to update to use the newer version of dplyr. If they do not, you have to downgrade your version of dplyr as described previously in this thread.

ADD REPLY
0
Entering edit mode

I tried doing so.

traceback()
19: filter_(., ~rid == NA_character_)
18: function_list[[k]](value)
17: withVisible(function_list[[k]](value))
16: freduce(value, `_function_list`)
15: `_fseq`(`_lhs`)
14: eval(quote(`_fseq`(`_lhs`)), env, env)
13: eval(quote(`_fseq`(`_lhs`)), env, env)
12: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
11: tbl %>% filter_(~rid == NA_character_)
10: tryCatchList(expr, classes, parentenv, handlers)
9: tryCatch({
       con <- .sql_connect_RO(.sql_dbfile(bfc))
       src <- src_dbi(con)
       tbl <- tbl(src, "resource")
       if (missing(rids)) {
       }
       else if (length(rids) == 0) {
           tbl <- tbl %>% filter_(~rid == NA_character_)
       }
       else if (length(rids) == 1) {
           tbl <- tbl %>% filter_(~rid == rids)
       }
       else {
           tbl <- tbl %>% filter_(~rid %in% rids)
       }
       meta <- setdiff(dbListTables(con), .RESERVED$TABLES)
       for (m in meta) tbl <- left_join(tbl, tbl(src, m), by = "rid")
       tbl <- tbl %>% collect
   }, finally = {
       dbDisconnect(con)
   })
8: .sql_get_resource_table(x, rids)
7: bfcinfo(x, rids)
6: bfcinfo(x, rids)
5: bfcquery(bfc, query = hash, field = "rname")
4: bfcquery(bfc, query = hash, field = "rname")
3: .checkCache(bfc, hash)
2: getBM(values = rownames(gexp.norm), attributes = c(id, "chromosome_name", 
       "start_position", "end_position"), filters = c(id), mart = mart.obj)
1: lt$setGexpMats(temp.ltgexp, lagexp.m, mart.obj, filter = FALSE, 
       scale = FALSE, verbose = TRUE)

sessionInfo()
R version 3.6.2 (2019-12-12)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Catalina 10.15.1

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/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] parallel  stats4    stats     graphics  grDevices utils     datasets  methods  
[9] base     

other attached packages:
 [1] EnsDb.Hsapiens.v79_2.99.0              
 [2] ensembldb_2.10.2                       
 [3] AnnotationFilter_1.10.0                
 [4] forcats_0.5.0                          
 [5] stringr_1.4.0                          
 [6] purrr_0.3.4                            
 [7] readr_1.4.0                            
 [8] tidyr_1.1.2                            
 [9] tibble_3.0.4                           
[10] ggplot2_3.3.2   
[11] tidyverse_1.3.0                        
[12] dplyr_1.0.2                            
[13] randomForest_4.6-14                    
[14] data.table_1.13.2                      
[15] BSgenome.Hsapiens.UCSC.hg19_1.4.0      
[16] BSgenome_1.54.0                        
[17] Biostrings_2.54.0                      
[18] XVector_0.26.0                         
[19] org.Hs.eg.db_3.10.0                    
[20] TxDb.Hsapiens.UCSC.hg19.knownGene_3.2.2
[21] GenomicFeatures_1.38.2                 
[22] AnnotationDbi_1.48.0                   
[23] Biobase_2.46.0                         
[24] AnnotationHub_2.18.0                   
[25] BiocFileCache_1.10.2                   
[26] dbplyr_2.0.0                           
[27] rtracklayer_1.46.0                     
[28] GenomicRanges_1.38.0                   
[29] GenomeInfoDb_1.22.1                    
[30] IRanges_2.20.2                         
[31] S4Vectors_0.24.4                       
[32] BiocGenerics_0.32.0                    
[33] biomaRt_2.42.1                         
[34] HoneyBADGER_0.1                        
[35] rjags_4-10                             
[36] coda_0.19-4                            

loaded via a namespace (and not attached):
 [1] colorspace_2.0-0              ellipsis_0.3.1               
 [3] rprojroot_2.0.2               fs_1.5.0                     
 [5] rstudioapi_0.13               remotes_2.2.0                
 [7] bit64_4.0.5                   fansi_0.4.1                  
 [9] interactiveDisplayBase_1.24.0 lubridate_1.7.9.2            
[11] xml2_1.3.2                    pkgload_1.1.0                
[13] jsonlite_1.7.1                Rsamtools_2.2.3              
[15] broom_0.7.2                   shiny_1.5.0                  
[17] BiocManager_1.30.10           compiler_3.6.2               
[19] httr_1.4.2                    backports_1.2.0              
[21] assertthat_0.2.1              Matrix_1.2-18                
[23] fastmap_1.0.1                 lazyeval_0.2.2               
[25] cli_2.2.0                     later_1.1.0.1                
[27] htmltools_0.5.0               prettyunits_1.1.1            
[29] tools_3.6.2                   gtable_0.3.0                 
[31] glue_1.4.2                    GenomeInfoDbData_1.2.2       
[33] reshape2_1.4.4                rappdirs_0.3.1               
[35] Rcpp_1.0.5                    cellranger_1.1.0             
[37] vctrs_0.3.5                   ps_1.4.0                     
[39] testthat_3.0.0                rvest_0.3.6                  
[41] mime_0.9                      lifecycle_0.2.0              
[43] devtools_2.3.2                XML_3.99-0.3                 
[45] zlibbioc_1.32.0               scales_1.1.1                 
[47] hms_0.5.3                     promises_1.1.1               
[49] ProtGenerics_1.18.0           SummarizedExperiment_1.16.1  
[51] yaml_2.2.1                    curl_4.3                     
[53] memoise_1.1.0                 gridExtra_2.3                
[55] stringi_1.5.3                 RSQLite_2.2.1                
[57] BiocVersion_3.10.1            desc_1.2.0                   
[59] pkgbuild_1.1.0                BiocParallel_1.20.1          
[61] rlang_0.4.9                   pkgconfig_2.0.3              
[63] matrixStats_0.57.0            bitops_1.0-6                 
[65] lattice_0.20-38               GenomicAlignments_1.22.1     
[67] processx_3.4.5                bit_4.0.4                    
[69] tidyselect_1.1.0              plyr_1.8.6                   
[71] magrittr_2.0.1                R6_2.5.0                     
[73] generics_0.1.0                DelayedArray_0.12.3          
[75] DBI_1.1.0                     withr_2.3.0                  
[77] pillar_1.4.7                  haven_2.3.1                  
[79] RCurl_1.98-1.2                modelr_0.1.8                 
[81] crayon_1.3.4                  usethis_1.6.3                
[83] progress_1.2.2                grid_3.6.2                   
[85] readxl_1.3.1                  callr_3.5.1                  
[87] blob_1.2.1                    reprex_0.3.0                 
[89] digest_0.6.27                 xtable_1.8-4                 
[91] httpuv_1.5.4                  openssl_1.4.3                
[93] munsell_0.5.0                 sessioninfo_1.1.1            
[95] askpass_1.1

But I couldn't go back to previous version of dplyr

library(dplyr)
Error in value[[3L]](cond) : 
  Package 'dplyr' version 1.0.2 cannot be unloaded:
 Error in unloadNamespace(package) : namespace 'dplyr' is imported by 'dbplyr', 'BiocFileCache' so cannot be unloaded.

Thanks again

ADD REPLY
0
Entering edit mode

Try to downgrade before loading any packages. In a fresh R instance before running anything else

#Install previous version of dplyr (0.8)
devtools::install_github("hadley/dplyr@v0.8.0")

#Install previous version of dbplyr (1.3)
devtools::install_url("http://cran.r-project.org/src/contrib/Archive/dbplyr/dbplyr1.3.0.tar.gz")

#Install AnnotationHub for Bioconductor 3.10
BiocManager::install("AnnotationHub", version = "3.10", dependencies = TRUE)
ADD REPLY
0
Entering edit mode

Same error here. It is fixed by upgrading to latest R (4.0.3) and all Bioconductor packages. I think this problem could be pinned down to incompatibilities between dplyr and biomaRt utilities. Also see this: Answer: BiomaRt::getBM Error in UseMethod(filter_)

ADD REPLY
0
Entering edit mode

dplyr made an update (I think middle of last year) regarding the filter_ and I think select_ functions. Packages that utilized these functions needed to update their code. I believe all the necessary changes were made for AnnotationHub/ExperimentHub. It is possible that there may be some lingering. Updating to the most recent R and all accompanied packages is the recommended course of action. Cheer!

ADD REPLY
0
Entering edit mode

I ran into this same error today trying to run select() on an OrgDb AnnotationHub object. I have the most recent versions of R (4.0.3) and Bioconductor (3.12). I was able to resolve it by loading dplyr after my call to select(), but then I have to unload dplyr before calling the code again. It doesn't appear that the issue is resolved in the current version.

ADD REPLY
0
Entering edit mode

If you feel like the issue is not resolved please make a report on the github issues for the repository and include the complete code you tried to run with ERROR and sessionInfo(). Report at https://github.com/Bioconductor/AnnotationHub/issues

ADD REPLY
0
Entering edit mode

In an interactive session, where you have both AnnotationDbi and dplyr loaded, you need to specify where the select function is coming from, e.g., dplyr::select() or AnnotationDbi::select(). It might be tempting to put an alias at the head of your script dselect <- dplyr::select; aselect <- AnnotationDbi::select and use those, but it will be confusing to others (and perhaps yourself at some future time) when they see dselect() in your code and haven't paid attention to the assignment earlier.

ADD REPLY
0
Entering edit mode
SmallChess ▴ 10
@smallchess-7765
Last seen 17 months ago
Australia

Updated my R and Bioconductor worked.

ADD COMMENT

Login before adding your answer.

Traffic: 506 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