subsample: Randomly subsample mutations.

View source: R/subsample.R

subsampleR Documentation

Randomly subsample mutations.

Description

This functions randoly subsample mutations, retaining all the simple clonal CNAs; subclonal CNAs are dropped. If data contains driver mutation annotations, these can be forced to remain.

Usage

subsample(x, N = 15000, keep_drivers = TRUE)

Arguments

x

A new CNAqc object with subset data.

N

The maximum number of mutations to retain.

keep_drivers

If TRUE, it retains drivers annotated in the data.

Examples

data('example_dataset_CNAqc', package = 'CNAqc')
x = init(mutations = example_dataset_CNAqc$mutations, cna = example_dataset_CNAqc$cna, purity = example_dataset_CNAqc$purity)

# Example runs
subsample(x, N = 100)
subsample(x, N = 1000)

caravagnalab/CNAqc documentation built on Oct. 31, 2024, 3:54 a.m.