hapiImupte: Imputation of missing genotypes in the framework

View source: R/Imputation.R

hapiImupteR Documentation

Imputation of missing genotypes in the framework

Description

Imputation of missing genotypes in the framework

Usage

hapiImupte(gmt, nSPT = 2, allowNA = 0)

Arguments

gmt

a dataframe of genotype data of gamete cells in the framework

nSPT

a numeric value of the minumum number of supports for an imputation

allowNA

a numeric value of the maximum number of gametes with NA at a locus

Value

a dataframe of imputed genotypes in the framework

Author(s)

Ruidong Li

Examples

ref <- rep(0,500)
alt <- rep(1,500)

gmtFrame <- data.frame(gmt1=ref, gmt2=alt, gmt3=ref,
gmt4=ref, gmt5=c(alt[1:250], ref[251:500]),
stringsAsFactors = FALSE)

idx1 <- sort(sample(seq_len(500), 30, replace = FALSE))
idx2 <- sort(sample(seq_len(500), 30, replace = FALSE))
idx3 <- sort(sample(seq_len(500), 30, replace = FALSE))

gmtFrame[idx1,1] <- NA
gmtFrame[idx2,2] <- NA
gmtFrame[idx3,3] <- NA
imputedFrame <- hapiImupte(gmtFrame, nSPT=2, allowNA=0)

rli012/Hapi documentation built on April 4, 2022, 8:39 p.m.