source

produce_offspring

 produce_offspring (key:<function PRNGKey>, state:chewc.state.SimState,
                    sp:chewc.structs.SimParam,
                    config:chewc.config.SimConfig,
                    mother_indices:jax.Array, father_indices:jax.Array)

*Top-level kernel to produce a cohort of offspring from selected parents.

This function is designed to be the main entry point for meiosis in your simulation step. It is JIT-compatible and vmapped across crosses.*

Type Details
key PRNGKey
state SimState
sp SimParam
config SimConfig
mother_indices Array (n_crosses,)
father_indices Array (n_crosses,)
Returns Tuple

source

meiosis_for_one_cross

 meiosis_for_one_cross (key:<function PRNGKey>, mother_geno:jax.Array,
                        father_geno:jax.Array, mother_ibd:jax.Array,
                        father_ibd:jax.Array, n_chr:int,
                        gen_map:jax.Array, v_interference:float,
                        max_crossovers:int)

Creates a single diploid progeny’s geno and IBD from two parents. This function is vmapped across chromosomes for parallel execution.

Type Details
key PRNGKey
mother_geno Array Shape: (n_chr, ploidy, n_loci)
father_geno Array Shape: (n_chr, ploidy, n_loci)
mother_ibd Array
father_ibd Array
n_chr int
gen_map Array Shape: (n_chr, n_loci)
v_interference float
max_crossovers int
Returns Tuple