Package pal.datatype

Interface DataType

    • Field Detail

      • PRIMARY_SUGGESTED_GAP_CHARACTER

        static final char PRIMARY_SUGGESTED_GAP_CHARACTER
        A suggested Gap character
        See Also:
        Constant Field Values
      • SUGGESTED_GAP_CHARACTERS

        static final char[] SUGGESTED_GAP_CHARACTERS
      • SUGGESTED_GAP_STATE

        static final int SUGGESTED_GAP_STATE
        The gap state that should generally be used (-2), though the DataType specification makes no requirement that this be the gap state
        See Also:
        Constant Field Values
      • SUGGESTED_UNKNOWN_STATE

        static final int SUGGESTED_UNKNOWN_STATE
        The gap state that should generally be used (-1). Though in general, the unknown state is defined to be anystate that isn't a gap state or a normal state (which makes sense) though the DataType specification makes no requirement that this be the unknown state
        See Also:
        Constant Field Values
      • NUCLEOTIDE_DESCRIPTION

        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 :-).
        See Also:
        Constant Field Values
      • AMINO_ACID_DESCRIPTION

        static final java.lang.String AMINO_ACID_DESCRIPTION
        amino acid name (for XML and human readability)
        See Also:
        Constant Field Values
      • TWO_STATE_DESCRIPTION

        static final java.lang.String TWO_STATE_DESCRIPTION
        two state name (for XML and human readability)
        See Also:
        Constant Field Values
      • IUPAC_NUCELOTIDES_DESCRIPTION

        static final java.lang.String IUPAC_NUCELOTIDES_DESCRIPTION
        iupac nucleotide name (for XML and human readability)
        See Also:
        Constant Field Values
      • CODON_DESCRIPTION

        static final java.lang.String CODON_DESCRIPTION
        codon name (for XML and human readability)
        See Also:
        Constant Field Values
      • GAP_BALANCED_DESCRIPTION

        static final java.lang.String GAP_BALANCED_DESCRIPTION
        generalized codon name (for XML and human readability)
        See Also:
        Constant Field Values
    • Method Detail

      • getNumStates

        int getNumStates()
        get number of unique states
        Returns:
        number of unique states
      • getState

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

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

        char getPreferredChar​(char c)
        get the preferred version of a particular character (eg a -> A) Should not always assume that a DataType only uses Upper case characters!
      • getDescription

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

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

        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

        boolean isUnknownChar​(char c)
        Returns:
        true if this character is a gap
      • getRecommendedUnknownState

        int getRecommendedUnknownState()
      • hasGap

        boolean hasGap()
        Returns:
        true if this data type supports having a gap character
      • isGapChar

        boolean isGapChar​(char c)
        Returns:
        true if this data type interprets c as a gap
      • isGapState

        boolean isGapState​(int state)
        Returns:
        true if this data type interprets state as a gap state
      • getRecommendedGapState

        int getRecommendedGapState()
        Returns:
        the recommended state to use as a gap
      • isAmbiguous

        boolean isAmbiguous()