Learn R Programming

polyfreqs (version 1.0.2)

get_map_genotypes: Maximum a posteriori (MAP) estmation of autopolyploid genotypes

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.

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.

Details

The easiest way to get these estimates is to set the genotypes argument to TRUE when running polyfreqs.