RecurrentSelectionBreedingProgram#
- class pybrops.breed.arch.RecurrentSelectionBreedingProgram.RecurrentSelectionBreedingProgram(initop, pselop, mateop, evalop, sselop, t_max, start_genome=None, start_geno=None, start_pheno=None, start_bval=None, start_gmod=None, **kwargs)[source]#
Bases:
BreedingProgram
Class implementing recurrent selection. This class is very generic and highly modular to facilitate rapid prototyping.
Constructor for the concrete class RecurrentSelectionBreedingProgram.
This class simulates a recurrent selection breeding program.
- Parameters:
initop (InitializationOperator) –
pselop (ParentSelectionOperator) –
mateop (MatingOperator) –
evalop (EvaluationOperator) –
sselop (SurvivorSelectionOperator) –
t_max (int) –
Methods
Advance the breeding program by a specified number of generations.
Evolve the breeding program for a set number of replications and generations.
Initialize the breeding program with genotypes, phenotypes, and genomic models.
Return whether or not the BreedingProgram has been initialized with a starting set of conditions.
Reset the evolution of the breeding program back to starting conditions.
Attributes
Breeding values for individuals in the breeding program.
Evaluation operator.
Genotypes for individuals in the breeding program.
Genomes for individuals in the breeding program.
Genomic models for individuals in the breeding program.
Initialization operator.
Mating operator.
Phenotypes for individuals in the breeding program.
Parent selection operator.
Survivor selection operator.
Starting breeding values for individuals in the breeding program.
Starting genotypes for individuals in the breeding program.
Starting genomes for individuals in the breeding program.
Starting genomic models for individuals in the breeding program.
Starting phenotypes for individuals in the breeding program.
Current time of the BreedingNode.
Maximum time of the BreedingNode.
- advance(ngen, lbook, verbose=False, **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.
- property bval: object#
Breeding values for individuals in the breeding program.
- property evalop: EvaluationOperator#
Evaluation operator.
- evolve(nrep, ngen, lbook, loginit=True, verbose=False, **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, None) – Number of generations to evolve the population for each replicate. If None, use ‘t_max’. Note: if specified this does not modify ‘t_max’ which may affect operators that utilize ‘t_max’.
lbook (Logbook) – Logbook into which to write statistics.
loginit (bool) – Whether to log the initial state before main loop.
verbose (bool) – Whether to print the rep number.
- property geno: object#
Genotypes for individuals in the breeding program.
- property genome: object#
Genomes for individuals in the breeding program.
- property gmod: object#
Genomic models for individuals in the breeding program.
- initialize(**kwargs)[source]#
Initialize the breeding program with genotypes, phenotypes, and genomic models.
- property initop: InitializationOperator#
Initialization operator.
- 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
- property mateop: MatingOperator#
Mating operator.
- property pheno: object#
Phenotypes for individuals in the breeding program.
- property pselop: ParentSelectionOperator#
Parent selection operator.
- reset(**kwargs)[source]#
Reset the evolution of the breeding program back to starting conditions.
- Parameters:
kwargs (dict) – Additional keyword arguments.
- property sselop: SurvivorSelectionOperator#
Survivor selection operator.
- property start_bval: dict | None#
Starting breeding values for individuals in the breeding program.
- property start_geno: dict | None#
Starting genotypes for individuals in the breeding program.
- property start_genome: dict | None#
Starting genomes for individuals in the breeding program.
- property start_gmod: dict | None#
Starting genomic models for individuals in the breeding program.
- property start_pheno: dict | None#
Starting phenotypes for individuals in the breeding program.
- property t_cur: int#
Current time of the BreedingNode.
- property t_max: int#
Maximum time of the BreedingNode.