[Biopython-dev] [Bug 2654] Bio.Blast.NCBIStandalone does not support the output file argument

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Thu Mar 19 17:08:16 UTC 2009


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


biopython-bugzilla at maubp.freeserve.co.uk changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Comment #1 from biopython-bugzilla at maubp.freeserve.co.uk  2009-03-19 13:08 EST -------
Fixed in Bio/Blast/NCBIStandalone.py CVS revision 1.86
http://cvs.biopython.org/cgi-bin/viewcvs/viewcvs.cgi/biopython/Bio/Blast/NCBIStandalone.py?cvsroot=biopython

Note that the three tools themselves all use -o (lower case) for the output
file, but refer to it slightly differently:

$ ./rpsblast --help | grep " -o "
  -o  Output File for Alignment [File Out]  Optional
$ ./blastpgp --help | grep " -o "
  -o  Output File for Alignment [File Out]  Optional
$ ./blastall --help | grep " -o "
  -o  BLAST report Output File [File Out]  Optional

Our function for rpsblast already supported this argument under the name
"align_outfile" which I have therefore also used for blastpgp (this is good
name as blastpgp outputs more than one type of file).

For blastall "align_outfile" doesn't seem entirely appropriate, and although it
is inconsistent I have gone for "outfile" instead.

Example usage:

#imports and setting up input parameters omitted
out_handle, err_handle = NCBIStandalone.blastall(blastall_exe, "blastp",
                                                 blastdb_nr, query_file,
                                                 expectation=0.000001,
                                                 nprocessors=1, filter="F",
                                                 outfile=output_file,
                                                 alignments=5, descriptions=5)
assert "" == err_handle.read()
assert "" = out_handle.read() #Important so we wait for BLAST to finish!
err_handle.close()
out_handle.close()
assert os.path.isfile(output_file)

count = 0
for blast_record in NCBIXML.parse(open(output_file)) :
    count += 1
print "Found %i BLAST results" % count


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