Interface Alignment

    • Field Detail

      • CONTENT

        static final ChangeType CONTENT
        Signals that SymbolLists will be added to or removed from an alignment. The ChangeEvent will record Object[] { label, symbolList } in previous if it is being removed, in current if it is being added and in both if the SymbolList for a given name is swapped.
    • Method Detail

      • getLabels

        List<StringgetLabels()

        The list of SymbolLists in the alignment.

        The index in the list is the same as the index in the alignment. Each SymbolList object will only be in the alignment once. However, a single underlying SymbolList may have more than one view within an alignment, each represented by a different GappedSymbolList.

        Returns:
        the List of all SymbolLists in the alignment
      • symbolAt

        Symbol symbolAt​(String label,
                        int column)
                 throws NoSuchElementException
        Retrieve a symbol by label and column.
        Parameters:
        label - the SymbolList to retrieve from
        column - the index of the column to retrieve
        Returns:
        the symbol in the symbol list associated with the label at the given column
        Throws:
        NoSuchElementException - if there is no row for 'label'
      • subAlignment

        Alignment subAlignment​(Set<String> labels,
                               Location loc)
                        throws NoSuchElementException

        Make a view onto this alignment.

        If labels is null, then each label will be kept. Otherwise, only those in labels will be kept. If loc is null, then the entire length of the alignment will be kept. If loc is not null, then only the columns within the location will be kept.

        Parameters:
        labels - the Set of sequences to include by label
        loc - the Location to include
        Returns:
        a sub Alignment
        Throws:
        NoSuchElementException - if labels contains any item that is not a label
      • symbolListIterator

        Iterator<SymbolListsymbolListIterator()
        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.
        Returns:
        an Iterator