com.rubecula.darwin.domain.helper
Interface Gene

All Superinterfaces:
Basic, CacheSignature, Censusible, net.sf.tostring0.IToString, Ploidy
All Known Implementing Classes:
Gene_, Gene_Diploid, Gene_Haploid

public interface Gene
extends net.sf.tostring0.IToString, Ploidy, Basic, Censusible

Defines the operations and properties of a Gene. A Gene is an object which is found at the locus of a genome. In a diploid system there will be two "genes" at any given locus. In most (haploid) systems there is one. A gene can take as its "value" an Allele which is valid at the given Locus.

Care must be taken to distinguish between a Gene and a Locus. In this framework, Gene is used to model the actual alleles that are present in the Genome of a particular Organism. Locus, on the other hand, is used to model the set of possible alleles that can appear at a locus of a Genomic.

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
 Allele getAllele(int index)
          Accessor method to return the indexth allele for this gene.
 int getAlleleCount()
           
 java.lang.String getAlleleKey(int index)
          Accessor method to return the key to the indexth allele for this gene.
 Locus getLocus()
           
 Gene mutate(Mutator mutator)
          Method to get a mutated copy of a Gene.
 void setAllele(int index, java.lang.String allele)
          Mutator method to set the indexth allele for this gene.
 void setLocus(Locus locus)
          Set the locus for this gene.
 
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.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
 

Method Detail

getAllele

Allele getAllele(int index)
Accessor method to return the indexth allele for this gene.

Parameters:
index - which allele to get.
Returns:
the value of the allele at that index.

getAlleleCount

int getAlleleCount()
Returns:
the number of alleles for the locus of this gene

getAlleleKey

java.lang.String getAlleleKey(int index)
Accessor method to return the key to the indexth allele for this gene.

Parameters:
index - which allele to get.
Returns:
key of the allele within the locus, at that index.

getLocus

Locus getLocus()
Returns:
the locus at which this gene appears

mutate

Gene mutate(Mutator mutator)
Method to get a mutated copy of a Gene.

Parameters:
mutator -
Returns:
a mutated copy (which may be identical if no mutations have occurred)

setAllele

void setAllele(int index,
               java.lang.String allele)
Mutator method to set the indexth allele for this gene.

Parameters:
index - which allele is to be set.
allele - the value of the allele to set.

setLocus

void setLocus(Locus locus)
Set the locus for this gene.

Parameters:
locus -


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