next up previous contents index
Next: profile.scan() Compare Up: The profile class: using Previous: profile.write() write   Contents   Index

profile.to_alignment() -- profile to alignment

to_alignment()
Output:
alignment

This command will convert a profile that is in memory into the alignment format (see Section B.1). The function of this command is complimentary to alignment.to_profile(). The generated alignment is returned.

Note: Not all information of a 'PIR' format is encoded in a profile. (See profile.read()). So converting a profile to an alignment may need manual attention to ensure that the alignment is useful for other routines.

Example: examples/commands/read_profile.py


# Example file for: profile.read(), profile.to_alignment()

from modeller import *

env = environ()

# Create a new, blank, profile
prf = profile(env)

# Read in the profile file
prf.read(file='toxin.prf', profile_format='TEXT')

# Convert the profile to alignment
aln = prf.to_alignment()

# Write out the alignment
aln.write(file='readprofile.pir', alignment_format='PIR')



Automatic builds 2010-04-21