title: Get fasta source file from blast database name
body: <p>I am currently writing a library that uses the <code>-outfmt 10</code> option of Blast, which give you a CSV instead of the pretty human readable format.</p>
  
  <p>Like</p>
  
  <pre><code>tblastn -db dmel_a -query somequery.faa -outfmt 10
  </code></pre>
  
  <p>The problem is, I want to access the db source file so I can extract some sequences after processing. The only way I know how to do this, is to use the remove <code>-outfmt 10</code> and run the blast twice. Then I parse the human readable output for the line that says:</p>
  
  <pre><code>Database: Source.fas
  </code></pre>
  
  <p>But, that only works if <code>title</code> is not specified when creating the database in <code>makeblastdb</code>. The <code>stitle</code> of <code>outfmt 10</code> seems to be the fasta header line anyway. I cannot just look for the database name and then a <code>.fna, .fas, .faa</code> because you can name the database differently than the source file.</p>
  
  <p>Is there another way to extract the fasta source file from the blast database name? I do not see one in the list of <code>outfmt</code> options. Or am I blind today?</p>