Answers.Body: <p>Yes, if a query sequence has no good alignment, blast will not return a result for it. Your command will indeed output only the best hit for each query sequence, but there is no reason to assume <em>all</em> of your sequences will have a match. </p>
  
  <p>Those that don't have a match won't be included in the output. This sounds perfectly normal unless you are blasting the same input file against a DB created from that file. Otherwise, you don't expect all of your sequences to necessarily have a match. </p>
  
  <p>Also note that since the default blastn settings are quite permissive (usually an e-value of 10, for example), don't make the mistake of assuming that a blast hit means anything. The details will always depend on the specific search you are running (I have discussed this a little in my answer <a href="https://biology.stackexchange.com/a/19356/1306">here</a>), but in the vast majority of cases, any hit with an e-value > 1 can safely be ignored. In most cases, you are only interested in e-values well under 1, actually. So you probably already have all sorts of spurious results in there anyway. </p>
  
  <p>For more details, please edit your question and explain what the query and DB files are.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-02T12:16:25.593Z
Answers.Text: Great! That was a perfect response.
Answers.UserDisplayName: Samaj Oruel
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-02T12:29:21.053Z
Answers.Text: The databases I created were the bacterial 16S metagenome of an additive, and the 16S metagenomic community of our experimental subject during the experiment. The microbiome of the subjects were blasted against the additive to track what in the additive was able to persist in a foreign environment.
Answers.UserDisplayName: Samaj Oruel
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-30T13:20:12.097Z
Answers.LastActivityDate: 2018-04-30T14:49:03.437Z
Answers.LastEditDate: 2018-04-30T14:49:03.437Z
Answers.UserDisplayName: terdon
Body: <p>I'm using this command (excuse the duplicate naming, I know it's bad form):</p>
  
  <pre><code>blastn -query cm-seqs/combined_seqs.fna -db combined_seqs.fna -out cm-matched.txt -num_alignments 1 -outfmt 10
  </code></pre>
  
  <p>to take a set of fasta sequences to blast against another data base I built with blast.</p>
  
  <p>My query file has 4,364,417 sequences. The files resulting from the above command spat out 4,362,639 results. The difference is about 1800. Is this due to poor alignments for some sequences that didn't pass any of blasts default parameters? I assumed the result would be 1 "best" match in the database for each query sequence.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-30T14:37:23.407Z
Comments.Text: `-num_alignments 1` is not appropriate for that output format i think, try `-max_target_seqs 1`
Comments.UserDisplayName: Chris_Rands
Tags: <blast>
Title: Will blastn remove sequences from a search with low identity?
ThreadText: # Will blastn remove sequences from a search with low identity?
  
  (Asked by: username_0 on 2018-04-30)
  
  I'm using this command (excuse the duplicate naming, I know it's bad form):
  
  ```
  blastn -query cm-seqs/combined_seqs.fna -db combined_seqs.fna -out cm-matched.txt -num_alignments 1 -outfmt 10
  
  ```
  
  to take a set of fasta sequences to blast against another data base I built with blast.
  
  My query file has 4,364,417 sequences. The files resulting from the above command spat out 4,362,639 results. The difference is about 1800. Is this due to poor alignments for some sequences that didn't pass any of blasts default parameters? I assumed the result would be 1 "best" match in the database for each query sequence.
  
  **Tags:** blast
  
  > **Comments:**
  > **username_1**: `-num_alignments 1` is not appropriate for that output format i think, try `-max_target_seqs 1`  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2018-04-30. Score: 1 | Accepted answer
  
  Yes, if a query sequence has no good alignment, blast will not return a result for it. Your command will indeed output only the best hit for each query sequence, but there is no reason to assume *all* of your sequences will have a match.
  
  Those that don't have a match won't be included in the output. This sounds perfectly normal unless you are blasting the same input file against a DB created from that file. Otherwise, you don't expect all of your sequences to necessarily have a match.
  
  Also note that since the default blastn settings are quite permissive (usually an e-value of 10, for example), don't make the mistake of assuming that a blast hit means anything. The details will always depend on the specific search you are running (I have discussed this a little in my answer [here](https://biology.stackexchange.com/a/19356/1306)), but in the vast majority of cases, any hit with an e-value > 1 can safely be ignored. In most cases, you are only interested in e-values well under 1, actually. So you probably already have all sorts of spurious results in there anyway.
  
  For more details, please edit your question and explain what the query and DB files are.
  
  > **Comments:**
  > **username_0**: Great! That was a perfect response.  
  > **username_0**: The databases I created were the bacterial 16S metagenome of an additive, and the 16S metagenomic community of our experimental subject during the experiment. The microbiome of the subjects were blasted against the additive to track what in the additive was able to persist in a foreign environment.  
  
  ---
  
  