impute_genotypes | R Documentation |
impute missing genotypes based on pop structure characterised using snmf
impute_genotypes(input.genotypes, K = NULL, no_cores = 1)
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 |
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()
Chris Brauer
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.