Uses the techniques in enumerate_RGs to sample a single RG
uniformly. All clonal partitions are generated, each weighted by its number
of consistent sibling partitions. A clonal partition is sampled proportional
to its weight, then a consistent sibling partition is drawn uniformly. The
resulting nested partition represents the RG; see enumerate_RGs
for details.
Usage
sample_RG(MOIs, igraph = TRUE)
Value
An RG encoded either as an igraph object (default), or as a list;
see enumerate_RGs for details.
Arguments
MOIs
Vector of per-episode multiplicities of infection (MOIs),
i.e., numbers of per-episode genotypes / vertices.
igraph
Logical; if TRUE (default), returns the RG as an
igraph object.