Description Usage Arguments Value See Also Examples
This function generates and evaluates admixture graphs in numgen
iterations across numrep
independent repeats
to find well fitting admixturegraphs. It uses the function future_map
to parallelize across the independent repeats. The function plan
can be called
to specify the details of the parallelization. This can be used to parallelize across cores or across nodes on
a compute cluster. Setting numadmix
to 0 will search for well fitting trees, which is much faster than searching
for admixture graphs with many admixture nodes.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21  find_graphs(
f2_data,
pops = NULL,
outpop = NULL,
numrep = 1,
numgraphs = 50,
numgen = 5,
numsel = 5,
numadmix = 0,
numstart = 1,
keep = c("all", "best", "last"),
initgraphs = NULL,
mutfuns = namedList(spr_leaves, spr_all, swap_leaves, move_admixedge_once,
flipadmix_random, mutate_n),
mutprobs = NULL,
store_intermediate = NULL,
parallel = TRUE,
stop_after = NULL,
verbose = TRUE,
...
)

f2_data 
A 3d array of blocked f2 statistics, output of 
pops 
Populations for which to fit admixture graphs (default all) 
outpop 
An outgroup population which will split at the root from all other populations in all tested graphs. If one of the populations is know to be an outgroup, designating it as 
numrep 
Number of independent repetitions (each repetition can be run in parallel) 
numgraphs 
Number of graphs in each generation 
numgen 
Number of generations 
numsel 
Number of graphs which are selected in each generation. Should be less than 
numadmix 
Number of admixture events within each graph 
numstart 
Number of random initializations in each call to 
keep 
Which models should be returned. One of

initgraphs 
Optional graph or list of igraphs to start with. If 
mutfuns 
Functions used to modify graphs. Defaults to the following:
See examples for how to make new mutation functions. 
mutprobs 
Relative frequencies of each mutation function.

store_intermediate 
Path and prefix of files for intermediate results to 
parallel 
Parallelize over repeats (if 
stop_after 
Stop optimization after 
verbose 
Print progress updates 
... 
Additional arguments passed to 
A nested data frame with one model per line
1 2 3 4 5 6 7 8 9 10 11 12  ## Not run:
find_graphs(example_f2_blocks, numrep = 200, numgraphs = 100,
numgen = 20, numsel = 5, numadmix = 3)
## End(Not run)
## Not run:
# Making new mutation functions by modifying or combining existing ones:
newfun1 = function(graph, ...) mutate_n(graph, 3, ...)
newfun2 = function(graph, ...) flipadmix_random(spr_leaves(graph, ...), ...)
find_graphs(f2_blocks, mutfuns = namedList(spr_leaves, newfun1, newfun2), mutprobs = c(0.2, 0.3, 0.5))
## End(Not run)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.