pivot_cna_longer: Reformat Wide CNA Data to Long

View source: R/pivot-cna.R

pivot_cna_longerR Documentation

Reformat Wide CNA Data to Long

Description

Takes a numeric vector of CNA data in wide format where each column is a sample and each row is a hugo symbol. Function will return a long format CNA data set of just events (neutral/diploid instances are filtered out) and will recode events from numeric to descriptive (-2/-1/-1.5 is deletion, 2/1 is amplification).

Usage

pivot_cna_longer(wide_cna, clean_sample_ids = TRUE)

Arguments

wide_cna

a cna dataframe in wide format (e.g. gnomeR::cna)

clean_sample_ids

TRUE by default and function will clean sample_id field to replace "." with "-". If FALSE, no modification will be made to returned sample_ids field

Value

A long data frame of CNA events

Examples

cna <- pivot_cna_longer(wide_cna = gnomeR::cna_wide)

MSKCC-Epi-Bio/gnomeR documentation built on March 28, 2024, 2:42 a.m.