generate_all_graphs: Generate all graphs

generate_all_graphsR Documentation

Generate all graphs

Description

This functions generates all possible admixture graphs with a set number of admixture events for a given set of leaf nodes. It's pretty slow, and may not terminate in reasonable time for more than 5 leaves and 2 admixture events. The function is similar to the all_graphs function in the admixturegraph package, but there are a few differences:

  • The function does not return graphs with fewer than nadmix admixture events

  • The function does not return most graphs which are unidentifiable and would have equal fits as simpler identifiable graphs (for example it does not return graphs where a node is expanded to a loop)

  • The function does not return duplicated graphs, as identified by the graph_hash function

  • The function generates unique graphs which are missing in the output of all_graphs

Usage

generate_all_graphs(leaves, nadmix = 0, verbose = TRUE)

Arguments

leaves

The leaf nodes

nadmix

The number of admixture nodes

verbose

Print progress updates

Value

A list of graphs in igraph format

See Also

all_graphs, generate_all_trees, graph_hash

Examples

## Not run: 
graphs = generate_all_graphs(letters[1:4], 1)

## End(Not run)

uqrmaie1/admixtools documentation built on March 4, 2024, 10:19 p.m.