Editing an alignment

CINEMA provides a number of tools for the basic editing of a multiple sequence alignment. Foremost amongst these tools is an intuitive, mouse-controlled interface that enables sequences to be aligned through the insertion (and removal) of gaps into sequences, along with the sliding of sequences left or right, relative to the rest of the alignment.

These basic alignment operations may be applied to individual sequences or, through the creation of temporary and/or persistent groups, to multiple sequences simultaneously. This section also covers more advanced editing concepts, such as the Sequence Group Manager, the use of Breakpoints to subdivide an alignment, changing the order of the sequences in an alignment and removing sequences from an alignment.


Inserting & removing gaps

The insertion of gaps into, or removal of gaps from, an alignment is the most basic editing tool provided by CINEMA, and represents the default mode of interaction. To insert or remove gaps, first ensure that the 'insert/remove gaps' icon, found on the Alignment View toolbar, is selected.
Then:

To insert gaps:

  1. Move the mouse pointer to the position in the alignment at which the gaps are to be inserted. The insertion point will be to the left of the residue the pointer is over.
  2. Press and hold down the left mouse button.
  3. Drag the mouse to the right to insert one or more gaps.
  4. If, during the insertion procedure, too many gaps are inserted, these gaps may be removed by dragging the mouse back to the left.
  5. Release the left mouse button once the desired number of gaps has been inserted.

To remove gaps:

  1. Move the mouse pointer over to the position in the alignment from which the gaps are to be removed. This can either be over one of the gaps, or over the residue directly to the right of a block of one or more gaps.
  2. Press and hold down the left mouse button.
  3. Drag the mouse to the left to remove the desired number of gaps.
  4. If, during the removal procedure, too many gaps are removed, gaps may be re-inserted by dragging the mouse to back the right.
  5. Release the left mouse button once the desired number of gaps has been removed.


Sliding sequences

Sequence-sliding is the second basic interaction mode provided by CINEMA. During alignment, an entire sequence may be easily shifted to the left or the right, in relation to the rest of the alignment. This enables sequences to be aligned without the insertion/removal of internal gaps. To slide a sequence, first ensure that the 'slide sequences' icon, found on the Alignment View toolbar, is selected
Then:

  1. Position the mouse pointer over the desired sequence.
  2. Press and hold down the left mouse button.
  3. Drag the mouse to the left or right to slide the sequence in either direction
  4. Release the mouse button once the sequence is in the correct position.

Switching between basic editing modes

It is possible to quickly switch between the two basic editing modes, insert & remove gaps, and slide sequences, by pressing the Insert key at any time during the editing process.


Interacting with temporary groups of sequences

Both the insert/remove gaps and sequence sliding operations may also be applied to groups of multiple sequences simultaneously. A temporary group of sequences is be created by holding down the shift key and/or the control key, and then selecting the desired group of sequences with the left mouse button:

Once a temporary group of sequences has been selected, an insert/remove gaps or sequence sliding operation may be performed on the entire group simply by interacting with one of the grouped sequences. If a sequence that is not a member of the temporary group is selected at any point then it will be disbanded.


Creating persistent sequence groups

Sequences can be grouped together on a more long-term basis to simplify group-based interaction. If it is likely that a number of operations are to be performed on the same group of sequences, it would be sensible to create a persistent sequence group for them. To create a sequence group:

  1. Use the left mouse button and the shift and/or control keys to select the sequences to be grouped.
  2. Right-click one of the selected sequences; the sequence context-menu will pop up.
  3. Choose Group sequence(s) from the menu.

The selected sequences will now be combined as a sequence group. The effect of this grouping can be seen as a little coloured block in the label area of each sequence contained in the group. Multiple sequence groups may be created in this way, and each group is assigned a particular colour, to enable easy identification its members. If one sequence belonging to a group is selected with the mouse, all other members are automatically selected as well. Any editing operation applied to one member of the group will be automatically applied to all others.

Although grouping sequences is a useful facility for applying the same operation to several sequences at once, there may reach a point where it is necessary to remove one or more of the sequences that have been added to a sequence group, or even to disband a sequence group entirely.

Removing a sequence from a sequence group

A sequence may be removed from a sequence group by right-clicking over the sequence and choosing Ungroup sequence from the context menu. The coloured block will be removed from the sequence's label area, indicating it is no longer a member of the sequence group.

Disbanding a sequence group

It may be necessary to disband a sequence group entirely, so that all of its members may be operated upon individually, rather than the group as a whole. A sequence group may be disbanded by right-clicking over any of the member sequences and choosing Disband sequence group from the context menu. The coloured block will be removed from all of the member sequences' label areas, indicating they are no longer a member of a sequence group.

Temporarily overriding a sequence group

It is possible to temporally override a sequence group so that one of its member sequences may be operated upon individually. By selecting a sequence with the middle mouse button, rather than the left, any interaction will only be applied to that sequence, rather than all of the members of its parent sequence group. Once the interaction is complete, the original sequence grouping is restored.


The Sequence Group Manager

Existing sequence groups can also be grouped together with other groups and/or individual sequences, creating more complicated hierarchical sequence groups. In such cases, the labels of the grouped sequences will be re-coloured in the alignment view to illustrate their current grouping at the top level of the hierarchy; thus, the underlying hierarchical structure cannot be seen. In order to have full control over hierarchical sequence groups, and to visualise them, the Sequence Group Manager must be used.

