predict_NMM: Predict allele dosage

View source: R/predict_NMM.R

predict_NMMR Documentation

Predict allele dosage

Description

Returns allele dosage as the maximum a posteriori (MAP) genotype based on a normal mixture model (NMM)

Usage

predict_NMM(x, params, ploidy, min.posterior = 0, transform = TRUE)

Arguments

x

vector of input values

params

vector of parameters for the normal mixture model

ploidy

2 or 4

min.posterior

minimum posterior probability for a genotype call to be made

transform

TRUE/FALSE whether to apply an arcsin square root transformation

Details

The input values should fall within the interval [0,1]. The vector of model parameters should be ordered as follows: means, standard deviations, mixture probabilities. If the posterior probability of the MAP genotype is less than 'min.posterior', then 'NA' is returned for that sample. By default, an arcsin square root transformation is applied to the input values, as this is the approach used by the 'fitPoly' package.

Value

vector of allele dosages (0,1,2,..ploidy)


jendelman/polyBreedR documentation built on Jan. 5, 2025, 12:13 a.m.