org.biojava3.core.sequence.io
Class IUPACParser

java.lang.Object
  extended by org.biojava3.core.sequence.io.IUPACParser

public class IUPACParser
extends Object

Available translations

Taken from NCBI with slight modification and put into the classpath resource. Takes in an ID, name, amino acid string and the locations of amino acids which acts as start codons in the translation table. You can give the 3 codon position strings that correspond to the amino acid string or if you are using the default IUPAC codes you can use the hardcoded ones which are consistent amongst all codon tables. The generated IUPACParser.IUPACTable objects do not parse the data further until requested so if you do not use a translation table your only penalty is the loading of the IUPAC data from the classpath.

Author:
Andy Yates

Nested Class Summary
static class IUPACParser.IUPACTable
          Holds the concept of a codon table from the IUPAC format
 
Field Summary
static String IUPAC_LOCATION
           
 
Constructor Summary
IUPACParser()
          Default version and uses the classpath based IUPAC table
IUPACParser(InputStream is)
          Allows you to specify a different IUPAC table.
 
Method Summary
static IUPACParser getInstance()
           
 IUPACParser.IUPACTable getTable(Integer id)
          Returns a table by its identifier i.e.
 IUPACParser.IUPACTable getTable(String name)
          Returns a table by its name
 List<IUPACParser.IUPACTable> getTables()
          Returns a list of all available IUPAC tables
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IUPAC_LOCATION

public static final String IUPAC_LOCATION
See Also:
Constant Field Values
Constructor Detail

IUPACParser

public IUPACParser()
Default version and uses the classpath based IUPAC table


IUPACParser

public IUPACParser(InputStream is)
Allows you to specify a different IUPAC table.

Method Detail

getInstance

public static IUPACParser getInstance()

getTables

public List<IUPACParser.IUPACTable> getTables()
Returns a list of all available IUPAC tables


getTable

public IUPACParser.IUPACTable getTable(String name)
Returns a table by its name


getTable

public IUPACParser.IUPACTable getTable(Integer id)
Returns a table by its identifier i.e. 1 means universal codon tables