categorize_TMB: Define tumor mutational burden (TMB) categories.

View source: R/categorize_TMB.R

categorize_TMBR Documentation

Define tumor mutational burden (TMB) categories.

Description

Encodes tumor mutational burden (TMB) from numerical into categorical variable.

Usage

categorize_TMB(TMB, thresholds = NULL)

Arguments

TMB

numeric vector with tumor mutational burden values.

thresholds

numeric vector to specify thresholds to be used. Default thresholds are low (<100), moderate (100-400) and high TMB (>400).

Value

A numeric vector assigning each sample a class from 1 (low TMB) to 3 (high TMB).

Examples

# using a SummarizedExperiment object
library(SummarizedExperiment)
# Using example exemplary dataset (Mariathasan et al., Nature, 2018)
# from easierData. Original processed data is available from
# IMvigor210CoreBiologies package.
library("easierData")
dataset_mariathasan <- easierData::get_Mariathasan2018_PDL1_treatment()

TMB <- colData(dataset_mariathasan)[["TMB"]]
names(TMB) <- colData(dataset_mariathasan)[["pat_id"]]

# Convert TMB continous values into categories
TMB_cat <- categorize_TMB(TMB = TMB)

olapuentesantana/easier documentation built on Feb. 25, 2024, 3:39 p.m.