Skip to contents

ID mapping

Usage

map_to_entrez(from, org_db = org.Hs.eg.db::org.Hs.eg.db)

guess_id_type(id, org_db = org.Hs.eg.db::org.Hs.eg.db, verbose = TRUE)

convert_to_entrez(x, org_db = org.Hs.eg.db::org.Hs.eg.db)

Arguments

from

The "keytype" of the "from" ID type.

org_db

An OrgDb object.

id

A vector of gene IDs

verbose

Whether to print messages?

x

It supports three formats: 1. A vector of gene IDs, 2. A numeric vector with gene IDs as names, 3. A numeric matrix with gene IDs as row names.

Details

map_to_entrez() returns a gene ID mapping from the "from" type to EntreZ IDs, only for protein-coding genes.

guess_id_type() automatically tests the following ID types: ENTREZID, ENSEMBL (genes), REFSEQ and SYMBOL.

For convert_to_entrez(), if mapping is applied on a character gene ID vector, IDs that cannot be mapped are removed, and for duplicated mappings only the first one is picked. If mapping is applied on a numeric vector or a matrix, and if there are multiple mappings, the mean is taken as the final value.