BLAST options: max_target_seqs and num_alignments
1
8
Entering edit mode
9.4 years ago
biolab ★ 1.4k

Hi everyone,

Could anyone explain in a little bit more details what's the difference for the options max_target_seqs and num_alignments. If I only want the top hit, how to do in BLAST setting?

Thank you very much!

blast • 23k views
ADD COMMENT
13
Entering edit mode
9.4 years ago
Siva ★ 1.9k

It depends on what value you set for the option outfmt (options range from 0 to 12) and you can only use either one of the max_target_seqs or num_alignments options.

If you want only one hit:

  • If you set outfmt to any option <=4, set both -num_descriptions and -num_alignments to 1
  • If you set outfmt to any option >4, set -max_target_seqs to 1

I hope you are aware that if you want only the top hit and if your query sequence is in the database you are searching against ('nr' for example), your query sequence might be the top hit.

ADD COMMENT
3
Entering edit mode
ADD REPLY
2
Entering edit mode

See https://blastedbio.blogspot.com/2018/11/blast-max-alignment-limits-repartee-one.html and https://blastedbio.blogspot.com/2018/11/blast-max-alignment-limits-repartee-two.html for more details - all of -max_target_seqs, -num_descriptions and -num_alignments set an internal limit during the search as well as limiting the output.

ADD REPLY
0
Entering edit mode

and this is a reply from NCBI that the way blast works in case max_target_seqs set to 1 as proposed in this letter is not true. It seems that blast reports the first best hit found in the database ONLY in the case where e-value and bit score from multiple hits are the same which is why they recommend setting this parameter to at least 5 and then do the filtering. I don't know what is the chance you have 2 hits with these values being exactly the same, but if this is not the case, the reported hit is indeed the best hit considering all hits found in the database. Please someone correct me if I got it wrong. :)

https://academic.oup.com/bioinformatics/article/35/15/2699/5259186

ADD REPLY
0
Entering edit mode

Thank you, Siva. Your comment is really helpful.

ADD REPLY

Login before adding your answer.

Traffic: 2475 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6