read_biomart: Read biomart annotations

View source: R/read_biomart.R

read_biomartR Documentation

Read biomart annotations

Description

Read Ensembl annotations using biomaRt library

Usage

read_biomart(
  dataset = "human",
  attributes,
  version = NULL,
  patch = FALSE,
  list = NULL,
  ...
)

Arguments

dataset

The first letter of genus and full species name like btaurus, ecaballus, sscrofa from listEnsembl. A few common names are accepted for human, mouse, rat, fruitfly, yeast and zebrafish.

attributes

vector of column names to pass to getBM, default ensembl_gene_id, external_gene_name, gene_biotype, chromosome_name, start_position, end_position, strand, description and transcript_count

version

Ensembl version for previous releases, check biomaRt::listEnsemblArchives() to see if versions < 90 are available

patch

Keep features on patches starting with CHR_, default FALSE

list

return a list of either datasets, attributes or filters only.

...

additional options like filters and values passed to getBM or listAttributes

Value

A tibble

Note

Many attributes like entrezgene have a 0 to many relationship with ensembl_gene_id causing duplicate ensembl ids to be added.

Author(s)

Chris Stubben

Examples

## Not run: 
x1 <- read_biomart( list= "datasets")
x1
# Download latest version
 mmu <- read_biomart("mouse")
 # Download mouse genes and human homologs
 x1 <- read_biomart("mouse", list= "attributes")
 dplyr::count(x1, page)
 filter(x1, grepl("hsapiens_homolog", name))
 mmu_homologs <- read_biomart("mouse",  attributes = c("ensembl_gene_id",
   "hsapiens_homolog_ensembl_gene", "hsapiens_homolog_associated_gene_name",
   "hsapiens_homolog_perc_id"))
 # Human genes with SignalP
 x2 <- read_biomart("human", list= "filters")
 filter(x2, grepl("signal", name))
 hsa_signalp <- read_biomart("human", attributes = c("ensembl_transcript_id",
  "ensembl_gene_id",  "external_gene_name", "signalp_start",  "signalp_end"),
  filter="with_signalp", values=TRUE)

## End(Not run)

HuntsmanCancerInstitute/hciR documentation built on Aug. 20, 2024, 12:22 a.m.