pal.datatype
Class SpecificAminoAcids

java.lang.Object
  extended by pal.datatype.SimpleDataType
      extended by pal.datatype.AminoAcids
          extended by pal.datatype.SpecificAminoAcids
All Implemented Interfaces:
java.io.Serializable, DataType, MolecularDataType

public class SpecificAminoAcids
extends AminoAcids
implements MolecularDataType

implements a MolecularDataType for amino acids, where we specifiy the Codon Table basis of amino acid by supplying the CodonTable which is/was used for converting Nucleotide sequences to Amino Acids. We need this table to do conversion between Nucleotides and Amino Acids (and vice versa)

Version:
$Id: SpecificAminoAcids.java,v 1.8 2004/10/29 01:13:37 matt Exp $
Author:
Matthew Goode
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface pal.datatype.MolecularDataType
MolecularDataType.Utils
 
Field Summary
 
Fields inherited from class pal.datatype.AminoAcids
DEFAULT_INSTANCE, TERMINATE_CHARACTER, TERMINATE_STATE
 
Fields inherited from interface pal.datatype.DataType
AMINO_ACID_DESCRIPTION, AMINOACIDS, CODON_DESCRIPTION, CODONS, GAP_BALANCED, GAP_BALANCED_DESCRIPTION, IUPAC_NUCELOTIDES_DESCRIPTION, IUPACNUCLEOTIDES, NUCLEOTIDE_DESCRIPTION, NUCLEOTIDES, NUMERIC, PRIMARY_SUGGESTED_GAP_CHARACTER, SUGGESTED_GAP_CHARACTERS, SUGGESTED_GAP_STATE, SUGGESTED_UNKNOWN_STATE, TWO_STATE_DESCRIPTION, TWOSTATES, UNKNOWN, UNKNOWN_CHARACTER, UNKNOWN_TLA
 
Constructor Summary
SpecificAminoAcids()
          Creates with Universal Codon Table
SpecificAminoAcids(CodonTable translationTable)
           
SpecificAminoAcids(int organismTypeID)
           
 
Method Summary
 int[] getMolecularStatesFromIUPACNucleotides(int[] nucleotideStates, int startingIndex)
           
 int[] getMolecularStatesFromSimpleNucleotides(int[] nucleotideStates, int startingIndex)
           
 int getNucleotideLength()
           
 int[] getNucleotideStates(int[] residueStates)
           
 int getOrganismTypeID()
           
 boolean isCreatesIUPACNuecleotides()
           
 
Methods inherited from class pal.datatype.AminoAcids
getCharImpl, getDescription, getNumStates, getStateImpl, getTLA, getTypeID, isUnknownStateImpl
 
Methods inherited from class pal.datatype.SimpleDataType
getAmbiguousVersion, getChar, getPreferredChar, getPreferredCharImpl, getRecommendedGapState, getRecommendedUnknownState, getState, hasGap, isAmbiguous, isGapChar, isGapState, isUnknownChar, isUnknownState, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface pal.datatype.DataType
getAmbiguousVersion, getChar, getDescription, getNumStates, getPreferredChar, getRecommendedGapState, getRecommendedUnknownState, getState, getTypeID, hasGap, isAmbiguous, isGapChar, isGapState, isUnknownChar, isUnknownState
 

Constructor Detail

SpecificAminoAcids

public SpecificAminoAcids()
Creates with Universal Codon Table


SpecificAminoAcids

public SpecificAminoAcids(CodonTable translationTable)

SpecificAminoAcids

public SpecificAminoAcids(int organismTypeID)
Method Detail

getOrganismTypeID

public int getOrganismTypeID()
Returns:
Organism TypeID as for CodonTable

getNucleotideStates

public int[] getNucleotideStates(int[] residueStates)
Specified by:
getNucleotideStates in interface MolecularDataType
Parameters:
residueStates - an array of states corresponding to states of this datatype
Returns:
the corresponding IUPAC states

getMolecularStatesFromIUPACNucleotides

public final int[] getMolecularStatesFromIUPACNucleotides(int[] nucleotideStates,
                                                          int startingIndex)
Specified by:
getMolecularStatesFromIUPACNucleotides in interface MolecularDataType

getMolecularStatesFromSimpleNucleotides

public final int[] getMolecularStatesFromSimpleNucleotides(int[] nucleotideStates,
                                                           int startingIndex)
Specified by:
getMolecularStatesFromSimpleNucleotides in interface MolecularDataType

isCreatesIUPACNuecleotides

public boolean isCreatesIUPACNuecleotides()
Specified by:
isCreatesIUPACNuecleotides in interface MolecularDataType
Returns:
false

getNucleotideLength

public final int getNucleotideLength()
Specified by:
getNucleotideLength in interface MolecularDataType
Returns:
3