[Biojava-dev] One character amino acid representation

mark.schreiber at novartis.com mark.schreiber at novartis.com
Thu Aug 10 07:47:55 UTC 2006


You need to use a SymbolTokenizer to convert a Symbol to a character (or 
String).

Symbol tyrosine = ProteinTools.tyr();
Alphabet protein = ProteinTools.getAlphabet()
SymbolTokenization st = protein.getTokenization("token");
String token = st.tokenizeSymbol(tyrosine);

//token should be equal to "Y"

For a SymbolList you can use

SymbolList sl = ... //make a SymbolList
st.tokenizeSymbolList(sl)


I'm really not sure why we didn't just have a single tokenize() method and 
overload it but it is stuck that way now.

- Mark





Mateusz Kaduk <mateusz at kaduk.net>
Sent by: biojava-dev-bounces at lists.open-bio.org
08/10/2006 03:23 PM
Please respond to mateusz

 
        To:     biojava-dev at lists.open-bio.org
        cc:     (bcc: Mark Schreiber/GP/Novartis)
        Subject:        [Biojava-dev] One character amino acid representation


Hi,
How to get one character amino acid mark from Symbol ?
getName() method returns 3 char string.
Thanks in advance,


_______________________________________________
biojava-dev mailing list
biojava-dev at lists.open-bio.org
http://lists.open-bio.org/mailman/listinfo/biojava-dev






More information about the biojava-dev mailing list