[Biopython] Mafft Alignment Output file

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


On Mon, Nov 29, 2010 at 11:05 AM, Peter <biopython at maubp.freeserve.co.uk> wrote:
> On Mon, Nov 29, 2010 at 10:26 AM, Ömer <arkanion at gmail.com> wrote:
>> I installed mafft.bat file to run an alignment similar to clustalw.exe
>> shown in the Tutorial. I prefer Mafft because it has an  option to
>> choose the matrix such as Blosum 45 , 80 etc.
>
> I think MAFFT is also faster, especially with large alignments.
>
>> However, it does not generate an output file by default for the alignment !
>> How can I create an output file? Which option should i switch on or what
>> value should i assign? So that i can read the alignment file via AlignIO?
>> It has parameters for the output file but the file cannot be created itself
>> ! It is simply generated by default when used ClustalWCommandline.
>> I checked everywhere but couldn't find ! Any idea?
>
> What are you doing right now? Can you show us your code?
>
> Are you using the MafftCommandline wrapper as I suggested here?:
> http://lists.open-bio.org/pipermail/biopython/2010-November/006894.html
>
> I'm looking at the code right now, and it could do with a basic example.
>
> Peter
>

How about something like this:

from Bio.Align.Applications import MuscleCommandline
muscle_exe = r"C:\Program Files\Aligments\muscle3.8.31_i86win32.exe"
in_file = r"C:\My Documents\unaligned.fasta"
out_file = r"C:\My Documents\aligned.fasta"
muscle_cline = MuscleCommandline(muscle_exe, input=in_file, out=out_file)
print muscle_cline
stdout, stderr = muscle_cline()

Peter




More information about the Biopython mailing list