[Biopython] Mafft Alignment Output file

Peter biopython at maubp.freeserve.co.uk
Mon Nov 29 12:11:49 UTC 2010


On Mon, Nov 29, 2010 at 11:37 AM, Ömer AN <bounlu at gmail.com> wrote:
> Here is my code in the attachment. My problem is mafft.bat does not create
> an output file.

What is the contents of your mafft.bat file? Batch files are just plain text.
How did you install MAFFT on Windows? Last time I tried it wasn't obvious
how to do this, and I gave up.

>From your example,

from Bio.Align.Applications import MafftCommandline
mafft_bat = r"mafft.bat"
assert os.path.isfile(mafft_bat), "mafft.bat file is missing"
mafft_cline = MafftCommandline(mafft_bat, input="sequences.fasta",
clustalout="on", treeout="on", bl="45")
stdout, stderr = mafft_cline()

What happens if you add:

print stdout
print stderr

Are there any error messages?

Peter

P.S. The clustalout and treeout switches should really be booleans,
the wrapper documentation is unclear here. e.g.

mafft_cline = MafftCommandline(mafft_bat, input="sequences.fasta",
clustalout=True, treeout=True, bl="45")




More information about the Biopython mailing list