graph_to_afs | R Documentation |
This function performs a very crude simulation of allele frequencies under an admixture graph model
graph_to_afs(
graph,
nsnps = 10000,
drift_default = 0.02,
admix_default = 0.5,
leaves_only = FALSE
)
graph |
An admixture graph as igraph object, or as edge list data frame
with a column |
nsnps |
Number of SNPs to simulate |
drift_default |
Default branch lengths. Ignored if |
admix_default |
Default admixture weights. Ignored if |
leaves_only |
Return allele frequencies for leaf nodes only |
A data frame with allele frequencies
graph_to_pcs
## Not run:
afs = graph_to_afs(example_igraph)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.