[BioPython] Alignment with Emboss water tool

Michiel de Hoon mjldehoon at yahoo.com
Wed Mar 19 08:22:07 UTC 2008


It turns out that popen2.Popen3 is not available on Windows. See:

http://docs.python.org/lib/module-popen2.html

As a workaround, you can modify the file

C:\Python25\lib\site-packages\Bio\Application\__init__.py

and replace the call to popen2.Popen3 by a call to popen2.popen3 (some other small modifications will be necessary).

The drawback of this approach is that we then cannot get the error code of the child process. Maybe we should modify Bio/Application/__init__.py to return a dummy error code on Windows.

--Micheil


Stefanie Lück <lueck at ipk-gatersleben.de> wrote: Hi!

I'm trying to make an alignment with Emboss water. Here's my code:

from Bio.Emboss.Applications import WaterCommandline
from Bio.Application import generic_run

water = WaterCommandline()
water.set_parameter("-asequence", "asis::atgctccg")
water.set_parameter("-bsequence", "asis::taggcgctcgctcgatgctccgatgctcgc")
water.set_parameter("-gapopen", "10")
water.set_parameter("-gapextend", "0.5")
water.set_parameter("-outfile", "test2.txt")
final = generic_run(water)

I get the following error:

Traceback (most recent call last):
File "C:\Dokumente und Einstellungen\Administrator\Desktop\water.py", line 10, in 
final = generic_run(water)
File "C:\Python25\lib\site-packages\Bio\Application\__init__.py", line 18, in generic_run
child = popen2.Popen3(str(commandline), 1)
AttributeError: 'module' object has no attribute 'Popen3'

Does someone knows how to fix this?

Thank in advance!
Stefanie
_______________________________________________
BioPython mailing list  -  BioPython at lists.open-bio.org
http://lists.open-bio.org/mailman/listinfo/biopython


       
---------------------------------
Looking for last minute shopping deals?  Find them fast with Yahoo! Search.



More information about the Biopython mailing list