In the BLAST+ packages, you can align two sequences instead of searching a database:

tblastn -query seq1.fa -subject seq1.fa

The web BLAST documentation states that e-values are calculated from the nr database:

Because BLAST 2 Sequences uses the size of the current nucleotide or protein nr database to calculate Expect values, you may need to significantly increase the Expect threshold in order to see shorter alignments.

However, the command-line documentation explicitly states that you cannot provide both a database and a subject sequence:

-db <String>
BLAST database name
 * Incompatible with:  subject, subject_loc
-subject <File_In>
Subject sequence(s) to search
 * Incompatible with:  db, gilist, seqidlist, negative_gilist,
   db_soft_mask, db_hard_mask

How is the e-value calculated when using BLAST-2-Sequences on the command line? (I am fairly certain I do not have the nr database downloaded.)



2 Answers 2


You do not need the nr database for BLAST to calculate an E-value. It will be calculated based on the alignment of n sequences. The exact procedure is mathematically complex but if you want to read the original paper it is here: http://www.ncbi.nlm.nih.gov/pmc/articles/PMC53667/pdf/pnas01031-0226.pdf

a simplified version you will find here:


  • $\begingroup$ BLAST does need a database to calculate the E-value. A database should first be made out of the n sequences and then, as you said, BLAST will calculate E-value from that. $\endgroup$
    Commented Jan 30, 2016 at 9:16
  • $\begingroup$ Well yes in the sense that you need sequences to look after but the database can be as numerous as one other sequence $\endgroup$
    – Xqua
    Commented Jan 31, 2016 at 17:41

You should first understand what the meaning of E-value is. E-value is the likelihood of a random match having a certain score in given database. So, you are right that a database is required to calculate E-value. The online algorithm calculates it from not necessarily the nr database but any selected target database which could be RefSeq or organism specific databases (nr is the default).

When you are just aligning two sequences, E-value does not make any sense and there is no need to look at E-value at all. If you are aligning a sequence with a list of many sequences then you have to first make a database of your selected sequences using makeblastdb.

Now, when you do the alignment, E-value will be calculated from this database.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .