satisfies_numadmix: Test admixture constraints on a graph

satisfies_numadmixR Documentation

Test admixture constraints on a graph

Description

This function returns TRUE if and only if the admixture graph satisfies all constraints on the number of admixture events for the populations in admix_constraints

Usage

satisfies_numadmix(graph, admix_constraints)

Arguments

graph

An admixture graph

admix_constraints

A data frame with columns pop, min, max

Value

TRUE if all admixture constraints are satisfied, else FALSE

Examples

## Not run: 
# At least one admixture event for C, and none for D:
constrain_cd = tribble(
  ~pop, ~min, ~max,
  'C', 1, NA,
  'D', NA, 0)
satisfies_numadmix(random_admixturegraph(5, 2), constrain_cd)

## End(Not run)

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