Hi there! 

I'm blasting (blastx2.2.28) my assembly to the annotated refseq. Below - the command line I used: 

    blastx -query assembly.fa -out Blast -db BlastCustomDB -num_threads 8 -evalue 1e-6 -best_hit_score_edge 0.05 -best_hit_overhang 0.25 -max_hsps_per_subject 1 -max_target_seqs 1 -outfmt 6 

I specified quantity of HighcoringSegmentPairs (1), but still BLAST output contains two or more HSP for some queries. 

Here's the output example (it goes like query ID, subject ID, identity %, length of HSP, mismatches, gap opens ... E-value, bit score):
 
     TR60-c0_g1_i1	EKV52009.1	37.36	174	57	7	...	        2e-14	74.3
     TR60-c0_g1_i1	EKV52009.1	64.37	87	30	1	...	        6e-10	59.7
     TR61-c0_g1_i1	EKV51611.1	49.41	253	121	2	...	        4e-47	 161
     TR64-c0_g1_i1	EKV51289.1	60.00	175	62	1	...	        9e-66	 208

After examination with 'uniq' command it became clear that all duplicated results for a query each time were aligned to a *single gene in different position* (what is exactly HPSs). 

There's the way just [to remove multiple HSP][1], but maybe it's possible to change some parameters in blast run to get the right single-hit-single-HSP output directly? 

Thanks in advance!


  [1]: https://www.biostars.org/p/90188/
In NCBI BLAST+ versions below 2.2.29, the <code>-max_hsps_per_subject</code> parameter does not work correctly. This parameter was further replaced with <code>-max_hsps</code>, which works fine.

Download the latest NCBI BLAST+ (from [NCBI FTP][1]) and you will be fine:

    blastx -query assembly.fasta -db blastdb.fa -max_hsps 1 -outfmt 6

Output:

    TR60-c0_g1_i1	EKV52009.1	37.356	174	57	7	809	288	273	394	1.32e-18	74.3

  [1]: ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/LATEST