graph_to_afs: Simulate allele frequncies under an admixture graph

graph_to_afsR Documentation

Simulate allele frequncies under an admixture graph

Description

This function performs a very crude simulation of allele frequencies under an admixture graph model

Usage

graph_to_afs(
  graph,
  nsnps = 10000,
  drift_default = 0.02,
  admix_default = 0.5,
  leaves_only = FALSE
)

Arguments

graph

An admixture graph as igraph object, or as edge list data frame with a column weight, as returned by qpgraph()$edges

nsnps

Number of SNPs to simulate

drift_default

Default branch lengths. Ignored if graph is a data frame with weights

admix_default

Default admixture weights. Ignored if graph is a data frame with weights

leaves_only

Return allele frequencies for leaf nodes only

Value

A data frame with allele frequencies

See Also

graph_to_pcs

Examples

## Not run: 
afs = graph_to_afs(example_igraph)

## End(Not run)

uqrmaie1/admixtools documentation built on Nov. 3, 2024, 12:56 a.m.