Pattern find
Finds a motif in DNA or protein. IUPAC codes, PROSITE patterns or a regular expression.
Finds a motif in DNA or protein. IUPAC codes, PROSITE patterns or a regular expression.
Type the motif in the pattern field. Plain letters match themselves, and the IUPAC ambiguity codes stand for a set of bases, so one pattern covers a degenerate site. GANTC is the HinfI site, TATAWAW is the TATA box consensus, CANNTG is an E-box. Both strands are searched by default, because a motif on the template strand is just as real as one on the coding strand, and the position given is always counted on the plus strand.
| Code | Bases | Code | Bases | Code | Bases |
|---|---|---|---|---|---|
| A | A | R | A G | B | C G T |
| C | C | Y | C T | D | A G T |
| G | G | S | G C | H | A C T |
| T | T or U | W | A T | V | A C G |
| K | G T | M | A C | N | any |
The DNA example loads a 180 nt promoter region and the pattern TATAWAW, which is T-A-T-A-(A or T)-A-(A or T). The tool reports 3 matches: TATAAAT at 38 to 44 andTATATAT at 60 to 66 on the plus strand, and TATAAAT at 104 to 110 on the minus strand, where the plus strand reads ATTTATA. Turn "Search both strands" off and 2 are left.
The protein example loads mature human erythropoietin and the PROSITE N-glycosylation motifN-{P}-[ST]-{P}. It reports 3 matches, at residues 24, 38 and 83, which are the three N-linked glycosylation sites of the hormone.
| Element | Meaning | Example |
|---|---|---|
| x | Any residue | A-x-C |
| [ST] | Any one of these residues | N-x-[ST] |
| {P} | Any residue except these | N-{P}-[ST] |
| x(3) | Exactly three of the element | C-x(3)-C |
| x(2,4) | Two to four of the element | C-x(2,4)-C |
| < | Start of the sequence | <M-A |
| > | End of the sequence | K-D-E-L> |
Elements are joined with hyphens and a trailing full stop is ignored, so a pattern copied straight out of a PROSITE entry works. The letters allowed are the twenty amino acids plus B, Z, X, J, U and O.
Switch "Pattern syntax" to "Regular expression" to use the full JavaScript syntax on either tab: character classes, alternation with the vertical bar, quantifiers, anchors and lookahead. The sequence is searched as one uppercase string per record, with no line breaks in it, so a motif is never split across a line of the FASTA file.
On the DNA tab with both strands on, the reverse complement of the sequence is searched as well, so a regular expression never has to be written twice. A pattern that can match an empty string, such as A*, only has its non-empty matches reported. A pattern with a repeat inside a repeat is refused, because it can take longer than the rest of your day on a megabase of sequence.
For a search that tolerates differences, use fuzzy search. For repeated units rather than one motif, use thetandem repeat finder, and for counting all motifs of one length, the k-mer counter.
Choose the DNA tab, type the motif in the pattern field using IUPAC codes, then paste the sequence or choose a FASTA file. Every match is listed with its position, strand and matched text, overlapping matches included, and the table can be copied or downloaded as tab-separated text.
All of them: R is A or G, Y is C or T, S is G or C, W is A or T, K is G or T, M is A or C, B is not A, D is not C, H is not G, V is not T, and N is any base. U is read as T, so RNA works as well. A code in the pattern matches the concrete bases it stands for; N in the pattern also matches an ambiguous base in the sequence.
It is the motif syntax used by the PROSITE database. Elements are joined by hyphens, x is any residue, square brackets list the residues allowed, curly brackets list the residues forbidden, a number in round brackets repeats an element, and the less-than and greater-than signs anchor the pattern to the N or C terminus. The N-glycosylation motif is written N-{P}-[ST]-{P}.
Because they are real occurrences. In AAAA the pattern AA occurs at positions 1, 2 and 3. A plain regular expression engine skips past each match and finds only the first and the third, which undercounts motifs such as poly-A tracts and direct repeats.
Either the syntax is not valid, in which case the message names the problem, or it contains a repeat inside a repeat, such as a group ending in a plus that is itself followed by a plus. Those patterns can take an extremely long time on a long sequence, so they are refused rather than left to freeze the page. Rewrite the inner repeat as a character class.