oscar_colony.optimise.estimate_offspring.estimate_n_offspring_per_mating#

oscar_colony.optimise.estimate_offspring.estimate_n_offspring_per_mating(line_stats, default_litter_size, min_n_matings=3, min_n_offspring=10)[source]#

For all possible breeding schemes for the given line, estimate the number of offspring produced per mating.

Calculates the total number across all genotypes == the litter size. As well as the expected number per offspring genotype.

Parameters:
  • line_stats (LineStatistics) – Statistics from historical data for the line

  • default_litter_size (int) – The default value used for average litter size if there isn’t enough historical data for the line. This should usually be set to the average litter size across all available data for all lines.

  • min_n_matings (int) – Minimum number of successful matings required to use the measured litter size from line_stats. If there aren’t enough matings for a specific breeding scheme, the average of the whole line will be used instead. If the whole line also doesn’t have enough matings, then default_litter_size is used.

  • min_n_offspring (int) – Minimum number of offspring required from a breeding scheme to use the measured proportion of each genotype from line_stats. If not met, the theoretical mendelian ratio will be used instead.

Returns:

Returns a dict mapping each breeding scheme to the expected number of offspring it will produce per mating.

Return type:

dict[BreedingScheme, ExpectedOffspring]