[Biopython-dev] localblast bug?

Chunlei Wu reillywu at yahoo.com
Wed Sep 5 15:50:25 EDT 2001


Hi,
   I wrote a script for localblast. It always raised a
TypeError:

   File "e:\python21\Bio\Blast\NCBIStandalone.py",
line 1447, in blastall
   r, w, e = popen2.popen3([blastcmd] + params)
   File "e:\python21\lib\popen2.py", line 129, in
popen3
   w, r, e = os.popen3(cmd, mode, bufsize)
   TypeError: popen3() argument 1 must be string, not
list

   When I modified line 1447 as:

   r, w, e = popen2.popen3(' '.join([blastcmd] +
params))

   then it works.


   Chunlei Wu

Python version: Activepython build 210
Biopython version: 1.00a3
OS:       WinNT
source:

def mylocalblast(input_file,output_file,db='nt'):
    """mylocalblast"""

    from Bio.Blast import NCBIStandalone

    my_blast_db="r:\\blastdb\\"+db
    my_blast_exe=r"r:\localblast\blastall.exe"

    blast_out, error_info =
NCBIStandalone.blastall(my_blast_exe,'blastn',my_blast_db,input_file)

    output_f=open(output_file,'w')
    blast_result=blast_out.read()
    output_f.write(blast_result)
    print blast_result
    output_f.close()



__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com



More information about the Biopython-dev mailing list