impute_genotypes: impute missing genotypes based on pop structure characterised...

impute_genotypesR Documentation

impute missing genotypes based on pop structure characterised using snmf

Description

impute missing genotypes based on pop structure characterised using snmf

Usage

impute_genotypes(input.genotypes, K = NULL, no_cores = 1)

Arguments

input.genotypes

A genind or genlight object

K

the number of predetermined clusters in your data (suggest using smnf, ADMIXTURE or similar to explore first)

no_cores

the number of cores to use for the analysis

Value

a genind or genlight object with missing data imputed

#' @details The function imputes missing genotypes based on ancestral population allele frequencies estimated using LEA::snmf()

Author(s)

Chris Brauer

Examples

 ## set directory for results to be written
 setwd("path/to/working/directory")

 # load example coordinate file
 data(rainbow.genind)

 # run analysis for K=6
 imputed.gi <- impute_genotypes(rainbow.genind, K = 6)
 

pygmyperch/melfuR documentation built on Aug. 26, 2024, 12:48 a.m.