org.biojava.bio.symbol
Class SimpleCodonPref

java.lang.Object
  extended by org.biojava.utils.AbstractChangeable
      extended by org.biojava.bio.symbol.SimpleCodonPref
All Implemented Interfaces:
CodonPref, Changeable

public class SimpleCodonPref
extends AbstractChangeable
implements CodonPref

a simple no-frills implementation of the CodonPref object that encapsulates codon preference data.

Since:
1.3
Author:
David Huen, gwaldon pyrrolysine

Constructor Summary
SimpleCodonPref(String geneticCodeName, Distribution codonPref, String name)
           
 
Method Summary
 Distribution getFrequency()
          returns a Distribution giving the frequency of codons (sums to one over the totality of codons).
 Distribution getFrequencyForSynonyms(Symbol residue)
          returns a Distribution giving the frequency of synonymous codons.
 ManyToOneTranslationTable getGeneticCode()
          the genetic code that this codon preference is based on.
 String getGeneticCodeName()
          get the name of the genetic code
 String getName()
          get name of object
 WobbleDistribution getWobbleDistributionForSynonyms(Symbol residue)
          returns a WobbleDistribution for a specified residue.
 
Methods inherited from class org.biojava.utils.AbstractChangeable
addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleCodonPref

public SimpleCodonPref(String geneticCodeName,
                       Distribution codonPref,
                       String name)
                throws IllegalAlphabetException
Throws:
IllegalAlphabetException
Method Detail

getName

public String getName()
Description copied from interface: CodonPref
get name of object

Specified by:
getName in interface CodonPref

getGeneticCodeName

public String getGeneticCodeName()
Description copied from interface: CodonPref
get the name of the genetic code

Specified by:
getGeneticCodeName in interface CodonPref

getGeneticCode

public ManyToOneTranslationTable getGeneticCode()
Description copied from interface: CodonPref
the genetic code that this codon preference is based on.

Specified by:
getGeneticCode in interface CodonPref

getFrequency

public Distribution getFrequency()
Description copied from interface: CodonPref
returns a Distribution giving the frequency of codons (sums to one over the totality of codons).

Specified by:
getFrequency in interface CodonPref

getFrequencyForSynonyms

public Distribution getFrequencyForSynonyms(Symbol residue)
                                     throws IllegalSymbolException
Description copied from interface: CodonPref
returns a Distribution giving the frequency of synonymous codons. (sums to one over the total number of codons that encode that residue).

Specified by:
getFrequencyForSynonyms in interface CodonPref
Throws:
IllegalSymbolException

getWobbleDistributionForSynonyms

public WobbleDistribution getWobbleDistributionForSynonyms(Symbol residue)
                                                    throws IllegalSymbolException
Description copied from interface: CodonPref
returns a WobbleDistribution for a specified residue.

Specified by:
getWobbleDistributionForSynonyms in interface CodonPref
Throws:
IllegalSymbolException