smooth_segments: Smooth simple clonal CNAs.

View source: R/smooth_segments.R

smooth_segmentsR Documentation

Smooth simple clonal CNAs.

Description

This function joins simple clonal CNAs that have the same Major and minor alleles, and that are zeparate by at most a certain number of nucleotides. The pre-smoothing copy number segments are retained in the output computation.

Usage

smooth_segments(x, maximum_distance = 1e+06)

Arguments

x

A CNAqc object.

maximum_distance

The maximum number of nucleotides to join two equivalent segments.

Value

A CNAqc object with smoothed segments, which retains also the pre-smooting dataset.

Examples

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

# Before smoothing
print(x)
x = smooth_segments(x)

# After smoothing
plot_smoothing(x)

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