calcPWP: Calculate pairwise pi between two diploid individuals

Description Usage Arguments Details Value

View source: R/stats.R

Description

Calculate pairwise pi between two diploid individuals

Usage

1
calcPWP(ind1, ind2, L)

Arguments

ind1

A genotype vector for a single diploid individual for which the ith element gives the frequency of the counted allele in that individual at the ith locus.

ind2

A genotype vector for a single diploid individual for which the ith element gives the frequency of the counted allele in that individual at the ith locus.

L

The number of loci genotyped in both individuals 1 and 2.

Details

The genotype data should consist of 0,0.5,1 with missing data indicated with NA. If the genotype vectors ind1 and ind2 consist only of polymorphic loci, and L is the number of co-genotyped polymorphic loci, this function will return pairwise pi at polymorphic sites, which may not be comparable across datasets.

Value

An estimate of pairwise pi between individuals 1 and 2.


gbradburd/popgenstuff documentation built on Oct. 16, 2021, 12:05 a.m.