satisfies_zerof4: Test f4 constraints on a graph

satisfies_zerof4R Documentation

Test f4 constraints on a graph

Description

This function returns TRUE if and only if the admixture graph is compatible with the f4-statistics listed in nonzero_f4 being non-zero

Usage

satisfies_zerof4(graph, zero_f4)

Arguments

graph

An admixture graph

zero_f4

A data frame or matrix with four columns. One row for each f4-statistic which is expected to be zero

Value

TRUE if all constraints are satisfied, else FALSE

Examples

## Not run: 
# Test whether Chimp and Altai are a clade with respect to all populations X and Y:
# (whether f4("Chimp", "Altai"; X, Y) is 0 for all pairs of X and Y)
zero_f4 = expand_grid(pop1 = "Chimp", pop2 = "Altai", pop3 = X, pop4 = Y)
satisfies_zerof4(random_admixturegraph(5, 2), zero_f4)

## End(Not run)

uqrmaie1/admixtools documentation built on April 25, 2024, 11:30 a.m.