genomicSimulationC 0.2.6
|
For simulation of meiosis. More...
Functions | |
void | gsc_generate_gamete (gsc_SimData *d, const char *parent_genome, char *output, const unsigned int mapindex) |
Fills a char* with the simulated result of meiosis (reduction and recombination) from the marker alleles of a given parent. More... | |
void | gsc_generate_doubled_haploid (gsc_SimData *d, const char *parent_genome, char *output, const unsigned int mapindex) |
Get the alleles of the outcome of producing a doubled haploid from a gamete from a given parent. More... | |
void | gsc_generate_clone (gsc_SimData *d, const char *parent_genome, char *output) |
Get an identical copy of a given genotype. More... | |
For simulation of meiosis.
void gsc_generate_clone | ( | gsc_SimData * | d, |
const char * | parent_genome, | ||
char * | output | ||
) |
Get an identical copy of a given genotype.
Has short name: generate_clone
d | pointer to the gsc_SimData object that includes genetic map data needed to simulate meiosis and the value of n_markers |
parent_genome | a 2x(n_markers) array of characters containing the alleles of the first parent |
output | a 2x(n_marker) array of chars which will be overwritten with the offspring genome. |
Definition at line 7661 of file sim-operations.c.
void gsc_generate_doubled_haploid | ( | gsc_SimData * | d, |
const char * | parent_genome, | ||
char * | output, | ||
const unsigned int | map_index | ||
) |
Get the alleles of the outcome of producing a doubled haploid from a gamete from a given parent.
One gamete is generated, then doubled. The output will be perfectly homozygous.
Has short name: generate_doubled_haploid
d | pointer to the gsc_SimData object that includes genetic map data needed to simulate meiosis and the value of n_markers |
parent_genome | a 2x(n_markers) array of characters containing the alleles of the first parent |
output | a 2x(n_marker) array of chars which will be overwritten with the offspring genome. |
map_index | index of the recombination map in d that should be used to choose positions and probabilities of recombination. |
Definition at line 7563 of file sim-operations.c.
void gsc_generate_gamete | ( | gsc_SimData * | d, |
const char * | parent_genome, | ||
char * | output, | ||
const unsigned int | map_index | ||
) |
Fills a char* with the simulated result of meiosis (reduction and recombination) from the marker alleles of a given parent.
It generates the number of crossover events in each chromosome by drawing from a Poisson distribution with a certain expected number of crossovers, where the expected number of crossovers is saved in the chosen recombination map.
It generates the positions of those crossover events from a uniform distribution.
It picks a random one of the gametes generated by picking randomly which column of the parent's alleles to start with. When crossover events occur it starts reading the other column.
Has short name: generate_gamete
d | pointer to the gsc_SimData object containing map positions for the markers that make up the rows of parent_table . sort_markers() and locate_chromosomes() should have been called previously. |
parent_genome | the char* containing the parent's genome as a character string made up of sequential pairs of alleles for each marker in d->markers. |
output | the char* to which to save the gamete. It saves the alleles every second character, starting at 0, so that calling gsc_generate_gamete(..., offspring_genome) & gsc_generate_gamete(..., offspring_genome + 1) can be used to generate both halves of its genome. |
map_index | index of the recombination map in d that should be used to choose positions and probabilities of recombination. |
Definition at line 7464 of file sim-operations.c.