transId: Transform id among symbol, entrezid, ensembl and uniprot.

View source: R/transID.R

transIdR Documentation

Transform id among symbol, entrezid, ensembl and uniprot.

Description

Transform id among symbol, entrezid, ensembl and uniprot.

Usage

transId(
  id,
  transTo,
  org = "hs",
  unique = FALSE,
  keepNA = FALSE,
  hgVersion = c("v38", "v19")
)

Arguments

id

Gene ids or protein ids.

transTo

Transform to what type. User could select one or more from "symbol", "entrez", "ensembl" or "uniprot."

org

Latin organism shortname from 'ensOrg_name'. Default is human.

unique

Logical, if one-to-many mapping occurs, only keep one record with fewest NA. Default is FALSE.

keepNA

If some id has no match at all, keep it or not. Default is FALSE.

hgVersion

Select human genome build version from "v38" (default) and "v19".

Value

data frame, first column is input id and others are converted id.

Examples


# example1:
transId(
  id = c("Cyp2c23", "Fhit", "Gal3st2b", "Trp53", "Tp53"),
  transTo = "ensembl", org = "mouse", keepNA = FALSE
)

## example2: input id with one-to-many mapping and fake one
transId(
  id = c("MMD2", "HBD", "RNR1", "TEC", "BCC7", "FAKEID", "TP53"),
  transTo = c("entrez", "ensembl"), keepNA = TRUE
)

# example3: auto-recognize ensembl version number
transId("ENSG00000141510.11", "symbol")

# example4: search genes with case-insensitive
transId(c('nc886','ezh2','TP53'),transTo = "ensembl",org = 'hs',unique = TRUE)



genekitr documentation built on Sept. 11, 2024, 9:10 p.m.