pal.datatype
Interface MolecularDataType

All Superinterfaces:
DataType, java.io.Serializable
All Known Implementing Classes:
Codons, GapBalanced, IUPACNucleotides, Nucleotides, SpecificAminoAcids

public interface MolecularDataType
extends DataType

An extension to the generic DataType class for DataTypes related to genetic residues (by this it is meant Nucleotides, AminoAcids, and Codons).

Version:
1.1
Author:
Matthew Goode

Nested Class Summary
static class MolecularDataType.Utils
          Utilities relating to MolecularDataType stuff
 
Field Summary
 
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
 
Method Summary
 int[] getMolecularStatesFromIUPACNucleotides(int[] nucleotideStates, int startingIndex)
           
 int[] getMolecularStatesFromSimpleNucleotides(int[] nucleotideStates, int startingIndex)
           
 int getNucleotideLength()
           
 int[] getNucleotideStates(int[] molecularStates)
           
 boolean isCreatesIUPACNuecleotides()
           
 
Methods inherited from interface pal.datatype.DataType
getAmbiguousVersion, getChar, getDescription, getNumStates, getPreferredChar, getRecommendedGapState, getRecommendedUnknownState, getState, getTypeID, hasGap, isAmbiguous, isGapChar, isGapState, isUnknownChar, isUnknownState
 

Method Detail

getNucleotideStates

int[] getNucleotideStates(int[] molecularStates)
Parameters:
molecularStates - an array of states corresponding to states of this datatype
Returns:
the corresponding IUPAC states

getMolecularStatesFromIUPACNucleotides

int[] getMolecularStatesFromIUPACNucleotides(int[] nucleotideStates,
                                             int startingIndex)
Parameters:
the - IUPAC nucleotidestates

getMolecularStatesFromSimpleNucleotides

int[] getMolecularStatesFromSimpleNucleotides(int[] nucleotideStates,
                                              int startingIndex)
Parameters:
the - Simple nucleotide states (eg 0,1,2,3 or A,C,G,T)

isCreatesIUPACNuecleotides

boolean isCreatesIUPACNuecleotides()
Returns:
true if this data type will create Nucleotide states using IUPAC states (for example if this DataType is AminoAcid based, IUPAC states are needed to maintain information on different possible values for a state)

getNucleotideLength

int getNucleotideLength()
Returns:
the number of nucleotides required for a single character of this data typedata