Page version 1.3.0 · For Sequences 0.102.0
Choosing a search method
Which search method fits your query, what each method does, and what recorded runs show about each one.
Choose a method
Your query is the sequence you search with. A residue is one amino acid of a protein, a base is one letter of DNA, and a peptide is a short protein. Automatic, the first method on the search form, picks a method by the kind of query, and the search record says what it ran: see The automatic choice. It makes a good first search. Then add a second search with the method your query, or your claim's wording, calls for.
| Your query | Automatic runs | Add | Why |
|---|---|---|---|
| A short peptide, 8 to 30 residues | Smith-Waterman | Exact text | Exact text lists every stored sequence that holds the peptide letter for letter, and counts every place it occurs |
| A whole protein | Smith-Waterman | Global on the query, or Global on both sequences | Claim wording such as "a sequence at least 90% identical to SEQ ID NO 2" is about the whole length, which a global alignment measures |
| An antibody | Smith-Waterman on the whole chain | Antibody CDR search | Antibody claims often name the six CDRs, and a CDR search finds each one on its own |
| DNA under 50 bases | BLAST, plus an exact scan of every stored sequence | Smith-Waterman | BLAST can miss a short query with changed bases, and Smith-Waterman finds more of them. In the runs below, it took 49.5 to 72.4 seconds for each query on Patent DNA |
| Long DNA, 300 to 2,000 bases | BLAST | Nothing more, in most cases | In the benchmark, BLAST found 19 of 20 long queries that kept only 70% of their bases |
| A claim with allowed residues, such as "wherein the amino acid at position 2 is A, G or S" | Smith-Waterman | Pattern, with the allowed residues in brackets, such as H-[AGS]-E-G-T | A pattern finds every combination the claim allows, letter for letter |
| A claim that allows a number of changes, such as "up to 3 substitutions" | Smith-Waterman for protein; for DNA, BLAST, plus an exact scan under 50 bases | Within k changes, with k = 3 and Substitutions only | Within k changes lists every stored sequence within the changes the claim allows, with no score or E-value cut, and counts them all |
| A sequence with a modified residue | Smith-Waterman | Pattern, with x at each modified position | A patent's sequence may write a modified residue as its plain letter or as X, and x matches either. How to read a result shows such an X |
Each method
Exact text
- For
- A sequence that must appear as written, such as a peptide, a primer or a probe.
- Searches
- Every stored sequence of the sets you check, DNA with DNA or protein with protein.
- Settings
- No scoring settings. For DNA, Search both strands, on unless you clear it.
- Limits
- One changed letter means no match, and a stored N or X matches only itself. The list stops at 1,000,000 rows, and its totals still count every match.
- Example
- The SIINFEKL sample, an exact search of Patent proteins on the hosted service.
- In the guide
- Exact and pattern search.
Pattern
- For
- A claim that allows a choice of residues at a position, such as "wherein the amino acid at position 2 is A, G or S", or a motif with variable positions.
- Searches
- Every stored sequence, as Exact text does, for every combination the pattern allows, letter for letter.
- Settings
- Pattern syntax: PROSITE, the first choice, or Regular expression. Sequences never guesses which you mean. In DNA, IUPAC codes such as
RandNstand for their bases. - Limits
- At most 100 parts, 4 ranges such as
x(2,6), repeat counts up to 1,000 and 20,000 characters. A stored N or X matches only itself. - Example
- Claim 1 of US12788009B2 as a PROSITE pattern, the demo pattern on the search form.
- In the guide
- Exact and pattern search.
Within k changes
- For
- A claim that allows a number of changes, such as "up to 3 substitutions".
- Searches
- Every stored sequence of the set, DNA with DNA or protein with protein, with no score, E-value or rank cut, so its counts are complete.
- Settings
- k, from 0 to 5, and what counts as a change: Substitutions only, or Substitutions, insertions and deletions.
- Limits
- A query of up to 64 letters, with k below its length, and up to 50,000 hits for each query, the closest first. It runs where its scanner,
kscan, is installed, and the Sequences container image includes it. - Example
- Within k changes on the benchmark, below.
- In the guide
- Within k changes.
BLAST
- For
- Long DNA, or many queries, when time matters. Automatic runs it for DNA, adding an exact scan under 50 bases.
- Searches
- Every set, and BLAST databases outside the snapshot such as core_nt:
blastnfor DNA andblastpfor protein, and under Translated search,blastxfor a DNA query on protein sets andtblastnfor a protein query on DNA sets, with the DNA read in all six frames. - Settings
- Scoring matrix, gap costs, word size, low-complexity filter and genetic code, with a Maximum E-value and Maximum hits per query.
- Limits
- It looks only where a short word matches exactly, so it can miss a short query or one with many changed letters: see The benchmark. It keeps up to 5,000 sequences for each query.
- Example
- The insulin sample, DNA on Patent DNA, and the GFP sample, a protein on Patent DNA read in six frames, both on the hosted service, where Automatic ran BLAST.
- In the guide
- Search methods and Scoring settings.
Smith-Waterman
- For
- Short or changed matches that BLAST misses, such as a peptide or short DNA. Automatic runs it for protein.
- Searches
- Every stored sequence of the set, letter by letter, DNA with DNA or protein with protein, by FASTA36
ssearch36. - Settings
- Scoring matrix and gap costs, with a Maximum E-value and Maximum hits per query.
- Limits
- It reads every stored sequence, so it takes longer than BLAST, most of all on DNA: 49.5 to 72.4 seconds for each DNA query of 21, 30 and 50 bases on Patent DNA in the runs below. It keeps up to 5,000 sequences for each query, each with its best alignment.
- Example
- The GLP-1 sample, where Automatic ran Smith-Waterman on the hosted service, and How to read a result, one of its hits drawn letter by letter.
- In the guide
- Search methods.
Global alignment
- For
- A claim about a whole sequence, such as "a sequence at least 90% identical to SEQ ID NO 2". A local alignment can score well on a part and say nothing about the rest.
- Searches
- Every stored sequence of the set, DNA with DNA or protein with protein. Global on the query, by FASTA36
glsearch36, aligns all of the query with the part of each stored sequence it fits best. Global on both sequences, byggsearch36, aligns all of the query with all of each. - Settings
- Scoring matrix and gap costs, as for Smith-Waterman.
- Limits
- Global on both sequences scores a short query against a long sequence low. Each keeps up to 5,000 sequences for each query.
- Example
- One query, seven methods, below, where both ran on one protein query beside the other methods.
- In the guide
- Search methods.
Antibody CDR search
- For
- Antibody claims that name the CDRs, the complementarity-determining regions: six short loops, three on each chain, that bind the antibody's target.
- Searches
- A protein set, each CDR on its own, with the exact scan and, where FASTA36 is installed, Smith-Waterman, up to 5,000 sequences for each CDR.
- Settings
- The numbering, Kabat, Chothia or IMGT, three common schemes for where each CDR starts and ends, and a Minimum identity from 50 to 100 percent, 80 by default.
- Limits
- Up to 10 heavy or light chains of up to 2,000 letters each, of which human and mouse heavy, kappa and lambda chains can be numbered, or six CDRs typed in. A CDR counts as found at the minimum identity or more over its full length.
- Example
- Trastuzumab's two variable domains, from PDB 1N8Z, which the Use demo data button fills.
- In the guide
- Antibody CDR search.
To compare many sequences at once, such as the chains a search found, Align under Sequence tools lines up as many as 200 of them with MAFFT, a program that aligns many sequences at once, and shows their majority consensus: at each position, the letter most of them hold.
Recorded runs
The benchmark
A benchmark of Sequences 0.22.0, run on November 6, 2026, searched a fixed set of queries with each method on one snapshot of the patent sets, the copy of the sets a server searches. Patent DNA then held 28.8 million sequences and Patent proteins 10.5 million. Each query was cut from a stored sequence, some with letters changed at random. A query counts as found when the stored sequence it was cut from came back.
| Queries | Exact text | Smith-Waterman | BLAST |
|---|---|---|---|
| Peptides of 8 to 30 residues, unchanged | 20 of 20 | 20 of 20 | 14 of 20 |
| Peptides of 8 to 30 residues, keeping 80% of their letters | 0 of 20 | 18 of 20 | 11 of 20 |
| DNA of 21 to 50 bases, keeping 80% of their bases | 0 of 20 | 16 of 20 | 8 of 20 |
For the peptides, Smith-Waterman ran as the automatic choice. BLAST also missed exact DNA: of 12 DNA fragments of 15 bases, cut unchanged, BLAST found 10, while Exact text found 12 and Automatic, which adds an exact scan under 50 bases, found 12. For long DNA, 300 to 2,000 bases, BLAST, which Automatic runs, found 20 of 20 queries that kept 80% of their bases, and 19 of 20 that kept 70%.
Within k changes on the benchmark
Within k changes ran 382 of the benchmark's queries on its snapshot: the peptides of 8 to 30 residues and the DNA fragments of 15 to 50 bases, each unchanged or with letters substituted. Whenever k was at least the number of letters changed, it found the stored sequence the query was cut from, counting substitutions only or insertions and deletions too: all 186 protein queries and all 117 DNA queries with 0 to 5 letters changed. In the benchmark, Smith-Waterman missed 7 DNA fragments that kept 80% to 95% of their bases, and Within k changes found each of them within 4 changes. Timed alone on 12 threads at k = 5, the scan took at most 2.1 seconds for each of 36 protein queries on Patent proteins, and at most 17.9 seconds for each of 10 DNA queries on Patent DNA. A query with more than 1,000,000 hits reads the set twice to list its closest: on a larger snapshot, the slowest such queries took 2.9 seconds for protein and 57.8 for DNA.
Searches measured on the hosted service
On November 14, 2026, Sequences 0.87.1 on the hosted service ran one protein query and one DNA query with each method, one search at a time, on 12 CPUs. The seconds run from a search's start to its end. A hit is a stored sequence that a search returned, and on DNA a sequence can return twice, once for each of DNA's two strands. An E-value is about how many hits this good a search of this size would find by chance alone. BLAST and the FASTA36 methods keep hits up to an E-value cutoff, which Search methods in the user guide gives, and at most 5,000 for each query. So the counts say what each method returned, not how complete it is.
The protein query was 71 residues, all of one stored sequence, unchanged, searched on Patent proteins, then 17.7 million sequences:
| Method | Seconds | Hits returned |
|---|---|---|
| Automatic, which ran Smith-Waterman | 4.8 | 709 |
| BLAST | 1.0 | 9 |
| Smith-Waterman | 4.7 | 709 |
| Global on the query | 4.4 | 392 |
| Global on both sequences | 4.4 | 2,079 |
| Exact text | 0.4 | 1 |
| Pattern | 0.6 | 1 |
The DNA query was 30 bases cut unchanged from a stored sequence of 134 bases, searched on Patent DNA, then 74.9 million sequences:
| Method | Seconds | Hits returned |
|---|---|---|
| Automatic, which ran BLAST and an exact scan | 15.9 | 5,000 |
| BLAST | 4.6 | 5,000 |
| Smith-Waterman | 49.5 | 107 |
| Global on the query | 72.7 | 2,856 |
| Global on both sequences | 23.0 | 2,551 |
| Exact text | 4.4 | 1 |
| Pattern | 7.4 | 1 |
The pattern was the query with its two middle letters replaced by x(1,3), any 1 to 3 letters. On DNA queries of 21, 30 and 50 bases, Smith-Waterman took 49.5 to 72.4 seconds. On November 15, 2026, Sequences 0.90.0 ran the same protein query on TrEMBL, 147.4 million sequences: 99.7 seconds with Smith-Waterman and 20.0 with BLAST. Sizing and cost in the installation guide gives the times of every method on every set.
One query, seven methods
On November 15, 2026, Sequences 0.93.0 ran the protein query above once more with each method, one search at a time, and compared the sequences each one returned. Each method returned the same number of hits as in the run above. Every method found the stored sequence the query came from, and it was the only sequence all seven found. Smith-Waterman gave it an E-value of 1.1 × 10⁻⁴⁸, and the next hit 0.013. Within k changes came later, and this query of 71 residues is longer than the longest query it takes: see Within k changes.
| Method | Hits with an E-value under 10 | Sequences no other method found |
|---|---|---|
| Automatic, which ran Smith-Waterman | 12 | The same list as Smith-Waterman |
| BLAST | 9 | 0 |
| Smith-Waterman | 12 | 502 |
| Global on the query | 6 | 229 |
| Global on both sequences | 83 | 2,026 |
| Exact text | No E-value | 0 |
| Pattern | No E-value | 0 |
Most of the hits in the run above are weak. BLAST keeps hits up to an E-value of 10 and the FASTA36 methods up to 1,000, so their longer lists reach down to matches that chance alone would give. Each sequence that only Smith-Waterman or Global on the query found had an E-value of 16 or more. Global on both sequences found many sequences the others did not because it compares the query only with stored sequences near its own length, here 53 to 93 residues, and aligns all of each. All 9 of BLAST's hits were also in Smith-Waterman's list. Automatic returned the same 709 sequences as Smith-Waterman, and for 14 weak hits the E-value or bit score differed slightly, because the FASTA36 build of that release drew the random sample of scores it fits its statistics to differently on each run. Since then, Smith-Waterman and the global methods return the same scores and E-values each time, whatever the number of threads, and score an X in a stored protein differently, as Search methods in the user guide says, so the same search on a later release can give slightly different scores, E-values and counts from these.
Why this works
Speed against completeness. Exact text and Pattern read every stored sequence, so they miss no exact match and find nothing else. Within k changes also reads every stored sequence, and counts changes rather than scoring them, so it lists every sequence within k changes and nothing further. BLAST looks only where a short word matches, which makes it the fastest way to find similar sequences, and is why it misses some short or changed ones. Smith-Waterman compares the query with every stored sequence, so it finds what BLAST misses, and takes longer. A global alignment measures the whole length, which a claim about the whole sequence needs.
Why Automatic chooses as it does. For protein, Smith-Waterman took 4.7 seconds on Patent proteins in the run above, and in the benchmark it found 18 of 20 changed peptides where BLAST found 11, so Automatic runs Smith-Waterman for protein. Patent DNA is larger, 74.9 million sequences against 17.7 million, and in the runs above Smith-Waterman took 49.5 to 72.4 seconds for each DNA query of 21, 30 and 50 bases, so Automatic runs BLAST for DNA. It adds an exact scan for a query under 50 bases, so that its exact matches are complete: in the benchmark, BLAST alone found 10 of 12 unchanged fragments of 15 bases, and Automatic found 12.
What a search record proves. Every search keeps a record: the search engine's version and each search program's, the set and snapshot it searched, every setting, each query, and the SHA-256 of each file the search wrote, a fingerprint that changes if the file changes at all. So you, or anyone you give the record to, can see which method ran on which data, and check that a saved file is the one the search wrote. See Exports and search records.
More
- How to read a result: one hit of a real search, drawn and measured letter by letter.
- Search methods and The automatic choice in the user guide.
- Sizing and cost in the installation guide: how long each method takes on each set, and what a server needs to run it.