[Biojava-l] how to set the “token” parameter?
mark.schreiber at novartis.com
mark.schreiber at novartis.com
Mon May 21 04:21:29 UTC 2007
Hi -
The name tokenization is provided because biojava can simply look up the
name of the symbol. For a "token" tokenization you would need to provide a
custom mapping for your custom alphabet.
Probably the simplist was is to instantiate a
org.biojava.bio.seq.io.CharacterTokenization and use the bindSymbol method
to bind Symbols to characters. If you want to register the tokenization
with the Alphabet then most Biojava alphabets derive from AbstractAlphabet
which contains the method: putTokenization(String name, SymbolTokenization
tok)
You could then register your tokenization under the name "token". This is
only required if other code is going to use the tokenization as after
creating it you already have a reference to it anyway.
- Mark
zt_2003 <zt_2003 at 163.com>
Sent by: biojava-l-bounces at lists.open-bio.org
05/21/2007 10:07 AM
To: biojava-l at lists.open-bio.org
cc: (bcc: Mark Schreiber/GP/Novartis)
Subject: [Biojava-l] how to set the "token" parameter?
I had made a custum alphabet und.but when I call the function:
System.out.println("22222222---"+und.getTokenization("token"));give such
error: There is no tokenization 'token' defined in alphabet UND.
und.getTokenization("default")) ot und.getTokenization("name")) is ok. And
I can't find any api to set the tokenization 'token',how to do it?
_______________________________________________
Biojava-l mailing list - Biojava-l at lists.open-bio.org
http://lists.open-bio.org/mailman/listinfo/biojava-l
More information about the Biojava-l
mailing list