load_biomart_go: Extract gene ontology information from biomart.

View source: R/annotation_biomart.R

load_biomart_goR Documentation

Extract gene ontology information from biomart.

Description

I perceive that every time I go to acquire annotation data from biomart, they have changed something important and made it more difficult for me to find what I want. I recently found the *.archive.ensembl.org, and so this function uses that to try to keep things predictable, if not consistent.

Usage

load_biomart_go(
  species = "hsapiens",
  overwrite = FALSE,
  do_save = TRUE,
  host = NULL,
  trymart = "ENSEMBL_MART_ENSEMBL",
  archive = TRUE,
  default_hosts = c("useast.ensembl.org", "uswest.ensembl.org", "www.ensembl.org",
    "asia.ensembl.org"),
  year = NULL,
  month = NULL,
  trydataset = NULL,
  dl_rows = c("ensembl_gene_id", "go_id"),
  dl_rowsv2 = c("ensembl_gene_id", "go_id")
)

Arguments

species

Species to query.

overwrite

Overwrite existing savefile?

do_save

Create a savefile of the annotations? (if not false, then a filename.)

host

Ensembl hostname to use.

trymart

Biomart has become a circular dependency, this makes me sad, now to list the marts, you need to have a mart loaded.

archive

Try an archive server instead of a mirror? If this is a character, it will assume it is a specific archive hostname.

default_hosts

List of biomart mirrors to try.

year

Choose specific year(s) for the archive servers?

month

Choose specific month(s) for the archive servers?

trydataset

Define a dataset to which to attempt connecting.

dl_rows

List of rows from the final biomart object to download.

dl_rowsv2

A second list of potential rows.

Details

Tested in test_40ann_biomart.R This function makes a couple of attempts to pick up the correct tables from biomart. It is worth noting that it uses the archive.ensembl host(s) because of changes in table organization after December 2015 as well as an attempt to keep the annotation sets relatively consistent.

Value

List containing the following: data frame of ontology data, a copy of the biomart instance for further querying, the host queried, the biomart queried, a vector providing the attributes queried, and the ensembl dataset queried.

See Also

[biomaRt::listMarts()] [biomaRt::useDatasets()] [biomaRt::getBM()]

Examples

 hs_biomart_ontology <-load_biomart_go()
 summary(hs_biomart_ontology)
 dim(hs_biomart_ontology$go)

elsayed-lab/hpgltools documentation built on May 9, 2024, 5:02 a.m.