Problem using dbplyr with biomaRt annotation

515 views Asked by At

I am using biomaRt to get some ensemble annotation and I keep encountering the same error event after updating all the packages. Seems like the problem persist only on Ubuntu and I was able to solve it in Mac. Here is the code I am running and the details about the error

ensembl <- useMart(
  "ENSEMBL_MART_ENSEMBL",
  dataset = "hsapiens_gene_ensembl", 
  host="https://may2021.archive.ensembl.org"
)
ids <- as.vector(row.names(OS_total))
ids
listAttributes(ensembl)
annot <- getBM(
  attributes=c(
    "ensembl_gene_id",
    "transcript_length", 
    "percentage_gene_gc_content",
    "gene_biotype",
    "chromosome_name", 
    "start_position",
    "end_position",
    "external_gene_name",
    "external_gene_source"
  ),
  filters="ensembl_gene_id",
  values=ids,
  mart=ensembl
)

Here are the details about the error

rlang::last_trace() <error/rlang_error> Error in collect(): ! Failed to collect lazy table. Caused by error in db_collect(): ! Arguments in ... must be used. ✖ Problematic argument: • ..1 = Inf ℹ Did you misspell an argument name?


Backtrace: ▆

  1. ├─biomaRt::getBM(...)
  2. │ └─BiocFileCache::BiocFileCache(cache, ask = FALSE)
  3. │ └─BiocFileCache:::.sql_create_db(bfc)
  4. │ └─BiocFileCache:::.sql_validate_version(bfc)
  5. │ └─BiocFileCache:::.sql_schema_version(bfc)
  6. │ ├─base::tryCatch(...)
  7. │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
  8. │ └─tbl(src, "metadata") %>% collect(Inf)
  9. ├─dplyr::collect(., Inf)
  10. └─dbplyr:::collect.tbl_sql(., Inf)
  11. ├─base::tryCatch(...)
  12. │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
  13. │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
  14. │ └─base (local) doTryCatch(return(expr), name, parentenv, handler)
  15. └─dbplyr::db_collect(x$src$con, sql, n = n, warn_incomplete = warn_incomplete, ...)

I have looked at the previous posts about a potential bug causing BiocFileCache compatibility with the new version dbplyr (https://stat.ethz.ch/pipermail/bioc-devel/2023-October/020003.html) and updated all the packages from GitHub accordingly but the problem seems to persist on my Ubuntu system. I could not reproduce the same error on my MacOS system.

I would appreciate any suggestion if anyone has encountered the same problem even after the bug fix release.

thanks! roberto

1

There are 1 answers

0
Graeme Newton On

Just ran into this issue myself. It is due to incompatibility between the latest version of dbplyr and BiocFileCache, which has subsequently affected biomaRt. To resolve it for Bioconductor v3.17, you can downgrade dbplyr with:

devtools::install_version("dbplyr", version = "2.3.4")

The better option is to upgrade Bioconductor to v3.18:

BiocManager::install(version = "3.18")

More details can be found in biomaRt's GitHub issues here.