Take the 2-minute tour ×

I have a set of scaffolds from a genome assembly, and I want to align a collection of proteins from various species to it. I can do this using BLAST in two ways:

  • Create a BLAST database of the scaffolds, and run tblastn on it with the proteins as the query.

  • Create a BLAST database of the proteins, and run blastx on it with the scaffolds as the query.

Should both of these produce the exact same hits? Will there be any significant difference in running time between them?

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

Quick answer: use tblastn.

As a general rule, when comparing two datasets using BLAST, it is recommended to use the larger of the two sets as the database and the smaller as queries. The main difference is one of computational time. Blast is optimized for large databases.

You are also likely to get different hits. Blast's e-value is calculated based on the size of the database, among other parameters. Roughly, the e-value answers the question: "How many high scoring sequence pairs with X% of sequence identity and Y length would I expect to find in a database of size X by chance?". Your e-values could be artificially high if you use the protein sequences as a database. I am not sure about this, but there may also be differences in the way gap penalties are dealt with by tblastn and blastx.

That said, I would first try doing this using a tool specifically designed for the task. BLAST has no model for dealing with splicing and it is a pain to build gene models from BLAST results. To align protein sequences against genomic DNA I would use either exonerate (with the p2g model) or genewise. Both programs incorporate splicing models and will give you a decent prediction of the gene structure of your target genes. The following are extracts from each program's man page:


Genewise2 compares a protein sequence to a genomic DNA sequence, allowing for introns and frameshifting errors.


exonerate is a general tool for sequence comparison.


-m | --model


This model allows alignment of a protein sequence to genomic DNA. This is similar to the protein2dna model, with the addition of modelling of introns and intron phases. This model is simliar to those used by genewise.

In general, genewise gives slightly better results but is much slower and cannot deal with multi fasta files. It is best when you know that your query protein will align against a specific nucleotide sequence.

Exonerate is fast but uses some heuristics that can give slightly worse results in some cases. Personally, I use exonerate to get my hits and then, if necessary, refine the gene model using genewise. In most cases, exonerate should be enough though.


exonerate -m p2g -q proteins.fasta -t scaffolds.fasta > output.txt

genewise -pretty -pep -gff single_prot.fasta single_scaff.fasta > output.txt

share|improve this answer
Thanks for your response. I'll be using the BLAST results to construct a "hints" file for use with the Augustus gene prediction program, so this isn't generating my final gene model. That said, it still might be better to use one of the programs you mention. –  Colin Oct 3 '12 at 16:10
If you want to go the BLAST way, use tblastn. I really recommend exonerate though, it knows about in-frame stop codons, splice sites, exons etc. Otherwise, you will need to filter out pseudogenes and duplications from your BLAST hits. –  terdon Oct 3 '12 at 16:18
add comment

Your Answer


