IDConverter converts identifiers within and between biological databases. Core use cases:
library(IDConverter)
# TCGA sample ID → patient ID
convert_tcga("TCGA-02-0001-10")
#> [1] "TCGA-02-0001"
# ICGC specimen → donor
convert_icgc("SP29019")
#> [1] "DO13695"
# PCAWG specimen → donor
convert_pcawg("SP1677")
#> [1] "DO804"
# Custom database
dt <- data.table::data.table(
UpperCase = LETTERS[1:5],
LowerCase = letters[1:5]
)
convert_custom(c("B", "C", "E"), from = "UpperCase", to = "LowerCase", dt = dt)
#> [1] "b" "c" "e"