Ubuntu系统biomaRt+dbplyr调用getBM时collect报错求助
BiomaRt在Ubuntu系统获取Ensembl注释的兼容性错误求助
在Ubuntu系统使用biomaRt获取Ensembl注释时,已更新所有相关包,但仍反复触发相同错误,Mac系统下无此问题。
运行代码
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 )
错误详情
rlang::last_trace()
<error/rlang_error>
Error incollect():
! Failed to collect lazy table.
Caused by error indb_collect():
! Arguments in...must be used.
✖ Problematic argument:
• ..1 = Inf
ℹ Did you misspell an argument name?
回溯信息
- ├─biomaRt::getBM(...)
- │ └─BiocFileCache::BiocFileCache(cache, ask = FALSE)
- │ └─BiocFileCache:::.sql_create_db(bfc)
- │ └─BiocFileCache:::.sql_validate_version(bfc)
- │ └─BiocFileCache:::.sql_schema_version(bfc)
- │ ├─base::tryCatch(...)
- │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
- │ └─tbl(src, "metadata") %>% collect(Inf)
- ├─dplyr::collect(., Inf)
- └─dbplyr:::collect.tbl_sql(., Inf)
- ├─base::tryCatch(...)
- │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
- │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
- │ └─base (local) doTryCatch(return(expr), name, parentenv, handler)
- └─dbplyr::db_collect(x$src$con, sql, n = n, warn_incomplete = warn_incomplete, ...)
已尝试操作
- 查阅BiocFileCache与新版dbplyr兼容性相关内容
- 从GitHub更新所有相关包
解决建议
- 降级dbplyr到兼容版本:新版dbplyr的
collect函数参数逻辑变更,导致BiocFileCache调用报错,安装dbplyr 2.3.4版本:install.packages("dbplyr", version = "2.3.4") - 清理BiocFileCache缓存:清除旧缓存避免数据库schema冲突:
BiocFileCache::bfcpurge() - 指定临时缓存目录:调用
useMart时指定临时目录作为缓存,绕过现有缓存问题:ensembl <- useMart( "ENSEMBL_MART_ENSEMBL", dataset = "hsapiens_gene_ensembl", host="https://may2021.archive.ensembl.org", cache = tempdir() ) - 检查系统依赖:Ubuntu系统确保安装
libsqlite3-dev依赖:sudo apt-get install libsqlite3-dev
内容的提问来源于stack exchange,提问作者Roberto Salatino
相关产品推荐
相关产品推荐

