BiomaRt getBM Error when converting from Ensemble to RNACentral IDs
2
0
Entering edit mode
Michael • 0
@51461f2d
Last seen 4 months ago
United States

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
biomaRt • 364 views
ADD COMMENT
0
Entering edit mode

Can you give some examples of the content of tx maybe via head(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.

ADD REPLY
0
Entering edit mode

Trying again today with the same code, it's actually showing a different error now.

Loading required package: biomaRt
> library(biomaRt)
> mart <- useEnsembl(biomart = "ensembl", 
+                    dataset = "hsapiens_gene_ensembl", 
+                    mirror = "useast")
Ensembl site unresponsive, trying www mirror
Error in curl::curl_fetch_memory(url, handle = handle) : 
  Timeout was reached: [useast.ensembl.org:8443] Connection timed out after 10001 milliseconds
> tx <- scan('R/test_study.txt', character(), quote = "")
Read 14763 items
> tx <- strsplit(tx, "\" \"")
> res <- getBM(
+   attributes = c("rnacentral"),
+   filters = "ensembl_gene_id_version",
+   values = tx,
+   mart = mart)
Error in curl::curl_fetch_memory(url, handle = handle) : 
  Timeout was reached: [useast.ensembl.org:8443] Connection timed out after 10004 milliseconds

Here is the head(tx)

> head(tx)
[[1]]
[1] "ENSG00000242268.2"

[[2]]
[1] "ENSG00000270112.3"

[[3]]
[1] "ENSG00000167578.15"

[[4]]
[1] "ENSG00000078237.5"

[[5]]
[1] "ENSG00000146083.10"

[[6]]
[1] "ENSG00000225275.4"
ADD REPLY
0
Entering edit mode

Nevermind, it now always returns the original error, I'm not sure why it was showing a new error for a little while.

ADD REPLY
2
Entering edit mode
@james-w-macdonald-5106
Last seen 1 day ago
United States
> tx <- list("ENSG00000242268.2","ENSG00000270112.3","ENSG00000167578.1","ENSG00000078237.5","ENSG00000146083.10","ENSG00000225275.4")
> tx
[[1]]
[1] "ENSG00000242268.2"

[[2]]
[1] "ENSG00000270112.3"

[[3]]
[1] "ENSG00000167578.1"

[[4]]
[1] "ENSG00000078237.5"

[[5]]
[1] "ENSG00000146083.10"

[[6]]
[1] "ENSG00000225275.4"

> getBM("rnacentral","ensembl_gene_id_version", tx, mart)
Error in .processResults(postRes, mart = mart, sep = sep, fullXmlQuery = fullXmlQuery,  : 
  Query ERROR: caught BioMart::Exception::Usage: Filter NA NOT FOUND
> getBM("rnacentral","ensembl_gene_id_version", unlist(tx), mart)
     rnacentral
1 URS00008C229F

The values argument is supposed to be a vector, not a list.

0
Entering edit mode

Thank You!

ADD REPLY
0
Entering edit mode
Rabada • 0
@a7cd8c24
Last seen 3 months ago
Pakistan

tx <- list("ENSG00000242268.2","ENSG00000270112.3","ENSG00000167578.1","ENSG00000078237.5","ENSG00000146083.10","ENSG00000225275.4") tx 1 "ENSG00000242268.2"

[2] "ENSG00000270112.3"

[3] "ENSG00000167578.1"

[4] "ENSG00000078237.5"

[5] "ENSG00000146083.10"

[6] "ENSG00000225275.4"

getBM("rnacentral","ensembl_gene_id_version", tx, mart) Error in .processResults(postRes, mart = mart, sep = sep, fullXmlQuery = fullXmlQuery, : Query ERROR: caught BioMart::Exception::Usage: Filter NA NOT FOUND getBM("rnacentral","ensembl_gene_id_version", unlist(tx), mart) rnacentral 1 URS00008C229F

Team: wallmountedhub

ADD COMMENT

Login before adding your answer.

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