next up previous contents index
Next: alignment.edit() edit Up: The alignment class: comparison Previous: alignment.append_profile() add   Contents   Index

alignment.write() -- write sequences and/or their alignment

file = <str:1> 'default' partial or complete filename
alignment_format = <str:1> 'PIR' format of the alignment file: 'PIR' | 'PAP' | 'QUANTA' | 'INSIGHT' | 'FASTA'
align_block = <int:1> 0 the last sequence in the first block of sequences
align_alignment = <bool:1> False writing out an alignment of alignments (for *)
alignment_features = <str:1> 'INDICES CONSERVATION' what alignment features to write out: 'ACCURACY' | 'HELIX' | 'BETA' | 'ACCESSIBILITY' | 'STRAIGHTNESS' | 'CONSERVATION' | 'INDICES' | 'ALL' | 'GAPS'

This command writes the whole alignment to a text file.

The 'PAP' format, which corresponds to a relatively nice looking alignment, has several additional formatting options that can be selected by the alignment_features variable. This scalar variable can contain any combination of the following keywords:

Options 'HELIX', 'BETA', 'ACCESSIBILITY', and 'STRAIGHTNESS' are valid only after executing command alignment.align2d(), where the corresponding quantities are defined. They refer to the 3D profile defined for the first align_block structures (run alignment.align2d() with fit = False to prepare these structural data without changing the input alignment). Similarly, the 'ACCURACY' option is valid only after the alignment.consensus() command. Options 'PRED_SS' and 'CONF_SS' are best exercised after reading in a ".PSS" file of secondary structure predictions. In the case of multiple sequences, it may be necessary to use the command 'transfer_res_prop' first.

align_alignment and align_block are used to ensure correct indication of identical alignment positions, depending on whether sequences or two blocks of sequences were aligned: For sequences (align_alignment = False and align_block is ignored), a '*' indicating a conserved position is printed where all sequences have the same residue type. For blocks (align_alignment = True and align_block indicates the last sequence of the first block), a '*' is printed only where the two blocks have the same order of residue types (there has to be the same number of sequences in both blocks). The blocks option is useful when comparing two alignments, possibly aligned by the alignment.align() command.

Example: See alignment.append() command.


next up previous contents index
Next: alignment.edit() edit Up: The alignment class: comparison Previous: alignment.append_profile() add   Contents   Index
Ben Webb 2007-01-19