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')"
1
1
Entering edit mode
antara ▴ 10
@antara-24297
Last seen 4.0 years ago

I am trying to run honeyBADGER and when I run code similar to this

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


I get following error

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()
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

Thank you in advance for your help,

Best, Antara

ErrorinUseMethod("filter_") biomaRt • 10k views
ADD COMMENT
0
Entering edit mode
@martin-morgan-1513
Last seen 4 months ago
United States

Hello antara!

Posts similar to yours can already be found at:

We encourage you to look at the sources listed above for more answers.

If you disagree with this please tell us why in a reply below. We'll be happy to talk about it.

Cheers!

PS: 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')"

ADD COMMENT
0
Entering edit mode

Hi antara,

Did this method Martin suggested work for you? I'm also using honey badger getting a similar error but the solution still does not work for me.

Thanks you!

ADD REPLY

Login before adding your answer.

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