com.rubecula.darwin.domain.helper
Interface Genome

All Superinterfaces:
Basic, CacheSignature, Censusible, java.util.Collection<Gene>, Genes, Genotype, net.sf.tostring0.Identifiable, java.lang.Iterable<Gene>, net.sf.tostring0.IToString, java.util.List<Gene>, Ploidy
All Known Implementing Classes:
Genome_, Genome_Linear

public interface Genome
extends Genotype

Defines the genetic information contained in an Organism belonging to a Taxon. A Genome may contain any number of instances of Gene , though in practice the number is determined by the Genomic which defines this Genome. The structure of Genome is approximately parallel to that of Genomic.

TODO consider restructuring a Genome such that is contains one or two Genotypes (according to the Ploidy) and that each Genotype is a (haploid) collection of Genes with a single allele each. This would clarify the concept of a Genotype. It would also mean a lot of work.

Author:
Robin Hillyard

Field Summary
 
Fields inherited from interface net.sf.tostring0.IToString
ANGBR_OPEN, ANGBRA_CLSE, BRA_CLSE, BRA_OPEN, BRCE_OPEN, BRCS_CLSE, COLON, LIST_SEPARATOR, MAX_ELEMENTS_DEFAULT, S_MT, S_PERCENT, SEPARATOR, SPACE
 
Fields inherited from interface com.rubecula.darwin.domain.helper.Ploidy
DIPLOID, HAPLOID
 
Method Summary
 void environmentChanged(Visualizable colony)
          Flush the cached phenotype for this genome/colony combination.
 Phenotype express(Colony colony)
          Express the genes of this Genome in the context of population and return the result as a Phenotype.
 Genome fertilize(Genes other)
          Method to fuse this haploid genome with other genome into a new diploid genome.
 Gene getGene(java.lang.String id)
           
 Genomic getGenomic()
           
 boolean getSex()
           
 Genes invert()
           
 Genome mutate(Mutator mutator)
          Method to mutate a Genome using a particular mutator.
 
Methods inherited from interface com.rubecula.darwin.domain.helper.Genotype
addGene, addGene, addGenes, doCensus
 
Methods inherited from interface net.sf.tostring0.IToString
toString, toStringBrief, toStringId
 
Methods inherited from interface com.rubecula.darwin.domain.helper.Ploidy
getPloidy
 
Methods inherited from interface com.rubecula.darwin.domain.helper.Genes
getGene
 
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
 
Methods inherited from interface com.rubecula.darwin.domain.helper.Basic
getBases
 
Methods inherited from interface com.rubecula.darwin.domain.helper.CacheSignature
getSignature
 
Methods inherited from interface com.rubecula.darwin.domain.helper.Censusible
censusMe, getCensusibleChildren
 
Methods inherited from interface net.sf.tostring0.Identifiable
getIdentifier
 

Method Detail

environmentChanged

void environmentChanged(Visualizable colony)
Flush the cached phenotype for this genome/colony combination. This must be called for any significant population change in the colony, or change to the colony's environment. A significant change is one that would result in a different phenotype being returned. TODO consider implementing VisualizableListener instead, but the semantics are slightly different in that we want to note changes to populations and/or environments.

Parameters:
colony -

express

Phenotype express(Colony colony)
Express the genes of this Genome in the context of population and return the result as a Phenotype.

Parameters:
colony - the population this genome belongs to, often ignored.
Returns:
a Phenotype corresponding to the expressed genes of this Genome, in the context of population.

fertilize

Genome fertilize(Genes other)
Method to fuse this haploid genome with other genome into a new diploid genome. In theory, at least, there is no implied ordering of the two gametes. The resulting genome should express as a phenotype regardless of the ordering of the arguments x and y. At meiosis, the ordering of the parents x, y is semi-significant - but the effect should be masked by the seeding of the random number generator for a mating. This and the other gamete must conform to the same Genomic, otherwise, no fertilization can take place. TODO in theory, we could allow this and two other Genes parameters to combine into a triploid result.

Parameters:
other - the gamete to be fused with this gamete
Returns:
the resulting genome.

getGene

Gene getGene(java.lang.String id)
Parameters:
id -
Returns:
the Gene whose locus has the identifier id

getGenomic

Genomic getGenomic()
Returns:
the genomic to which this genome conforms.

getSex

boolean getSex()
               throws GeneticsException
Returns:
the sex of this genome.
Throws:
GeneticsException

invert

Genes invert()
Returns:
a set of genes which is complementary to this genome.

mutate

Genome mutate(Mutator mutator)
Method to mutate a Genome using a particular mutator. Implementers of this method should normally return a copy of this Genome, rather than simply a reference (although if the mutator is the identity mutator, it is acceptable to return a reference to the original).

Parameters:
mutator - the mutator
Returns:
possibly mutated copy of this (or possibly a reference to the unmutated original).


Copyright © 2010 Rubecula Software, LLC. All Rights Reserved.