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

profile.read() -- read a profile of a sequence

file = <str:1> 'default' partial or complete filename
profile_format = <str:1> 'TEXT' 'TEXT' | 'BINARY' ; for READ/WRITE_PROFILE

This command will read a profile from a specified file. Two formats are supported: TEXT and BINARY.

For the format of text files, see Section B.3. Binary format files are standard HDF5 files (see Section B.4).

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')



Ben Webb 2007-01-19