Learn R Programming

polyRAD (version 1.6)

AddPloidyLikelihood: 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 RADdata
AddPloidyLikelihood(object, excludeTaxa = GetBlankTaxa(object), 
                            minLikelihoodRatio = 50, ...)

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.

Arguments

object

A "RADdata" object. Prior genotype probabilities and genotype likelihoods should have already been added using the appropriate functions.

...

Additional arguments to be passed to the method for "RADdata".

excludeTaxa

A character vector indicating taxa that should be excluded from calculations.

minLikelihoodRatio

A number, one or higher, to be passed to GetLikelyGen.

Author

Lindsay V. Clark

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.

See Also

AddPloidyChiSq

Examples

Run this code
##---- 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)
  }

Run the code above in your browser using DataLab