Cn3D macromolecular structure viewer
 
 
 
Alignment Editing

  Using the editor
 
 

Cn3D has a complete alignment editor when manual changes to an alignment are desired, such as to fix errors, or to add new sequences.


There are a few basic rules about the sort of editing you can do: you can't change the sequences themselves, and Cn3D's alignment model is enforced - that is, only aligned blocks with no gaps are allowed. Beyond that, however, the user has complete freedom to alter the alignment with the operations listed below.


The alignment editor works the same in both the alignment window and the import window. To turn on the editor in the alignment window, use Edit:Enable Editor; the editor in the import window is always on.


Changing the alignmentback to top


The basic alignment editing operation is simply to click-drag residues left or right within an aligned block. This will shift the alignment of that row within that single block. This assumes that Mouse Mode:Horizontal Drag is selected, which is the default when the editor is on.


After any change to the alignment, there is an Edit:Undo operation available in case a mistake is made. You can undo up to 50 operations since the editor was last enabled.


There are also operations that change the size and number of aligned blocks, described below.


The block indicator rowback to top


When the editor is on, you will see an extra row at the top of the alignment, labeled (blocks), that indicates the boundaries of the aligned blocks. The symbol '<' indicates the left edge of the block, '-' the middle, and '>' the right. If a block is a single residue wide, the '^' symbol is used.


To make a block bigger or smaller, simply click and drag the edge symbol ('<' or '>'). When making the block smaller, residue letters will be made lower case and added to the adjacent unaligned region. Or when making the block bigger, you will see more residues being added to the block - hence the letters becoming capitalized, and possibly colored in an aligned block scheme. Note that because no gaps are allowed in an aligned block, there may be a limit on how big you can make a block, depending on how many unaligned residues are available in the adjacent unaligned area in each sequence in the alignment.


Block operationsback to top


There are four block-wise operations in the editor:


  • Split block: select this item then click on an internal column within an aligned block; the existing block will be split into two adjacent blocks with the new block starting at that column.
  • Merge blocks: select this item then click-drag the mouse across the block edges of any two or more adjacent aligned blocks. These blocks will be fused into one single block.
  • Create block: select this item and click-drag across any number of columns of unaligned residues. A new block will be created from these residues, assuming every sequence in the alignment has aligned residues in the selected columns.
  • Delete block: select this item and click anywhere in an aligned block. The block will be removed and its residues added to adjacent unaligned regions.

Row operationsback to top


The editor also lets you delete a row with Edit:Delete Row, move rows up or down when Mouse Mode:Move Row is enabled, and also sort rows by various criteria - see the built-in help on the Edit:Sort Rows algorithms.


 
  Correcting alignment errorsback to top
 
 

If there are errors in a multiple alignment, there are two general ways to fix them, depending on their severity. If the errors are slight, they can be fixed manually using the operations described above. But sometimes the errors in the alignment of a particular sequence are so severe that a complete re-alignment of that sequence is necessary.


In order to apply algorithms (like BLAST) to realign an entire sequence, it is necessary to move the sequence into the import window where these algorithms are available. This is done using the Imports:Realign... items in the alignment window (available only when the editor is on). For instance, after selecting Imports:Realign Individual Rows, click on any sequence (except the master) in the multiple alignment, and it will be removed from the multiple alignment and added to the import window as a pairwise alignment with the master.


Once in the import window, the sequence can be realigned using the various Algorithms built into Cn3D, or as always, the alignment can be adjusted manually.


After the sequence is aligned satisfactorily in the import window, it can then be merged back into the multiple alignment. This procedure is described in the next section.


 
  Merging sequences into a multiple alignmentback to top
 
 

Sequences from the import window can be added as new rows to the multiple alignment in the alignment window. This process is called "merging," and applies to sequences that have been imported as well as sequences that were removed from the multiple alignment in order to be realigned (see above).


Merging can be complicated, because the pairwise alignment to be merged must have aligned blocks compatible with those of the multiple alignment. In other words, if the multiple alignment has a block from residues 10-20 (with respect to the master sequence), then the pairwise alignment to be merged must also have a block that covers at least residues 10-20.


This rule is necessary in order to preserve the block structure of the multiple alignment when a new sequence is added. In Cn3D's alignment model, the aligned blocks represent the "core" of an alignment (usually corresponding to the structural core of a protein), and Cn3D enforces this core model on all new sequence to be added to the multiple alignment. If, say, residues 10-20 on the master represent a core alpha helix, then it is asserted that any member of the family must have a corresponding alpha helix - and thus all rows of the alignment must have a block that covers these residues.


Cn3D tries to guide the user towards a mergeable alignment by painting a red background behind any regions of the pairwise sequence in the import window that would prevent that sequence from being merged into the multiple alignment. It is up to the user to make any necessary alterations to the pairwise alignment's block structure in these red areas before it can be merged.


It is also possible to make the pairwise alignments mergeable by changing the block structure of the multiple alignment. Although this is not usually the recommended strategy, there may be cases where an imported sequence provides evidence that the core model of the family is incorrect, and thus the multiple alignment needs to be altered. It is up to the user to make this judgment;  by design, Cn3D will not attempt to make such a decision automatically - hence these merging rules.


Once an alignment is mergeable - when there are no red-shaded residues in the pairwise alignment - then do Alignments:Merge Single and then click on any pairwise alignment, and it will be removed from the import window and added as a new row at the end of the multiple alignment in the alignment window. You can also do Alignments:Merge All to merge in all alignments in the import window.


 
 
 
 
 
 
Revised 20 September 2016