pal.datatype
Interface DataType

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
SimpleDataType, IUPACNucleotides

public interface DataType
extends java.io.Serializable

interface for sequence data types


Field Summary
static java.lang.String AMINO_ACID_DESCRIPTION
          amino acid name (for XML and human readability)
static int AMINOACIDS
           
static java.lang.String CODON_DESCRIPTION
          codon name (for XML and human readability)
static int CODONS
           
static java.lang.String GENERALIZED_CODONS_DESCRIPTION
          generalized codon name (for XML and human readability)
static int GENERALIZEDCODONS
           
static java.lang.String IUPAC_NUCELOTIDES_DESCRIPTION
          iupac nucleotide name (for XML and human readability)
static int IUPACNUCLEOTIDES
           
static java.lang.String NUCLEOTIDE_DESCRIPTION
          Name of nucleotide data type.
static int NUCLEOTIDES
           
static java.lang.String TWO_STATE_DESCRIPTION
          two state name (for XML and human readability)
static int TWOSTATES
           
static char UNKNOWN_CHARACTER
           
 
Method Summary
 char getChar(int state)
          get character corresponding to a given state
 java.lang.String getDescription()
          description of data type
 int getNumSimpleStates()
          get number of unique non-ambiguous states
 int getNumStates()
          get number of unique states
 int[] getSimpleStates(int state)
          returns an array containing the non-ambiguous states that this state represents.
 int getState(char c)
          get state corresponding to a character
 int getTypeID()
          get numerical code describing the data type
 boolean isAmbiguousState(int state)
          returns true if this state is an ambiguous state.
 boolean isUnknownChar(char c)
           
 boolean isUnknownState(int state)
           
 

Field Detail

UNKNOWN_CHARACTER

public static final char UNKNOWN_CHARACTER

NUCLEOTIDES

public static final int NUCLEOTIDES

AMINOACIDS

public static final int AMINOACIDS

TWOSTATES

public static final int TWOSTATES

IUPACNUCLEOTIDES

public static final int IUPACNUCLEOTIDES

CODONS

public static final int CODONS

GENERALIZEDCODONS

public static final int GENERALIZEDCODONS

NUCLEOTIDE_DESCRIPTION

public static final java.lang.String NUCLEOTIDE_DESCRIPTION
Name of nucleotide data type. For XML and human reading of data type. You should do it yourself :-).

AMINO_ACID_DESCRIPTION

public static final java.lang.String AMINO_ACID_DESCRIPTION
amino acid name (for XML and human readability)

TWO_STATE_DESCRIPTION

public static final java.lang.String TWO_STATE_DESCRIPTION
two state name (for XML and human readability)

IUPAC_NUCELOTIDES_DESCRIPTION

public static final java.lang.String IUPAC_NUCELOTIDES_DESCRIPTION
iupac nucleotide name (for XML and human readability)

CODON_DESCRIPTION

public static final java.lang.String CODON_DESCRIPTION
codon name (for XML and human readability)

GENERALIZED_CODONS_DESCRIPTION

public static final java.lang.String GENERALIZED_CODONS_DESCRIPTION
generalized codon name (for XML and human readability)
Method Detail

getNumStates

public int getNumStates()
get number of unique states
Returns:
number of unique states

getNumSimpleStates

public int getNumSimpleStates()
get number of unique non-ambiguous states
Returns:
number of unique states

getState

public int getState(char c)
get state corresponding to a character
Parameters:
c - character
Returns:
state

getChar

public char getChar(int state)
get character corresponding to a given state
Parameters:
state - state return corresponding character

isAmbiguousState

public boolean isAmbiguousState(int state)
returns true if this state is an ambiguous state.

getSimpleStates

public int[] getSimpleStates(int state)
returns an array containing the non-ambiguous states that this state represents.

getDescription

public java.lang.String getDescription()
description of data type
Returns:
string describing the data type

getTypeID

public int getTypeID()
get numerical code describing the data type
Returns:
numerical code

isUnknownState

public boolean isUnknownState(int state)
Returns:
true if this state is an unknown state (the same as check if a state is >= the number of states... but neater)

isUnknownChar

public boolean isUnknownChar(char c)
Returns:
true if this character is a gap