This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Makeblastdb With Whitespace In -Out Filename

Has anyone had success convincing the makeblastdb command to create a DB where the name (-out option) has a space in it? I have tried enclosing the name in two sets of quotes like in the manual both like ' "DB name" ' and with unicode single-quotes instead of apostrophes. In the first case I get: BLAST options error: Please provide a database name using -out, and in the second I get a longer error message, the meat of which seems to be: "BLAST options error: Please provide a database name using -out"

blast makeblastdb

have you tried -out DB name

or if your command works when you rename the database to contain underscores instead of spaces?

@Michael: It does. This would not be an issue if I just wanted to create one DB, but I'm working on a program that runs user-supplied fasta files through makeblastdb and manages their databases. I wanted to keep the names they gave but I think I may just have to rename them.

1 answer

Since space is used as the delimiter when specifying multiple databases. For example:

blastp -db "uniprotkb_swissprot uniprotkb_swissprotsv" -query inseq.tfa

I would avoid trying to use spaces in database names. So as Michael suggests, replace spaces (and anything else that may be problematic in file names) with underscores to be safe.

The "Multiple databases vs. spaces in filenames and paths" section in the current BLAST+ documentation describes methods for handling spaces in paths and database names, but in my experimentation with 'makeblastdb' using the current BLAST+ on MS Windows these do not function as described. I suspect this is a case of the shell (I've tried CMD.EXE and PowerShell) processing the quotes before BLAST+ gets to see them, so it might be okay in a system call?

Log in to answer this question.