Learn R Programming

poolABC (version 1.0.0)

fixed: Compute the fraction of sites fixed between populations

Description

This function will compute the fraction of sites that constitute a fixed difference between populations.

Usage

fixed(minor, total, nPops)

Value

a numeric vector with a single entry when nPops is equal to 2 or with three entries when nPops is set to 4.

Arguments

minor

is a matrix with the number of minor-allele reads. Each row of the matrix is a different population and each column a different site.

total

is a matrix with the total coverage. Each row of the matrix is a different population and each column a different site.

nPops

is an integer indicating the total number of populations.

Details

More precisely, we define fixed differences as sites where the number of minor-allele reads of a given population is equal to the total coverage of that population and equal to zero in the other population.

For models with two populations, this function compares the two present-day populations. For models with four populations, this function performs a pairwise comparison of the populations at each of the locations. For the models with four populations, we also assess the fraction of sites that represent a fixed difference between any of the populations and the remaining three populations.