希望你一切都好!我遇到了一个我在使用 biomaRt 时从未遇到过的错误。 这是我正在使用的代码和我看到的错误:
`> library("biomaRt")
> # release 88 of Ensembl is March 2017
> #https://www.ensembl.org/info/website/archives/index.html
> ensembl <- useEnsembl(biomart = "ensembl",
+ dataset = "hsapiens_gene_ensembl",
+ mirror = "useast")
> annot2 <- getBM(attributes=c('ensembl_gene_id', 'chromosome_name', 'start_position', 'end_position', 'description', 'strand','external_gene_name'),
+ #filters ='ensembl_gene_id',
+ #values = gene_ids,
+ mart = ensembl)
Error in `mutate()`:
! Problem while computing `rpath = unname(bfcrpath(x, rids = rids))`.
Caused by error in `dplyr::select()`:
! <text>:1:7: unexpected symbol
1: Using an
^
Run `rlang::last_error()` to see where the error occurred.
> rlang::last_error()
<error/dplyr:::mutate_error>
Error in `mutate()`:
! Problem while computing `rpath = unname(bfcrpath(x, rids = rids))`.
Caused by error in `dplyr::select()`:
! <text>:1:7: unexpected symbol
1: Using an
^
---
Backtrace:
1. biomaRt::getBM(...)
22. dplyr:::select.data.frame(., rid, field)`
我尝试再次加载biomaRt,但没有任何变化 .
这是我的 sessionInfo()
`> sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)
Matrix products: default
BLAS/LAPACK: /usr/lib64/libopenblas-r0.3.3.so
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
[6] LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=C 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
other attached packages:
[1] biomaRt_2.46.3 BiocManager_1.30.20 dplyr_1.0.9
loaded via a namespace (and not attached):
[1] Rcpp_1.0.9 dbplyr_2.2.1 pillar_1.8.1 compiler_4.0.3 prettyunits_1.1.1 progress_1.2.2 tools_4.0.3
[8] bit_4.0.5 BiocFileCache_1.14.0 RSQLite_2.2.15 memoise_2.0.1 lifecycle_1.0.1 tibble_3.1.7 pkgconfig_2.0.3
[15] rlang_1.0.4 DBI_1.1.3 cli_3.4.0 rstudioapi_0.14 curl_5.0.0 parallel_4.0.3 xfun_0.31
[22] fastmap_1.1.1 withr_2.5.0 xml2_1.3.3 httr_1.4.5 stringr_1.4.1 rappdirs_0.3.3 askpass_1.1
[29] hms_1.1.2 IRanges_2.24.1 generics_0.1.3 vctrs_0.4.1 S4Vectors_0.28.1 stats4_4.0.3 bit64_4.0.5
[36] tidyselect_1.2.0 glue_1.6.2 Biobase_2.50.0 R6_2.5.1 fansi_1.0.3 AnnotationDbi_1.52.0 XML_3.99-0.13
[43] limma_3.46.0 purrr_0.3.4 blob_1.2.3 magrittr_2.0.3 ellipsis_0.3.2 BiocGenerics_0.36.1 assertthat_0.2.1
[50] utf8_1.2.3 tinytex_0.44 stringi_1.7.6 openssl_2.0.3 cachem_1.0.6 crayon_1.5.2 `
有人知道发生了什么事吗?预先非常感谢! 奇亚拉
我在使用 dplyr 版本 1.0.10 和 biomaRt 时也遇到了这个问题。
我通过使用
install.packages('dplyr')
更新 dplyr 并使用 BiocManager::install('biomaRt', force=TRUE)
重新安装 biomaRt 解决了这个问题
现在 get_BM() 按预期工作。
packageVersion('biomaRt')
[1]“2.50.3”
packageVersion('dplyr')
[1]“1.1.4”