[Biopython] MUSCLE for alignment

Peter Cock p.j.a.cock at googlemail.com
Sat Apr 6 08:58:30 UTC 2013


On Sat, Apr 6, 2013 at 3:53 AM, 林行众 <linxzh1989 at gmail.com> wrote:
> Hi all !
> I have a seqdump.fasta file:
>>lcl|24977
> TGAGAAAGACTTGAGAGGACA
>
>>lcl|24977:8-21
> GAGATGACTTAGAGGACA
>
> I want to use a wrapper for Muscle in Biopython to align the two seq.
> the alignment result will put into a existing fasta file.
>
>>>>from Bio.Align.Applications import MuscleCommandline
>>>>mcline = MuscleCommandline(input='seqdump.fasta',out='result.fasta')
>
> But i can not find anything in the result.fasta after i run the command.
> Do i have any missing to get the result?
>
> regards
> Lin

Hi Lin,

In your example you've not yet called Muscle,

#Load the library:
from Bio.Align.Applications import MuscleCommandline

#Create command line wrapper instance,
mcline = MuscleCommandline(input='seqdump.fasta',out='result.fasta')

#Optionally show what command it would run:
print mcline

#Actually run the command,
stdout, stderr = mcline()

Does that help? The main Tutorial does have some more
detailed examples.

Peter




More information about the Biopython mailing list