scan error in biomaRt with non-Ensemble datsets
1
0
Entering edit mode
Reb • 0
@reb-21949
Last seen 4.9 years ago

Hi all,

I am facing a scan error when using getBM with a mart that is not ensembl. The code below worked fine like a year or two ago, but I recently figured that it stopped doing that (I was upgrading my OS and R in between). Unfortunately, I don't know how to handle the error, the Mart object looks fine. Help is much appreciated!

Thanks a ton, Rebecca

> listMarts(host="biomart.vectorbase.org")
            biomart               version
1 vb_gene_mart_1908      VectorBase Genes
2        expression VectorBase Expression
>mart=listMarts(host="biomart.vectorbase.org")[1,1]

>VB=useMart(host="http://biomart.vectorbase.org", biomart=mart)
> VB
Object of class 'Mart':
  Using the vb_gene_mart_1908 BioMart database
  No dataset selected.

> Aed=useDataset(VB, dataset = "alvpagwg_eg_gene")
> Aed
Object of class 'Mart':
  Using the vb_gene_mart_1908 BioMart database
  Using the alvpagwg_eg_gene dataset

>getBM(attributes = "ensembl_gene_id",  mart = Aed, uniqueRows = TRUE) 
Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  : 
  line 1 did not have 3 elements

I don't have these problems when I pick for example the Drosophila dataset from Ensembl.

Session:

> sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.3 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1

locale:
 [1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C               LC_TIME=de_DE.UTF-8        LC_COLLATE=en_GB.UTF-8     LC_MONETARY=de_DE.UTF-8   
 [6] LC_MESSAGES=en_GB.UTF-8    LC_PAPER=de_DE.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=de_DE.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] biomaRt_2.40.4  magrittr_1.5    forcats_0.4.0   stringr_1.4.0   dplyr_0.8.3     purrr_0.3.2     readr_1.3.1     tidyr_0.8.3     tibble_2.1.3   
[10] ggplot2_3.2.1   tidyverse_1.2.1

loaded via a namespace (and not attached):
 [1] progress_1.2.2       tidyselect_0.2.5     xfun_0.9             haven_2.1.1          lattice_0.20-38      colorspace_1.4-1     vctrs_0.2.0         
 [8] generics_0.0.2       stats4_3.6.1         blob_1.2.0           XML_3.98-1.20        rlang_0.4.0          pillar_1.4.2         glue_1.3.1          
[15] withr_2.1.2          DBI_1.0.0            BiocGenerics_0.30.0  bit64_0.9-7          modelr_0.1.5         readxl_1.3.1         munsell_0.5.0       
[22] gtable_0.3.0         cellranger_1.1.0     rvest_0.3.4          memoise_1.1.0        Biobase_2.44.0       knitr_1.24           IRanges_2.18.1      
[29] curl_4.0             parallel_3.6.1       AnnotationDbi_1.46.0 broom_0.5.2          Rcpp_1.0.2           scales_1.0.0         backports_1.1.4     
[36] S4Vectors_0.22.0     jsonlite_1.6         bit_1.1-14           digest_0.6.20        hms_0.5.0            stringi_1.4.3        grid_3.6.1          
[43] cli_1.1.0            tools_3.6.1          bitops_1.0-6         lazyeval_0.2.2       RCurl_1.95-4.12      RSQLite_2.1.2        crayon_1.3.4        
[50] pkgconfig_2.0.2      zeallot_0.1.0        prettyunits_1.0.2    xml2_1.2.2           lubridate_1.7.4      assertthat_0.2.1     httr_1.4.1          
[57] rstudioapi_0.10      R6_2.4.0             nlme_3.1-141         compiler_3.6.1      
software error • 600 views
ADD COMMENT
0
Entering edit mode
Mike Smith ★ 6.6k
@mike-smith
Last seen 20 hours ago
EMBL Heidelberg

It looks like VectorBase automatically redirects you to the https version of their site. biomaRt should be able to cope with this, but clearly it doesn't, so we'll have to be explicit. Try this for setting the mart host:

VB = useMart(host = "https://biomart.vectorbase.org", biomart = mart, port = 443)

I'll try to track down why biomaRt doesn't work this out for itself.

ADD COMMENT
0
Entering edit mode

Thanks a ton! It is working again!

ADD REPLY

Login before adding your answer.

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