Skip to contents

Simulate counts and coverage from a lineage definition matrix

Usage

simulate_coco(
  lineage_defs,
  rel_counts = NULL,
  censoring = NULL,
  absurd = FALSE,
  verbose = TRUE
)

Arguments

lineage_defs

The lineage definition matrix, with properly named rows (VOCs) and columns (mutations)

rel_counts

(Optional) The relative counts of each VOC (will be censored by coverage). Must be same length as nrow(lineage_defs).

censoring

(Optional) The proportion of observations for each mutation. Must be same length as ncol(lineage_defs).

absurd

If true, the counts are completely unrelated to the lineage proportions. Useful for Monte Carlo estimation.

verbose

Print information about the simulation

Value

A data frame with counts and coverage of the sampled mutations, ready to be used in copt_binom().

Details

By default, uses a negative binomial distribution for the counts and uniform censoring for the coverage.