5 #ifndef _MULTILOCUSGENOTYPESTATISTICS_H_
6 #define _MULTILOCUSGENOTYPESTATISTICS_H_
66 const std::set<size_t>& groups);
76 const std::set<size_t>& groups);
86 const std::set<size_t>& groups);
97 const std::set<size_t>& groups);
106 size_t locusPosition,
107 const std::set<size_t>& groups);
116 size_t locusPosition,
117 const std::set<size_t>& groups);
126 size_t locusPosition,
127 const std::set<size_t>& groups);
137 size_t locusPosition,
138 const std::set<size_t>& groups);
149 size_t locusPosition,
150 const std::set<size_t>& groups);
165 size_t locusPosition,
166 const std::set<size_t>& groups);
181 size_t locusPosition,
182 const std::set<size_t>& groups);
199 std::vector<size_t> locusPositions,
225 std::vector<size_t> locusPositions,
234 size_t locusPosition,
235 const std::set<size_t>& groups);
242 size_t locusPosition,
243 const std::set<size_t>& groups);
250 size_t locusPosition,
251 const std::set<size_t>& groups);
258 size_t locusPosition,
259 const std::set<size_t>& groups);
266 size_t locusPosition,
267 const std::set<size_t>& groups);
275 std::vector<size_t> locusPositions,
276 const std::set<size_t>& groups);
284 std::vector<size_t> locusPositions,
285 const std::set<size_t>& groups);
295 std::vector<size_t> locusPositions,
296 std::set<size_t> groups,
297 unsigned int nb_perm);
307 std::vector<size_t> locusPositions,
308 std::set<size_t> groups,
309 unsigned int nbPerm);
318 std::vector<size_t> locusPositions,
319 const std::set<size_t>& groups);
328 std::vector<size_t> locusPositions,
329 const std::set<size_t>& groups,
330 std::string distance_method);
The MultilocusGenotypeStatistics class.
static size_t countNonMissingForGroups(const PolymorphismMultiGContainer &pmgc, size_t locusPosition, const std::set< size_t > &groups)
Count the number of non-missing data at a given locus for a set of groups.
static double getWCMultilocusFis(const PolymorphismMultiGContainer &pmgc, std::vector< size_t > locusPositions, 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 component...
static std::map< size_t, double > getAllelesFrqForGroups(const PolymorphismMultiGContainer &pmgc, size_t locusPosition, const std::set< size_t > &groups)
Get the alleles frequencies at one locus for a set of groups.
static std::map< size_t, double > getAllelesFit(const PolymorphismMultiGContainer &pmgc, size_t locusPosition, 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, size_t > getAllelesMapForGroups(const PolymorphismMultiGContainer &pmgc, size_t locusPosition, const std::set< size_t > &groups)
Get a map of allele count for a set of groups.
static double getHexpForGroups(const PolymorphismMultiGContainer &pmgc, size_t locusPosition, const std::set< size_t > &groups)
Compute the expected heterozygosity for one locus.
static std::unique_ptr< DistanceMatrix > getDistanceMatrix(const PolymorphismMultiGContainer &pmgc, std::vector< size_t > locusPositions, 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 double getHnbForGroups(const PolymorphismMultiGContainer &pmgc, size_t locusPosition, const std::set< size_t > &groups)
Compute the expected non biased heterozygosity for one locus.
static std::map< size_t, size_t > countHeterozygousForGroups(const PolymorphismMultiGContainer &pmgc, size_t locusPosition, const std::set< size_t > &groups)
Count how many times each allele is found in an heterozygous MonolocusGenotype in a set of groups.
static double getWCMultilocusFst(const PolymorphismMultiGContainer &pmgc, std::vector< size_t > locusPositions, const std::set< size_t > &groups)
Compute the Weir and Cockerham on a set of groups for a given set of loci. The variance components f...
static std::map< size_t, VarComp > getVarianceComponents(const PolymorphismMultiGContainer &pmgc, size_t locusPosition, const std::set< size_t > &groups)
Get the variance components a, b and c (Weir and Cockerham, 1983).
static std::map< size_t, double > getAllelesFst(const PolymorphismMultiGContainer &pmgc, size_t locusPosition, const std::set< size_t > &groups)
Compute the Weir and Cockerham on a set of groups for each allele of a given locus.
static std::map< size_t, Fstats > getAllelesFstats(const PolymorphismMultiGContainer &pmgc, size_t locusPosition, const std::set< size_t > &groups)
Compute the three F statistics of Weir and Cockerham for each allele of a given locus.
static double getRHMultilocusFst(const PolymorphismMultiGContainer &pmgc, std::vector< size_t > locusPositions, const std::set< size_t > &groups)
Compute the on a set of groups for a given set of loci. The variance components for each allele are ...
static PermResults getWCMultilocusFstAndPerm(const PolymorphismMultiGContainer &pmgc, std::vector< size_t > locusPositions, std::set< size_t > groups, unsigned 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::map< size_t, double > getHeterozygousFrqForGroups(const PolymorphismMultiGContainer &pmgc, size_t locusPosition, const std::set< size_t > &groups)
Get the heterozygous frequencies for each allele at a locus in a set of groups.
static std::vector< size_t > getAllelesIdsForGroups(const PolymorphismMultiGContainer &pmgc, size_t locusPosition, const std::set< size_t > &groups)
Get the alleles' id at one locus for a set of groups.
static std::map< size_t, double > getAllelesFis(const PolymorphismMultiGContainer &pmgc, size_t locusPosition, 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 double getDnei78(const PolymorphismMultiGContainer &pmgc, std::vector< size_t > locusPositions, size_t grp1, size_t grp2)
Compute the Nei unbiased distance between two groups at a given number of loci.
static size_t countBiAllelicForGroups(const PolymorphismMultiGContainer &pmgc, size_t locusPosition, const std::set< size_t > &groups)
Counr the number of bi-allelic MonolocusGenotype at a given locus for a set of groups.
static size_t countGametesForGroups(const PolymorphismMultiGContainer &pmgc, size_t locusPosition, const std::set< size_t > &groups)
Count the number of allele (gametes) at a locus for a set of groups.
static PermResults getWCMultilocusFisAndPerm(const PolymorphismMultiGContainer &pmgc, std::vector< size_t > locusPositions, std::set< size_t > groups, unsigned int nbPerm)
Compute the Weir and Cockerham Fis on a set of groups for a given set of loci and make a permutation ...
static double getHobsForGroups(const PolymorphismMultiGContainer &pmgc, size_t locusPosition, const std::set< size_t > &groups)
Compute the observed heterozygosity for one locus.
static double getDnei72(const PolymorphismMultiGContainer &pmgc, std::vector< size_t > locusPositions, size_t grp1, size_t grp2)
Compute the Nei distance between two groups at one locus.
The PolymorphismMultiGContainer class.