Home Software Services About Contact usearch manual
patterns
 
Patterns, also called spaced seeds, are supported for all commands that use indexes (see index options). A pattern is a string of zeros and ones, e.g. 1011. One means "this position must match", and zero is a wildcard that means "any letter matches". So, for example, with pattern 1011, the 4-mers WQRD and WERD match.

Patterns are an alternative to compressed alphabets for allowing substitutions within a seed. Patterns can be applied to nucleotide and protein sequences. It turns out that with an appropriately chosen pattern, distantly related sequences tend to have more seeds in common if some zeroes are introduced compared to using an all-ones pattern with the same number of ones. This observation can be used to improve the speed-sensitivity trade-off with a given effective word length (i.e., the number of ones in the pattern).

By default,  protein ublast is the only command that uses patterns. This is because other commands are generally used for high-identity search and clustering tasks where patterns typically give only a marginal improvement in sensitivity.

The default PatternHunter pattern for nucleotide searches is 111010010100110111. This pattern has eleven 1s, corresponding to the default word length of eleven for BLASTN (compare 28 for MEGABLAST).

Examples
The default compressed alphabet and pattern for protein ublast could be specified by the following options:

-alpha A,KR,DENQ,C,G,H,ILVM,FYW,P,ST -pattern 10111011

A nucleotide database for sensitive search using the PatternHunter pattern could be created by:

usearch -makeudb_ublast nt.fasta  -pattern 111010010100110111