Expected_Het: Compute expected heterozygosity within a population

View source: R/functions_pool.R

Expected_HetR Documentation

Compute expected heterozygosity within a population

Description

This functions calculates the value of the expected heterozygosity for each SNP.

Usage

Expected_Het(Pop_Pi)

Arguments

Pop_Pi

is a matrix or list of allele frequencies. When dealing with a single locus, this input is a matrix and when dealing with multiple loci it is a list. Each entry of that list is a matrix representing a different locus. Each row of that matrix should correspond to a different population and each column to a different SNP.

Value

if the input is a single matrix, the output will be a matrix where each row represents a different population and each column is the expected heterozygosity of a population at that site. If the input is a list, the output will also be a list, with each entry corresponding to a different locus. Each of those entries will be a matrix with different populations in different rows and the expected heterozygosity of different sites at different columns.


poolHelper documentation built on July 9, 2023, 6:23 p.m.