biomaRt invalid results
0
0
Entering edit mode
NicolasP • 0
@nicolasp-20123
Last seen 5.1 years ago

Hello, I'm running biomaRt as follow, to retrieve rs IDs with providing SNPs chromosome number and position

ensembl = useMart(biomart = "ENSEMBL_MART_SNP", host = "grch37.ensembl.org", path = "/biomart/martservice",dataset = "hsapiens_snp") 

getBM(attributes = c("refsnp_id", "chr_name", "chrom_start", "chrom_end", "allele", "allele_1", "minor_allele", "minor_allele_freq", "chrom_strand"), 
    filters = "chromosomal_region", 
    values = chrpos_rsidNA, 
    mart = ensembl)

head(chrpos_rsidNA)
[1] "21:14714623:14714623" "21:14756926:14756926" "21:14760841:14760841"
[4] "21:14802991:14802991" "21:15471360:15471360" "21:15535590:15535590"

I get the following error message

Error in getBM(attributes = c("refsnp_id", "chr_name", "chrom_start",  : The query to the BioMart webservice returned an invalid result: biomaRt expected a character string of length 1. 
Please report this on the support site at http://support.bioconductor.org


> sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.1 LTS

Matrix products: default
BLAS: /home/R/R-3.5.1/lib/R/lib/libRblas.so
LAPACK: /home/R/R-3.5.1/lib/R/lib/libRlapack.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] 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] bindrcpp_0.2.2    biomaRt_2.38.0    dplyr_0.8.0.1     data.table_1.12.0

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.0           pillar_1.3.1         compiler_3.5.1      
 [4] bindr_0.1.1          prettyunits_1.0.2    bitops_1.0-6        
 [7] tools_3.5.1          progress_1.2.0       digest_0.6.18       
[10] bit_1.1-14           RSQLite_2.1.1        memoise_1.1.0       
[13] tibble_2.0.1         pkgconfig_2.0.2      rlang_0.3.1         
[16] DBI_1.0.0            curl_3.3             parallel_3.5.1      
[19] xml2_1.2.0           httr_1.4.0           stringr_1.4.0       
[22] S4Vectors_0.20.1     IRanges_2.16.0       hms_0.4.2           
[25] stats4_3.5.1         bit64_0.9-7          tidyselect_0.2.5    
[28] glue_1.3.0           Biobase_2.42.0       R6_2.4.0            
[31] AnnotationDbi_1.44.0 XML_3.98-1.18        purrr_0.3.1         
[34] blob_1.1.1           magrittr_1.5         BiocGenerics_0.28.0 
[37] assertthat_0.2.0     stringi_1.3.1        RCurl_1.95-4.12     
[40] crayon_1.3.4

Thanks

software error • 566 views
ADD COMMENT
0
Entering edit mode

How long is the chrpos_rsidNA vector? It's possible you're hitting Ensembl's time limit for your query, although normally you would receive a message saying this. Does it work if you use a subset of the values in chrpos_rsidNA?


As an aside, it's good to tag your question with the name of the package you're trying to use. Then the maintainer of that package gets notified, I only saw this post by chance.

ADD REPLY

Login before adding your answer.

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