source

create_ocs_mating_plan

 create_ocs_mating_plan (key:jax.Array, candidate_ids:jax.Array,
                         contributions:jax.Array, n_crosses:int,
                         allow_selfing:bool=False)

Generates a mating list based on optimal contribution scores for unisex populations.


source

cross_pair

 cross_pair (key:jax.Array, mother_geno:jax.Array, father_geno:jax.Array,
             mother_ibd:jax.Array, father_ibd:jax.Array,
             genetic_map:chewc.structs.GeneticMap, max_crossovers:int)
Type Details
key Array
mother_geno Array
father_geno Array (n_chr, 2, n_loci)
mother_ibd Array
father_ibd Array (n_chr, 2, n_loci)
genetic_map GeneticMap
max_crossovers int
Returns Tuple

source

random_mating

 random_mating (key:jax.Array, n_parents:int, n_crosses:int)

Sample (mother, father) pairs with replacement. Works even when n_parents is not a Python literal.