Calculates the expected number of single nucleotide variants (SNVs) accumulated in a clone over time using a simple linear model where the number of mutations is proportional to time, genome length, and a base mutation rate.

calc_clone_snv_num(time, genome_length, mutation_rate)

Arguments

time

Numeric value representing time (units should be consistent with mutation_rate)

genome_length

Numeric value representing the length of the genome in base pairs

mutation_rate

Numeric value representing the mutation rate per base pair per time unit

Value

Integer number of mutations, rounded to the nearest whole number

Details

The function implements a simple linear model where the number of mutations is directly proportional to time, genome length, and mutation rate. The result is rounded to the nearest integer.

Examples

# Calculate mutations for 100 time units, genome length of 1e6, and mutation rate of 1e-8
calc_clone_snv_num(100, 1e6, 1e-8)
#> [1] 1