run_burnin
run_burnin (key:jax.Array, n_gens:int, n_pop:int, n_chr:int=5, n_loci:int=1000, chr_length:float=1.0, max_crossovers:int=10, founder_pop:Optional[chewc.structs.Population]=None, genetic_map:Optional[chewc.structs.GeneticMap]=None)
*Runs a burn-in simulation to establish Linkage Disequilibrium (LD).
If no founder population is provided, one is created using quick_haplo.
Args: key (jax.Array): Random number generator key. n_gens (int): Number of generations to burn in. n_pop (int): Population size (constant throughout). n_chr (int): Number of chromosomes (used if creating founders). n_loci (int): Number of loci per chromosome (used if creating founders). chr_length (float): Length of chromosomes in Morgans. max_crossovers (int): Max crossovers per chromosome during meiosis. founder_pop (Optional[Population]): Custom starting population. genetic_map (Optional[GeneticMap]): Custom genetic map.
Returns: Tuple containing: - final_state (BreedingState): The simulation state after burn-in. - final_ld (jnp.ndarray): Array of mean r^2 between adjacent markers per chromosome. - genetic_map (GeneticMap): The genetic map used/created.*
calculate_adjacent_ld
calculate_adjacent_ld (population:chewc.structs.Population)
*Calculates the Linkage Disequilibrium (r^2) between adjacent markers across the genome.
Args: population (Population): The population to analyze.
Returns: jnp.ndarray: An array of mean r^2 values per chromosome. Shape: (n_chr,)*