[Biojava-dev] Doing pattern matching on Proteins

Uday Kamath kamathuday at gmail.com
Thu Nov 18 14:54:11 UTC 2010


Hello
A simple question,

In order to search a motif in Protein i used following code, is my method to
create pattern factory right? Because matcher is going in infinite
recurssion. Can someone suggest right usage? Thanks a ton

//sample
FiniteAlphabet alphabet = ProteinTools.getAlphabet();
factory = PatternFactory.makeFactory(alphabet);
SymbolList proteinSequence = ProteinTools.createProtein("CANLSTFA");
//in the sequence find the match
SymbolList motif = ProteinTools.createProtein("FA");
Pattern p = HivProteaseProblem.factory.compile(
MotifTools.createRegex(motif));
Matcher occurences= p.matcher(proteinSequence);



More information about the biojava-dev mailing list