BLAST seed and extend
Finds shared words between two sequences and extends them into HSPs, the way BLAST starts.
Finds shared words between two sequences and extends them into HSPs, the way BLAST starts.
A full Smith-Waterman comparison of a query against a database is exact and far too slow, so BLAST replaces it with a heuristic in three steps. This page runs the first two on one pair of sequences so you can watch them work.
For a real database search use NCBI BLAST, or blast+ locally. To turn a raw score from this page into the number of chance hits expected in a database of a given size, use theE-value calculator. To get the alignment BLAST would have found if it never took a shortcut, useSmith-Waterman, orNeedleman-Wunsch for an end-to-end alignment.
| Parameter | NCBI default | Effect |
|---|---|---|
| Word size w | 11 blastn, 28 megablast, 3 blastp | Smaller finds more, and takes longer |
| Threshold T | 11 (blastp) | Lower lets less similar words seed |
| Drop-off X | 20 blastn, 7 bits blastp | Larger pushes extensions through diverged patches |
| Match, mismatch | +2, −3 blastn | Sets the identity at which extension breaks even |
X is entered here in raw score points, the same units as the HSP score. NCBI states the protein drop-off in bits instead, and 7 bits under BLOSUM62 is roughly 15 raw points, which is why the protein tab starts at 16.
With +2 for a match and −3 for a mismatch, an extension gains ground only while the region is more than 60 % identical, because 0.6 × 2 = 0.4 × 3. That single ratio is what decides how far an HSP runs into a diverged flank, and why changing the match and mismatch scores changes the length of every hit.
The DNA example is a 200 nt query against a 200 nt subject that is 83 % identical overall, but unevenly: two conserved blocks with a heavily diverged stretch between them. At the defaults (w = 11, match +2, mismatch −3, X = 20) the tool finds 67 word hits that collapse into 2 HSPs:
The 44 nt between them, query 84 to 127, is never reported although the two sequences are still 48 % identical there. No exact 11-mer occurs in it, so no seed lands there, and below the 60 % break-even identity the extensions from either side run out of score and stop. Two settings recover it. Drop the word size to 7 and the seeds appear: 99 word hits and 6 HSPs, the four new ones only 7 to 9 nt long. Or raise the drop-off to 40 and the extension from the left block survives the bad stretch: the two HSPs merge into a single one covering query 1 to 200 with a score of 230.
The protein example is the first 76 residues of human beta-globin against human myoglobin, two globins with the same fold. With w = 3, T = 11 and BLOSUM62 there are 21 word hits and 16 HSPs, and the top one is the real alignment: query 24 to 70 against subject 25 to 71, score 65, 17 of 47 identical (36 %). Three word hits fall inside it, the best being the query word AHG against the subject's KHG, worth 13. Three weak near-matches in the middle of the protein were enough to find a 47-residue alignment that is barely a third identical, which is what the neighbourhood-word threshold T buys.
No. It is a working model of the two steps that make BLAST fast, word hits and ungapped extension, run on one query against one subject sequence you supply. There is no database, no gapped extension, no low-complexity filter and no E-value. For a real search, use NCBI BLAST or a local blast+ installation. Use this page to understand why a real search finds what it finds.
A short stretch, w letters long, that the query and the subject share. BLAST indexes every w-letter word of the query, scans the subject for them, and only where one is found does it do any alignment work. That is the whole trick: instead of comparing every position with every other, it looks only where a short exact or near-exact match already exists. blastn uses w = 11, megablast 28, and blastp 3.
It decides when to stop extending. The extension walks outward from the seed adding the score of each new pair of letters, and it stops when the running score has fallen X below the best score seen so far. The alignment is then trimmed back to that best point. A small X stops at the first bad patch and gives short, tight HSPs; a large X pushes through a diverged region and can join two conserved blocks into one HSP.
Because no seed lands in it. If two sequences are 70 percent identical but their matches are scattered, an exact 11-letter word may never occur, and with no seed there is no extension and no hit. Lower the word size and the region appears; that is exactly the speed-for-sensitivity trade every BLAST parameter set makes. A Smith-Waterman alignment has no word step and so cannot miss it.
Through the Karlin-Altschul equation, which needs the raw score, the query length, the size of the database searched, and the lambda and K parameters of the scoring system. The raw scores this page reports are the S in that equation. Put one into the E-value calculator together with a database size and you get the number of chance hits that good expected in a real search.