Profile.read() — read a profile of a sequence

read(file, profile_format)
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).

For TEXT files, file can be either a file name or a readable file handle (see modfile.File()). For BINARY files, it must be a file name.

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