Skip to contents

This function uses the biomaRt package.

Usage

getTx2gene(
  organism = "mmusculus",
  version = NULL,
  outputDir = "data",
  checkArgsOnly = FALSE
)

Arguments

organism

String used to pass paste0(organism, "_gene_ensembl") as the dataset argument to biomaRt::useEnsembl(). To see available datasets, do mart = biomaRt::useEnsembl("genes"); biomaRt::listDatasets(mart).

version

Passed to biomaRt::useEnsembl(). NULL indicates the latest version. To see available versions, do biomaRt::listEnsemblArchives().

outputDir

Directory in which to save the result, a file named "tx2gene.csv.gz". If NULL, no file is saved.

checkArgsOnly

Logical indicating whether to only check function arguments. Used for testing.

Value

If checkArgsOnly is FALSE, a data.table based on the result from biomaRt::getBM(), with an attribute "version". Otherwise 0.

See also