Hi,

I have downloaded the current version of the stand-alone-blast (ncbi-blast-2.2.29+) and I am trying to use blast (blastn) to find similarity of of a group of nucleotide sequences that I have. However, I am interested on only the top 3 matches. I tried searching online and I saw some posts that suggests using `-K`, but I realized this does not work with the new version that I am using. I looked at the help document and I tried using (`-max_target_seqs`) and (`-num_alignments`) but none of them worked. The result contains all the matches found by blast.

Does anyone know how to limit the results to let say just top 3 matches?

Thanks!
Depends what you are trying to do.

As [Neilfws][1] says, if you want to limit the number of hits reported you can use (from the NCBI BLAST+ help output):

```
 -num_descriptions <Integer, >=0>
   Number of database sequences to show one-line descriptions for
   Not applicable for outfmt > 4
   Default = `500'
    * Incompatible with:  max_target_seqs
 -num_alignments <Integer, >=0>
   Number of database sequences to show alignments for
   Default = `250'
    * Incompatible with:  max_target_seqs
```

These correspond to the '-v' and '-b' options in legacy NCBI BLAST:

```
  -v  Number of database sequences to show one-line descriptions for (V) [Integer]
    default = 500
  -b  Number of database sequence to show alignments for (B) [Integer]
    default = 250
```

The '-K' option in legacy NCBI BLAST:

```
  -K  Number of best hits from a region to keep. Off by default.
If used a value of 100 is recommended.  Very high values of -v or -b is also suggested [Integer]
```

Is slightly different and maps to the '-culling_limit' parameter in NCBI BLAST+:

```
 -culling_limit <Integer, >=0>
   If the query range of a hit is enveloped by that of at least this many
   higher-scoring hits, delete the hit
    * Incompatible with:  best_hit_overhang, best_hit_score_edge
```

You may also want to limit the number of matches reported per hit (i.e. limit the number of HSPs):

```
 -max_hsps <Integer, >=0>
   Set maximum number of HSPs per subject sequence to save (0 means no limit)
   Default = `0'
```

For more information about the NCBI BLAST+ command-line options see:

 - NCBI BLAST+ usage/help output (run the relevant BLAST program with the '-help' option)
 - [BLAST Command Line Applications User Manual][2]
 - [NCBI's BLAST help][3]

 [1]: /u/66/
 [2]: http://www.ncbi.nlm.nih.gov/books/NBK1763/
 [3]: http://blast.ncbi.nlm.nih.gov/Blast.cgi?CMD=Web&PAGE_TYPE=BlastDocs