BreedingProgram#

class pybrops.breed.arch.BreedingProgram.BreedingProgram(**kwargs)[source]#

Bases: BreedingNode

Abstract class defining a breeding program.

The purpose of this abstract class is to define functionality for:
  1. Container storage for the breeding program.

  2. Contain breeding operators used in the breeding program.

  3. Initialization routines for the breeding program.

  4. Advancement of simulations for the breeding program.

Constructor for the abstract class BreedingProgram.

Parameters:

kwargs (dict) – Additional keyword arguments.

Methods

advance

Advance the breeding program by a specified number of generations.

evolve

Evolve the breeding program for a set number of replications and generations.

initialize

Initialize the breeding program with genotypes, phenotypes, and genomic models.

is_initialized

Return whether or not the BreedingProgram has been initialized with a starting set of conditions.

reset

Reset the evolution of the breeding program back to starting conditions.

Attributes

bval

Breeding values for individuals in the breeding program.

evalop

Evaluation operator.

geno

Genotypes for individuals in the breeding program.

genome

Genomes for individuals in the breeding program.

gmod

Genomic models for individuals in the breeding program.

initop

Initialization operator.

mateop

Mating operator.

pheno

Phenotypes for individuals in the breeding program.

pselop

Parent selection operator.

sselop

Survivor selection operator.

start_bval

Starting breeding values for individuals in the breeding program.

start_geno

Starting genotypes for individuals in the breeding program.

start_genome

Starting genomes for individuals in the breeding program.

start_gmod

Starting genomic models for individuals in the breeding program.

start_pheno

Starting phenotypes for individuals in the breeding program.

t_cur

Current time of the BreedingNode.

t_max

Maximum time of the BreedingNode.

abstract advance(ngen, lbook, **kwargs)[source]#

Advance the breeding program by a specified number of generations.

Parameters:
  • ngen (int) – Number of generations to advance the BreedingProgram.

  • lbook (Logbook) – Logbook into which to write statistics.

  • kwargs (dict) – Additional keyword arguments.

Return type:

None

abstract property bval: object#

Breeding values for individuals in the breeding program.

abstract property evalop: object#

Evaluation operator.

abstract evolve(nrep, ngen, lbook, **kwargs)[source]#

Evolve the breeding program for a set number of replications and generations. The BreedingProgram is restarted using the starting geno, bval, gmod containers.

Parameters:
  • nrep (int) – Number of evolution replicates.

  • ngen (int) – Number of generations to evolve the population for each replicate. Note that this does not modify ‘t_max’.

  • lbook (Logbook) – Logbook into which to write statistics.

  • kwargs (dict) – Additional keyword arguments.

Return type:

None

abstract property geno: object#

Genotypes for individuals in the breeding program.

abstract property genome: object#

Genomes for individuals in the breeding program.

abstract property gmod: object#

Genomic models for individuals in the breeding program.

abstract initialize(**kwargs)[source]#

Initialize the breeding program with genotypes, phenotypes, and genomic models.

Parameters:

kwargs (dict) – Additional keyword arguments.

Return type:

None

abstract property initop: object#

Initialization operator.

abstract is_initialized(**kwargs)[source]#

Return whether or not the BreedingProgram has been initialized with a starting set of conditions.

Parameters:

kwargs (dict) – Additional keyword arguments.

Returns:

out – True if the BreedingProgram has been initialized. False if the BreedingProgram has not been initialized.

Return type:

boolean

abstract property mateop: object#

Mating operator.

abstract property pheno: object#

Phenotypes for individuals in the breeding program.

abstract property pselop: object#

Parent selection operator.

abstract reset(**kwargs)[source]#

Reset the evolution of the breeding program back to starting conditions.

Parameters:

kwargs (dict) – Additional keyword arguments.

Return type:

None

abstract property sselop: object#

Survivor selection operator.

abstract property start_bval: object#

Starting breeding values for individuals in the breeding program.

abstract property start_geno: object#

Starting genotypes for individuals in the breeding program.

abstract property start_genome: object#

Starting genomes for individuals in the breeding program.

abstract property start_gmod: object#

Starting genomic models for individuals in the breeding program.

abstract property start_pheno: object#

Starting phenotypes for individuals in the breeding program.

abstract property t_cur: int#

Current time of the BreedingNode.

abstract property t_max: int#

Maximum time of the BreedingNode.