Sequences

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 queryAutomatic runsAddWhy
A short peptide, 8 to 30 residuesSmith-WatermanExact textExact text lists every stored sequence that holds the peptide letter for letter, and counts every place it occurs
A whole proteinSmith-WatermanGlobal on the query, or Global on both sequencesClaim 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 antibodySmith-Waterman on the whole chainAntibody CDR searchAntibody claims often name the six CDRs, and a CDR search finds each one on its own
DNA under 50 basesBLAST, plus an exact scan of every stored sequenceSmith-WatermanBLAST 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 basesBLASTNothing more, in most casesIn 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-WatermanPattern, with the allowed residues in brackets, such as H-[AGS]-E-G-TA 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 basesWithin k changes, with k = 3 and Substitutions onlyWithin 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 residueSmith-WatermanPattern, with x at each modified positionA 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.
QueryStored sequence
Exact text and Pattern: the query, or a sequence the pattern allows, appears unchanged in a stored sequence.

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 R and N stand 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.

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.
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: blastn for DNA and blastp for protein, and under Translated search, blastx for a DNA query on protein sets and tblastn for 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.
QueryStored sequence
BLAST starts from short words the query and a stored sequence share exactly, the short bars inside each, and extends them into an alignment.

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.
QueryStored sequence
Smith-Waterman finds the best-matching stretch of the query and of each stored sequence, wherever it lies.

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, by ggsearch36, 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.
Global on the queryGlobal on both sequences
In each pair of bars, the upper one is the query and the lower one a stored sequence. Top: global on the query aligns all of the query with part of the stored sequence. Bottom: global on both sequences aligns all of each.

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.
Heavy chainH1H2H3Light chainL1L2L3
A heavy chain and a light chain, with the three CDRs of each, H1 to H3 and L1 to L3, which antibody CDR search finds and searches one by one.

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.

QueriesExact textSmith-WatermanBLAST
Peptides of 8 to 30 residues, unchanged20 of 2020 of 2014 of 20
Peptides of 8 to 30 residues, keeping 80% of their letters0 of 2018 of 2011 of 20
DNA of 21 to 50 bases, keeping 80% of their bases0 of 2016 of 208 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:

MethodSecondsHits returned
Automatic, which ran Smith-Waterman4.8709
BLAST1.09
Smith-Waterman4.7709
Global on the query4.4392
Global on both sequences4.42,079
Exact text0.41
Pattern0.61

The DNA query was 30 bases cut unchanged from a stored sequence of 134 bases, searched on Patent DNA, then 74.9 million sequences:

MethodSecondsHits returned
Automatic, which ran BLAST and an exact scan15.95,000
BLAST4.65,000
Smith-Waterman49.5107
Global on the query72.72,856
Global on both sequences23.02,551
Exact text4.41
Pattern7.41

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.

MethodHits with an E-value under 10Sequences no other method found
Automatic, which ran Smith-Waterman12The same list as Smith-Waterman
BLAST90
Smith-Waterman12502
Global on the query6229
Global on both sequences832,026
Exact textNo E-value0
PatternNo E-value0

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