# Using a BioMart other than Ensembl
Author: Steffen Durinck, Wolfgang Huber, Mike Smith
Date: 2024-04-30

Steffen Durinck, Wolfgang Huber, Mike Smith

#### 30 April 2024

#### Package

biomaRt 2.60.0

# Contents

# 1 Introduction

In recent years a wealth of biological data has become available in public data repositories. Easy access to these valuable data resources and firm integration with data analysis is needed for comprehensive bioinformatics data analysis. The biomaRt package, provides an interface to a growing collection of databases implementing the BioMart software suite. The package enables retrieval of large amounts of data in a uniform way without the need to know the underlying database schemas or write complex SQL queries. Examples of BioMart databases are Ensembl, Uniprot and HapMap. These major databases give biomaRt users direct access to a diverse set of data and enable a wide range of powerful online queries from R.

# 2 Using a BioMart other than Ensembl

There are a small number of non-Ensembl databases that offer a BioMart interface to their data. The biomaRt package can be used to access these in a very similar fashion to Ensembl. The majority of biomaRt functions will work in the same manner, but the construction of the initial Mart object requires slightly more setup. In this section we demonstrate the setting requires to query Wormbase ParaSite and Phytozome. First we need to load biomaRt.

    library(biomaRt)

# 3 `{r test-wormbase-ssl, echo = FALSE} # if(grepl(try(httr::GET('https://parasite.wormbase.org'), silent = TRUE)[1], # pattern = "sslv3 alert handshake")) { # httr::set_config(httr::config(ssl_cipher_list = "DEFAULT@SECLEVEL=1")) # } #`

## 3.1 Wormbase

To demonstrate the use of the biomaRt package with non-Ensembl databases the next query is performed using the Wormbase ParaSite BioMart. In this example, we use the `listMarts()` function to find the name of the available marts, given the URL of Wormbase. We use this to connect to Wormbase BioMart using the `useMart()` function.11 1 Note that we use the `https` address and must provide the port as `443`. Queries to WormBase will fail without these options.

    listMarts(host = "parasite.wormbase.org")

    ## Error in `[.data.frame`(marts, , c("biomart", "version")): undefined columns selected

    wormbase <- useMart(biomart = "parasite_mart",
                        host = "https://parasite.wormbase.org",
                        port = 443)

    ## Error in .useMart(biomart, dataset, host = host, path = path, port = port, : Incorrect BioMart name, use the listMarts function to see which BioMart databases are available

We can then use functions described earlier in this vignette to find and select the gene dataset, and print the first 6 available attributes and filters. Then we use a list of gene names as filter and retrieve associated transcript IDs and the transcript biotype.

    listDatasets(wormbase)

    ## Error in eval(expr, envir, enclos): object 'wormbase' not found

    wormbase <- useDataset(mart = wormbase, dataset = "wbps_gene")

    ## Error in eval(expr, envir, enclos): object 'wormbase' not found

    head(listFilters(wormbase))

    ## Error in eval(expr, envir, enclos): object 'wormbase' not found

    head(listAttributes(wormbase))

    ## Error in eval(expr, envir, enclos): object 'wormbase' not found

    getBM(attributes = c("external_gene_id", "wbps_transcript_id", "transcript_biotype"),
          filters = "gene_name",
          values = c("unc-26","his-33"),
          mart = wormbase)

    ## Error in eval(expr, envir, enclos): object 'wormbase' not found

## 3.2 Phytozome

### 3.2.1 Version 12

The Phytozome 12 BioMart was retired in August 2021 and can not longer be accessed.

### 3.2.2 Version 13

Version 13 of Phyotozome can be found at https://phytozome-next.jgi.doe.gov/ and if you wish to query that version the URL used to create the Mart object must reflect that.

    phytozome_v13 <- useMart(biomart = "phytozome_mart",
                    dataset = "phytozome",
                    host = "https://phytozome-next.jgi.doe.gov")

Once this is set up the usual biomaRt functions can be used to interrogate the database options and run queries.

    getBM(attributes = c("organism_name", "gene_name1"),
          filters = "gene_name_filter",
          values = "82092",
          mart = phytozome_v13)

    ##          organism_name gene_name1
    ## 1 Smoellendorffii_v1.0      82092

# 4 Session Info

    sessionInfo()

    ## R version 4.4.0 beta (2024-04-15 r86425)
    ## Platform: x86_64-pc-linux-gnu
    ## Running under: Ubuntu 22.04.4 LTS
    ##
    ## Matrix products: default
    ## BLAS:   /home/biocbuild/bbs-3.19-bioc/R/lib/libRblas.so
    ## LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.10.0
    ##
    ## locale:
    ##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8
    ##  [4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
    ##  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C
    ## [10] LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
    ##
    ## time zone: America/New_York
    ## tzcode source: system (glibc)
    ##
    ## attached base packages:
    ## [1] stats     graphics  grDevices utils     datasets  methods   base
    ##
    ## other attached packages:
    ## [1] biomaRt_2.60.0   BiocStyle_2.32.0
    ##
    ## loaded via a namespace (and not attached):
    ##  [1] KEGGREST_1.44.0         xfun_0.43               bslib_0.7.0             httr2_1.0.1
    ##  [5] Biobase_2.64.0          vctrs_0.6.5             tools_4.4.0             generics_0.1.3
    ##  [9] stats4_4.4.0            curl_5.2.1              tibble_3.2.1            fansi_1.0.6
    ## [13] AnnotationDbi_1.66.0    RSQLite_2.3.6           highr_0.10              blob_1.2.4
    ## [17] pkgconfig_2.0.3         dbplyr_2.5.0            S4Vectors_0.42.0        lifecycle_1.0.4
    ## [21] GenomeInfoDbData_1.2.12 compiler_4.4.0          stringr_1.5.1           Biostrings_2.72.0
    ## [25] progress_1.2.3          GenomeInfoDb_1.40.0     htmltools_0.5.8.1       sass_0.4.9
    ## [29] yaml_2.3.8              pillar_1.9.0            crayon_1.5.2            jquerylib_0.1.4
    ## [33] cachem_1.0.8            tidyselect_1.2.1        digest_0.6.35           stringi_1.8.3
    ## [37] purrr_1.0.2             dplyr_1.1.4             bookdown_0.39           fastmap_1.1.1
    ## [41] cli_3.6.2               magrittr_2.0.3          utf8_1.2.4              withr_3.0.0
    ## [45] filelock_1.0.3          prettyunits_1.2.0       UCSC.utils_1.0.0        rappdirs_0.3.3
    ## [49] bit64_4.0.5             rmarkdown_2.26          XVector_0.44.0          httr_1.4.7
    ## [53] bit_4.0.5               png_0.1-8               hms_1.1.3               memoise_2.0.1
    ## [57] evaluate_0.23           knitr_1.46              IRanges_2.38.0          BiocFileCache_2.12.0
    ## [61] rlang_1.1.3             glue_1.7.0              DBI_1.2.2               xml2_1.3.6
    ## [65] BiocManager_1.30.22     BiocGenerics_0.50.0     jsonlite_1.8.8          R6_2.5.1
    ## [69] zlibbioc_1.50.0

    warnings()