Interface Sequence

    • Method Detail

      • getTaxon

        Taxon getTaxon()
        Returns:
        the taxon that this sequence represents (primarily used to match sequences with tree nodes)
      • getSequenceType

        SequenceType getSequenceType()
        Returns:
        the type of symbols that this sequence is made up of.
      • getString

        java.lang.String getString()
        Returns:
        a string representing the sequence of symbols.
      • getStates

        State[] getStates()
        Returns:
        an array of state objects.
      • getStateIndices

        byte[] getStateIndices()
        Returns:
        an array of state indices.
      • getState

        State getState​(int site)
        Returns:
        the state at site.
      • getLength

        int getLength()
        Get the length of the sequence
        Returns:
        the length
      • appendSequences

        static Sequence appendSequences​(Sequence sequence1,
                                        Sequence sequence2)
        Append two sequences together to create a new sequence object. New sequence has the taxon of the first sequence.
        Parameters:
        sequence1 -
        sequence2 -
        Returns:
      • getSubSequence

        static Sequence getSubSequence​(Sequence sequence,
                                       int from,
                                       int to)
        Returns a sub-sequence for states from, to (inclusive).
        Parameters:
        sequence -
        from -
        to -
        Returns: