Package org.biojava.bio.alignment
Class AbstractULAlignment.SubULAlignment
java.lang.Object
org.biojava.utils.AbstractChangeable
org.biojava.bio.symbol.AbstractSymbolList
org.biojava.bio.alignment.AbstractULAlignment.SubULAlignment
- All Implemented Interfaces:
Alignment,UnequalLengthAlignment,SymbolList,Changeable
- Enclosing class:
- AbstractULAlignment
public class AbstractULAlignment.SubULAlignment
extends AbstractSymbolList
implements UnequalLengthAlignment
-
Nested Class Summary
Nested classes/interfaces inherited from class org.biojava.bio.symbol.AbstractSymbolList
AbstractSymbolList.EditScreener, AbstractSymbolList.EditTranslaterNested classes/interfaces inherited from interface org.biojava.bio.alignment.Alignment
Alignment.SymbolListIterator -
Field Summary
Fields inherited from interface org.biojava.bio.symbol.SymbolList
EDIT, EMPTY_LIST -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe alphabet that this SymbolList is over.The list of SymbolLists in the alignment.labelsAt(int column) Returns a list labels, of all seqs that cover that columnlabelsInRange(Location loc) Returns list of all the labels that intersect that rangeintlength()The number of symbols in this SymbolList.listIntersection(List<String> s1, List<String> s2) locInAlignment(Object label) The location of an individual SymbolList relative to overall AlignmentsubAlignment(Set<String> labels, Location loc) Make a view onto this alignment.symbolAt(int column) Return the symbol at index, counting from 1.Retrieve a symbol by label and column.symbolListForLabel(String label) Retrieve a single row of the alignment by label.Creates an Iterator over the SymbolLists in the alignment.Methods inherited from class org.biojava.bio.symbol.AbstractSymbolList
edit, equals, hashCode, iterator, seqString, subList, subStr, toList, toStringMethods inherited from class org.biojava.utils.AbstractChangeable
addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListenerMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.biojava.utils.Changeable
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
-
Constructor Details
-
SubULAlignment
- Throws:
IndexOutOfBoundsException
-
-
Method Details
-
length
Description copied from interface:SymbolListThe number of symbols in this SymbolList.- Specified by:
lengthin interfaceSymbolList- Returns:
- the length
-
locInAlignment
The location of an individual SymbolList relative to overall Alignment- Specified by:
locInAlignmentin interfaceUnequalLengthAlignment
-
subAlignment
Description copied from interface:AlignmentMake 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.
- Specified by:
subAlignmentin interfaceAlignment- Parameters:
labels- the Set of sequences to include by labelloc- the Location to include- Returns:
- a sub Alignment
- Throws:
NoSuchElementException- if labels contains any item that is not a label
-
listIntersection
-
labelsAt
Description copied from interface:UnequalLengthAlignmentReturns a list labels, of all seqs that cover that column- Specified by:
labelsAtin interfaceUnequalLengthAlignment- Throws:
IndexOutOfBoundsException
-
labelsInRange
Description copied from interface:UnequalLengthAlignmentReturns list of all the labels that intersect that range- Specified by:
labelsInRangein interfaceUnequalLengthAlignment- Throws:
IndexOutOfBoundsException
-
getLabels
Description copied from interface:AlignmentThe 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.
-
symbolAt
Description copied from interface:AlignmentRetrieve a symbol by label and column.- Specified by:
symbolAtin interfaceAlignment- Parameters:
label- the SymbolList to retrieve fromcolumn- 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'
-
symbolAt
Description copied from interface:SymbolListReturn the symbol at index, counting from 1.- Specified by:
symbolAtin interfaceSymbolList- Parameters:
column- the offset into this SymbolList- Returns:
- the Symbol at that index
- Throws:
NoSuchElementException
-
symbolListForLabel
Description copied from interface:AlignmentRetrieve a single row of the alignment by label.- Specified by:
symbolListForLabelin interfaceAlignment- Parameters:
label- the object from which to retrieve the symbol list- Returns:
- a SymbolList that contains each token in a row of the alignment
- Throws:
NoSuchElementException- if there is no row for 'label'
-
getAlphabet
Description copied from interface:SymbolListThe alphabet that this SymbolList is over.Every symbol within this SymbolList is a member of this alphabet.
alphabet.contains(symbol) == truefor each symbol that is within this sequence.- Specified by:
getAlphabetin interfaceSymbolList- Returns:
- the alphabet
-
symbolListIterator
Description copied from interface:AlignmentCreates 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:
symbolListIteratorin interfaceAlignment- Returns:
- an Iterator
-