50% off: Unlimited data and AI learning.
The Learning Leader's Guide to AI Literacy

hierfstat (version 0.5-11)

pi.dosage: Estimates nucleotide diversity (π) from dosage data

Description

Estimates nucleotide diversity π=l2pl(1pl)2n/(2n1) from a dosage matrix

Usage

pi.dosage(dos,L=NULL)

Arguments

dos

a ni X nl dosage matrix containing the number of derived/alternate alleles each individual carries at each SNP

L

the length of the sequence

Value

if L=NULL (default), returns the sum over SNPs of nucleotide diversity; otherwise return the average nucleotide diversity per nucleotide given the length L of the sequence