generate_all_graphs | R Documentation |
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
generate_all_graphs(leaves, nadmix = 0, verbose = TRUE)
leaves |
The leaf nodes |
nadmix |
The number of admixture nodes |
verbose |
Print progress updates |
A list of graphs in igraph
format
all_graphs
, generate_all_trees
, graph_hash
## Not run:
graphs = generate_all_graphs(letters[1:4], 1)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.