| Description |
PREG application details page
Regular expression search of a protein sequence
This searches for matches of a regular expression to a protein sequence. A regular expression is a way of specifying an ambiguous pattern tosearch for. Regular expressions are commonly used in some computerprogramming languages and may be more familiar to some users than toothers. The following is a short guide to regular expressions in EMBOSS: - ^
- use this at the start of a pattern to insist that the pattern can onlymatch at the start of a sequence. (eg. '^M' matches a methionine atthe start of the sequence)
- $
- use this at the end of a pattern to insist that the pattern can onlymatch at the end of a sequence (eg. 'R$' matches an arginine atthe end of the sequence)
- ()
- groups a pattern. This is commonly used with '|' (eg. '(ACD)|(VWY)'matches either the first 'ACD' or the second 'VWY' pattern )
- |
- This is the OR operator to enable a match to be made to either onepattern OR another. There is no AND operator in this version of regularexpressions.
The following quantifier characters specify the number of time thatthe character before (in this case 'x') matches: - x?
- matches 0 or 1 times (ie, '' or 'x')
- x*
- matches 0 or more times (ie, '' or 'x' or 'xx' or 'xxx', etc)
- x+
- matches 1 or more times (ie, 'x' or 'xx' or 'xxx', etc)
Quantifiers can follow any of the following types of character specification: - x
- any character (ie 'A')
- x
- the character after the backslash is used instead of its normalregular expression meaning. This is commonly used to turn off thespecial meaning of the characters '^$()|?*+[]-.'. It may be especiallyuseful when searching for gap characters in a sequence (eg '.' matchesonly a dot character '.')
- [xy]
- match one of the characters 'x' or 'y'. You may have one or morecharacters in this set.
- [x-z]
- match any one of the set of characters starting with 'x' andending in 'y' in ASCII order (eg '[A-G]' matches any one of: 'A', 'B','C', 'D', 'E', 'F', 'G')
- [^x-z]
- matches anything except any one of the group of characters inASCII order (eg '[^A-G]' matches anything EXCEPT any one of: 'A', 'B','C', 'D', 'E', 'F', 'G')
- .
- the dot character matches any other character (eg: 'A.G' matches'AAG', 'AaG', 'AZG', 'A-G' 'A G', etc.)
Combining some of these features gives these examples from the PROSITEpatterns database: '[STAGCN][RKH][LIVMAFY]$' which is the 'Microbodies C-terminal targetingsignal'. 'LP.TG[STGAVDE]' which is the 'Gram-positive cocci surface proteinsanchoring hexapeptide'. Regular expressions are case-sensitive.The pattern 'AAAA' will not match the sequence 'aaaa'.
|