getMart: Get the Mart corresponding the Ensembl version and species

Description Usage Arguments Examples

View source: R/getMart.R

Description

Get the Mart corresponding the Ensembl version and species

Usage

1
getMart(version, species = "human")

Arguments

version

the ensembl version (number) or “current”

species

the species, currently either “human” or “mouse” in English, or the species part of the dataset name (without the “_gene_ensembl” part, as listed by listDatasets, for instance “rnorvegicus” or “scerevisiae”).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
if(require("biomaRt")) {
  ensembl.proteins <- c("ENSP00000361930", "ENSP00000309503")
  mart <- getMart(88, "human")
  getBM(attributes = c("ensembl_peptide_id", "uniprotswissprot", "refseq_peptide", "hgnc_symbol"),
        filters = "ensembl_peptide_id", values = ensembl.proteins, mart = mart)

  # Mouse example
  ensembl.proteins <- c("ENSMUSP00000004055", "ENSMUSP00000002708")
  mart <- getMart(88, "mmusculus")
  getBM(attributes = c("ensembl_peptide_id", "uniprotswissprot", "refseq_peptide", "mgi_symbol"),
        filters = "ensembl_peptide_id", values = ensembl.proteins, mart = mart)
}

xrobin/xavamess documentation built on June 15, 2021, 3:46 a.m.