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

profile.write() -- write a profile

file = <str:1> 'default' partial or complete filename
gap_penalties_1d = <float:2> 900 50 gap creation and extension penalties for sequence/sequence alignment
matrix_offset = <float:1> 0.00 substitution matrix offset for local alignment
profile_format = <str:1> 'TEXT' 'TEXT' | 'BINARY' ; for READ/WRITE_PROFILE
rr_file = <str:1> '$(LIB)/as1.sim.mat' input residue-residue scoring file

Description:
This command will write a profile to a specified file, together with a number of variables that are associated with the profile in the memory. Two formats are supported: TEXT and BINARY.

Example: examples/commands/aln_to_prof.py


env = environ()

# Read in the alignment file
aln = alignment(env)
aln.append(file='toxin.ali', alignment_format='PIR', align_codes='ALL')

# Convert the alignment to profile format
prf = aln.to_profile(clean_sequences=True)

# Write out the profile

# in text file
prf.write(file='alntoprof.prf', profile_format='TEXT')

# in binary format
prf.write(file='alntoprof.bin', profile_format='BINARY')



Ben Webb 2006-02-28