
Last chance! 50% off unlimited learning
Sale ends in
EstimateParentalGenotypes
estimates the most likely genotypes of two
parent taxa. Using those parental genotypes,
AddGenotypePriorProb_Mapping2Parents
estimates expected genotype
frequencies for a population of progeny, which are added to the
"RADdata"
object in the $priorProb
slot.
AddGenotypePriorProb_Mapping2Parents(object, ...)
# S3 method for RADdata
AddGenotypePriorProb_Mapping2Parents(object,
donorParent = GetDonorParent(object),
recurrentParent = GetRecurrentParent(object),
n.gen.backcrossing = 0, n.gen.intermating = 0, n.gen.selfing = 0,
donorParentPloidies = object$possiblePloidies,
recurrentParentPloidies = object$possiblePloidies,
minLikelihoodRatio = 10, ...)
EstimateParentalGenotypes(object, ...)
# S3 method for RADdata
EstimateParentalGenotypes(object,
donorParent = GetDonorParent(object),
recurrentParent = GetRecurrentParent(object),
n.gen.backcrossing = 0, n.gen.intermating = 0, n.gen.selfing = 0,
donorParentPloidies = object$possiblePloidies,
recurrentParentPloidies = object$possiblePloidies,
minLikelihoodRatio = 10, ...)
A "RADdata"
object identical to that passed to the function, but with
data stored in six new slots:
A list of matrices, with one matrix per possible ploidy of offspring. For each matrix, allele copy number (from zero to the total ploidy) is in rows, and alleles are in columns. Each value is the probability of sampling an individual with that allele copy number from the population.
A list in the same format as
object$possiblePloidies
, and the same length as
object$priorProb
. Each item in the list is a vector indicating the
inheritance mode for the corresponding matrix in object$priorProb
.
A list in the same format as object$possiblePloidies
,
with one item corresponding to each in object$priorProbPloidies, indicating
the donor parent ploidy for that progeny ploidy.
A list in the same format as object$possiblePloidies
,
with one item corresponding to each in object$priorProbPloidies
, indicating
the recurrent parent ploidy for that progeny ploidy.
A matrix of the donor parent genotypes that were
used for estimating genotype prior probabilities. Formatted like the
output of GetLikelyGen
.
A matrix of the recurrent parent genotypes that were use for estimating gentoype prior probabilities.
A "RADdata"
object. Ideally this should be set up as a mapping
population using SetDonorParent
, SetRecurrentParent
,
and AddAlleleFreqMapping
.
Additional arguments, listed below, to be passed to the method for
"RADdata"
objects.
A character string indicating which taxon is the donor parent. If backcrossing was not performed, it does not matter which was the donor or recurrent parent.
A character string indicating which taxon is the recurrent parent.
An integer, zero or greater, indicating how many generations of backcrossing to the recurrent parent were performed.
An integer, zero or greater, indicating how many generations of intermating within the population were performed. (Values above one should not have an effect on the genotype priors that are output, i.e. genotype probabilities after one generation of random mating are identical to genotype probabilities after >1 generation of random mating, assuming no genetic drift or selection).
An integer, zero or greater, indicating how many generations of selfing were performed.
A list, where each item in the list is an integer vector indicating a
potential inheritance mode that could be observed among loci in the donor
parent. 2
indicates diploid, 4
indicates autotetraploid,
c(2, 2)
indicates allotetraploid, etc.
A list in the same format as donorParentPloidies
indicating
inheritance modes that could be observed among loci in the recurrent
parent.
The minimum likelihood ratio for determining parental genotypes with
confidence, to be passed to GetLikelyGen
for both
parental taxa.
Lindsay V. Clark
AddGenotypePriorProb_Mapping2Parents
first calls
EstimateParentalGenotypes
internally to determine which combinations
of inheritance modes from
the two parents should be examined in the progeny. The expected progeny
ploidy must be in object$possiblePloidies
for a given combination
to be examined.
The most likely genotypes for the two parents are estimated by
EstimateParentalGenotypes
using
GetLikelyGen
. If parental gentoypes don't match progeny allele
frequencies, the function attempts to correct the parental genotypes to the
most likely combination that matches the allele frequency.
For each ploidy being examined, F1 genotype probabilities are then calculated
by AddGenotypePriorProb_Mapping2Parents
.
Genotype probabilities are updated for each backcrossing generation, then each
intermating generation, then each selfing generation.
The default, with n.gen.backcrossing = 0
, n.gen.intermating = 0
and n.gen.selfing = 0
, will simulate an F1 population. A BC1F2
population, for example, would have n.gen.backcrossing = 1
,
n.gen.intermating = 0
and n.gen.selfing = 1
. A typical F2
population would have n.gen.selfing = 1
and the other two parameters
set to zero. However, in a self-incompatible species where many F1 are
intermated to produce the F2, one would instead use
n.gen.intermating = 1
and set the other parameters to zero.
AddGenotypeLikelihood
, AddGenotypePriorProb_HWE
# load dataset and set some parameters
data(exampleRAD_mapping)
exampleRAD_mapping <- SetDonorParent(exampleRAD_mapping, "parent1")
exampleRAD_mapping <- SetRecurrentParent(exampleRAD_mapping, "parent2")
exampleRAD_mapping <- AddAlleleFreqMapping(exampleRAD_mapping,
expectedFreqs = c(0.25, 0.75),
allowedDeviation = 0.08)
exampleRAD_mapping <- AddGenotypeLikelihood(exampleRAD_mapping)
# examine the dataset
exampleRAD_mapping
exampleRAD_mapping$alleleFreq
# estimate genotype priors for a BC1 population
exampleRAD_mapping <- AddGenotypePriorProb_Mapping2Parents(exampleRAD_mapping,
n.gen.backcrossing = 1)
exampleRAD_mapping$priorProb
Run the code above in your browser using DataLab