Answers.Body: <p>It's easy; just use output <code>format 6</code>, this gives you a nice table that's easy to parse:</p>
  <pre><code>blastn -db plasmid2.db -query plasmid1.fasta -evalue 1e-6 -outfmt &quot;6 pident evalue bitscore&quot;
  </code></pre>
  <p>I don't know what parameters you prefer.</p>
  <pre><code>... &quot;6 pident evalue bitscore&quot; ...
  </code></pre>
  <p>You just edit the <code>pident</code>, <code>evalue</code> and <code>bitscore</code> above.  You might want to place <code>staxid</code> or something to tell you what it is. A selection of parameters are as follows:</p>
  <blockquote>
  <p>staxid ssciname qseqid sseqid pident length mismatch gapopen qstart qend sstart send evalue bitscore qcovs sstrand</p>
  </blockquote>
  <p>You might want to make the command a bit fancier</p>
  <pre><code>blastn -db plasmid2.db -query plasmid1.fasta -evalue 1e-7 -outfmt &quot;6 pident evalue bitscore&quot; | sort | uniq -c | sort -n &gt;&gt; myplasmid.txt
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-04-12T13:13:33.780Z
Answers.LastActivityDate: 2023-04-12T16:20:13.797Z
Answers.LastEditDate: 2023-04-12T16:20:13.797Z
Answers.UserDisplayName: M__
Body: <p>I have 96  fasta files (A1, A2, A3...) from one  plasmid assembly pipeline, and I have another 96 fasta  files (B1, B2, B3 ...) from another plasmid assembly pipeline.
  I would like to compare pair wise (A1 to B1, A2 to B2, A3 to B3 etc) and collect some metrics to see how this two assembly method differs.</p>
  <p>I am thinking of doing blastn -query A1 -subject B1, but this created a lot visual alignment, rather than detailed align metrics.</p>
  <p>Thank you for your suggestions.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-04-12T11:26:17.667Z
Comments.Text: OK, I think maybe I will just stay with blastn and do this: blastn -query A1 -subject B1 |grep -E "Score|Identities|Strand" >res_A1_B1
   Then I will get report like this  in res_A1_B1, Score = 1.048e+04 bits (5674),  Expect = 0.0
   Identities = 5674/5674 (100%), Gaps = 0/5674 (0%)
   Strand=Plus/Minus
   I can further collect them into tables.
Comments.UserDisplayName: cautree
Tags: <phylogenetics><fasta><phylogeny><assembly><blast>
Title: compare fasta sequences in pairs and collect metrics
ThreadText: # compare fasta sequences in pairs and collect metrics
  
  (Asked by: username_0 on 2023-04-12)
  
  I have 96 fasta files (A1, A2, A3...) from one plasmid assembly pipeline, and I have another 96 fasta files (B1, B2, B3 ...) from another plasmid assembly pipeline.
  I would like to compare pair wise (A1 to B1, A2 to B2, A3 to B3 etc) and collect some metrics to see how this two assembly method differs.
  
  I am thinking of doing blastn -query A1 -subject B1, but this created a lot visual alignment, rather than detailed align metrics.
  
  Thank you for your suggestions.
  
  **Tags:** phylogenetics, fasta, phylogeny, assembly, blast
  
  > **Comments:**
  > **username_0**: OK, I think maybe I will just stay with blastn and do this: blastn -query A1 -subject B1 |grep -E "Score|Identities|Strand" >res_A1_B1  Then I will get report like this  in res_A1_B1, Score = 1.048e+04 bits (5674),  Expect = 0.0  Identities = 5674/5674 (100%), Gaps = 0/5674 (0%)  Strand=Plus/Minus  I can further collect them into tables.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-04-12. Score: 3 | Accepted answer
  
  It's easy; just use output `format 6`, this gives you a nice table that's easy to parse:
  
  ```
  blastn -db plasmid2.db -query plasmid1.fasta -evalue 1e-6 -outfmt "6 pident evalue bitscore"
  
  ```
  
  I don't know what parameters you prefer.
  
  ```
  ... "6 pident evalue bitscore" ...
  
  ```
  
  You just edit the `pident`, `evalue` and `bitscore` above. You might want to place `staxid` or something to tell you what it is. A selection of parameters are as follows:
  
  > staxid ssciname qseqid sseqid pident length mismatch gapopen qstart qend sstart send evalue bitscore qcovs sstrand
  
  You might want to make the command a bit fancier
  
  ```
  blastn -db plasmid2.db -query plasmid1.fasta -evalue 1e-7 -outfmt "6 pident evalue bitscore" | sort | uniq -c | sort -n >> myplasmid.txt
  
  ```
  
  
  ---
  
  