load_biomart_orthologs: Use biomart to get orthologs between supported species.

View source: R/annotation_biomart.R

load_biomart_orthologsR Documentation

Use biomart to get orthologs between supported species.

Description

Biomart's function getLDS is incredibly powerful, but it makes me think very polite people are going to start knocking on my door, and it fails weirdly pretty much always. This function attempts to alleviate some of that frustration.

Usage

load_biomart_orthologs(
  gene_ids = NULL,
  first_species = "hsapiens",
  second_species = "mmusculus",
  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,
  attributes = "ensembl_gene_id"
)

Arguments

gene_ids

List of gene IDs to translate.

first_species

Linnean species name for one species.

second_species

Linnean species name for the second species.

host

Ensembl server to query.

trymart

Assumed mart name to use.

archive

Use an archive server?

default_hosts

Set of default hosts to query.

year

When using an archive server, use this year (otherwise it will choose last year).

month

When using an archive server, use this month (otherwise, this month).

trydataset

Choose a dataset to query.

attributes

Key to query

Details

Tested in test_40ann_biomart.R As with my other biomart functions, this one grew out of frustrations when attempting to work with the incredibly unforgiving biomart service. It does not attempt to guarantee a useful biomart connection, but will hopefully point out potentially correct marts and attributes to use for a successful query. I can say with confidence that it works well between mice and humans.

Value

list of 4 elements: The first is the set of all ids, as getLDS seems to always send them all; the second is the subset corresponding to the actual ids of interest, and the 3rd/4th are other, optional ids from other datasets.

See Also

[biomaRt::getLDS()]

Examples

 mouse_yeast_orthologs <- load_biomart_orthologs(gene_ids = NULL, first_species = "mmusculus",
                                                 second_species = "scerevisiae")
 head(mouse_yeast_orthologs$all_linked_genes)

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