|
| Population () |
|
| Population (int N, int mt, int xL, int xS, int y, int aL, int aS) |
|
| Population (Population const &a) |
|
| Population (std::string const &filename) |
|
| ~Population () |
|
std::vector< T > | get_pop (int current) const |
|
Population & | operator= (Population const &) |
|
void | reset (int N) |
|
void | set_mating_system (int) |
|
int | get_matingSystem () const |
|
void | set_inbreeding (int) |
|
int | get_inbreeding () const |
|
void | set_mu (double, double, double, double) |
|
void | set_mu (double, double, double, double, double, double, double, double) |
|
void | set_growthFactor (double, double, double) |
|
void | set_growthFactor (std::vector< double >) |
|
void | resize (int) |
|
double | get_muMt1 () const |
|
double | get_muMt2 () const |
|
double | get_muA1 () const |
|
double | get_muA2 () const |
|
double | get_muX1 () const |
|
double | get_muX2 () const |
|
double | get_muY1 () const |
|
double | get_muY2 () const |
|
int | get_generation () const |
|
int | get_nbHuman () const |
|
int | get_nbFemale () const |
|
int | get_nbMale () const |
|
int | get_sizeMt () const |
|
int | get_sizeY () const |
|
int | get_sizePerX () const |
|
int | get_sizePerA () const |
|
int | get_crumbA () const |
|
int | get_crumbY () const |
|
int | get_crumbX () const |
|
int | get_crumbMt () const |
|
int | get_nbCellPerA () const |
|
int | get_nbCellPerX () const |
|
int | get_nbChromosomesA () const |
|
int | get_nbChromosomesX () const |
|
std::vector< double > | get_growthFactor () const |
|
std::vector< int > | get_nb_mates () |
|
std::vector< int > | get_nb_children () |
|
Population | subsample (int sampleSize, int nbWomen) |
|
Population | subsample_female () |
|
Population | subsample_male () |
|
void | evolve (int gen) |
|
void | evolve_gene (int gen, std::string filename) |
|
void | write_txt_pop (std::string const &) const |
|
void | output_pop_size () const |
|
void | write_nexus (std::string const &file_name) const |
|
void | write_fasta (std::string const &file_name) const |
|
void | output_genealogy (std::ofstream &fs) |
|
void | write_smartFormat (std::string const &filename) const |
|
void | output_arlequin (std::string const &filename) |
|
void | output_nb_child () |
|
void | output_nb_mates () |
|
void | test (int) |
|
int | burnin (int gen, double facMu) |
|
int | burnin (double diversityTreshold, int gen, double facMu) |
|
void | evolve_one () |
|
typeDNA | polySites (int nuclear) const |
|
typeDNA | polySites_mtdna () const |
|
double | pairwise_distance_mtdna () const |
|
|
std::vector< T > | female [2] |
|
std::vector< T > | male [2] |
|
|
std::ostream & | operator<< (std::ostream &os, Population const &a) |
|
Constructor from the population size, and the mtDNA sequence length, the number of X loci, size of each X locus, size of Y sequence, number of autosome loci and length of each of those.
Constructor from reading a file containing a population from a previous run.
template<class T>
int Population< T >::burnin |
( |
int |
gen, |
|
|
double |
facMu |
|
) |
| |
Starts a burn-in phase with a higher mutation rate. It will either stop once the maximum number of generations to run is reached.
template<class T>
int Population< T >::burnin |
( |
double |
diversityTreshold, |
|
|
int |
gen, |
|
|
double |
facMu |
|
) |
| |
Starts a burn-in phase with a higher mutation rate. It will either stop once the threshold is reached or once the maximum number of generations to run is reached.
Evolves a defined number of generation, calling evolve_one as many times.
Runs a full cycle from one generation to the next, which includes reproduction and mutation.
template<class T >
void Population< T >::evolve_gene |
( |
int |
gen, |
|
|
std::string |
filename |
|
) |
| |
Evolves a defined number of generation, calling evolve_one as many times, saving the genealogy at the same time in the given file.
Returns the number of generations that the population have evolved.
Returns the value of the inbreeding parameter. If the value is 1, alliances are forbidden between two individuals who share at least one parent.
Resets all the population values, and its inidviduals except for the size of sequences. Used to gain time when doing a set of several simulations with the same parameters.
Returns the autosome transition rate.
Returns the autosome transversion rate.
Returns the mtDNA transition rate.
Returns the mtDNA transversion rate.
Returns the X transition rate.
Returns the X transversion rate.
Returns the Y transition rate.
Return the Y transversion rate.
template<class T >
std::vector< int > Population< T >::get_nb_children |
( |
| ) |
|
Returns a vector containing the number of children per individual.
template<class T >
std::vector< int > Population< T >::get_nb_mates |
( |
| ) |
|
Returns a vector containing the number of children per individual.
Returns the current number of female in the population.
Returns the current number of individuals in the population.
Returns the current number of male in the population.
template<class T>
std::vector<T> Population< T >::get_pop |
( |
int |
current | ) |
const |
Returns an array containing the individuals.
Returns the size - in number of sites - of the mtDNA sequence.
Returns the size - in number of sites - of sequences on X loci.
Returns the size - in number of sites - of sequences on autosome loci.
Returns the size - in number of sites - of the X loci.
Returns the size of the array containing mtDNA in each individual.
Returns the size taken by X chromosome in the nuclear DNA array in each individual.
Returns the size taken by Y chromosome in the nuclear DNA array in each individual.
Returns the size taken by autosomes in the nuclear DNA array in each individual.
Returns the size taken by one autosome locus in the nuclear DNA array in each individual.
Returns the size taken by one X locus in the nuclear DNA array in each individual.
Returns the number of unlinked X loci.
Returns the number of unlinked autosome loci.
template<class T >
void Population< T >::output_genealogy |
( |
std::ofstream & |
fs | ) |
|
Output the genealogy of the population in a file. For each individual of each generation, the following line will be written:
generation ID IDmother IDfather
This file can be processed by a specific python script.
Output the number of children for each individual per generation in the terminal.
Outputs the number of mates for each individual per generation in the terminal.
Return the demography parameters a,b,c. Defined as:
p(t+1) = a + b * p(t) + c * p(t)*p(t)
Outputs the population size at each generation in the terminal.
template<class T>
double Population< T >::pairwise_distance_mtdna |
( |
| ) |
const |
Computes the mean pairwise distance on the mtDNA sequence in the population.
template<class T>
typeDNA Population< T >::polySites |
( |
int |
nuclear | ) |
const |
Returns the number of polymorphic sites on a given locus.
template<class T>
typeDNA Population< T >::polySites_mtdna |
( |
| ) |
const |
Returns the number of polymorphic sites on the mtDNA sequence in the population.
Resizes the array containing the individuals. Done only once, after computing the maximum size of the population depending on the demographyc function.
template<class T >
void Population< T >::set_growthFactor |
( |
double |
a, |
|
|
double |
b, |
|
|
double |
c |
|
) |
| |
Changes the values a,b,c of the demography function.
p(t+1) = a + b*p(t) + c*p(t)*p(t)
template<class T >
void Population< T >::set_growthFactor |
( |
std::vector< double > |
a | ) |
|
Changes the values a,b,c of the demography function. p(t+1) = a + b*p(t) + c*p(t)*p(t)
Sets the value of the inbreeding parameter. If 1 individual sharing at least one parent can not mate.
template<class T >
void Population< T >::set_mu |
( |
double |
a, |
|
|
double |
b, |
|
|
double |
c, |
|
|
double |
d |
|
) |
| |
Set mutation rates : mtDNA, X, Y, autosomes
template<class T >
void Population< T >::set_mu |
( |
double |
a, |
|
|
double |
b, |
|
|
double |
c, |
|
|
double |
d, |
|
|
double |
e, |
|
|
double |
f, |
|
|
double |
g, |
|
|
double |
h |
|
) |
| |
Sets mutation rate : mtDNA transition, mtDNA transversion, X transition, X transversion, Y transition, Y transversion, austomomal transition, autosomal transversion.
>Returns a sample of the population (of type Population aswell) for a given sample size, with a given number of female in this sample.
>Returns a sample of the population (of type Population aswell) containing only the females.
>Returns a sample of the population (of type Population aswell) containing only the males.
Outputs the number of mates for each human in the command line.
template<class T>
void Population< T >::write_fasta |
( |
std::string const & |
file_name | ) |
const |
Outputs the population in a Fasta formatted file.
template<class T>
void Population< T >::output_arlequin |
( |
std::string const & |
file_name | ) |
const |
Outputs the population in a Arlequin formatted file.
template<class T>
void Population< T >::write_nexus |
( |
std::string const & |
file_name | ) |
const |
Outputs the population in a Fasta formatted file.
template<class T>
void Population< T >::write_smartFormat |
( |
std::string const & |
filename | ) |
const |
Outputs the population, with all its inidividuals and their DNA / mtDNA sequences in a special format. SMARTPOP can later read this file to reload the population.
template<class T >
void Population< T >::write_txt_pop |
( |
std::string const & |
file_name | ) |
const |
Starts a cycle of a given number of generations to evolve.
Vector containing all the female of the current generation, and of the previous (in phases before reproduction) or the next generation (in phases after reproduction).
Vector containing all the female of the current generation, and of the previous (in phase before reproduction) or the next generation (in phases after reproduction).
The documentation for this class was generated from the following file: