regex - Does a regular expression exist for enzymatic cleavage? -
There is a regular expression for the (theoretical) cleavage of the sequences? There is a crack rule for trypsin: after r or after, but not before p.
Example:
Sequence of fragmentation VGTKCCTKPESERMPCTEDYLSLILNR
The result should be in the sequence (s):
VGTK CCTKPCI YLSLILR
Note that there is no deviation after the second peptide (because PK comes after Kashmir). / P>
In Perl (this can be just in C #, Python or Ruby):
My $ seq = 'VGTRCCTKPESERMPCTEDYLSLILNR'; My @peptides = Split / Some Regular Expressions, $ seq;
I have used around this work (where a cut marker, = inserted into the first sequence and then removed, if immediately after the p cut maker): < / P>
my $ seq = 'VGTRCCTKPESERMPCTEDYLSLILNR'; $ Seq = ~ s / ([RK]) / $ 1 = / g; # Main deduction rules $ Seq = ~ s / = P / P / g; #exception. My @peptides = split (/ = /, $ seq);
But this requires modification of a string which can be very long and can have millions of views. Is there a way where a regular expression can be used with split? If so, what will be the regular expression?
Test Platform: Windows XP 64 bit ActivePerl 64 bit Pearl-V: v5.10.0 is designed for MSWIN 32-X 64-Multi thread.
You really need to use a positive approach and a negative attitude to use the right ( Pearl) Syntax is as follows:
my @peptides = split (/ (?? p) (? & Lt; = [rk]) /, $ seq);
Comments
Post a Comment