[Biopython-dev] [Bug 2480] Local BLAST fails: Spaces in Windows file-path values

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Wed Oct 1 16:30:47 EDT 2008


http://bugzilla.open-bio.org/show_bug.cgi?id=2480





------- Comment #30 from biopython-bugzilla at maubp.freeserve.co.uk  2008-10-01 16:30 EST -------
Peter wrote in comment 26
>> I've been having trouble with specifying BLAST databases
>> with spaces in the path.  Have you been able to demonstrate
>> this with more than one database?

Patnaik wrote in comment #29
> It seems the BLAST executables can accept multiple databases
> (database pointers) in the 'd' argument, but they need to be
> space-separated.

Yes, that is correct.

> When there is a space in a single database's path-value, BLAST
> can interpret the provided argument as two databases and then
> fail. This can be the reason why the path-values for input
> sequence files and databases need to be quoted/escaped in
> different ways:

Yes, I agree.  This is clear from some of the error messages BLAST gives when
it cannot understand a BLAST database with a space in the name.  I don't even
know if using multiple databases with spaces is even possible.

> If this is correct, it might be helpful if Biopython had
> a functionality to accept multiple databases (for BLAST)
> by using the list data-type:
> ...
> Biopython can then collapse the list items into a properly
> quoted/escaped string for BLAST's 'd' argument.

This is a nice idea *IF* we can establish what the rules for for making a
properly quoted/escaped string for BLAST's 'd' argument (which may be different
for different operating systems).  We may want to email the NCBI for
clarification here.

> If this is not feasible, then a note in the documentation will
> also be of help.

For any documentation I would want to recommend using the
win32api.GetShortPathName() function to avoid the spaces, with an example
showing how to do this for the database name(s).  To me this seems much simpler
than the complex quoting solution.


-- 
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


More information about the Biopython-dev mailing list