[Biojava-l] orderNSymbols and Alphabets

Matthew Pocock mrp@sanger.ac.uk
Tue, 27 Feb 2001 10:55:19 +0000


...and to make the n'th order symbol list for the distribution to be 
used with you can use one of:

SymbolListViews.orderNSybolList(source, order)
SymbolListViews.windowedSymbolList(source, windowWidth)

Thomas Down wrote:

> On Tue, Feb 27, 2001 at 05:04:59PM +1300, Schreiber, Mark wrote:
> 
>> Hi
>> 
>> What is the simplest way to create an orderN alphabet or symbol that can be
>> used in a dsitribution?
> 
> 
> Cross product alphabets are created via the AlphabetManager:
> 
>   Alphabet codons = AlphabetManager.getCrossProductAlphabet(
>                             Collections.nCopies(3, DNATools.getDNA());
> 
> This method will work on any arbitrary List of Alphabets.
> 
> You can then retrieve symbols from that alphabet:
> 
>   List symbols = DNATools.createDNA("atg").toList();
>   Symbol startCodon = codons.getSymbol(symbols);
> 
> This method works on an arbitrary list of Symbols (but obviously
> these must match the alphabet -- you'll get an IllegalSymbolException
> otherwise.
> 
> Hope this helps,
> 
>    Thomas.
> 
> _______________________________________________
> Biojava-l mailing list  -  Biojava-l@biojava.org
> http://biojava.org/mailman/listinfo/biojava-l