simulator: A function to sample from binomial distribution

Description Usage Arguments Value See Also

View source: R/simulator.R

Description

Samples from binomial distribution N variants with different depths and fixed mismatch rate for one simulation. Return 1 if the simulation exceeds observed alt allele reads or 0 otherwise

Usage

1
simulator(depths, rate, alt_reads, seed)

Arguments

depths

a vector with the depths of the variants

rate

A list containing mismatch rates as produced by get_background_rate function

alt_reads

the observed variant allele reads

seed

the random seed

Value

a scalar. Either 1 if the simulation exceeds observed variant alleles or 0 otherwise

See Also

test_ctDNA


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