|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biojava.bio.symbol.SymbolListViews
Tools class for constructing views of SymbolList
objects.
Method Summary | |
static Alignment |
alignment(java.util.List labels,
SymbolList symList)
View a SymbolList over a cross-product Alphabet as an Alignment. |
static Alignment |
alignment(java.util.Map labelToSymList)
Construct an alignment of the SymbolLists contained in the values collection of labelToSymList . |
static SymbolList |
orderNSymbolList(SymbolList source,
int order)
An n-th order view of another SymbolList. |
static SymbolList |
reverse(SymbolList symbols)
A reversed view onto a SymbolList. |
static SymbolList |
translate(SymbolList symbols,
TranslationTable table)
Provides a 'translated' view of an underlying SymbolList. |
static SymbolList |
windowedSymbolList(SymbolList source,
int wsize)
A view of windows onto another SymbolList. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static SymbolList orderNSymbolList(SymbolList source, int order) throws IllegalAlphabetException
In practice, what this means is that you can view a DNA sequence into an overlapping dinucleotide sequence without having to do any work yourself.
source
- The underlying SymbolList to vieworder
- The window size
IllegalAlphabetException
public static SymbolList windowedSymbolList(SymbolList source, int wsize) throws java.lang.IllegalArgumentException
In practice, what this means is that you can view a DNA sequence as codons which do not overlap.
source
- The underlying SymbolList to viewwsize
- The window size.
java.lang.IllegalArgumentException
- if the symbollist length isn't an integer multiple of wsize.public static SymbolList reverse(SymbolList symbols)
symbols
- the SymbolList to reverse.public static SymbolList translate(SymbolList symbols, TranslationTable table) throws IllegalAlphabetException
This method allows you to translate from one alphabet into another, so for example, you could translate from DNA-triplets into amino-acids. You could also translate from DNA-dinucleotide into the 'twist' structural metric, or any other translation that takes your fancy.
The actual mapping from source to view Symbol is encapsulated in a TranslationTable object.
The translated SymbolList will be the same length as the source, and each Symbol in the view will correspond to a single Symbol in the source.
symbols
- a SymbolList to translate.table
- a translation table for mapping symbols.
IllegalAlphabetException
public static Alignment alignment(java.util.Map labelToSymList) throws java.lang.IllegalArgumentException
labelToSymList
.
labelToSymList
- A Map containing label -> SymbolList mappings
java.lang.IllegalArgumentException
public static Alignment alignment(java.util.List labels, SymbolList symList) throws java.lang.IllegalArgumentException
labels
- a List of labels, which should be the same length
as the order symList
's Alphabet.symList
- a SymbolList over a cross-product alphabet.
java.lang.IllegalArgumentException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |