Parallel PopGen Package
Simulation Models: Inbreeding, Mutation, and Dominance Group

Functions that model inbreeding coefficients (F), per-site mutation rates (mu), and dominance coefficients (h) across populations and over time. More...

Classes

struct  Sim_Model::F_mu_h_constant
 functor: models parameter p as a constant across populations and over time More...
 
struct  Sim_Model::F_mu_h_sine_wave
 functor: models parameter as a sine wave through time More...
 
struct  Sim_Model::F_mu_h_population_specific< Functor_p, Functor_p_pop >
 functor: one population, pop, has a different, parameter function, p_pop, all others have function p More...
 
struct  Sim_Model::F_mu_h_piecewise< Functor_p1, Functor_p2 >
 functor: parameter function changes from p1 to p2 at generation inflection_point More...
 

Detailed Description

Functions that model inbreeding coefficients (F), per-site mutation rates (mu), and dominance coefficients (h) across populations and over time.

Inbreeding coefficients, F, must be between [0,1]:

(F = 0) := diploid, outbred; (F = 1) := haploid, inbred

Per-site mutation rate, mu, must be > 0.

Dominance coefficients, h, can be any real number:

(h < 0) := underdominance; (h > 1) := overdominance; (h = 0) := recessive; (h = 1) := dominant; (0 < h < 1) := co-dominant


Writing your own Inbreeding, Mutation, and Dominance functions

These can be functions or functors (or soon, with C++11 support, lambdas). However, the parameter function must be of the form:

float your_function(int population, int generation){ ... return parameter; }

This returns the parameter in population population at generation generation. Adding a __host__ flag is optional, but if done, the function must be defined in CUDA source file (*.cu) or declared/defined header file (*.h, *.hpp, *.cuh, etc...) which is included in a CUDA source file. If no flag added, function can be defined in a regular C/C++ source file (e.g. *.c, *.cpp). Note: run_sim is required to be in a CUDA source file to be compiled.