Package org.biojava.bio.symbol
Class SimpleCodonPref
- java.lang.Object
-
- org.biojava.utils.AbstractChangeable
-
- 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
Constructors Constructor Description SimpleCodonPref(String geneticCodeName, Distribution codonPref, String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 codeString
getName()
get name of objectWobbleDistribution
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
-
-
-
-
Constructor Detail
-
SimpleCodonPref
public SimpleCodonPref(String geneticCodeName, Distribution codonPref, String name) throws IllegalAlphabetException
- Throws:
IllegalAlphabetException
-
-
Method Detail
-
getGeneticCodeName
public String getGeneticCodeName()
Description copied from interface:CodonPref
get the name of the genetic code- Specified by:
getGeneticCodeName
in interfaceCodonPref
-
getGeneticCode
public ManyToOneTranslationTable getGeneticCode()
Description copied from interface:CodonPref
the genetic code that this codon preference is based on.- Specified by:
getGeneticCode
in interfaceCodonPref
-
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 interfaceCodonPref
-
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 interfaceCodonPref
- 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 interfaceCodonPref
- Throws:
IllegalSymbolException
-
-