auto_tolerance: Determine the optimal error tolerance to QC clonal simple...

View source: R/auto_tolerance.R

auto_toleranceR Documentation

Determine the optimal error tolerance to QC clonal simple CNAs.

Description

The QC procedure implemented by function analyze_peaks allows to pass or fail a sample based on a custom purity error (maximum error to allow).

A regression has been used to measure the rate of false positives from simulated tumours with variable coverage and purity. This allows to determine an optimal value of $\epsilon$, the parameter 'purity_error' of function analyze_peaks, for a desired rate of alse positives basde on the sample coverage and putative purity.

Usage

auto_tolerance(purity, coverage, fpr = 0.1, epsilon_range = c(0.01, 0.08))

Arguments

purity

The data purity (putative) for a sample.

coverage

The observed data coverage.

fpr

Desired false positive rate.

epsilon_range

Range of values to constrain $epsilon$.

Value

The $\epsilon$ value estimated from data, constrained to be in 'epsilon_range', in order to limit the false positive rate to be at most 'fpr'.

Examples

# Desired 10% FPR for a 30% pure tumour at 90x
auto_tolerance(.3, 90)

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