|
template<typename uniform_generator > |
std::pair< int, int > | pick2_in_deme (uniform_generator &uni, const std::vector< Sequence::coalsim::chromosome > &sample, const int &ttl_nsam, const int &deme_nsam, const int &deme) |
|
template<typename uniform_generator > |
std::pair< int, int > | pick2_in_deme (const uniform_generator &uni, const std::vector< Sequence::coalsim::chromosome > &sample, const int &ttl_nsam, const int &deme_nsam, const int &deme) |
|
template<typename uniform_generator > |
std::pair< int, int > | pick2 (uniform_generator &uni, const int &nsam) |
|
template<typename uniform_generator > |
std::pair< int, int > | pick2 (const uniform_generator &uni, const int &nsam) |
|
bool | isseg (chromosome::const_iterator seg, const unsigned &nsegs, const int &pos, unsigned *offset) |
| ask if a chromosome beginning at seg and containing nsegs contains a segment containing the position pos More...
|
|
int | coalesce (const double &time, const int &ttl_nsam, const int ¤t_nsam, const int &c1, const int &c2, const int &nsites, int *nlinks, std::vector< chromosome > *sample, arg *sample_history) |
| Common ancestor routine for coalescent simulation. Merges chromosome segments and updates marginal trees. More...
|
|
template<typename uniform_generator , typename uniform01_generator , typename exponential_generator > |
arg | bottleneck (uniform_generator &uni, uniform01_generator &uni01, exponential_generator &expo, const std::vector< chromosome > &initialized_sample, const marginal &initialized_marginal, const double &tr, const double &d, const double &f, const double &rho=0., const bool &exponential_recovery=false, const double &recovered_size=1.) |
|
template<typename uniform_generator , typename uniform01_generator , typename exponential_generator > |
arg | bottleneck (const uniform_generator &uni, const uniform01_generator &uni01, const exponential_generator &expo, const std::vector< chromosome > &initialized_sample, const marginal &initialized_marginal, const double &tr, const double &d, const double &f, const double &rho=0., const bool &exponential_recovery=false, const double &recovered_size=1.) |
|
template<typename uniform_generator , typename uniform01_generator , typename exponential_generator > |
arg | exponential_change (uniform_generator &uni, uniform01_generator &uni01, exponential_generator &expo, const std::vector< chromosome > &initialized_sample, const marginal &initialized_marginal, const double &G, const double &t_begin, const double &t_end, const double &rho=0., const double &size_at_end=-1) |
|
template<typename uniform_generator , typename uniform01_generator , typename exponential_generator > |
arg | exponential_change (const uniform_generator &uni, const uniform01_generator &uni01, const exponential_generator &expo, const std::vector< chromosome > &initialized_sample, const marginal &initialized_marginal, const double &G, const double &t_begin, const double &t_end, const double &rho=0., const double &size_at_end=-1) |
|
template<typename uniform_generator , typename uniform01_generator , typename exponential_generator > |
arg | snm (uniform_generator &uni, uniform01_generator &uni01, exponential_generator &expo, const std::vector< chromosome > &initialized_sample, const marginal &initialized_marginal, const double &rho) |
|
template<typename uniform_generator , typename uniform01_generator , typename exponential_generator > |
arg | snm (const uniform_generator &uni, const uniform01_generator &uni01, const exponential_generator &expo, const std::vector< chromosome > &initialized_sample, const marginal &initialized_marginal, const double &rho) |
|
int | sample_length (const std::vector< std::pair< int, int > > &fragments) |
| When simulating partially linked regions, return the total length of sample material that we are simulating. More...
|
|
int | total_length (const std::vector< std::pair< int, int > > &fragments) |
| When simulating partially linked regions, return the total length of the region. More...
|
|
void | calculate_scales (const std::vector< std::pair< int, int > > &fragments, std::vector< std::pair< double, double > > *sample_scale, std::vector< std::pair< double, double > > *mutation_scale) |
| This is a helper function that rescales physical distance in base pairs to continuous distance on the interval 0,1. More...
|
|
void | rescale_mutation_positions (Sequence::SimData *d, const std::vector< std::pair< double, double > > &sample_scale, const std::vector< std::pair< double, double > > &mutation_scale) |
| Rescales the positions of the mutations in d from the scale given in sample_scale to that given in mutation_scale. More...
|
|
void | rescale_arg (arg *sample_history, const std::vector< std::pair< int, int > > &fragments) |
| Rescales the beginnings of marginal trees in an ancestral recombination graph from a genetic scale to a physical scale.
|
|
double | integrate_genetic_map (const std::vector< chromosome > &sample, const int ¤t_nsam, const std::vector< double > &genetic_map, std::vector< double > *reclens) |
| When simulating non-uniform recombination rates, the probability of recombination at each point in the simulation needs to be obtained by integrating over the genetic map and the current sample configuration. This function does that. More...
|
|
std::vector< chromosome > | init_sample (const std::vector< int > &pop_config, const int &nsites) |
| A simple function to initialize a sample of chromosomes. More...
|
|
marginal | init_marginal (const int &nsam) |
| Simple function to initialize a marginal tree. More...
|
|
template<typename uniform_generator > |
void | add_S_inf_sites (uniform_generator &uni, marginal::const_iterator history, const double &tt, const int &beg, const int &end, const int &nsam, const int &nsites, const int &S, const int &first_snp_index, gamete_storage_type *gametes) |
|
template<typename uniform_generator > |
void | add_S_inf_sites (const uniform_generator &uni, marginal::const_iterator history, const double &tt, const int &beg, const int &end, const int &nsam, const int &nsites, const int &S, const int &first_snp_index, gamete_storage_type *gametes) |
|
template<typename poisson_generator , typename uniform_generator > |
int | infinite_sites (poisson_generator &poiss, uniform_generator &uni, gamete_storage_type *gametes, const int &nsites, const arg &history, const double &theta) |
|
template<typename poisson_generator , typename uniform_generator > |
int | infinite_sites (const poisson_generator &poiss, const uniform_generator &uni, gamete_storage_type *gametes, const int &nsites, const arg &history, const double &theta) |
|
template<typename uniform_generator > |
int | infinite_sites (uniform_generator &uni, gamete_storage_type *gametes, const int &nsites, const arg &history, const double *total_times, const unsigned *segsites) |
|
template<typename uniform_generator > |
int | infinite_sites (const uniform_generator &uni, gamete_storage_type *gametes, const int &nsites, const arg &history, const double *total_times, const unsigned *segsites) |
|
template<typename poisson_generator , typename uniform_generator > |
SimData | infinite_sites_sim_data (poisson_generator &poiss, uniform_generator &uni, const int &nsites, const arg &history, const double &theta) __attribute((deprecated)) |
|
template<typename poisson_generator , typename uniform_generator > |
SimData | infinite_sites_sim_data (const poisson_generator &poiss, const uniform_generator &uni, const int &nsites, const arg &history, const double &theta) __attribute__((deprecated)) |
|
template<typename uniform_generator > |
SimData | infinite_sites_sim_data (uniform_generator &uni, const int &nsites, const arg &history, const double *total_times, const unsigned *segsites) __attribute__((deprecated)) |
|
template<typename uniform_generator > |
SimData | infinite_sites_sim_data (const uniform_generator &uni, const int &nsites, const arg &history, const double *total_times, const unsigned *segsites) __attribute__((deprecated)) |
|
void | output_gametes (FILE *fp, const unsigned &segsites, const unsigned &nsam, const gamete_storage_type &gametes) |
| Write an object of type gamete_storage type to a C-style file stream This function is used when you need to output simulated gametes using a method faster than the operator<< for class SimData. More...
|
|
template<typename uniform_generator , typename uniform01_generator , typename exponential_generator , typename poisson_generator > |
Sequence::SimData | neutral_sample (uniform_generator &uni, uniform01_generator &uni01, exponential_generator &expo, poisson_generator &poiss, const double &theta, const double &rho, const int &nsites, const int &nsam, std::vector< chromosome > *sample, arg *sample_history, unsigned *max_chromosomes=NULL, const unsigned &max_chromosomes_inc=0) |
| A simple function to generate samples under a neutral equilibrium model. More...
|
|
int | crossover (const int ¤t_nsam, const int &chromo, const int &pos, std::vector< chromosome > *sample, arg *sample_history) |
| Recombination function. More...
|
|
std::pair< int, int > | pick_uniform_spot (const double &random_01, const int &nlinks, std::vector< chromosome >::const_iterator sample_begin, const unsigned ¤t_nsam) |
| Pick a crossover point for the model where recombination rates are constant across a recion. Picks a positions uniformly amongst all chromosomes at which a recombination event will occur. More...
|
|
template<typename uniform01_generator > |
std::pair< int, int > | pick_spot (uniform01_generator &uni01, const double &total_reclen, const std::vector< double > &reclens, std::vector< chromosome >::const_iterator sample_begin, const unsigned ¤t_nsam, const double *rec_map) |
|
template<typename uniform01_generator > |
std::pair< int, int > | pick_spot (const uniform01_generator &uni01, const double &total_reclen, const std::vector< double > &reclens, std::vector< chromosome >::const_iterator sample_begin, const unsigned ¤t_nsam, const double *rec_map) |
|
std::ostream & | operator<< (std::ostream &s, const chromosome &c) |
| output operator for chromosome types in coalescent simulation Outputs the segments contained by the chromosome
|
|
std::ostream & | operator<< (std::ostream &s, const marginal &m) |
| Write a marginal tree to an ostream.
|
|
std::ostream & | operator<< (std::ostream &o, const newick_stream_marginal_tree &n) |
|
std::istream & | operator>> (std::istream &i, newick_stream_marginal_tree &n) |
|
template<typename uni01_generator > |
void | ConditionalTraj (uni01_generator &uni01, std::vector< double > *traj, const unsigned &N, const double &s, const double &dt, const double &initial_frequency, const double &final_frequency=1.) |
|
template<typename uni01_generator > |
void | ConditionalTraj (const uni01_generator &uni01, std::vector< double > *traj, const unsigned &N, const double &s, const double &dt, const double &initial_frequency, const double &final_frequency=1.) |
|
template<typename uni01_generator > |
void | ConditionalTrajNeutral (uni01_generator &uni01, std::vector< double > *traj, const double &dt, const double &initial_freq=1., const double &final_freq=0.) |
|
template<typename uni01_generator > |
void | ConditionalTrajNeutral (const uni01_generator &uni01, std::vector< double > *traj, const double &dt, const double &initial_freq=1., const double &final_freq=0.) |
|
double | total_time (const marginal::const_iterator beg, const int &nsam) |
| Calculate total time on a marginal tree. More...
|
|
int | pick_branch (marginal::const_iterator beg, const int &nsam, const double &rtime) |
| pick a random branch of a marginal tree More...
|
|
std::vector< int > | get_all_descendants (marginal::const_iterator beg, const int &nsam, const int &branch) |
| Find all the descendants of a branch on a marginal tree. More...
|
|
bool | is_descendant (marginal::const_iterator beg, const int &ind, const int &branch) |
| Ask if a tip of a tree is a descendant of a particular branch. More...
|
|
double | total_time_on_arg (const Sequence::coalsim::arg &sample_history, const int &total_number_of_sites) |
| Returns the total time on an ancestral recombination graph. More...
|
|
void | minimize_arg (arg *sample_history) |
|