41 #ifndef _MULTILOCUSGENOTYPESTATISTICS_H_
42 #define _MULTILOCUSGENOTYPESTATISTICS_H_
The MultilocusGenotypeStatistics class.
static double getDnei78(const PolymorphismMultiGContainer &pmgc, std::vector< size_t > locus_positions, size_t grp1, size_t grp2)
Compute the Nei unbiased distance between two groups at a given number of loci.
static std::map< size_t, double > getAllelesFit(const PolymorphismMultiGContainer &pmgc, size_t locus_position, const std::set< size_t > &groups)
Compute the Weir and Cockerham Fit on a set of groups for each allele of a given locus.
static std::map< size_t, double > getHeterozygousFrqForGroups(const PolymorphismMultiGContainer &pmgc, size_t locus_position, const std::set< size_t > &groups)
Get the heterozygous frequencies for each allele at a locus in a set of groups.
static std::map< size_t, VarComp > getVarianceComponents(const PolymorphismMultiGContainer &pmgc, size_t locus_position, const std::set< size_t > &groups)
Get the variance components a, b and c (Weir and Cockerham, 1983).
static double getDnei72(const PolymorphismMultiGContainer &pmgc, std::vector< size_t > locus_positions, size_t grp1, size_t grp2)
Compute the Nei distance between two groups at one locus.
static std::map< size_t, size_t > countHeterozygousForGroups(const PolymorphismMultiGContainer &pmgc, size_t locus_position, const std::set< size_t > &groups)
Count how many times each allele is found in an heterozygous MonolocusGenotype in a set of groups.
static size_t countBiAllelicForGroups(const PolymorphismMultiGContainer &pmgc, size_t locus_position, const std::set< size_t > &groups)
Counr the number of bi-allelic MonolocusGenotype at a given locus for a set of groups.
static double getHnbForGroups(const PolymorphismMultiGContainer &pmgc, size_t locus_position, const std::set< size_t > &groups)
Compute the expected non biased heterozygosity for one locus.
static std::map< size_t, double > getAllelesFst(const PolymorphismMultiGContainer &pmgc, size_t locus_position, const std::set< size_t > &groups)
Compute the Weir and Cockerham on a set of groups for each allele of a given locus.
static PermResults getWCMultilocusFstAndPerm(const PolymorphismMultiGContainer &pmgc, std::vector< size_t > locus_positions, std::set< size_t > groups, int nb_perm)
Compute the Weir and Cockerham on a set of groups for a given set of loci and make a permutation tes...
static std::vector< size_t > getAllelesIdsForGroups(const PolymorphismMultiGContainer &pmgc, size_t locus_position, const std::set< size_t > &groups)
Get the alleles' id at one locus for a set of groups.
static size_t countGametesForGroups(const PolymorphismMultiGContainer &pmgc, size_t locus_position, const std::set< size_t > &groups)
Count the number of allele (gametes) at a locus for a set of groups.
static std::unique_ptr< DistanceMatrix > getDistanceMatrix(const PolymorphismMultiGContainer &pmgc, std::vector< size_t > locus_positions, const std::set< size_t > &groups, std::string distance_method)
Compute pairwise distances on a set of groups for a given set of loci. distance is either Nei72,...
static std::map< size_t, Fstats > getAllelesFstats(const PolymorphismMultiGContainer &pmgc, size_t locus_position, const std::set< size_t > &groups)
Compute the three F statistics of Weir and Cockerham for each allele of a given locus.
static double getHexpForGroups(const PolymorphismMultiGContainer &pmgc, size_t locus_position, const std::set< size_t > &groups)
Compute the expected heterozygosity for one locus.
static double getRHMultilocusFst(const PolymorphismMultiGContainer &pmgc, std::vector< size_t > locus_positions, const std::set< size_t > &groups)
Compute the on a set of groups for a given set of loci. The variance componenets for each allele are...
static double getHobsForGroups(const PolymorphismMultiGContainer &pmgc, size_t locus_position, const std::set< size_t > &groups)
Compute the observed heterozygosity for one locus.
static size_t countNonMissingForGroups(const PolymorphismMultiGContainer &pmgc, size_t locus_position, const std::set< size_t > &groups)
Count the number of non-missing data at a given locus for a set of groups.
static std::map< size_t, double > getAllelesFis(const PolymorphismMultiGContainer &pmgc, size_t locus_position, const std::set< size_t > &groups)
Compute the Weir and Cockerham Fis on a set of groups for each allele of a given locus.
static PermResults getWCMultilocusFisAndPerm(const PolymorphismMultiGContainer &pmgc, std::vector< size_t > locus_positions, std::set< size_t > groups, int nb_perm)
Compute the Weir and Cockerham Fis on a set of groups for a given set of loci and make a permutation ...
static std::map< size_t, size_t > getAllelesMapForGroups(const PolymorphismMultiGContainer &pmgc, size_t locus_position, const std::set< size_t > &groups)
Get a map of allele count for a set of groups.
static double getWCMultilocusFst(const PolymorphismMultiGContainer &pmgc, std::vector< size_t > locus_positions, const std::set< size_t > &groups)
Compute the Weir and Cockerham on a set of groups for a given set of loci. The variance componenets ...
static double getWCMultilocusFis(const PolymorphismMultiGContainer &pmgc, std::vector< size_t > locus_positions, const std::set< size_t > &groups)
Compute the Weir and Cockerham Fis on a set of groups for a given set of loci. The variance componene...
static std::map< size_t, double > getAllelesFrqForGroups(const PolymorphismMultiGContainer &pmgc, size_t locus_position, const std::set< size_t > &groups)
Get the alleles frequencies at one locus for a set of groups.
The PolymorphismMultiGContainer class.