Re: [modeller_usage] alignment of multiple templates
To: Bo Yang <>
Subject: Re: [modeller_usage] alignment of multiple templates
From: Modeller Caretaker <>
Date: Sat, 24 Mar 2007 09:43:10 -0700
Cc:
Bo Yang wrote:
I try to do a multiple structural alignment using the example of
"salign.py" script. The command went through, but the alignment file
only contained the last template sequence. I have attached my script and
the alignment files generated.
You have a bug in your script:
aln = alignment(env)
for (code) in (('2HI4-1A2'), ('1PQ2-2C8A'), ('1OG5-2C9A')):
mdl = model(env, file=code, model_segment=('FIRST:@', 'END:'))
aln.append_model(mdl, atom_files=code, align_codes=code)
This should read:
> aln = alignment(env)
> for (code) in (('2HI4-1A2'), ('1PQ2-2C8A'), ('1OG5-2C9A')):
> mdl = model(env, file=code, model_segment=('FIRST:@', 'END:'))
> aln.append_model(mdl, atom_files=code, align_codes=code)
i.e. the last line must be indented to line up with the 'mdl = model'
line. Indentation is important in Python scripts; the indented line runs
within the 'for' loop (and thus for all sequences) while an unindented
line runs outside the loop, and thus only for the last sequence.