Nei82Fst: Fst from hamming distance

View source: R/weightedFst.R

Nei82FstR Documentation

Fst from hamming distance

Description

Calculates sample size weighted or unweighted Fst-like \gammast from Nei (1982)

Usage

Nei82Fst(distMat, popList, pairs, ploidy, weighted = TRUE)

Arguments

distMat

hamming distance matrix calculated using the hidden function genoDist

popList

List of populations made from pops dataframe provided by users

pairs

list of populaiton pairs generated in getDiversityStats

ploidy

numeric number of chromosomes

weighted

logical
Weight by sample subpopulaiton size. If TRUE mean nuceotide diversity within the subpopulaiton will be weigthed by sample size.
With weighting 6 samples in p1 and 4 in p2, will result in 0.6*pi_p1 + 0.4*pi_p2
Alternatively, without weighting each subpopulaiton is assumed to contribute equally to the mean, (pi_p1 + pi_p2)/2

Details

Authours: Chris Ward Uses the mean nucleotide diversity within each subpopulaiton to calculate subpopulaiton pi and divides by the total nucleotide diversity.

Value

A dataframe Fst between two populations


CMWbio/geaR documentation built on April 22, 2023, 6:23 a.m.