Question to the align2d_mult.py file
Dear modeller team, I am using a variant of the align2d_mult.py script on your homepage.
I want to use a multi-sequence alignment, align several template structures and the query sequence to it without changing the initial multi-sequence alignment. On the webpage it is mentioned that one can use align_block to fix a specific part of the alignment. Just to make sure - by using the script:
#!/usr/bin/python
from modeller import *
log.verbose()#output=1, notes=1, warnings=1, errors=1, memory=0) env = environ()
env.libs.topology.read(file='$(LIB)/top_heav.lib')
# Read aligned sequences: aln = alignment(env) aln.append(file='../alignments/test.pir', align_codes='all') aln_block = len(aln)
# Read aligned structures: aln.append(file='../templates/pdb_fit/alignment_test_structures.ali', align_codes='all')
# Structure sensitive variable gap penalty sequence-sequence alignment: aln.salign(output='', max_gap_length=20, gap_function=False, # to use structure-dependent gap penalty alignment_type='PAIRWISE', align_block=aln_block, feature_weights=(1., 0., 0., 0., 0., 0.), overhang=0, gap_penalties_1d=(-450, 0), gap_penalties_2d=(0.35, 1.2, 0.9, 1.2, 0.6, 8.6, 1.2, 0., 0.), similarity_flag=True)
aln.write(file='../alignments/modeller_multi.ali', alignment_format='PIR') aln.check()
--------------------------- where "alignment_test_structures.ali" contains an alignment of potential template structures; is each of the sequence in "alignment_test_structures.ali" independently aligned to the alignment given in "test.pir" without changing the "test.pir" alignment?
Thanks in advance! Kind regards, Simone
On 11/27/13 4:09 AM, Simone Fulle wrote: > I want to use a multi-sequence alignment, align several template > structures and the query sequence to it without changing the initial > multi-sequence alignment.
...
> aln.salign(output='', max_gap_length=20, > gap_function=False, # to use structure-dependent gap penalty > alignment_type='PAIRWISE', align_block=aln_block, > feature_weights=(1., 0., 0., 0., 0., 0.), overhang=0, > gap_penalties_1d=(-450, 0), > gap_penalties_2d=(0.35, 1.2, 0.9, 1.2, 0.6, 8.6, 1.2, 0., 0.), > similarity_flag=True)
Here you have requested a pairwise alignment. So what will happen is that Modeller will align the average of the first aln_block sequences (those read from test.pir) with the average of the remaining sequences (those read from alignment_test_structures.ali). The alignment between each sequence in test.pir will not be changed; neither will the alignment between each sequence in alignment_test_structures.ali.
Normally to get what you want I would read test.pir, then just a single sequence from alignment_test_structures.ali, and do the pairwise alignment as in your script. Repeat for each sequence in alignment_test_structures.ali. Unfortunately you can't do it with a single call to SALIGN (alignment_type='PROGRESSIVE' is essentially the behavior you want, but that ignores align_block).
Ben Webb, Modeller Caretaker
participants (2)
-
Modeller Caretaker
-
Simone Fulle