map_genes: Map gene identifiers to ENTREZ gene

Description Usage Arguments Value Examples

View source: R/map_genes.R

Description

map_genes provides mapping to ENTREZ gene identifiers for Hugo or Ensembl gene identifiers using either org.Mm.eg.db or org.Hs.eg.db Bioconductor annotation packages. Function annotate::lookUp() extract the mappings. We use ALIAS2EG for Hugo - ENTREZ mappings and ENSEMBL for Ensembl - ENTREZ gene mappings.

Usage

1
map_genes(dat, id, species)

Arguments

dat

Data frame with two columns: id and set_label.

id

A character string specifying the type of gene identifier in the data, must of be one of two "symbol" (default) or "ensembl".

species

A character string specifying the species, must be one of two "human" (default) or "mouse".

Value

Data frame with two columns: entrez and set_label. The column with the original identifiers is removed.

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
# load test data:
data("human_symbol")
# remove duplicate rows:
dat_clean <- deduplicate_rows(human_symbol)
# map symbol to ENTREZ gene id:
dat_mapped <- map_genes(dat_clean, id = "symbol", species = "human")

## End(Not run)

vitalinakomashko/parallelGO documentation built on May 18, 2019, 1:32 p.m.