The Sequence Group Manager is a tool that enables the user to create, organise and visualise hierarchical sequences groups. The Sequence Group Manager lists the sequences belonging to the currently active alignment, arranged according to any groups that have been defined to organise those sequences. A simple and intuitive drag-and-drop mechanism can be used to organise the resulting group structures. Sequence groups can also be customised with user-specified names and colours.


Launching the Sequence Group Manager

To use the Sequence Group Manager, either select Sequence Group manager from the Tools menu, or click on Sequence Groups tab in the main window.


Creating sequence groups

To create a group in the sequence group manager:

  1. Select the sequences to be grouped, using the left mouse button, and the shift and/or control keys.
  2. Right-click one of the selected sequences to pop-up the context menu; choose Group selected item(s).
  3. A new sequence group will be created, and the selected sequences will be arranged in the group. The group will be automatically named 'new group x', and a new colour generated for it.

Hierarchical sequence groups are created in the same manner, by selecting a combination of sequence groups and/or individual sequences then choosing Group selected item(s) from the context menu. It is important to note that when selecting a sequence group, you should click on the group name itself,
rather than the sequences it contains.


Drag-and-drop editing of sequence groups

A simple drag-and-drop mechanism may be used to edit sequence groups from within the Sequence Group Manager:


Renaming / re-colouring sequence groups

When a sequence group is created, it is automatically given a name and a colour is randomly chosen for it. Using the Sequence Group Manager, it is possible to both rename and to choose a new colour for a sequence group. To rename a sequence group:

  1. Right click the sequence group to pop up the context menu; Choose Rename from the menu.
  2. Alter the group name as required.

To change the colour of a sequence group:

  1. Right click the sequence group to pop up the context menu; Choose Change colour from the menu.
  2. The Select Colour dialog appears. Use this dialog to select or generate the required colour.
  3. Click on OK to accept the new colour. The sequence group will be re-coloured in both the Sequence Group Manager, and all appropriate alignment views.


Disbanding sequence groups

To disband an existing sequence group:

  1. Right click the sequence group to pop up the context menu; Choose Disband group from the menu.
  2. The group will be removed, and all of its member sequences or sub-groups will become children of the immediate parent group.
    If the disbanded group had no parent, the members will be returned to the set of ungrouped sequences.


Subdividing an alignment with Breakpoints

A Breakpoint is a vertical divider that may be inserted into an alignment, along a 'column' of residues. A breakpoint inserted into an alignment has the effect of splitting it into two sub-alignments at that point. For subsequent editing operations, CINEMA treats the sub-alignments either side of the breakpoint as if they were separate entities. If, e.g., a sequence sliding operation is performed, only the section of the sequence contained between the nearest breakpoints to the left and right of the mouse pointer will be effected.

Breakpoints can thus be used to preserve sections of an alignment while other sections are being edited. For example, if one region of an alignment has been successfully aligned, it is possible to add a breakpoint at one, or both sides of it. Subsequent editing to other areas of the alignment will not effect the region contained within the breakpoints, which has effectively been 'fenced off'.

The following image shows a breakpoint, represented by the vertical red dashed bar, inserted into an alignment:



To add a breakpoint:

  1. Move the mouse pointer to the position in the alignment at which the breakpoint is to be added. Note that the breakpoint will be set to the left of the residue the pointer is over.
  2. Right-click to pop-up the context menu and select Insert breakpoint.

As many breakpoints as are required may be added in this way.

To remove an existing breakpoint:

  1. Position the mouse over the breakpoint to be removed.
  2. Right-click to pop-up the context menu and select Remove breakpoint.


Removing sequences from an alignment

During the construction of a multiple sequence alignment, it may be necessary to remove existing sequences from the alignment. To remove one or more sequences from the alignment:

  1. Select the sequence(s) to be removed with the left mouse button, using the shift and/or control keys to select multiple sequences.
  2. Right-click one of the selected sequences; the sequence context-menu will pop up.
  3. Choose Remove selected sequences from the menu.

The selected sequence(s) will be removed from the alignment. Any redundant gaps subsequently created at the either end of the alignment will automatically be removed.

Important notes:


Changing the order of the sequences in an alignment

During the construction of a multiple sequence alignment, it may be necessary to change the order of the sequences that make up that alignment. Sequences can be re-positioned very easily using the mouse:

  1. Select the sequence to be re-positioned by clicking on its label using the left mouse button.
  2. With the left mouse button held down, move the mouse up/down to re-position the sequence as appropriate.
  3. Once the sequence is in the correct position within the alignment, release the mouse button.

After changing the order of sequences in an alignment, all open views onto that alignment will be automatically updated to reflect the new sequence order.

Note: if any motifs have been defined in the alignment that depend on a sequence you move, then you must either remove or
manually correct the affected motif(s) following the repositioning operation.


Viewing the different chains of a PDB sequence

Sequences obtained directly from the PDB database (or local PDB files) my consist of multiple chains. When a multi-chain PDB sequence is first opened in CINEMA, you will be shown a list of the available chains, and asked to choose which chain you wish to see. This choice is not permanent and you can generally change which chain is shown very easily:

  1. Position the mouse pointer over the sequence and click the right hand mouse button to pop up the context menu.
  2. Open up the Show Chain sub-menu and select the chain you wish to see.
  3. The sequence will be updated to show the newly selected chain in all currently open views of the alignment.

Note: if the sequence in question is a member of a sequence group, or there are any motifs defined that include the sequence then you will not be able to change the chain (the Show Chain sub menu will be greyed-out and inactive.) You must either remove the sequence from the group, or remove the motif in order to show a different chain.