Examples

Wrapper functions for specific identifiers:

You can choose from the following predefined functions:

SYMBOL_to_ENTREZID(), ENTREZID_to_SYMBOL, SYMBOL_to_ENSEMBL, ENSEMBL_to_SYMBOL, SYMBOL_to_REFSEQ, REFSEQ_to_SYMBOL.

library(idconv)
SYMBOL_to_ENTREZID(c("EGR1", "FOS"))
ENTREZID_to_SYMBOL(c("1958", "2353"))
SYMBOL_to_ENSEMBL(c("EGR1", "FOS"))
ENSEMBL_to_SYMBOL(c("ENSG00000120738", "ENSG00000170345"))

Generic function

You can use the generic function to map other identifiers:

IDX_to_IDY(ids = "NM_005252", from = "REFSEQ", to = "ENSEMBL")

Or simply define your own custom conversion function:

REFSEQ_to_ENSEMBL <- function(ids) IDX_to_IDY(ids = ids, from = "REFSEQ", to = "ENSEMBL")
REFSEQ_to_ENSEMBL("NM_005252")

Non-unique mappings

If more than one mapping is available, AnnotationDbi returns a warning (1:many mappings) and idconv wrapper functions return concatenated target IDs by default. If desired, wrapper functions in this package can be forced to return unique mappings. Forcing unique mappings is however not recommended.

SYMBOL_to_ENSEMBL("IER3", force_unique = F) # default
SYMBOL_to_ENSEMBL("IER3", force_unique = NA)
SYMBOL_to_ENSEMBL("IER3", force_unique = T)

Subtype IDs

When converting to RefSeq, a subtype for target IDs can be specified, eg. NM or NP:

SYMBOL_to_REFSEQ("IER3", to_sub = "NM")
SYMBOL_to_REFSEQ("IER3", to_sub = "NP")


uhlitz/idconv documentation built on May 3, 2019, 2:23 p.m.