001/*
002 *                    BioJava development code
003 *
004 * This code may be freely distributed and modified under the
005 * terms of the GNU Lesser General Public Licence.  This should
006 * be distributed with the code.  If you do not have a copy,
007 * see:
008 *
009 *      http://www.gnu.org/copyleft/lesser.html
010 *
011 * Copyright for this code is held jointly by the individual
012 * authors.  These should be listed in @author doc comments.
013 *
014 * For more information on the BioJava project and its aims,
015 * or to join the biojava-l mailing list, visit the home page
016 * at:
017 *
018 *      http://www.biojava.org/
019 *
020 */
021
022package org.biojava.bio.symbol;
023
024import org.biojava.bio.dist.Distribution;
025
026public interface CodonPref
027{
028    /**
029     * Distributions on codon preferences can be based on
030     * i) codon frequency over all codons
031     * ii) per residue: codon fraction over all codons (returns a Distribution)
032     * iii) per residue: codon fraction per dinucleotide + wobble distribution (returns a WobbleDistribution)
033     */
034
035    /**
036     * get name of object
037     */
038    public String getName();
039
040    /**
041     * get the name of the genetic code
042     */
043    public String getGeneticCodeName();
044
045    /**
046     * the genetic code that this codon
047     * preference is based on.
048     */
049    public ManyToOneTranslationTable getGeneticCode();
050
051    /**
052     * returns a Distribution giving the 
053     * frequency of codons (sums to one over the 
054     * totality of codons).
055     */
056    public Distribution getFrequency();
057
058    /**
059     * returns a Distribution giving the
060     * frequency of synonymous codons.
061     * (sums to one over the total number
062     * of codons that encode that residue).
063     */
064    public Distribution getFrequencyForSynonyms(Symbol residue) 
065        throws IllegalSymbolException;
066
067    /**
068     * returns a WobbleDistribution for
069     * a specified residue.
070     */
071    public WobbleDistribution getWobbleDistributionForSynonyms(Symbol residue) 
072        throws IllegalSymbolException;
073}
074