I'm using BLAST to identify a short protein (BLASTp). If I check the short query then the word size reduces from 3 to 2. However the search will then be less reliable right? Because reducing the word size increases the chance of finding matches? So my instinct would be to raise the word size to almost the whole length of the query, because with a short query you want to search really specific to reduce output results, so apparently I'm missing something.

So I hope someone can explain me why reducing the word size from 3 to 2 is better for short proteins while using BLASTp

  • $\begingroup$ > As a general rule, playing with the word size is a question of finding the right balance between specificity and sensitivity. I guess that's why they said that 'A good rule of thumb is that the query length must be at least twice the Word size. ' on a blast FAQ site. see here $\endgroup$ – Siyuan Feng Aug 15 '18 at 8:59

No, the search won't be less reliable. It will only be more sensitive, more capable of finding matches. To understand this, you need to understand how the BLAST algorithm works, what the word size means.

When you use a word size of $N$, BLAST starts by looking for a match of length $N$ between your query and target sequences. If such a match is found, BLAST then attempts to extend the match as far as possible. So, for example, consider these two sequences:

> query
> target

As you can see, they are quite similar:

query           CRKKL
target          CRAKL
                ** **

Now, what happens if you try to find the target sequence with BLAST using the query sequence and a word size of 2 ($N=2$)? BLAST will take the first $N$ characters of the query and try to match them against the target:


It will then try to extend:


It will find a gap and apply the gap penalty, but continue matching since the next characters match1, thereby increasing the overall score of the alignment:

** *

And so on and so forth. BLAST starts by matching the first $N$-sized word and then attempts to extend the alignment.

Now, what if we were using $N=3$?


Because the word size is now 3, we need at least three matching residues to match in order to attempt to extend the alignment. Since there is no 3-letter match, the target is missed.

So, decreasing the word size is better for finding small protein matches because it can use shorter matching sequences as an alignment seed. As a general rule, playing with the word size is a question of finding the right balance between specificity and sensitivity. Decreasing the word size helps you find more matches (increases sensitivity) but it will also find more divergent sequences (decrease specificity). Increasing the word size will reduce the number of matches (decrease sensitivity) because you need a longer perfect match to start extending the alignment, but will increase specificity for the same reason.

If you raise the word size to something close to the size of the query, you will only find almost exact matches. That might be what you want to do and it is what algorithms like BLAT which are designed to find near exact matches (for example, mapping a sequence to the genome it came from) do. Usually, however, we want less than perfect matches since we are looking for homologous sequences and not the exact same query. In such cases, we will decrease the word size for smaller proteins to increase our chances of finding homologs.

1 This is a bit of a simplification. The rules for extending alignments are a more complex but it serves to illustrate the point.

| improve this answer | |
  • $\begingroup$ If I understood correctly: If you want an almost exact match, the word size can be almost as high as the query length. However if you need to identify homologs (so assuming there isn't an exact match), you can better lower the word size to find more matches? @terdon $\endgroup$ – KingBoomie Jun 1 '16 at 14:32
  • $\begingroup$ @RickBeeloo more or less, yes. Having a large word size means that you will need a large section of the target to be identical to the query in order to find that target. A smaller word size makes the search more sensitive. $\endgroup$ – terdon Jun 1 '16 at 14:34
  • $\begingroup$ But why does lowering the word size using a blastn reduces sensitivity and lowering the word size using protein blast does exactly the opposite? Thankyou for explaining everything by the way ,helps me al lot. @terdon $\endgroup$ – KingBoomie Jun 1 '16 at 16:46
  • $\begingroup$ @RickBeeloo the SE sites are for questions and answers and don't lend themselves to discussions. Ping me in chat if you want more details. That said, unless I'm mistaken, reducing the word size would also increase sensitivity for blastn. $\endgroup$ – terdon Jun 1 '16 at 16:56
  • $\begingroup$ Sorry I made a mistake you are right @terdon, increasing word size also increases sensitivity for nucleotide searches $\endgroup$ – KingBoomie Jun 1 '16 at 17:07

Not the answer you're looking for? Browse other questions tagged or ask your own question.