Parallel PopGen Package
|
control and output data structure for GO_Fish simulation More...
#include <go_fish_data_struct.h>
Classes | |
struct | sim_constants |
specification of simulation constants More... | |
Public Member Functions | |
allele_trajectories () | |
default constructor More... | |
allele_trajectories (const allele_trajectories &in) | |
copy constructor More... | |
allele_trajectories & | operator= (allele_trajectories in) |
copy assignment More... | |
sim_constants | last_run_constants () |
returns sim_constants of the simulation currently held by allele_trajectories More... | |
int | num_sites () |
returns the number of sites in the simulation More... | |
int | num_populations () |
returns the number of populations in the simulation More... | |
int | num_time_samples () |
returns number of time samples taken during simulation run More... | |
int | maximal_num_mutations () |
returns number of reported mutations in the final time sample (maximal number of stored mutations in the allele_trajectories) More... | |
int | num_mutations_time_sample (int sample_index) |
number of reported mutations in the time sample sample_index More... | |
int | final_generation () |
returns final generation of simulation More... | |
int | sampled_generation (int sample_index) |
return generation of simulation in the time sample sample_index More... | |
bool | extinct (int sample_index, int population_index) |
returns whether or not population population_index is extinct in time sample sample_index More... | |
int | effective_number_of_chromosomes (int sample_index, int population_index) |
returns the effective number of chromosomes of population population_index in time sample sample_index More... | |
float | frequency (int sample_index, int population_index, int mutation_index) |
returns the frequency of the mutation at time sample sample_index , population population_index , mutation mutation_index More... | |
mutID | mutation_ID (int mutation_index) |
returns the mutation ID at mutation_index More... | |
void | delete_time_sample (int sample_index) |
deletes a single time sample, sample_index More... | |
void | reset () |
deletes all memory held by allele_trajectories, resets constants to default More... | |
~allele_trajectories () | |
destructor More... | |
Public Attributes | |
sim_constants | sim_input_constants |
constants for initializing the next simulation More... | |
control and output data structure for GO_Fish simulation
Stores the constants, mutation IDs (mutID), and time samples of a simulation run. Each time sample holds the frequencies of each mutation at the time the sample was taken, the size of each population in chromosomes and which population were extinct for a time sample, the number of mutations in the sample, and of which simulation generation is the sample. Data is accessed through the member functions.
Definition at line 54 of file go_fish_data_struct.h.
|
inline |
default constructor
Definition at line 42 of file inline_go_fish_data_struct.hpp.
|
inline |
copy constructor
Definition at line 44 of file inline_go_fish_data_struct.hpp.
|
inline |
|
inline |
copy assignment
Definition at line 78 of file inline_go_fish_data_struct.hpp.
|
inline |
returns sim_constants of the simulation currently held by allele_trajectories
Definition at line 83 of file inline_go_fish_data_struct.hpp.
|
inline |
returns the number of sites in the simulation
Definition at line 85 of file inline_go_fish_data_struct.hpp.
|
inline |
returns the number of populations in the simulation
maximum population_index
Definition at line 87 of file inline_go_fish_data_struct.hpp.
|
inline |
returns number of time samples taken during simulation run
maximum sample_index
Definition at line 89 of file inline_go_fish_data_struct.hpp.
|
inline |
returns number of reported mutations in the final time sample (maximal number of stored mutations in the allele_trajectories)
maximum mutation_index
Definition at line 91 of file inline_go_fish_data_struct.hpp.
|
inline |
number of reported mutations in the time sample sample_index
Definition at line 93 of file inline_go_fish_data_struct.hpp.
|
inline |
returns final generation of simulation
Definition at line 99 of file inline_go_fish_data_struct.hpp.
|
inline |
return generation of simulation in the time sample sample_index
Definition at line 101 of file inline_go_fish_data_struct.hpp.
|
inline |
returns whether or not population population_index
is extinct in time sample sample_index
Definition at line 107 of file inline_go_fish_data_struct.hpp.
|
inline |
returns the effective number of chromosomes of population population_index
in time sample sample_index
Definition at line 114 of file inline_go_fish_data_struct.hpp.
|
inline |
returns the frequency of the mutation at time sample sample_index
, population population_index
, mutation mutation_index
if the mutation_index
is of a mutation that is in the simulation, but which had not arisen as of /p sample_index, the reported frequency will be 0
Definition at line 122 of file inline_go_fish_data_struct.hpp.
|
inline |
returns the mutation ID at mutation_index
Definition at line 138 of file inline_go_fish_data_struct.hpp.
|
inline |
deletes a single time sample, sample_index
Useful for when the allele_trajectories object is still in scope, but memory needs to be free and the data held in a particular time sample of the object is no longer needed. If the final time sample is deleted, but there are still previous time samples remaining, then function does not delete any of the memory held by mutations_ID, but does move the apparent length of the array, maximal_num_mutations(), to the number of mutations in the next last time sample. If deleting the last time sample left in allele trajectories, will call reset().
Definition at line 152 of file inline_go_fish_data_struct.hpp.
|
inline |
deletes all memory held by allele_trajectories, resets constants to default
Useful for when the allele_trajectories object is still in scope, but memory needs to be free and the data held by the object is no longer needed.
Definition at line 174 of file inline_go_fish_data_struct.hpp.
sim_constants GO_Fish::allele_trajectories::sim_input_constants |
constants for initializing the next simulation
Definition at line 72 of file go_fish_data_struct.h.