com.rubecula.darwin.domain.helper
Interface Genomic

All Superinterfaces:
Countable, net.sf.tostring0.Identifiable, Ploidy, Replicator
All Known Implementing Classes:
Genomic_, Genomic_Asexual, Genomic_Diploid, Genomic_Haploid, Genomic_Sexual

public interface Genomic
extends Ploidy, Replicator, Countable, net.sf.tostring0.Identifiable

Defines the genetic information contained in a Taxon. A Genomic may be either haploid (a single strand of genes) or diploid (a double strand), though, theoretically, a Genomic could have any number of genes at a particular locus. This number is the "ploidy" and can be accessed via Ploidy.getPloidy().
A genomic object is essentially a list of Locus instances.
Other properties of genomic include: an implementation of the Meiosis interface.
A note about type names. This type uses the name "Genomic". An alternative would have been "Genomics" (but that's a little ugly) and also, an adjectival form is often what we want when naming an interface (corresponding to a concept). A Genomic object then denotes the general structure, organization, plan, etc. of all the genomes of the individuals of a interbreeding group of organisms (generally known as a species). The Genomic object is what determines the chromosomal structure, for instance.
This type family was formerly known as "Genome..."

Version:
$Revision: 1.12 $
Author:
Robin Hillyard

Field Summary
 
Fields inherited from interface com.rubecula.darwin.domain.helper.Ploidy
DIPLOID, HAPLOID
 
Method Summary
 boolean addChromosome(Chromosome chromosome)
          Method to add a chromosome at the end of this Genomic.
 void addChromosome(int index, Chromosome chromosome)
          Method to add a chromosome at the specified index.
 void express(Phenotype phenotype, Colony colony, Genes genes)
          Method to create a new phenotype from a collection of genes by expressing each and every gene, one at a time, using the appropriate Expresser.
 void express(Phenotype phenotype, Genes genes)
          Method to create a new phenotype from a collection of genes by expressing each and every gene, one at a time, using the appropriate Expresser.
 java.lang.String getAlphabet()
          This returns the base alphabet for the genome.
 Chromosome getChromosome(int index)
           
 java.util.Collection<Chromosome> getChromosomes()
          Getter/setter typically used by reflection.
 Expresser getExpresser(Locus locus)
           
 Locus getLocus(int n)
           
 int getLocusCount()
           
 Meiosis getMeiosis()
           
 Mutator getMutator()
           
 Genome mutate(Genome genome)
          Non-mutating method to mutate this Genome and return a mutated copy.
 void normalize(Genome genome, Genome reference)
          Normalize the given genome with respect to the reference genome.
 Expresser putExpresser(Locus locus, Expresser expresser)
          Method to register an implementer of Expresser for a specific Locus.
 void setChromosomes(java.util.Collection<Chromosome> chromosomes)
          This is the preferred method to set the chromosomes.
 void setExpresser(Expresser expresser)
          Set the common expresser (for all loci).
 boolean simplify(Genome genome)
           
 
Methods inherited from interface com.rubecula.darwin.domain.helper.Ploidy
getPloidy
 
Methods inherited from interface com.rubecula.darwin.domain.helper.Replicator
createGamete
 
Methods inherited from interface com.rubecula.darwin.foundation.Countable
getCount
 
Methods inherited from interface net.sf.tostring0.Identifiable
getIdentifier
 

Method Detail

addChromosome

boolean addChromosome(Chromosome chromosome)
Method to add a chromosome at the end of this Genomic.

Parameters:
chromosome - a chromosome to be inserted into this Genomic.
Returns:
true if the chromosome was added.
See Also:
addChromosome(int, Chromosome)

addChromosome

void addChromosome(int index,
                   Chromosome chromosome)
Method to add a chromosome at the specified index.

Parameters:
index - the index at which the new object will appear.
chromosome - a chromosome to be inserted into this Genomic.
See Also:
List.add(int, java.lang.Object)

express

void express(Phenotype phenotype,
             Colony colony,
             Genes genes)
Method to create a new phenotype from a collection of genes by expressing each and every gene, one at a time, using the appropriate Expresser. This method may be overwritten by implementers of Genomic but that would be unusual. An example of why you might want to overwrite it would be to allow the expression of several genes together or to express more than one trait from any one gene.

Parameters:
phenotype - the phenotype to which the expressions will be added.
colony - the population in which the genes are being expressed (usually this is null but the mechanism is available to allow expression to be influenced by population (or the environment in which the population is found).
genes -

express

void express(Phenotype phenotype,
             Genes genes)
Method to create a new phenotype from a collection of genes by expressing each and every gene, one at a time, using the appropriate Expresser. This method may be overwritten by implementers of Genomic but that would be unusual. An example of why you might want to overwrite it would be to allow the expression of several genes together or to express more than one trait from any one gene. In this signature, the population is not passed. Note, that normally subclasses do not need to implement this method explicitly.

Parameters:
phenotype - the phenotype to which the expressions will be added.
genes -

getAlphabet

java.lang.String getAlphabet()
This returns the base alphabet for the genome. Typically, the value returned is "CGAT".

Returns:
the alphabet in which the bases are expressed.

getChromosome

Chromosome getChromosome(int index)
Parameters:
index -
Returns:
the chromosome defined by index (0..N). Note that sex chromosomes are never counted in the index. Thus the first non-sex chromosome in the genomic is at index 0, etc.

getChromosomes

java.util.Collection<Chromosome> getChromosomes()
Getter/setter typically used by reflection.

Returns:
the chromosomes as a collection of Chromosome objects.

getExpresser

Expresser getExpresser(Locus locus)
Parameters:
locus - the locus (or null) for which we want the expresser
Returns:
the specific expresser for the given locus else, if no locus given, the common expresser for all loci.

getLocus

Locus getLocus(int n)
Parameters:
n - which must be greater than or equal to 0 and less than getLocusCount().
Returns:
the nth locus, by counting through each chromosome.

getLocusCount

int getLocusCount()
Returns:
the total number of loci, over all chromosomes.

getMeiosis

Meiosis getMeiosis()
Returns:
the application-specified implementer of Meiosis

getMutator

Mutator getMutator()
Returns:
the mutator

mutate

Genome mutate(Genome genome)
Non-mutating method to mutate this Genome and return a mutated copy.

Parameters:
genome -
Returns:
either this Genome or a mutated copy.

normalize

void normalize(Genome genome,
               Genome reference)
Normalize the given genome with respect to the reference genome. For example, if genome and reference are identical to start with, genome will be modified such that it is now empty. This is particularly useful in asexual systems.

Parameters:
genome -
reference -

putExpresser

Expresser putExpresser(Locus locus,
                       Expresser expresser)
Method to register an implementer of Expresser for a specific Locus.

Parameters:
locus -
expresser -
Returns:
the previous version of expresser, if any.

setChromosomes

void setChromosomes(java.util.Collection<Chromosome> chromosomes)
This is the preferred method to set the chromosomes. Any prior chromosomes will be discarded. Getter/setter typically used by reflection.

Parameters:
chromosomes -

setExpresser

void setExpresser(Expresser expresser)
Set the common expresser (for all loci). Note that the expresser map is used in preference to this expresser.

Parameters:
expresser -

simplify

boolean simplify(Genome genome)
Parameters:
genome - the genome to be simplified TODO consider narrowing genome to Genotype.
Returns:
true if the genome has changed as a result of simplification.


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