[BioPython] blastall directory problem

Stefanie Lück lueck at ipk-gatersleben.de
Mon Jan 12 07:06:39 EST 2009


Thanks for the response! This worked!

Lifesaver ;-)
Stefanie


----- Original Message ----- 
From: "Peter" <biopython at maubp.freeserve.co.uk>
To: "Stefanie Lück" <lueck at ipk-gatersleben.de>
Cc: <biopython at lists.open-bio.org>
Sent: Friday, January 09, 2009 1:16 PM
Subject: Re: [BioPython] blastall directory problem


On Thu, Jan 8, 2009 at 3:07 PM, Stefanie Lück <lueck at ipk-gatersleben.de> 
wrote:
> Hi!
>
> I finally finished my program and tested on several PC's.
> I'm doing standalone blasts, it's a GUI program for Windows.
>
> By this I found a problem on the english operating systems because 
> blastall has problems with spaces in the full path.
>
> I tried to replace the path "C:\Program Files\Final\test"  into 
> "C:\PROGRA~1\Final\test" but I get a message that blast is unable to open 
> the input file. Maby there is a way not to give the full path of the 
> database and the blastall.exe but only the file name?
>
> Does someone has a idea how I can solve this problem?
>
> Kind regards and a happy new year!
> Stefanie

The problem here is that BLAST allows you to specify multiple
databases using spaces to separate the list - while you may also want
to use spaces in the filename(s)!  The solution is that BLAST should
understand some fiddly escape quoted string arguments, i.e. slash
double quote at the beginning and end of the filename.

Try this (using a mixture of single and double quotes!):
my_blast_db =r'"\"C:\Program Files\Final\test\""'

(There was some discussion on this issue on Bug 2480).

You should also be able to use the DOS 8.3 style names (which have no
spaces), something like "C:\PROGRA~1\Final\test" which you said you
tried.  Read about the win32api.GetShortPathName() function for how to
get this name programatically. From your email it sounds like this
worked - but you had another problem with specifying your input
filename.

If you are still stuck, could you give us an example showing the
arguments used for the blast exe, database and input file?

Peter



More information about the BioPython mailing list