oncotree_to_nci {mskcc.oncotree}R Documentation

Map OncoTree to NCIt codes

Description

This function maps OncoTree codes to National Cancer Institute Thesaurus (NCIt) codes.

Usage

oncotree_to_nci(
  oncotree_code = NULL,
  oncotree_version = "oncotree_latest_stable",
  expand = FALSE,
  keep_empty = TRUE
)

Arguments

oncotree_code

OncoTree codes.

oncotree_version

OncoTree database release version.

expand

Whether to expand one-to-many mappings. If TRUE, one-to-many mappings are expanded into several rows in the output.

keep_empty

OncoTree codes that do not map to NCI have the nci_code with NA if keep_empty = TRUE. Use keep_empty = FALSE, to remove the mapping (row) altogether from the output.

Value

A tibble of two variables: oncotree_code and nci_code.

Examples

## Not run: 
# Leave `oncotree_code` empty to return mappings for all OncoTree codes
oncotree_to_nci()

# Map a few selected OncoTree codes
oncotree_to_nci(oncotree_code = c('PAOS', 'SCST', 'ITLPDGI', 'SRCCR'))

# Use `expand` to make sure the column `nci_code` is a character vector and
# not a list-column. One-to-many mappings will result in more than row with
# `oncotree_code` values repeated.
oncotree_to_nci(oncotree_code = c('PAOS', 'SCST', 'ITLPDGI', 'SRCCR'), expand
= TRUE)

# Use `keep_empty` to drop or keep one-to-none mappings
oncotree_to_nci(oncotree_code = c('PAOS', 'SCST', 'ITLPDGI', 'SRCCR'), expand
= TRUE, keep_empty = FALSE)

## End(Not run)

[Package mskcc.oncotree version 0.1.1 Index]