alignment of multiple templates
Hello, Modeller:
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.
My pdb files containe only single chain. I can't figure out what could be wrong with my script. Why it always return the last template sequece. I use modeller 8v1. Thank you very much for your help!
Bo
--------------------------------- Bored stiff? Loosen up... Download and play hundreds of games for free on Yahoo! Games.
log.verbose() env = environ() env.io.atom_files_directory = "./:../atom_files/"
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)
for (weights, write_fit, whole) in (((1., 0., 0., 0., 1., 0.), False, True), ((1., 0.5, 1., 1., 1., 0.), False, True), ((1., 1., 1., 1., 1., 0.), True, False)): aln.salign(rms_cutoffs=(3.5, 6., 60, 60, 15, 60, 60, 60, 60, 60, 60), normalize_pp_scores=False, rr_file='$(LIB)/as1.sim.mat', overhang=30, gap_penalties_1d=(-450, -50), gap_penalties_3d=(0, 3), gap_gap_score=0, gap_residue_score=0, dendrogram_file='1is3A.tree', alignment_type='tree', # If 'progresive', the tree is not # computed and all structues will be # aligned sequentially to the first #ext_tree=True, # Tree building can be avoided if the tree # is input #input_weights_file='1is3A_exmat.mtx', feature_weights=weights, # For a multiple sequence alignment only # the first feature needs to be non-zero improve_alignment=True, fit=True, write_fit=write_fit, write_whole_pdb=whole, output='ALIGNMENT QUALITY')
aln.write(file='test1a.pap', alignment_format='PAP') aln.write(file='test1a.ali', alignment_format='PIR')
aln.salign(rms_cutoffs=(1.0, 6., 60, 60, 15, 60, 60, 60, 60, 60, 60), normalize_pp_scores=False, rr_file='$(LIB)/as1.sim.mat', overhang=30, gap_penalties_1d=(-450, -50), gap_penalties_3d=(0, 3), gap_gap_score=0, gap_residue_score=0, dendrogram_file='1is3A.tree', alignment_type='progressive', feature_weights=[0]*6, improve_alignment=False, fit=False, write_fit=True, write_whole_pdb=False, output='QUALITY')
>P1;1OG5-2C9A structureX:1OG5-2C9A: 30 :A: 490 :A:undefined:undefined:-1.00:-1.00 PPGPTPLPVIGNILQIGIKDISKSLTNLSKVYGPVFTLYFGLKPIVVLHGYEAVKEALIDLGEEFSGRGIFPLAE RANRGFGIVFSNGKKWKEIRRFSLMTLRNFGMGKRSIEDRVQEEARCLVEELRKTKASPCDPTFILGCAPCNVIC SIIFHKRFDYKDQQFLNLMEKLNENIEILSSPWIQVYNNFPALLDYFPGTHNKLLKNVAFMKSYILEKVKEHQES MDMNNPQDFIDCFLMKMEKEKHNQPSEFTIESLENTAVDLFGAGTETTSTTLRYALLLLLKHPEVTAKVQEEIER VIGRNRSPCMQDRSHMPYTDAVVHEVQRYIDLLPTSLPHAVTCDIKFRNYLIPKGTTILISLTSVLHDNKEFPNP EMFDPHHFLDEGGNFKKSKYFMPFSAGKRICVGEALAGMELFLFLTSILQNFNLKSLVDPKNLDTTPVVNGFASV PPFYQLCFIPV*
_aln.pos 10 20 30 40 50 60 1OG5-2C9A PPGPTPLPVIGNILQIGIKDISKSLTNLSKVYGPVFTLYFGLKPIVVLHGYEAVKEALIDLGEEFSG _consrvd
_aln.pos 70 80 90 100 110 120 130 1OG5-2C9A RGIFPLAERANRGFGIVFSNGKKWKEIRRFSLMTLRNFGMGKRSIEDRVQEEARCLVEELRKTKASP _consrvd
_aln.pos 140 150 160 170 180 190 200 1OG5-2C9A CDPTFILGCAPCNVICSIIFHKRFDYKDQQFLNLMEKLNENIEILSSPWIQVYNNFPALLDYFPGTH _consrvd
_aln.pos 210 220 230 240 250 260 1OG5-2C9A NKLLKNVAFMKSYILEKVKEHQESMDMNNPQDFIDCFLMKMEKEKHNQPSEFTIESLENTAVDLFGA _consrvd
_aln.po 270 280 290 300 310 320 330 1OG5-2C9A GTETTSTTLRYALLLLLKHPEVTAKVQEEIERVIGRNRSPCMQDRSHMPYTDAVVHEVQRYIDLLPT _consrvd
_aln.pos 340 350 360 370 380 390 400 1OG5-2C9A SLPHAVTCDIKFRNYLIPKGTTILISLTSVLHDNKEFPNPEMFDPHHFLDEGGNFKKSKYFMPFSAG _consrvd
_aln.pos 410 420 430 440 450 460 1OG5-2C9A KRICVGEALAGMELFLFLTSILQNFNLKSLVDPKNLDTTPVVNGFASVPPFYQLCFIPV _consrvd
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
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 modeller-care@salilab.org 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
Bo Yang wrote: > 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:'))
You can only read in a single model at a time with 'model'. If you want to read multiple models, put it in a 'for' loop, just as for the earlier salign script you used.
Ben Webb, Modeller Caretaker
Dear Ben:
Thank you for your advice.
I forgot to mention that the sequence that to be aligned with the other three tempates does not have 3D structure. I have try the way as you suggested. The modeller returned to error message saying that 2c17 does not have a pdb code. Here is what I got:
runcmd______> model.read(file='2c17', (def)model_format='PDB', model_segment=('FIRST:@', 'END:')) pdbnam__217W> Filename for PDB code not found: 2c17 Directories: ./:../atom_files/ Extensions : :.atm:.pdb:.ent:.crd openf5__224_> Open 11 OLD SEQUENTIAL file-not-found openf5__225E> File does not exist: file-not-found
In such case, should I be able to align my sequence to other tempates with known 3D-structures? I have attached my script and the log file as attachments.
Thank you for help.
Bo
Modeller Caretaker modeller-care@salilab.org wrote: Bo Yang wrote: > 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:'))
You can only read in a single model at a time with 'model'. If you want to read multiple models, put it in a 'for' loop, just as for the earlier salign script you used.
Ben Webb, Modeller Caretaker
Bo Yang wrote: > I forgot to mention that the sequence that to be aligned with the other > three tempates does not have 3D structure. I have try the way as you > suggested. The modeller returned to error message saying that 2c17 does > not have a pdb code. Here is what I got: > > runcmd______> model.read(file='2c17', (def)model_format='PDB', > model_segment=('FIRST:@', 'END:'))
Well, of course - model.read reads in a PDB file, so if you don't have a PDB file, you can't use it. Use alignment.append rather than alignment.append_model to add a sequence from a PIR file. See section 3 of the basic modeling tutorial for an example.
Ben Webb, Modeller Caretaker
participants (2)
-
Bo Yang
-
Modeller Caretaker