Class AbstractULAlignment

    • Field Detail

    • Constructor Detail

      • AbstractULAlignment

        public AbstractULAlignment()
    • Method Detail

      • symbolAt

        public Symbol symbolAt​(int index)
        this will return the ambiguity symbol associated with all symbols in that column
        Specified by:
        symbolAt in interface SymbolList
        Parameters:
        index - the offset into this SymbolList
        Returns:
        the Symbol at that index
      • symbolListIterator

        public java.util.Iterator symbolListIterator()
        Description copied from interface: Alignment
        Creates an Iterator over the SymbolLists in the alignment. This should be similar to iterating over the labels and then fetching each SymbolList, but the order is not guaranteed to be the same.
        Specified by:
        symbolListIterator in interface Alignment
        Returns:
        an Iterator
      • debug

        protected void debug​(java.lang.String s)
      • leftMost

        public java.lang.Object leftMost()
        leftMost and rightMost return labels. If there are more than one that start at the same location it returns the longest, if they are the same length it returns the first one it found;
      • rightMost

        public java.lang.Object rightMost()
      • subAlignment

        public Alignment subAlignment​(java.util.Set labels,
                                      Location loc)
                               throws java.lang.IndexOutOfBoundsException
        Retrieves a subalignment specified by the location.

        WARNING: It is assumed that the location is contiguous. If the location is non-contiguous it may be preferable to use a block iterator to retrieve each sub location independently.

        Specified by:
        subAlignment in interface Alignment
        Parameters:
        labels - the Set of sequences to include by label
        loc - the Location to include
        Returns:
        a sub Alignment
        Throws:
        java.lang.IndexOutOfBoundsException
        See Also:
        subAlignment(Set labels, int min, int max)
      • subAlignment

        public Alignment subAlignment​(java.util.Set labels,
                                      int min,
                                      int max)
                               throws java.util.NoSuchElementException
        Retreives a subAlignment
        Parameters:
        labels - the labels of the SymbolLists to be in the Alignment
        min - the left most coordinate
        max - the right most coordinate
        Returns:
        an Alignment
        Throws:
        java.util.NoSuchElementException - if one of the values in labels is not in the parent alignment
      • orderedLables

        public java.util.SortedSet orderedLables​(java.util.Comparator comp)