This function provides a very simple imputation algorithm for gen_tibble objects by using the mode, mean or sampling from the allele frequencies. Each locus is imputed independently (and thus linkage information is ignored). It is a wrapper around bigsnpr::snp_fastImputeSimple().

gt_impute_simple(x, method = c("mode", "mean0", "random"), n_cores = 1)

Arguments

x

a gen_tibble with missing data

method

one of

  • 'mode': the most frequent genotype

  • 'mean0': the mean rounded to the nearest integer

  • 'random': randomly sample a genotype based on the observed allele frequencies

n_cores

the number of cores to be used

Value

a gen_tibble with imputed genotypes