[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [modeller_usage] alignment of multiple templates



Dear Ben:
 
Thank you very much for your help. I fixed the script, and it went through. Now I have a alignment from the three templates.
 
Then I add my sequence to the alignment using the example of 'align.py'. And I have a new alignment (see attachment test.ali). In order to structurally align my sequence with the templates, I try to align the sequence again using the example of "align2d.py". Here is how I tried:
 
env = environ()
env.io.atom_files_directory = "./:../atom_files/"
aln = alignment(env)
mdl = model((env, file=('2HI4-1A2', '1PQ2-2C8A', '1OG5-2C9A'), model_segment=('FIRST:@', 'END:'))
aln.append_model(mdl, align_codes=('2HI4-1A2', '1PQ2-2C8A', '1OG5-2C9A'), atom_files=('2HI4-1A2_fit', '1PQ2-2C8A', '1OG5-2C9A')
aln.append(file='test.ali', align_codes='2c17')
aln.align2d()
aln.write(file='test1a.ali', alignment_format='PIR')
aln.write(file='test1a.pap', alignment_format='PAP')
 
But modeller complained that:
 
mdl = model((env, file=('2HI4-1A2', '1PQ2-2C8A', '1OG5-2C9A'), model_segment=('FIRST:@', 'END:'))
Invalid syntax.
 
Could you please help, how can I align my target sequence with other three templates?
 
Your advices will be very appreciated!
 
Bo

Modeller Caretaker <> wrote:
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.

Ben Webb, Modeller Caretaker
--
http://www.salilab.org/modeller/
Modeller mail list: http://salilab.org/mailman/listinfo/modeller_usage


Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.

Attachment: test.ali
Description: 1655186431-test.ali