stampp2genlight: Convert StAMPP genotype data to genlight object

Description Usage Arguments Details Value Author(s) Examples

View source: R/stampp2genlight.R

Description

Converts a StAMPP formated allele frequency data frame generated from the stamppConvert function to a genlight object for use in other packages

Usage

1
stampp2genlight(geno, pop = TRUE)

Arguments

geno

a data frame containing allele frequency data generated from stamppConvert

pop

logical. True if population IDs are present in the StAMPP genotype data, False if population IDs are absent.

Details

StAMPP only exports to genlight objects as they are able to handle mixed ploidy datasets unlike genpop and genloci objects. The genlight object allows the intergration between StAMPP and other common R packages such as ADEGENET

Value

A object of class genlight which contains genotype data, individual IDs, population IDs (if present) and ploidy levels

Author(s)

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

Examples

1
2
3
4
5
# import genotype data and convert to allele frequecies
data(potato.mini, package="StAMPP")
potato.freq <- stamppConvert(potato.mini, "r")
# Convert the StAMPP formatted allele frequency data frame to a genlight object
potato.genlight <- stampp2genlight(potato.freq, TRUE)

StAMPP documentation built on Aug. 8, 2021, 9:07 a.m.