Skip to contents

Map gene names to NCBI

Usage

mapGeneNamesToNcbi(
  genes,
  organism,
  taxonomicGroup = NULL,
  ignoreCase = FALSE,
  ncbi = NULL
)

Arguments

genes

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

organism

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

taxonomicGroup

character(1). NCBI FTP server taxonomic group subdirectory path (e.g. "Mammalia"). Defining this manually avoids having to query the FTP server.

ignoreCase

logical(1). Perform case-insensitive matching.

ncbi

NcbiGeneIfo or NULL. If NULL, NCBI annotations will be downloaded automatically.

Note

Updated 2025-04-14.

Examples

## Homo sapiens.
x <- mapGeneNamesToNcbi(
    genes = c("TUT4", "ZCCHC11", "TENT3A"),
    organism = "Homo sapiens"
)
#> → Downloading Homo sapiens gene info from NCBI at <https://ftp.ncbi.nlm.nih.gov/gene/DATA/GENE_INFO/Mammalia/Homo_sapiens.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

## Mus musculus.
x <- mapGeneNamesToNcbi(
    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