biopython v1.71.0 Bio.GA.Organism.Organism
Represent a single individual in a population.
Attributes:
- genome — The genome of the organism. This is a Bio.MutableSeq object that has the sequence of the genome, and the alphabet describing all elements that can be a part of the genome.
- fitness — The calculate fitness of the organism. This fitness is based on the last time it was calculated using the fitness_calculator. So… the fitness could potentially be out of date with the real genome if you are not careful to recalculate it after changes with recalculate_fitness()
Link to this section Summary
Functions
Compare organisms by their genomes (as strings of letters)
Compare organisms by their genomes (as strings of letters)
Compare organisms by their genomes (as strings of letters)
Initialize an organism
Compare organisms by their genomes (as strings of letters)
Compare organisms by their genomes (as strings of letters)
Compare organisms by their genomes (as strings of letters)
Provide a string output for debugging
Return a copy of the organism
Calculate and reset the fitness of the current genome
Link to this section Functions
Compare organisms by their genomes (as strings of letters).
Compare organisms by their genomes (as strings of letters).
Compare organisms by their genomes (as strings of letters).
Initialize an organism.
Arguments:
- genome — A MutableSeq object representing the sequence of the genome.
- fitness_calculator — A function that will calculate the fitness of the organism when given the organisms genome.
- start_fitness - the starting fitness corresponding with the given genome. If not supplied, the fitness will be calculated using fitness_calculator.
Compare organisms by their genomes (as strings of letters).
Compare organisms by their genomes (as strings of letters).
Compare organisms by their genomes (as strings of letters).
Provide a string output for debugging.
Return a copy of the organism.
This makes it easy to duplicate an organism before changing it.
Calculate and reset the fitness of the current genome.
This should be called after the genome is updated to ensure that fitness always stays in sync with the current genome.