Class IUPACParser


  • public class IUPACParser
    extends java.lang.Object
    Available translations
    • 1 - UNIVERSAL
    • 2 - VERTEBRATE_MITOCHONDRIAL
    • 3 - YEAST_MITOCHONDRIAL
    • 4 - MOLD_MITOCHONDRIAL
    • 5 - INVERTEBRATE_MITOCHONDRIAL
    • 6 - CILIATE_NUCLEAR
    • 9 - ECHINODERM_MITOCHONDRIAL
    • 10 - EUPLOTID_NUCLEAR
    • 11 - BACTERIAL
    • 12 - ALTERNATIVE_YEAST_NUCLEAR
    • 13 - ASCIDIAN_MITOCHONDRIAL
    • 14 - FLATWORM_MITOCHONDRIAL
    • 15 - BLEPHARISMA_MACRONUCLEAR
    • 16 - 2CHLOROPHYCEAN_MITOCHONDRIAL
    • 21 - TREMATODE_MITOCHONDRIAL
    • 23 - SCENEDESMUS_MITOCHONDRIAL
    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
    • Constructor Detail

      • IUPACParser

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

        public IUPACParser​(java.io.InputStream is)
        Allows you to specify a different IUPAC table.
    • Method Detail

      • getInstance

        public static IUPACParser getInstance()
      • getTables

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

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