Class IUPACParser.IUPACTable
- java.lang.Object
-
- org.biojava.nbio.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.biojava.nbio.core.sequence.transcription.Table
Table.CaseInsensitiveTriplet, Table.Codon
-
-
Constructor Summary
Constructors Constructor Description IUPACTable(String name, int id, String aminoAcidString, String startCodons, String baseOne, String baseTwo, String baseThree)
IUPACTable(String name, Integer id, String aminoAcidString, String startCodons)
Constructor which uses the basic IUPAC codon table format.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompoundSet<Table.Codon>
getCodonCompoundSet(CompoundSet<NucleotideCompound> rnaCompounds, CompoundSet<AminoAcidCompound> aminoAcidCompounds)
Returns the compound set of codonsList<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.
-
-
-
Constructor Detail
-
IUPACTable
public IUPACTable(String name, int id, String aminoAcidString, String startCodons, String baseOne, String baseTwo, String baseThree)
-
IUPACTable
public 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
-
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 interfaceTable
- Throws:
IllegalStateException
- Thrown ifgetCodons(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.
-
getCodonCompoundSet
public CompoundSet<Table.Codon> getCodonCompoundSet(CompoundSet<NucleotideCompound> rnaCompounds, CompoundSet<AminoAcidCompound> aminoAcidCompounds)
Returns the compound set of codons- Specified by:
getCodonCompoundSet
in interfaceTable
-
-