convert_pcawg: Convert PCAWG Identifiers

View source: R/convert_pcawg.R

convert_pcawgR Documentation

Convert PCAWG Identifiers

Description

Run data("pcawg_full") or data("pcawg_simple") to see detail database for conversion. The pcawg_simple database only contains PCAWG white-list donors.

Usage

convert_pcawg(
  x,
  from = "icgc_specimen_id",
  to = "icgc_donor_id",
  db = c("full", "simple"),
  multiple = FALSE
)

Arguments

x

A character vector to convert.

from

Which identifier type to be converted. For db "full", one of . For db "simple", one of .

to

Identifier type convert to. Same as parameter from.

db

Database, one of "full" (for data("pcawg_full")) or "simple" (for data("pcawg_simple")).

multiple

if TRUE, return a data.table instead of a string vector, so multiple identifier mappings can be kept.

Value

A character vector.

Examples


x <- convert_pcawg("SP1677")
x

y <- convert_pcawg("DO804",
  from = "icgc_donor_id",
  to = "icgc_specimen_id", multiple = TRUE
)
y

## Not run: 
convert_pcawg("SA5213")

## End(Not run)

IDConverter documentation built on March 31, 2023, 10:25 p.m.