io = <io_data> | Options for reading atom files | |
file = <str:1> | 'default' | partial or complete filename |
align_codes = <str:0> | 'all' | codes of proteins in the alignment |
atom_files = <str:0> | '' | complete or partial atom filenames |
alignment_format = <str:1> | 'PIR' | format of the alignment file: 'PIR' | 'PAP' | 'QUANTA' | 'INSIGHT' | 'FASTA' |
remove_gaps = <bool:1> | True | whether to remove all-gap positions in input alignment |
close_file = <bool:1> | True | whether or not to close the alignment file at the end of READ_ALIGNMENT |
rewind_file = <bool:1> | False | whether or not to rewind the alignment file at the start of READ_ALIGNMENT |
There are several alignment formats:
If remove_gaps = True, positions with gaps in all selected sequences are removed from the alignment.
The io argument is required since PIR files can contain empty sequences; in this case, the sequence is read from the corresponding PDB file.
Ordinarily, the alignment file is closed at the end of this commmand. However, when reading 'PIR' or 'FASTA' format files, if close_file is False, then the file is left open. Subsequent calls to alignment.append() will then resume at this point in the file, provided they set rewind_file to False. The end_of_file variable is set to 1 if MODELLER reached the end of the 'PIR' or 'FASTA' file during the read, or 0 otherwise.
# Example for: alignment.append(), alignment.write(), # alignment.check() # Read an alignment, write it out in the 'PAP' format, and # check the alignment of the N-1 structures as well as the # alignment of the N-th sequence with each of the N-1 structures. log.level(output=1, notes=1, warnings=1, errors=1, memory=0) env = environ() aln = alignment(env) aln.append(file='toxin.ali', align_codes='all') aln.write(file='toxin.pap', alignment_format='PAP') aln.write(file='toxin.fasta', alignment_format='FASTA') aln.check()