This function randomly generates an admixture graph for a given set of leaf nodes

random_admixturegraph(
  leaves,
  numadmix = 0,
  simple = TRUE,
  outpop = NULL,
  nonzero_f4 = NULL,
  admix_constraints = NULL,
  event_order = NULL,
  ntry = 100
)

Arguments

leaves

Names of the leaf nodes, or a number specifying how many leaf nodes there should be

numadmix

Number of admixture events

simple

Should edges leading to admixture nodes consist of separate admix edges and normal edges

outpop

Outgroup population

Examples

rand_graph = random_admixturegraph(10, numadmix = 5)
plot_graph(rand_graph)