HI there,
I am working my way through the tutorials, playing with the Python
scripts to get a better understanding of how things work. I have
successfully done a multiple structural alignment using a modified
version of the salign.py script in the advanced tutorial aligning
multiple sequences for a protein from several different species using
the pdb files as input. The protein is a homopentamer, and using the
example script, I aligned the "A" chains and everything worked fine.
Since I really want to work on modeling a homopentamer, I then tried to
do the alignment on the pentamers. I receive the following error:
*************************************************************************
linux:/home/mike/Modeller_files/Modelling_projects/Test_run/Mult_align #
mod8v2 salignPentamer.py
Traceback (most recent call last):
File "salignPentamer.py", line 11, in ?
mdl = model(env, file=code, model_segment=('FIRST:@, LAST:'))
File "/usr/bin/modeller8v2/modlib/modeller/model.py", line 23, in
__init__
self.read(io, aln, libs, **vars)
File "/usr/bin/modeller8v2/modlib/modeller/model.py", line 40, in read
io=io.modpt, libs=libs.modpt, **vars)
File "/usr/bin/modeller8v2/modlib/modeller/util/top.py", line 189, in
read_model
return _modeller.read_model(mdl, aln, io, libs, *args)
ValueError: Expected a sequence for model_segment
*************************************************************************
I assume that the problem is in reading the pdb files and getting the
information.The pdb files do contain the chain ID's (A-E). Here is the
Python script I used, which is essentially a slightly modified version
of the example script:
*********************************************************************
from modeller import *
log.verbose()
env = environ()
env.io.atom_files_directory = './:../atom_files/'
aln = alignment(env)
for (code, chain) in (('1i9b', 'A'), ('2br7', 'A'), ('2bj0', 'A')):
mdl = model(env, file=code, model_segment=('FIRST:@, LAST:'))
aln.append_model(mdl, atom_files=code, align_codes=code+chain)
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='fm00495.tree',
alignment_type='tree', # If 'progresive', the tree is not
# computed and all structues will
be
# aligned sequentially to the
first
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='achbpsPentamer.pap', alignment_format='PAP')
aln.write(file='achbpsPentamer.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')
**********************************************************************************
the only change that I made from the script that worked on the single
subunits was to change the "model_segment" parameters from
"('FIRST:'+chain, 'LAST:'+chain)" to "('FIRST:@, LAST:'))". I couldn't
find anything in the Online manual concerning the arguments on the line
before (for (code,chain) in.....)- should I have replaced chain "A" with
something else to read the entire set of chains?
Thanks for whatever help you can provide. I am sure that as I get deeper
into things that I'll have more questions- hopefully not so basic.
Mike White