text: user2766: 
  What is the algorithm/concept behind‚makeblastdb?
  
  I know makeblastdb produces a .phr, .pin, and a .psq file, that represents an index or a data structure that is better optimised for searching a given query. 
  
  What is exactly stored in these files?
  
  Seems like .phr and .pin are storing some metadata (based on the size) and .psq the actual index.
  It can't be the table of all k-mers since the command doesn't take a value of k? (or maybe it is fixed to 3)
  I could not find any direct discussion of the algorithm since google is flooded with people asking how to build such a database...
  Maybe someone can give me a link or hint?
  
  user1769: From looking at this publication "Database indexing for production MegaBLAST searches" which although deals with MegaBLAST and it's indexing method, it would appear that this was rolled into the NCBI C++ toolkit as the command makembindex so I'm inclined to think the current implementation must have been derived from this strategy. Looking at the relevant part of the current NCBI C++ toolkit I find no reference to makembindex but only makeblastdb which I assume has superseded the older command: blastdb Directory Reference
  Ulimtately the true details of the index generation lie in the C++ source code for makeblastdb can be found here.  However following on from that I think the further details of the index generation may be in one of the following files which are includes for the main .cpp file:
  seqdb.hpp
  build_db.hpp
  seqdbcommon.hpp
  writedb.hpp
  It would appear from seqdb.hpp that:
  The index files have extension .pin or .nin and sequence files .psq or .nsq, 
  However it's not at all clear how the current implementation differs to the 2007 reference or where the .phr file is generated from!  Some degree of reverse engineering the C++ source code will be needed!
  
original_text: 2766: <blockquote>
    <p>What is the algorithm/concept behind‚<code>makeblastdb</code>?</p>
  </blockquote>
  
  <p>I know <code>makeblastdb</code> produces a <code>.phr</code>, <code>.pin</code>, and a <code>.psq</code> file, that represents an index or a data structure that is better optimised for searching a given query. </p>
  
  <blockquote>
    <p>What is exactly stored in these files?</p>
  </blockquote>
  
  <p>Seems like <code>.phr</code> and <code>.pin</code> are storing some metadata (based on the size) and <code>.psq</code> the actual index.
  It can't be the table of all k-mers since the command doesn't take a value of k? (or maybe it is fixed to 3)</p>
  
  <p>I could not find any direct discussion of the algorithm since google is flooded with people asking how to build such a database...
  Maybe someone can give me a link or hint?</p>
   1769: <p>From looking at this publication <a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2696921/" rel="nofollow noreferrer">"Database indexing for production MegaBLAST searches"</a> which although deals with MegaBLAST and it's indexing method, it would appear that this was rolled into the NCBI C++ toolkit as the command <code>makembindex</code> so I'm inclined to think the current implementation must have been derived from this strategy. Looking at the relevant part of the current NCBI C++ toolkit I find no reference to <code>makembindex</code> but only <code>makeblastdb</code> which I assume has superseded the older command: <a href="https://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/dir_30f669065d6b13796daf8e29b61b0d9a.html" rel="nofollow noreferrer">blastdb Directory Reference</a></p>
  
  <p>Ulimtately the true details of the index generation lie in the C++ source code for <code>makeblastdb</code> can be found <a href="https://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/makeblastdb_8cpp_source.html" rel="nofollow noreferrer">here</a>.  However following on from that I think the further details of the index generation may be in one of the following files which are includes for the main <code>.cpp</code> file:</p>
  
  <p><a href="https://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/blast_2seqdb__reader_2seqdb_8hpp_source.html" rel="nofollow noreferrer"><code>seqdb.hpp</code></a></p>
  
  <p><a href="https://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/blast_2seqdb__writer_2build__db_8hpp_source.html" rel="nofollow noreferrer"><code>build_db.hpp</code></a></p>
  
  <p><a href="https://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/blast_2seqdb__reader_2seqdbcommon_8hpp_source.html" rel="nofollow noreferrer"><code>seqdbcommon.hpp</code></a></p>
  
  <p><a href="https://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/blast_2seqdb__writer_2writedb_8hpp_source.html" rel="nofollow noreferrer"><code>writedb.hpp</code></a></p>
  
  <p>It would appear from <code>seqdb.hpp</code> that:</p>
  
  <p>The index files have extension <code>.pin</code> or <code>.nin</code> and sequence files <code>.psq</code> or <code>.nsq</code>, </p>
  
  <p>However it's not at all clear how the current implementation differs to the 2007 reference or where the <code>.phr</code> file is generated from!  Some degree of reverse engineering the C++ source code will be needed!</p>
  