getConsensusGeno: getConsensusGeno...

Description Usage Arguments Value

View source: R/aiding_functions.R

Description

Get consensus genotype

Usage

1
getConsensusGeno(geno, maxNAfrac = 0.499, lowconf.NAfrac = 0.751)

Arguments

geno

A vector with scores (0..ploidy or NA) for all samples of one parent.

maxNAfrac

The maximum fraction of missing scores allowed to assign a high-confidence consensus geno score; if more are missing a missing geno score is returned (the default requires MORE than half of the samples to be scored, so one missing out of 2 samples already causes a missing geno)

lowconf.NAfrac

if the fraction missing scores is more than maxNAfrac but less than lowconf.NAfrac, or if there is only one sample, a lowconf.geno score is assigned

Value

Returns a list with 4 components:

geno

The consensus of the dosages in vector geno. NA if geno is empty, if all elements of geno are NA, if there are different non-NA values in geno, or if the fraction of NA values in geno larger than maxNAfrac

lowconf.geno

If there is no conflict and the fraction of missing scores is between maxNAfrac and lowconf.NAfrac, the consensus is assigned as a "low-confidence" geno - this needs confirmation from the F1 segregation to be accepted

conflict

TRUE if there are different non-NA values in geno, else FALSE

NAfrac

The fraction NA in geno (0.5 if length(geno)==0)


mdavy86/polymapR documentation built on May 25, 2019, 9:35 p.m.