AddPloidyLikelihood {polyRAD} | R Documentation |
Likelihoods for Possible Ploidies Based on Genotype Distributions
Description
Given prior genotype probabilities, and a set of high-confidence
genotypes estimated with GetLikelyGen
, this function
estimates the probability of observing that distribution of genotypes
and stores the probability in the $ploidyLikelihood
slot of the
"RADdata"
object.
Usage
AddPloidyLikelihood(object, ...)
## S3 method for class 'RADdata'
AddPloidyLikelihood(object, excludeTaxa = GetBlankTaxa(object),
minLikelihoodRatio = 50, ...)
Arguments
object |
A |
... |
Additional arguments to be passed to the method for |
excludeTaxa |
A character vector indicating taxa that should be excluded from calculations. |
minLikelihoodRatio |
A number, one or higher, to be passed to |
Details
The purpose of this function is to estimate the correct inheritance mode for each locus. This function may be deleted in the future in favor of better alternatives.
Value
A "RADdata"
object identical to that passed to the function, but with
results added to the $ploidyLikelihood
slot. This has one row for each
possible ploidy (each ploidy with data in $priorProb
), and one column
for each allele. Each element of the matrix is the multinomial probability
of seeing that distribution of genotypes given the prior probabilities.
Author(s)
Lindsay V. Clark
See Also
Examples
##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (object, ...)
{
UseMethod("AddPloidyLikelihood", object)
}