CINEMA provides a simple, yet powerful, mechanism for defining and managing motifs within a multiple sequence alignment. Motifs are defined directly in an alignment, by selecting a rectangular region with the mouse. If appropriate, a set of motifs can be grouped together into one or more Fingerprints for the alignment.
This section explains how to define and edit motifs, as well as how to correct motifs that have been affected by changes in the alignment. A detailed guide is provided for the Motif Manager, a tool for managing motifs and performing advanced operations, such as compiling a set of motifs into a Fingerprint. A Motif can also have breakpoints added to it, be saved as an image or a .mot file, or it can be printed out.
Motifs are defined by drawing them directly over the appropriate region of the alignment. Before you begin to define any motifs, you must put CINEMA into Create/Edit motifs mode, which is done by clicking on the
icon in the Alignment View tool bar. Then, to create a motif:
- Position the mouse pointer over the residue that is to be the top-left corner of the motif, then press and hold down the left mouse button
- Drag the mouse pointer down and/or to the right; the outline of the motif will be drawn from the initially selected residue to the residue under the mouse pointer, illustrating the region of the alignment that it covers
- Once the required region is fully enclosed by the outline, release the left mouse button to create the motif.
Creating an 'alignment-high' motif
When creating a motif, you will often want to define a region that spans the entire 'height' of an alignment, i.e. a region that covers all sequences. In order to simplify the creation of such motifs, it is possible to select a region spanning the height of the alignment automatically by holding down the shift key whilst defining a motif in the manner described above - only the start and end residues need then be chosen by the user.
After a motif has been defined, it may subsequently become necessary to resize it, or to remove it altogether.
- Position the mouse pointer inside the motif to be edited and click the left mouse button. Small square handles will appear in the corners and along the left and right edges of the motif.
- Position the mouse pointer over one of the motif's edges; press and hold the left button.
- Whilst holding down the left button, drag the mouse left/right or up/down to resize the motif.
- Release the left mouse button when finished.
- Position the mouse within the motif area and right-click to pop-up the context menu.
- Open the Motif "motif-name" sub-menu and then select Delete motif.
- The motif will be removed from the alignment.
Invalidated motifs
If, after defining motifs, the alignment is subsequently changed, then one or more of those motifs may be affected. For example by inserting/removing gaps, or by changing the order of, or adding/removing sequences, the region of the alignment covered by a motif may be altered in such a way that the motif may no longer make sense. Such motifs are considered by CINEMA to be "invalidated", since they no longer cover the same alignment region as when originally created.
It is likely that, in such cases, the affected motif(s) will need to be resized and/or re-positioned as a result of the changes, or perhaps they will need to be removed altogether. In other cases, the motif may actually be unaffected by the change to the alignment and can remain in its original state. However, it is up to the user to make this decision, hence CINEMA treats these motifs as invalidated.
Invalidated motifs are drawn with a red outline, and with a translucent red cast, to draw the user's attention to them and indicate that it is likely that they must be edited in some way. The following image illustrates an invalidated motif (on the right hand side), in direct comparison with a "valid" motif (left):
Re-validating a motif
The basic procedure for dealing with an invalidated motif is (if necessary) to resize it, so that it covers the correct region of the alignment, and then to re-validate it, which informs CINEMA that the motif is OK again. Alternatively, if the motif is no longer required, it can be removed. To re-validate a motif, put CINEMA into Create/Edit motifs mode and then click on the tick box in the right-hand corner of the motif outline. The motif outline will change colour, from red back to black again (or it's current colour if that has been changed).
The Motif Manager is a tool that provides more advanced control over the motifs defined in an alignment. In particular, motifs can be can be grouped together into a Fingerprint, given specific names and they can be re-coloured. The Motif Manager also provides a fast way to locate specific motifs in an alignment.
To open the Motif Manager, either select Motif manager from the Tools menu, or click on the Motifs tab in the CINEMA control window. The following image illustrates the main regions of the Motif Manager window:
Compiling a Fingerprint of motifs
The concept of a Fingerprint can be used to logically group the motifs that are defined in an alignment. Fingerprints can be freely compiled for motifs that cover the main family of the alignment (i.e. all of the sequences it contains) and for any appropriate sub-families that might be represented. Once a fingerprint has been compiled, some motif operations may be performed on all motifs contained on the Fingerprint collectively.
Grouping a set of motifs as a Fingerprint
To group a set of motifs together as a Fingerprint, first make sure all of the motifs are selected in the Motif Manager window:
- Using the shift and/or control keys to group-select, click on each motif icon in the Motif Manager.
- Right-click on one of the selected motif icons.
- Choose Group selected motif(s) as a Fingerprint from the context menu.
- You will be asked to provide a name for this Fingerprint (a default name will be generated for you, using the name of the alignment). Enter a name in the box, or accept the default and click OK
- A Fingerprint will be created in the Motif Manager, and the selected motif icons will be moved into the Fingerprint.
Moving motifs into, out of and between Fingerprints
Motifs can be easily moved into and out of a Fingerprint, or even moved between two Fingerprints using the Motif Manager. To move a motif into a Fingerprint:
- Select the motif's icon and drag it over the Fingerprint icon.
- Drop the motif on to the Fingerprint icon by releasing the mouse button
- The motif will become a member of the Fingerprint.
Motifs can be removed from a Fingerprint in a similar manner:
- Select the motif's icon and drag it over the alignment icon (at the top of the list in the Motif Manager window).
- Drop the motif on to the alignment icon by releasing the mouse button
- The motif will be removed from the Fingerprint.
Finally, to move a motif between one fingerprint to another:
- Select the motif's icon and drag it over the icon of the Fingerprint you wish to move it to.
- Drop the motif on to the Fingerprint icon by releasing the mouse button
- The motif will be removed from its original Fingerprint and inserted into the new one.
Disbanding/deleting Fingerprints
If a Fingerprint is no longer needed it may either be disbanded or deleted. Disbanding a Fingerprint removes it, but leaves the motifs it contains untouched - they remain in the alignment, and some or all of them may be re-grouped as a new Fingerprint at some later time. Deleting a Fingerprint removes both the Fingerprint and all of the motifs it contains from the alignment. To disband or delete a Fingerprint:
- Right-click on the icon of the Fingerprint in the Motif Manager.
- Choose either Disband Fingerprint or Delete Fingerprint & Motifs from the context menu.
Renaming motifs and Fingerprints
Renaming a motif
When a motif is first created, it will automatically be given a name to identify it: the first motif is called "New motif", then second "New motif 2" and so-on. This name may be changed to something more appropriate if desired, to make it easier to identify he different motifs defined in an alignment. To rename a motif:
- Position the mouse over the motif's icon in the Motif Manager and right-click to pop-up the context menu
- Select Rename.
- A Rename motif dialog will appear; enter a suitable new name and click the OK button.
Note that a motif cannot be renamed if it is a member of a Fingerprint. Motifs that are grouped in a Fingerprint automatically take their name from the name of that Fingerprint. Specifically, the motif's name is derived from the Fingerprint name and its position in the alignment, from left to right, relative to the other motifs in the Fingerprint. The Fingerprint itself must be renamed in order to change the contained motifs' names.
Renaming a fingerprint
When a Fingerprint is first created a name must be proposed for it (of the default suggested name accepted), and the name of the Fingerprint is subsequently used to generate names for all the motifs it contains. A new name can be chosen for a Fingerprint at any point and, after changing the name of a Fingerprint, all of the motifs it contains will automatically be renamed to reflect this change. To rename a Fingerprint:
- Position the mouse over the Fingerprint's icon in the Motif Manager and right-click to pop-up the context menu
- Select Rename Fingerprint.
- A Rename dialog will appear; enter a suitable new name and click the OK button.
By default, motifs are drawn over the alignment using a black outline. It is also possible to choose a custom colour to draw a particular motif's outline. To change the colour of a motif:
- Position the mouse over the motif's icon in the Motif Manager and right-click to pop-up the context menu
- Select Change colour of motif.
- A colour dialog will appear; choose a suitable new colour and click the OK button .
The motif will now be drawn in the alignment using the newly chosen colour; the name of the motif will also be drawn in this colour in the Motif Manager.
Re-colouring a Fingerprint
It is also possible to change the colour of a Fingerprint, in much the same manner as that described above; in this case, all of the motifs contained in the Fingerprint will adopt the new Fingerprint colour.
Locating specific motifs in an alignment
One of the most useful features of the motif manager is the ability to quickly locate a specific motif defined in an alignment. If there are many motifs defined in different regions of a large alignment, CINEMA can be easily instructed to centre the view on a particular motif:
- Position the mouse over the motif's icon in the Motif Manager.
- Either double-click on the motif icon, or right-click and select Find motif in alignment from the context menu.
- The currently active view onto this alignment will be scrolled in the appropriate direction so that the selected motif is visible.
In order to preserve the region of an alignment defined by a motif, it is possible to automatically add a breakpoint to its left and right edges. To add breakpoints to a motif:
- Position the mouse within the motif area and right-click to pop-up the context menu
- Open the Motif "motif-name" sub-menu and then select Add breakpoints to motif.
- Two breakpoints will be added to the alignment, one at the left and one at the right edge of the motif. Any subsequent changes made to the alignment outside of the motif will not affect the region inside it.
Once breakpoints have been added to a motif, they may subsequently be removed from that motif by following the same procedure, but choosing Remove breakpoints from motif from the menu.
The region of an alignment defined by a motif may be saved as a bitmap image file, for use in document processing software, graphics software or for printing out. A number of standard image file formats are supported: bmp, xpm, xbm, png. You can specify the size of the image to be saved in terms of pixels or millimetres. To save a motif as an image, position the mouse within motif area in the alignment and right-click to pop-up the context menu. Open the Motif "motif-name" sub-menu and then select Save motif as an image. The output options dialog will appear:
From this dialog, you can specify the output size of the motif in either pixels or mm by choosing the desired units from the drop-down box and then entering a value in either the width or height boxes. When altering the either the width or height, the aspect ratio of the motif is maintained, and the corresponding dimension will be automatically updated for you; the width or height values may be rounded slightly to accommodate the entire motif.
Once you are ready to generate an image, click on the OK button. The file save dialog will appear once the image has been generated. Choose the appropriate image file format, enter a suitable name to save the image file as and click on the Save button.
Note: This operation can also be performed via the Motif Manager, by right-clicking on the motif icon and choosing the appropriate menu option.
A motif may be saved as a .mot file, for use with analysis tools such as scan and compare. A .mot file takes the following format:
% [comment]
[number of sequences in motif]
[name of motif]
GTEGPETUCVPTEGPETUCVP
GTEGPETUCVPTEGPETUCVP
GTEGPETUCVPTEGPETUCVP
GTEG...
*
To save a motif as a .mot file:
- Position the mouse within the motif area in the alignment and right-click to pop-up the context menu.
- Open the Motif "motif-name" sub-menu and then select Save motif.
- The file save dialog will appear.
- The name of the motif will automatically appear in the dialog: either accept this name or enter a suitable replacement, and then click on the Save button to save the motif.
Saving all motifs in a Fingerprint
After compiling a Fingerprint, you may want to save each of the motifs within it. Rather than saving each motif individually, an entire Fingerprint of motifs can be saved at the same time. To save all of the motifs in a Fingerprint:
- Position the mouse within one of the motifs contained in the fingerprint and right-click to pop-up the context menu.
- Open the Fingerprint "fingerprint-name" sub-menu and then select Save all motifs in fingerprint.
- You will now be prompted to save each motif in turn. For each motif, a save file dialog will appear; either accept the suggested name, or enter a new one and click on the Save button.
Note: These operations can also be performed via the Motif Manager, by right-clicking on the motif icon and choosing the appropriate menu option.
The region of an alignment defined by a motif may be printed out to any standard printer attached to your system. Motifs may be printed in colour, and on any paper format your printer supports. You can specify the print size in terms of pixels or millimetres. To print a motif, first position the mouse within the appropriate alignment area and right-click to pop-up the context menu. Open the Motif "motif-name" sub-menu and then select Print motif. The output options dialog will appear:
From this dialog, you can specify the print size of the motif in either pixels or mm by choosing the desired units from the drop-down box and then entering a value in either the width or height boxes. When altering the either the width or height, the aspect ratio of the motif is maintained, and the corresponding dimension will be automatically updated for you; the width or height values may be rounded slightly to accommodate the entire motif.
Once you are ready to print the motif, click on the OK button. The standard print dialog will appear. Choose and configure an appropriate printer on the OK button to print.
Note: This operation can also be performed via the Motif Manager, by right-clicking on the motif icon and choosing the appropriate menu option.