Skip to contents

Map gene names to Ensembl identifiers

Usage

mapGeneNamesToEnsembl(
  genes,
  organism,
  ignoreCase = FALSE,
  hgnc = NULL,
  ncbi = NULL
)

Arguments

genes

Gene names (e.g. "TUT4").

organism

character(1). Full Latin organism name (e.g. "Homo sapiens").

ignoreCase

logical(1). Enable case-insensitive matching.

hgnc

Hgnc object. Supported for Homo sapiens genome only. Snapshot of HGNC annotations. Passes to mapGeneNamesToHgnc internally.

ncbi

NcbiGeneInfo object. Snapshot of NCBI annotations. Passes to mapGeneNamesToNcbi internally.

Details

Internally matches using mapGeneNamesToHgnc (Homo sapiens only) or mapGeneNamesToNcbi (all other organisms), so we can support gene synonym matching.

Note

Updated 2025-04-15.

Examples

## Homo sapiens.
x <- mapGeneNamesToEnsembl(
    genes = c("TUT4", "ZCCHC11", "TENT3A"),
    organism = "Homo sapiens"
)
#> → Importing HGNC complete set.
#> Error in vapply(X = X, FUN = FUN, FUN.VALUE = logical(1L), ..., USE.NAMES = useNames): formal argument "USE.NAMES" matched by multiple actual arguments
print(x)
#> Error: object 'x' not found

## Mus musculus
x <- mapGeneNamesToEnsembl(
    genes = c("Nfe2l2", "Nrf2"),
    organism = "Mus musculus"
)
#> → Downloading Mus musculus gene info from NCBI at <https://ftp.ncbi.nlm.nih.gov/gene/DATA/GENE_INFO/Mammalia/Mus_musculus.gene_info.gz>.
#> Error in h(simpleError(msg, call)): error in evaluating the argument 'con' in selecting a method for function 'import': formal argument "USE.NAMES" matched by multiple actual arguments
print(x)
#> Error: object 'x' not found