Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

stamppNeisD

Genetic Distance Calculation


Description

This function calculates Nei's genetic distance (Nei 1972) between populations or individuals

Usage

stamppNeisD(geno, pop = TRUE)

Arguments

geno

a data frame containing allele frequency data generated from stamppConvert, or a genlight object containing genotype data, individual IDs, population IDs and ploidy levels

pop

logical. True if genetic distance should be calculated between populations, false if it should be calculated between individual

Value

A object of class matrix which contains the genetic distance between each population or individual

Author(s)

Luke Pembleton <luke.pembleton at agriculture.vic.gov.au>

References

Nei M (1972) Genetic Distance between Populations. The American Naturalist 106, 283-292.

Examples

# import genotype data and convert to allele frequecies
data(potato.mini, package="StAMPP")
potato.freq <- stamppConvert(potato.mini, "r")
# Calculate genetic distance between individuals
potato.D.ind <- stamppNeisD(potato.freq, FALSE)
# Calculate genetic distance between populations
potato.D.pop <- stamppNeisD(potato.freq, TRUE)

StAMPP

Statistical Analysis of Mixed Ploidy Populations

v1.6.2
GPL-3
Authors
LW Pembleton
Initial release
2021-04-22

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.