[Biojava-dev] Doing pattern matching on Proteins

Andreas Prlic andreas at sdsc.edu
Fri Nov 19 17:49:35 UTC 2010


Hi Uday,

have you seen this cookbook page?

http://www.biojava.org/wiki/BioJava:Cookbook:Sequence:Regex


Andreas

On Thu, Nov 18, 2010 at 7:49 PM, Uday Kamath <kamathuday at gmail.com> wrote:
> Anyone ? anyhelp? a way to to motif search example or what am i doing wrong
> below?
> Thanks a ton!
> Uday
>
> On Thu, Nov 18, 2010 at 9:54 AM, Uday Kamath <kamathuday at gmail.com> wrote:
>
>> 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);
>>
> _______________________________________________
> biojava-dev mailing list
> biojava-dev at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biojava-dev
>



-- 
-----------------------------------------------------------------------
Dr. Andreas Prlic
Senior Scientist, RCSB PDB Protein Data Bank
University of California, San Diego
(+1) 858.246.0526
-----------------------------------------------------------------------



More information about the biojava-dev mailing list