org.biojava3.core.sequence.io
Class IUPACParser.IUPACTable

java.lang.Object
  extended by org.biojava3.core.sequence.io.IUPACParser.IUPACTable
All Implemented Interfaces:
Table
Enclosing class:
IUPACParser

public static class IUPACParser.IUPACTable
extends Object
implements Table

Holds the concept of a codon table from the IUPAC format

Author:
Andy Yates

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.biojava3.core.sequence.transcription.Table
Table.CaseInsensitiveTriplet, Table.Codon
 
Constructor Summary
IUPACParser.IUPACTable(String name, Integer id, String aminoAcidString, String startCodons)
          Constructor which uses the basic IUPAC codon table format.
IUPACParser.IUPACTable(String name, int id, String aminoAcidString, String startCodons, String baseOne, String baseTwo, String baseThree)
           
 
Method Summary
 CompoundSet<Table.Codon> getCodonCompoundSet(CompoundSet<NucleotideCompound> rnaCompounds, CompoundSet<AminoAcidCompound> aminoAcidCompounds)
          Returns the compound set of codons
 List<Table.Codon> getCodons(CompoundSet<NucleotideCompound> nucelotides, CompoundSet<AminoAcidCompound> aminoAcids)
          Returns a list of codons where the source and target compounds are the same as those given by the parameters.
 Integer getId()
           
 String getName()
           
 boolean isStart(AminoAcidCompound compound)
          Returns true if the given compound was a start codon in this codon table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IUPACParser.IUPACTable

public IUPACParser.IUPACTable(String name,
                              int id,
                              String aminoAcidString,
                              String startCodons,
                              String baseOne,
                              String baseTwo,
                              String baseThree)

IUPACParser.IUPACTable

public IUPACParser.IUPACTable(String name,
                              Integer id,
                              String aminoAcidString,
                              String startCodons)
Constructor which uses the basic IUPAC codon table format. Useful if you need to specify your own IUPAC table with minimal definitions from your side.

Method Detail

getId

public Integer getId()

getName

public String getName()

isStart

public boolean isStart(AminoAcidCompound compound)
                throws IllegalStateException
Returns true if the given compound was a start codon in this codon table. This will report true if the compound could ever have been a start codon.

Specified by:
isStart in interface Table
Throws:
IllegalStateException - Thrown if getCodons(CompoundSet, CompoundSet) was not called first.

getCodons

public List<Table.Codon> getCodons(CompoundSet<NucleotideCompound> nucelotides,
                                   CompoundSet<AminoAcidCompound> aminoAcids)
Returns a list of codons where the source and target compounds are the same as those given by the parameters.

Specified by:
getCodons in interface Table
Parameters:
nucleotides - The nucleotide set to use when building BioJava representations of codons
aminoAcids - The target amino acid compounds objects

getCodonCompoundSet

public CompoundSet<Table.Codon> getCodonCompoundSet(CompoundSet<NucleotideCompound> rnaCompounds,
                                                    CompoundSet<AminoAcidCompound> aminoAcidCompounds)
Returns the compound set of codons

Specified by:
getCodonCompoundSet in interface Table