outflank_mod_fst_correct: Modificatin of OutFLANK's...

View source: R/outflank_mod_fst_correct.R

outflank_mod_fst_correctR Documentation

Modificatin of OutFLANK's WC_FST_FiniteSample_Diploids_2Alleles()

Description

Skip the need for diploid genotypes, i.e. just use allele frequencies, and produce the same output as WC_FST_FiniteSample_Diploids_2Alleles(). Calculate FST with a sample size correction.

Usage

outflank_mod_fst_correct(alleleFreqs, sampSize, Ho)

Arguments

alleleFreqs

Numeric: A vector of the Reference allele frequency, with the length == number of populations.

sampSize

Integer: A vector of sample sizes, with the length == number of populations and the order corresponding to the those in alleleFreqs.

Ho

Integer: An optional vector of the heterozygote frequency, with the length == number of populations and the order corresponding to the those in alleleFreqs. Default = NULL, see Details.

Details

By using just allele frequencies, there is no information about the observed frequency of heterozygotes, Ho. The function will make the naive assumption that Ho = He, if Ho is not specified.

Value

Returns a list of values related to FST:

  • He: the expected heterozygosity of the locus

  • FST: Fst (with sample size correction)

  • T1: The numerator of the Fst calculation (a from Weir and Cockerham 1984)

  • T2: The denominator of the Fst calculation (a+b+c from Weir and Cockerham 1984)


j-a-thia/genomalicious documentation built on Oct. 19, 2024, 7:51 p.m.