fill_fail: Infer the genotype of failed SNPs If we have a 'Fail' in the...

View source: R/reformat-geno-mt.R

fill_failR Documentation

Infer the genotype of failed SNPs If we have a Fail in the genotype data and the Fail in a block of either Home_alt, or Het, we fill in the Fails using values of the ones adjacent to it, otherwise they remain as "Fail" to indicate missing values.

Description

Infer the genotype of failed SNPs If we have a Fail in the genotype data and the Fail in a block of either Home_alt, or Het, we fill in the Fails using values of the ones adjacent to it, otherwise they remain as "Fail" to indicate missing values.

Usage

fill_fail(s_gt, fail = "Fail", chr = NULL)

Arguments

s_gt,

a column of labelled genotypes

fail,

the string that is used for encoding failed genotype results, default to Fail

chr,

the factor vector indicating which chromosomes the markers are on, default to NULL which means the input markers are all on the same chromosome.

Value

a vector of genotypes with Failed genotype imputed or changed to 'NA' if not imputable

Author(s)

Ruqian Lyu


ruqianl/comapr documentation built on Oct. 27, 2023, 5:12 a.m.