next up previous contents index
Next: alnsequence.code alignment Up: MODELLER command reference Previous: alignment.segment_matching() align   Contents   Index


The alnsequence class: a single sequence within an alignment

The alnsequence class contains a single sequence from an alignment. alnsequence objects can be accessed from an alignment object; see Section 6.15 for more details.

For alignment template structures (i.e., sequences for which a structure is also available) see the structure class in Section 6.17.

Example: examples/python/alnsequence.py


# Example for alnsequence objects

from modeller import *

env = environ()

aln = alignment(env, file='../commands/toxin.ali')
print "Alignment contains %d sequences:" % len(aln)
for seq in aln:
    print "   Sequence %s from %s contains %d residues" \
          % (seq.code, seq.source, len(seq))



Subsections

Ben Webb 2008-02-01