This is a test version of Biostars. For the public version, visit https://www.biostars.org.
formatting makeblastdb commands

I have a couple of .fasta files which I want to turn into databases using the makeblastdb program stored in Blast+ 2.4.0 for OS X 10.11. After following the manual, I typed in this command

makeblastdb -in ~/db/nucleotide/Genus_species_DNA_cds.fasta -title Genus_species_DNA -dbtype nucl -out ~/db/nucleotide

... and expected these files to be created and stored in ~/db/nucleotide:

  1. document "Genus_species_DNA.nsq"
  2. document "Genus_species_DNA.nin"
  3. document "Genus_species_DNA.nhr"
  4. Unix executable "Genus_species_DNA"

Essentially, I wanted to store my databases the same way the test databases were stored. Instead, these files were created and stored in ~/db/:

  1. document "nucleotide.nsq"
  2. document "nucleotide.nin"
  3. document "nucleotide.nhr"

What needs to change in my command to receive the desired result?

makeblastdb database blast ncbi

I just got part of the way there with

 makeblastdb -in ~/db/nucleotide/Genus_species_DNA_cds.fasta -title GspeciesDNA -dbtype nucl -parse_seqids -out ~/db/nucleotide/GspeciesDNA

The above command put the files where I wanted them, with the name I wanted. But -parse_seqids produced more files than I wanted without creating the one I didn't get last time. Which command produces the Unix executable "GspeciesDNA"?

2 answers

makeblastdb -in ~/db/nucleotide/Genus_species_DNA_cds.fasta -title Genus_species_DNA -dbtype nucl -out ~/db/nucleotide

The string passed with the -title option is stored somewhere inside the datadase, it is not the filename of the database. The filename of the new database is the last part of the pathname passed with the -out option. It is given on the command line without any filename extensions. You have to modify the command slightly to get a blast database named '~/db/nucleotide/Genus_species_DNA.*':

makeblastdb -in ~/db/nucleotide/Genus_species_DNA_cds.fasta -title Genus_species_DNA -dbtype nucl -out ~/db/nucleotide/Genus_species_DNA

The string passed with the -title option is stored somewhere inside the database, it is not the filename of the database.

That's really good to know, piet; thank you for posting. Would I be better off not including the -title option in my command? Also, will I be able the command you submitted create three files or four, like in this instance: https://postimg.org/image/dw1cgajmv/ ?

The string passed with the -title option is stored somewhere inside the database, it is not the filename of the database.

That's really good to know, piet; thank you for posting. Would I be better off not including the -title option in my command? Also, will I be able the command you submitted create three files or four, like in this instance: https://postimg.org/image/dw1cgajmv/ ?

Please use ADD COMMENT/ADD REPLY buttons to respond to existing posts/comments. SUBMIT ANSWER should be reserved for new answers for the original question. This comment should go up to @Piet's answer above.

Log in to answer this question.