I'm trying to convert a list of Ensemble gene IDs to RNACentral Gene IDs using BiomaRt, but I'm not very experienced with R. My code is
library(biomaRt)
mart <- useEnsembl(biomart = "ensembl",
dataset = "hsapiens_gene_ensembl",
mirror = "useast")
tx <- scan('R/test_study.txt', character(), quote = "")
tx <- strsplit(tx, "\" \"")
res <- getBM(
attributes = c("rnacentral"),
filters = "ensembl_gene_id_version",
values = tx,
mart = mart)
I'm getting this error:
Error in .processResults(postRes, mart = mart, sep = sep, fullXmlQuery = fullXmlQuery, :
Query ERROR: caught BioMart::Exception::Usage: Filter NA NOT FOUND
Session Info
R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] biomaRt_2.46.3
loaded via a namespace (and not attached):
[1] Rcpp_1.0.6 pillar_1.6.0 compiler_4.0.3 BiocManager_1.30.12 dbplyr_2.1.1
[6] prettyunits_1.1.1 tools_4.0.3 progress_1.2.2 bit_4.0.4 tibble_3.1.1
[11] RSQLite_2.2.7 memoise_2.0.0 BiocFileCache_1.14.0 lifecycle_1.0.0 pkgconfig_2.0.3
[16] rlang_0.4.11 DBI_1.1.1 curl_4.3.1 parallel_4.0.3 fastmap_1.1.0
[21] withr_2.4.2 dplyr_1.0.5 stringr_1.4.0 httr_1.4.2 xml2_1.3.2
[26] rappdirs_0.3.3 generics_0.1.0 S4Vectors_0.28.1 vctrs_0.3.7 askpass_1.1
[31] IRanges_2.24.1 hms_1.0.0 tidyselect_1.1.1 stats4_4.0.3 bit64_4.0.5
[36] glue_1.4.2 Biobase_2.50.0 R6_2.5.0 fansi_0.4.2 AnnotationDbi_1.52.0
[41] XML_3.99-0.6 purrr_0.3.4 blob_1.2.1 magrittr_2.0.1 ellipsis_0.3.1
[46] BiocGenerics_0.36.1 assertthat_0.2.1 utf8_1.2.1 stringi_1.5.3 openssl_1.4.4
[51] cachem_1.0.4 crayon_1.4.1
Can you give some examples of the content of
tx
maybe viahead(tx)
?Errors of the form
caught BioMart::Exception::Usage: Filter NA NOT FOUND
are from the Ensembl server rather than the R package, but it's hard to suggest why without knowing what values are being sent to it.Trying again today with the same code, it's actually showing a different error now.
Here is the head(tx)
Nevermind, it now always returns the original error, I'm not sure why it was showing a new error for a little while.