positivity_test: Computes a p-value of ctDNA positivity with a Monte-Carlo...

Description Usage Arguments Value See Also

View source: R/positivity_test.R

Description

A function to determine ctDNA positivity with N repeated Monte Carlo simulations. Return a p-value based on Monte Carlo simulation test. Calls simulator function n_simulations times.

Usage

1
2
positivity_test(depths, alt_reads, rate, seed = 123,
  n_simulations = 10000)

Arguments

depths

a vector with the depths of the variants

alt_reads

the observed variant allele reads

rate

A named list containing mismatch rates as produced by get_background_rate function

seed

the random seed

n_simulations

the number of simulations to run.

Value

a scalar, simulation p-value.

See Also

test_ctDNA


ctDNAtools documentation built on March 26, 2020, 7:39 p.m.