Usage
get_map_genotypes(tM, burnin = 20, geno_dir = "genotypes")
Arguments
- tM
- Total reads matrix: matrix containing the total number of reads mapping to each locus for each individual.
- burnin
- Percent of the posterior samples to discard as burn-in (default=20).
- geno_dir
- File path to directory containing the posterior samples of genotypes output by
polyfreqs
(default = "genotypes").
Value
A matrix containing the maximum a posteriori estimates for all individuals at each locus. The MAP estimate of the genotype is simply the posterior mode.
Description
INTERNAL: Calculates the MAP estimate of the genotypes for autopolyploid individuals using the posterior mode of the marginal posterior distribtuion of genotypes for each individual at each locus.
Details
The easiest way to get these estimates is to set the genotypes
argument to TRUE
when running polyfreqs
.