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

View source: R/div_dosage.R

pi.dosageR Documentation

Estimates nucleotide diversity (\pi) from dosage data

Description

Estimates nucleotide diversity \pi= \sum_l 2 p_ l(1-p_l) 2n/(2n-1) 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


jgx65/hierfstat documentation built on April 20, 2023, 8:34 a.m.