>         > problem. Actually I have Protein      
> composed of a 20 letter alphabet) for example "CAARGNDLYSKNIG" can be
> considered as a protein sequence. basically it's just a string.

Have you looked at the BioRuby project? They may have classes that can
help.
http://bioruby.org/