Return to FAQ Table of Contents
BLAT is an alignment tool like BLAST, but it is structured differently. On DNA, BLAT works by keeping an index of an entire genome in memory. Thus, the target database of BLAT is not a set of GenBank sequences, but instead an index derived from the assembly of the entire genome. By default, the index consists of all non-overlapping 11-mers except for those heavily involved in repeats, and it uses less than a gigabyte of RAM. This smaller size means that BLAT is far more easily mirrored than BLAST. Blat of DNA is designed to quickly find sequences of 95% and greater similarity of length 40 bases or more. It may miss more divergent or shorter sequence alignments. (The default settings and expected behavior of standalone Blat are slightly different from those on the graphical version of BLAT.)
On proteins, BLAT uses 4-mers rather than 11-mers, finding protein sequences of 80% and greater similarity to the query of length 20+ amino acids. The protein index requires slightly more than 2 gigabytes of RAM. In practice -- due to sequence divergence rates over evolutionary time -- DNA Blat works well within humans and primates, while protein Blat continues to find good matches within terrestrial vertebrates and even earlier organisms for conserved proteins. Within humans, protein Blat gives a much better picture of gene families (paralogs) than DNA Blat. However, BLAST and psi-BLAST at NCBI can find much more remote matches.
From a practical standpoint, BLAT has several advantages over BLAST:
BLAT is commonly used to look up the location of a sequence in the genome or determine the exon structure of an mRNA, but expert users can run large batch jobs and make internal parameter sensitivity changes by installing command line Blat on their own Linux server.
First, check if you are using the correct version of the genome. For example, two versions of the human genome are currently in wide use (hg19 and hg38) and your sequence may be only in one of them. Many published articles do not specify the assembly version so trying a few may be necessary.
Very short sequences that go over a splice site in a cDNA sequence can't be found, as they are not in the genome. qPCR primers are a typical example. For these cases, try using In-Silico PCR and selecting a gene set as the target. In general, the In-Silico PCR tool is more sensitive and should be preferred for pairs of primers.
If you have verified that you are using the correct genome and that the sequence is indeed there, for example by using the "Short match" track, the problem may be a result of BLAT's query-masking. This happens if your input sequence is part of a repeat and present thousands of times in the genome. The online version of Blat masks 11mers from the query that occur more than 1024 times in the genome. This is done to improve speed, but may result in missed hits when you are searching for sequences in repeats.
If your input sequence is not one of the very repetitive sequences, but still present a few dozen times on a chromosome, note that Blat results are limited to 16 results per chromosome strand. This means that at most 32 locations per chromosome are returned.
To find all matches for repetitive sequences with the online version of Blat, you can add more flanking sequence to your query. If this is not possible, the only alternative is to download the executables of Blat and the .2bit file of a genome to your own machine and use BLAT on the command line. See Downloading BLAT source and documentation for more information.
Due to the high demand on our Blat servers, we restrict service for users who programmatically query the BLAT tool or do large batch queries. Program-driven use of BLAT is limited to a maximum of one hit every 15 seconds and no more than 5,000 hits per day. Please limit batch queries to 25 sequences or less.
For users with high-volume Blat demands, we recommend downloading the BLAT tool for local use. For more information, see Downloading BLAT source and documentation.
Blat source and executables are freely available for academic, nonprofit and personal use. Commercial licensing information is available on the Kent Informatics website.
Blat source may be downloaded from http://www.soe.ucsc.edu/~kent (look for the blatSrc* zip file with the most recent date). For Blat executables, go to http://hgdownload.soe.ucsc.edu/admin/exe/ and choose your machine type.
Documentation on Blat program specifications is available here.
We almost always expect there to be some small differences between the hgBlat/gfServer and the stand-alone command-line Blat. The best matches can be found using pslReps and pslCDnaFilter utilities. The web-based Blat is tuned permissively with a minimum cut-off score of 20, which will display most of the alignments. Other than to confirm that your command-line Blat is working, there is little use in perfectly replicating the web-based Blat results. We advise deciding which filtering parameters make the most sense for the experiment or analysis. Often these settings will be different and more stringent than those of the web-based Blat. With that in mind, use the following settings to replicate the search results of the web-based Blat:
faToTwoBit:
gfServer (this is how the UCSC web-based Blat servers are configured):
gfServer start blatMachine portX -stepSize=5 -log=untrans.log
database.2bit
gfServer start blatMachine portY -trans -mask -log=trans.log
database.2bit
For enabling DNA/DNA and DNA/RNA matches, only the host, port and twoBit files are needed. The same port is used for both untranslated BLAT (gfClient) and PCR (webPcr). You'll need a separate Blat server on a separate port to enable translated Blat (protein searches or translated searches in protein-space).
gfClient:
standalone Blat:
blat -stepSize=5 -repMatch=2253 -minScore=0 -minIdentity=0
database.2bit query.fa output.psl
Notes on repMatch:
For more information about how to replicate the score and percent identity matches displayed by our web-based Blat, please see this BLAT FAQ.
For more information on the parameters available for BLAT, gfServer, and gfClient, see the BLAT specifications.
Using any -ooc option in Blat, such as -ooc=11.ooc, speeds up searches similar to repeat-masking sequence. The 11.ooc file contains sequences determined to be over-represented in the genome sequence. To improve search speed, these sequences are not used when seeding an alignment against the genome. For reasonably sized sequences, this will not create a problem and will significantly reduce processing time.
By not using the 11.ooc file, you will increase alignment time, but will also slightly increase sensitivity. This may be important if you are aligning shorter sequences or sequences of poor quality. For example, if a particular sequence consists primarily of sequences in the 11.ooc file, it will never be seeded correctly for an alignment if the -ooc flag is used.
In summary, if you are not finding certain sequences and can afford the extra processing time, you may want to run Blat without the 11.ooc file if your particular situation warrants its use.
There is no option to command-line Blat that gives you the percent ID and the score. However, we have created scripts that include the calculations:
pslScore.pl
pslScore.c
and associated library functions pslScore
and pslCalcMilliBad
in
psl.c
See our FAQ on source code licensing and downloads for information on obtaining the source.
The code for the "I'm feeling lucky" Blat search orders the results based on the sort output option that you selected on the query page. It then returns the highest-scoring alignment of the first query sequence.
If you are sorting results by "query, start" or "chrom, start", generating the "I'm feeling lucky" result is straightforward: sort the output file by these columns, then select the top result.
To replicate any of the sort options involving score, you first must calculate the score for each result in your PSL output file, then sort the results by score or other combination (e.g. "query, score" and "chrom, score"). See the section on Replicating web-based Blat percent identity and score calculations for information on calculating the score.
Alternatively, you can try filtering your Blat PSL output using either the
pslReps
or
pslCDnaFilter
program available in the Genome Browser source code. For information on
obtaining the source code, see our FAQ on source code licensing and
downloads.
Here are some guidelines for configuring standalone Blat and gfServer/gfClient for these conditions:
The above changes will make Blat more sensitive, but will also slow the speed and increase the memory usage. It may be necessary to process one chromosome at a time to reduce the memory requirements.
A note on filtering output: increasing the -minScore parameter value beyond one-half of
the query size has no further effect. Therefore, use either the pslReps
or
pslCDnaFilter
program available in the Genome Browser source code to filter for the size,
score, coverage, or quality desired. For information on obtaining the source code, see our
FAQ on source code licensing and downloads.
BLAT is designed to quickly find sequence similarity between query and target sequences. Generally, Blat is used to find locations of sequence homology in a single target genome or determine the exon structure of an mRNA. Blat also allows users to compare the query sequence against all of the default assemblies for organisms hosted on the UCSC Genome Browser. The Search ALL feature may be useful if you have an ambiguous query sequence and are trying to determine what organism it may belong to.
Selecting the "Search ALL" checkbox above the Genome drop-down list allows you to search the genomes of the default assemblies for all of our organisms. It also searches any attached hubs' Blat servers, meaning you can search your user-generated assembly hubs. The results page displays an ordered list of all our organisms and their homology with your query sequence. The results are ordered so that the organism with the best alignment score is at the top, indicating which region(s) of that organism has the greatest homology with your query sequence. The entire alignment, including mismatches and gaps, must score 20 or higher in order to appear in the Blat output. By clicking into a link in the Assembly list you will be taken to a new page displaying various locations and scores of sequence homology in the assembly of interest.