next up previous contents index
Next: model.superpose() superpose Up: The model class: handling Previous: model.make_region() define   Contents   Index

model.color() -- color MODEL according to alignment

aln = <alignment>   Alignment between the model and another sequence

Description:
This command colors MODEL according to a given alignment, aln, between MODEL and a sequence. MODEL has to be the first protein in the alignment. The second protein can be any sequence, with or without known structure. The MODEL can be displayed on the screen, colored by `the fourth parameter' and inspected for the structural context of deletions and insertions. This is useful in optimizing the alignment for comparative modeling. The isotropic temperature factors in MODEL are set as follows:

Example: examples/commands/color_aln_model.py


# Example for: model.color()

# Two demos: 
#
# 1) Use a given alignment to color a structure according to 
#    insertions and deletions in a pairwise alignment.
#
# 2) Superpose two 3D structure and do (1).

env = environ()

# Demo 1:
mdl = model(env)
aln = alignment(env)
mdl.read(file='1nbt')
aln.append(file='toxin.ali', align_codes=('1nbt', '1fas'), remove_gaps=True)
mdl.color(aln)
mdl.write(file='1nbt-1.clr')

# Demo 2:
aln = alignment(env)
segs = {'1nbt':('1:A', '66:A'), '1fas':('1:', '61:')}
for code in ('1nbt', '1fas'):
    mdl.read(file=code, model_segment=segs[code])
    aln.append_model(mdl, align_codes=code, atom_files=code)
aln.align(gap_penalties_1d=(-600, -400))
aln.malign3d(gap_penalties_3d=(0, 3.0))
aln.write(file='color_aln_model.pap', alignment_format='PAP')

mdl.read(file='1nbt', model_segment=segs['1nbt'])
mdl.color(aln)
mdl.write(file='1nbt-2.clr')


next up previous contents index
Next: model.superpose() superpose Up: The model class: handling Previous: model.make_region() define   Contents   Index
Ben Webb 2006-02-28