[Biopython] Clustalw Hangs on Python 2.6
Marco Gallotta
marco at gallotta.co.za
Fri Apr 24 16:57:12 EDT 2009
Hi
I recently upgraded to Python 2.6 (from 2.5) and this seems to have
revealed a potential bug in biopython. I'm using biopython to run
clustalw and after the upgrade it just hangs. I discovered that it was
hanging on a write to stdout. The best reason I could determine for
this behaviour was that Python's subprocess module (which biopython
uses to spawn clastlw) was piping stdout to bioypython, which wasn't
reading it.
The code I used to call clustalw:
cline = MultipleAlignCL(blast_results_file)
cline.set_output(alignment_file, output_type = format.upper(),
output_order = "INPUT")
Clustalw.do_alignment(cline)
I was able to get it working by changing the arguments to the
subprocess module to pipe to /dev/null as in the attached patch.
Unfortunately this approach only works on Linux. If there is a better
fix, or perhaps I'm calling clustalw incorrectly, please do let me
know.
Thanks
Marco
--
Marco Gallotta
MSc Student | SACO Scientific Committee | ACM ICPC Coach
Department of Computer Science, University of Cape Town
people.cs.uct.ac.za/~mgallott | marco-za.blogspot.com
marco AT gallotta DOT co DOT za | 073 170 4444 | 021 552 2731
-------------- next part --------------
A non-text attachment was scrubbed...
Name: biopython_clustalw.patch
Type: text/x-diff
Size: 507 bytes
Desc: not available
URL: <http://lists.open-bio.org/pipermail/biopython/attachments/20090424/0b1dc657/attachment.bin>
More information about the Biopython
mailing list