|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An alignment containing multiple SymbolLists.
The alignment can be thought of as a rectangular array of Symbols. Each row is indexed by a label and each column is indexed by offset (counting from 1).
Alternatively, it can be thought of as a SymbolList where each Symbol is a list of Symbols in that column.
To create gapped alignments, use SymbolLists with gaps. The most flexible way to do this will be to leverage GappedSymbolList objects.
Nested Class Summary | |
static class |
Alignment.SymbolListIterator
Iterator implementation looping over symbol lists in an alignment using the labels. |
Nested classes inherited from class org.biojava.bio.symbol.SymbolList |
SymbolList.EmptySymbolList |
Field Summary | |
static ChangeType |
CONTENT
Signals that SymbolLists will be added to or removed from an alignment. |
Fields inherited from interface org.biojava.bio.symbol.SymbolList |
EDIT, EMPTY_LIST |
Method Summary | |
java.util.List |
getLabels()
The list of SymbolLists in the alignment. |
Alignment |
subAlignment(java.util.Set labels,
Location loc)
Make a view onto this alignment. |
Symbol |
symbolAt(java.lang.Object label,
int column)
Retrieve a symbol by label and column. |
SymbolList |
symbolListForLabel(java.lang.Object label)
Retrieve a single row of the alignment by label. |
java.util.Iterator |
symbolListIterator()
Creates an Iterator over the SymbolLists in the alignment. |
Methods inherited from interface org.biojava.bio.symbol.SymbolList |
edit, getAlphabet, iterator, length, seqString, subList, subStr, symbolAt, toList |
Methods inherited from interface org.biojava.utils.Changeable |
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener |
Field Detail |
public static final ChangeType CONTENT
Method Detail |
public java.util.List getLabels()
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.
public Symbol symbolAt(java.lang.Object label, int column) throws java.util.NoSuchElementException
label
- the SymbolList to retrieve fromcolumn
- the index of the column to retrieve
java.util.NoSuchElementException
- if there is no row for 'label'public SymbolList symbolListForLabel(java.lang.Object label) throws java.util.NoSuchElementException
label
- the object from which to retrieve the symbol list
java.util.NoSuchElementException
- if there is no row for 'label'public Alignment subAlignment(java.util.Set labels, Location loc) throws java.util.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.
labels
- the Set of sequences to include by labelloc
- the Location to include
java.util.NoSuchElementException
- if labels contains any item that is not a labelpublic java.util.Iterator symbolListIterator()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |