Very recently a BLAST parameter
-max_target_seqs n got a lot of attention. Instead of the intuitive interpretation (return the best
n sequences) the parameters asks blast to return the first
n sequences that pass the e-value threshold. This is affecting thousands of workflows and analyses that assumed the intuitive interpretation.
I also found that there is another parameter called
-num_alignments. What is the difference? Related question on BioStars seems that is misinterpreting the
max_target_seqs parameter. Is
num_alignments also misunderstood?
Now the main question. How to actually run blast to give me the best
n hits in the database?
Till now I thought that this example will do the job:
blastp -query $QUERY -db $PROTEINS -out $BLASTOUT -evalue 1e-10 -outfmt 6 -num_alignments 5
-- edit --
Now I understood that i can not achieve the desired output only by parameters of blast, but I still don't see an answer to how can I get the best n hits. So I wanted to check out how to get all the results and that's not intuitive either. The parameter
-max_target_seqs is set by default to 500. Does it mean that if there are more than 500 significant hits, I don't have a guarantee for the best one? Do I have to specify
max_target_seqs to some crazy high number to be sure that I got them all?