text: user252: I am trying to make local databases for the ncbi-blast+ package (version 2.60). I am doing so for 4 T-cell receptor genes. 3 of the 4 (TRAV, TRAJ, TRBV) have worked fine, but I am having problems with TRBJ. I say this because they should be the same format and if one works the rest works.
  They take the format below:
  >K02545|TRBJ1-1*01|Homo sapiens|F|J-REGION|749..796|48 nt|3| | | |15 AA|15+0=15| | |
  NTEAFFGQGTRLTVV
  
  I used the following command (like I say, it was fine for the rest, oddly enough):
  makeblastdb -in TRBJ_AA.fa -parse_seqids -dbtype prot
  
  and I get the following error message:
  BLAST options error: TRBJ_AA.fa does not match input format type, default input type is FASTA
  
  One issue I checked was the length of the sequences being too short, but I believe 11 is the minimum length required (for inputs, don't know if that is the same for databases)- but would someone be able to confirm, that strikes me as the most likely candidate?
  I'm happy to use some other metric, but I was hoping on keeping BLAST for consistency's sake for the time being.
  Thank you.
  edit: I know it's to late, but for reference I'm on Ubuntu 16.04.2 LTS x86_64 for all steps. 
  
  user298: This looks like a bug in makeblastdb. Removing the final | | | from your sequence's description makes it work:
  >K02545|TRBJ1-1*01|Homo sapiens|F|J-REGION|749..796|48 nt|3| | | |15 AA|15+0=15
  
  So does removing everything after the 1st space:
  >K02545|TRBJ1-1*01|Homo sapiens|F|J-REGION|749..796|48
  
  There is nothing in the FASTA definition that would explain this and, even more weirdly, the presence of the | | | alone isn't enough to trigger the issue. I played around with this a little and it looks like it doesn't like the combination of + or -along with empty | |, but there's no clear pattern I can see:
  These fail:
  >| | |15-| | |
  >| | |15+| | |
  >| | |15-1| | |
  >| | |15+1| | |
  
  These work:
  >| |15+| |
  >| | |151| | |
  
  So yeah, sounds like a bug. I suggest you report it to the NCBI devs. In the meantime, a simple fix would be to just keep the first space-separated field of your fasta header. Pass your fasta file through this:
  awk '{print $1}' fasta.fa > new.fa
  
  That will print the 1st field of each line and, assuming you don't have spaces in your sequence, it should effectively sort this out for you. 
  
original_text: 252: <p>I am trying to make local databases for the ncbi-blast+ package (version 2.60). I am doing so for 4 T-cell receptor genes. 3 of the 4 (TRAV, TRAJ, TRBV) have worked fine, but I am having problems with TRBJ. I say this because they should be the same format and if one works the rest works.</p>
  
  <p>They take the format below:</p>
  
  <pre><code>&gt;K02545|TRBJ1-1*01|Homo sapiens|F|J-REGION|749..796|48 nt|3| | | |15 AA|15+0=15| | |
  NTEAFFGQGTRLTVV
  </code></pre>
  
  <p>I used the following command (like I say, it was fine for the rest, oddly enough):</p>
  
  <pre><code>makeblastdb -in TRBJ_AA.fa -parse_seqids -dbtype prot
  </code></pre>
  
  <p>and I get the following error message:</p>
  
  <pre><code>BLAST options error: TRBJ_AA.fa does not match input format type, default input type is FASTA
  </code></pre>
  
  <p>One issue I checked was the length of the sequences being too short, but I believe 11 is the minimum length required (for inputs, don't know if that is the same for databases)- but would someone be able to confirm, that strikes me as the most likely candidate?</p>
  
  <p>I'm happy to use some other metric, but I was hoping on keeping BLAST for consistency's sake for the time being.</p>
  
  <p>Thank you.</p>
  
  <p>edit: I know it's to late, but for reference I'm on Ubuntu 16.04.2 LTS x86_64 for all steps. </p>
   298: <p>This looks like a bug in <code>makeblastdb</code>. Removing the final <code>| | |</code> from your sequence's description makes it work:</p>
  
  <pre><code>&gt;K02545|TRBJ1-1*01|Homo sapiens|F|J-REGION|749..796|48 nt|3| | | |15 AA|15+0=15
  </code></pre>
  
  <p>So does removing everything after the 1st space:</p>
  
  <pre><code>&gt;K02545|TRBJ1-1*01|Homo sapiens|F|J-REGION|749..796|48
  </code></pre>
  
  <p>There is nothing in the FASTA definition that would explain this and, even more weirdly, the presence of the <code>| | |</code> alone isn't enough to trigger the issue. I played around with this a little and it looks like it doesn't like the combination of <code>+</code> or <code>-</code>along with empty <code>| |</code>, but there's no clear pattern I can see:</p>
  
  <p>These fail:</p>
  
  <pre><code>&gt;| | |15-| | |
  &gt;| | |15+| | |
  &gt;| | |15-1| | |
  &gt;| | |15+1| | |
  </code></pre>
  
  <p>These work:</p>
  
  <pre><code>&gt;| |15+| |
  &gt;| | |151| | |
  </code></pre>
  
  <p>So yeah, sounds like a bug. I suggest you report it to the NCBI devs. In the meantime, a simple fix would be to just keep the first space-separated field of your fasta header. Pass your fasta file through this:</p>
  
  <pre><code>awk '{print $1}' fasta.fa &gt; new.fa
  </code></pre>
  
  <p>That will print the 1st field of each line and, assuming you don't have spaces in your sequence, it should effectively sort this out for you. </p>
  