entrez_to_symbol {dnapath}R Documentation

Obtain gene symbols for entrezgene IDs

Description

Uses biomaRt (Durinck et al. 2009) to map entrezgene IDs to gene symbols for a given species. Obtains MGI symbols for mouse species and HGNC symbols for other species. (Note: this mapping may not work for all species.) The output of this function can be used in rename_genes.

Usage

entrez_to_symbol(
  x,
  species,
  symbol_name = NULL,
  dir_save = tempdir(),
  verbose = TRUE
)

Arguments

x

A vector of entrezgene IDs.

species

The species used to obtain the entrezgene IDs. For example: "Homo sapiens", "m musculus", "C. elegans", or "S cerevisiae". "Human" and "mouse" can also be used and will be converted to the correct species name.

symbol_name

The type of gene symbol to use. If NULL, then "hgnc_symbol" is used for HGNC symbols, unless species is "mmusculus", in which case

dir_save

The directory to store annotation reference. Future calls to this function will use the stored annotations. This speeds up the operation and allows for reproducibility in the event that the biomaRt database is updated. Set to NULL to disable. By default, it uses a temporary directory to store files during the R session. "mgi_symbol" is used.

verbose

Set to FALSE to avoid messages.

Details

If entrezgene IDs are used in a dnapath_list or dnapath object, or a pathway list, then get_genes can be used to extract them and used for the x argument here.

Value

A data frame with two columns: the first contains the original entrezgene IDs, and the second contains the corresponding gene symbols. MGI symbols are returned when species = "Mus musculus" and HGNC symbols are returned otherwise.

Note

Internet connection is required to connect to biomaRt. If unavailable, the default biomart and default species contained in the package is used, but this may not match the desired species.

References

Durinck S, Spellman PT, Birney E, Huber W (2009). “Mapping Identifiers for the Integration of Genomic Datasets with the R/Bioconductor Package biomaRt.” Nature Protocols, 4, 1184–1191.

See Also

symbol_to_entrez, get_genes

Examples


data(meso)
# The meso gene expression data contains entrezgene IDs. 
# These can be converted to gene symbols.
gene_mat <- entrez_to_symbol(colnames(meso$gene_expression), species = "human")


[Package dnapath version 0.7.4 Index]