from Bio.Clustalw import MultipleAlignCL
from Bio.Clustalw import do_alignment

cl = MultipleAlignCL('myseqs.fasta')
cl.gap_open_pen = 5
cl.gap_ext_pen = 3
cl.type = 'protein'
cl.set_output('outfile.aln', output_type='PHYLIP',
               output_order='ALIGNED')
cl.set_protein_matrix('PAM')
# cl.set_guide_tree('tree1.txt')
cl.set_new_guide_tree('newtree.txt')
print cl

This code is part of the book "Python for Bioinformatics", by Sebastian Bassi (sbassi@genesdigitales.com). Return to home page.