subset_snvs: Subset only SNVs.

View source: R/subsample.R

subset_snvsR Documentation

Subset only SNVs.

Description

This function removes all non-SNVs mutations, re-creating a new CNAqc object with just SNVs. All analyses are lost.

Usage

subset_snvs(
  x,
  ref_nucleotides = c("A", "C", "T", "G"),
  alt_nucleotides = c("A", "C", "T", "G")
)

Arguments

x

A CNAqc object.

ref_nucleotides

What reference alleles to use, default c("A", "C", "T", "G").

alt_nucleotides

What alternative alleles to use, default c("A", "C", "T", "G").

Value

A new CNAqc dataset created with init.

Examples

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

subset_snvs(x)

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