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

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Thu Apr 3 19:25:40 EDT 2008


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

           Summary: Local BLAST fails: Spaces in Windows file-path values
           Product: Biopython
           Version: 1.45
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: Main Distribution
        AssignedTo: biopython-dev at biopython.org
        ReportedBy: drpatnaik at yahoo.com


I am a new user trying Python on a Windows XP SP2 machine on which I do not
have admin rights. Consequently, Python itself as well as all of the
files/executables I work with have file-paths that contain spaces (e.g.,
python.exe is at C:\Documents and settings\username...).

When I try to perform a local BLAST using code mentioned in one of Bio-Python
tuorials, the BLAST fails. I use the following code to capture the error:

my_blast_db =r"C:/Documents and Settings/patnaik/My Documents/blast/bin/mine"
my_blast_file =r"C:/Documents and Settings/patnaik/My
Documents/blast/bin/hairpin"
my_blast_exe =r'C:\Documents and Settings\patnaik\My
Documents\blast\bin\blastall.exe'
from Bio.Blast import NCBIStandalone
result_handle, error_handle = NCBIStandalone.blastall(my_blast_exe, "blastn",
my_blast_db, my_blast_file)
error_results = error_handle.read()
save_file = open(r"C:/Documents and Settings/patnaik/My
Documents/blast/bin/my_blast_error", "w")
save_file.write(error_results)
save_file.close()

The error reported is:

'C:\Documents' is not recognized as an internal or external command,
operable program or batch file.

There thus seems to be some issue because of the spaces in the file-paths.

Can this be resolved by appropriately replacing 'os.popen3' with
'subprocess.call' in Bio/Blast/NCBIStandaolne.py?


-- 
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