copy_number_maxima: Obtain maxima in a distribution of relative copy numbers.

Description Usage Arguments Value Examples

View source: R/utils.R

Description

This function obtains peaks in the density for the given set of relative copy numbers.

Usage

1
2
3
4
5
6
copy_number_maxima(
  copy_numbers,
  min_copy_number = 0,
  max_copy_number = 3,
  lower_threshold = 0
)

Arguments

copy_numbers

a numeric vector of absolute copy number values.

min_copy_number

the lower copy number value in the range of values to estimate the density.

max_copy_number

the upper copy number value in the range of values to estimate the density.

lower_threshold

the lower threshold for a maximum as a fraction of the density of the largest maximum.

Value

a data frame with copy number and density columns and a row for each maximum in the distribution.

Examples

1
2
3
data(copy_number)
copy_number <- copy_number[copy_number$sample == "X17222", ]
maxima <- copy_number_maxima(copy_number$segmented, lower_threshold = 0.1)

crukci-bioinformatics/rascal documentation built on Dec. 19, 2021, 6:21 p.m.