Chapter 5
Warping 2D Gel Images

5.1 The Gel Image Pair View

The Gel Image Pair View shows a gel pair and lets you create or refine a warp transform between them.


ui/visual_comparison_result_scaled
Figure 5.1: The Gel Image Pair View, also named Dual Image View, or, in short, Dual View

Open the Gel Image Pair View of Delta2D by double clicking on the gel pair's cell in the Project Manager table. The Gel Image Pair View will open and the referred gel pair is automatically loaded.

The images are loaded after a fixed scheme: the gel image in the table row is loaded as the master image, the other one (in the table column) takes the role of the sample image that will be warped.

From the gel images, a dual channel image is automatically generated: the master image is colored blue while the sample image will be displayed in orange color. Shades of black1 are generated where both images have dark regions, i.e. spots. You can click on the tabs at the bottom of the Dual View window to switch quickly between displaying the master, sample, or dual channel image. You can use as well Ctrl + Space and Ctrl + Shift + Space to switch between these tabs.

________________________________________________________________________________

Note:
Delta2D can use any color scheme to produce a dual channel image. When you first start it, it will be set to the default color scheme: white for background, a shade of blue for master spots, and a shade of orange for sample spots. Regions with overlapping spots are colored black. For changing the color scheme, please refer to section 5.13.

ui/gel_view_tabs
Figure 5.2: The tabs for controlling image visibility

At the top you see the menu bar and an icon bar. On the left-hand side is a vertical panel, the Tool Panel (Figure 5.3).

The Tool Panel

is a vertical panel with five tool buttons. They are used for activating the match icons/match-tool16, spots icons/spots-tool16, edit spots icons/spotedit-tool16, zoom icons/zoom-tool16, and labels tool icons/label-tool16, respectively.
ui/tool_panel_all
Figure 5.3: The tool panel.

Table 5.1 explains the meaning of the tool buttons in detail. At any given time there can be only one tool active. Depending on the tool you have activated, Delta2D will react differently to your mouse actions and adapt the visible overlays. For example, activating the label tool and then clicking on a gel image will create a new label. If the match tool is activated however, a mouse click will create a new match vector.
icons/match-tool16 Match vector tool. In match vector mode, only the match vector overlay is visible, mouse clicks define corresponding gel positions.
icons/spots-tool16 Spots tool. Only the spots overlay will be visible. If no spot boundaries are present, spot detection and quantitation will be started. On present spots, this tool enables you to select, mark, hide, and cancel spots, and to exclude spots from or include them into normalization. allow selection of spots and spot groups.
icons/spotedit-tool16 Edit Spots tool. Click here to switch to the edit spots mode. Available edit markers become visible, you can add, split and fuse spots (details in sec. 6.5).
icons/zoom-tool16 Zoom tool. This is the initially active tool. All other layers (except edit markers) are visible. Use this tool to control image zoom by clicking into or dragging a rectangle around interesting regions of the image.
icons/label-tool16 Labels tool. The labels overlay remains or becomes visible, the other overlays are hidden. Use this tool to create and edit labels.

Table 5.1: Buttons on the tool panel.

The Icon Bar


ui/dual_view_toolbar_scaled
Figure 5.4: The icon bar of the Gel Pair View

The tool bar is located at the top of the window, right below the menu bar. Table 5.2 shows the meaning of the buttons.




icons/SaveAs16 Export the warped or unwarped sample image as image to disk.
icons/SaveAsDiff16 Export the dual channel image as image to disk.
icons/camera16 Open a snapshot window, that contains the whole gel image as it is now.


icons/Preferences16 Open the preferences dialog


icons/ZoomIn16 Zoom in
icons/ZoomOut16 Zoom out
icons/Zoom10016 Zoom 1:1
icons/ZoomFitImage16 Fit the image into the window, such that it can be seen completely inside the window.


icons/OpenMatch16 Import a match map
icons/SaveAsMatch16 Export the current match map


icons/Warped16Warp Apply the current warp mode to the sample image
icons/Unwarped16 Disable warping operations and show sample image in its unwarped state.
icons/warpmode_dual_view16 Current warp mode: Select the warp mode for this sample gel image.
icons/FindMatchVectors Find Match Vectors: Apply the SmartVectors Technology to receive an automatically genreated match map.


icons/Enhance16 Show image histograms
icons/Equalize16 Equalize images
icons/foreground16 Show or hide the foreground of images
icons/background16 Show or hide the background of images


icons/Help16 Help. . .
icons/About16 About. . .





Table 5.2: Buttons on the icon bar and what they do.

_________________________________________________________________________________________________________________________________________________________
Note:
The icon bar, the tool panel and any similar looking component of Delta2D can be torn off and placed anywhere on your screen by clicking on its "handle" at its beginning and dragging it to the desired place. To reattach it to the main window, simply close the small window of the respective bar.

The Status Bar


ui/gel_view_statusbar_scaled
Figure 5.5: The status bar of the Gel Pair View

The status bar, located at the bottom of the Gel Image Pair View window, shows some useful information about your work:
Position and zoom level
The left field of the status bar shows the coordinates of the mouse cursor in relation to the gel image. This makes it easy to evaluate the mouse position in a higher zoom level, to locate a certain spot quickly, as well as to access the size of a spot. In brackets near the coordinates, the zoom level is indicated.
Image Size, Match Vector count, Spots count
The middle field indicates the outer bounds of both images. This means the horizontal size of the broader of both images and the vertical size of the higher one. This value refers to the original images, no matter how the prescale is used. Besides, you get a quick information on how many match vectors and how many spot boundaries are present in this pair of images.
Memory use
The right part shows the amount of memory currently used in relation to currently reserved memory. Double click on this field to free unused memory.

5.2 Configuring the Display Using Rollups

Rollups are little windows that are floating above the main window. They can be collapsed to use only a minimum of screen space.

The Colors Rollup

The Colors rollup contains the current color scheme. You see a colored square that shows how master and sample image intensities map to colors. Consider it as a diagram with two axes: on the vertical axis is the intensity of a sample spot, and master spot intensities are shown on the horizontal axis. The color code for common background pixels is in the bottom left corner, common spots have the color of the top right corner. For any possible combination of master and sample intensities, the diagram shows the color code that is displayed by Delta2D.

Move the mouse pointer over the dual channel image and watch the color square. A small circle inside the color square shows the current location in the color diagram. A numerical display of the intensity ratio (sample / master) is shown below the color square. Even though these values are computed only for small regions of the gel images, they are already quite useful indicators for the expression ratio of a spot.

Click inside the color square to change the color scheme. A menu appears, giving you the opportunity to change the used color scheme (see sec.5.13) and to switch directly between the absolute mode (standard setting) and the ratio mode (see sec.5.13).


ui/rollup_colors
Figure 5.6: The colors rollup

The Overlays Rollup

The Overlays containing the various objects that are overlaid on top of the gel images: match vectors, spots, and labels, are generally controlled by the working context, i.e. the activated tool; but you can controll them manually as well with the Overlays Rollup.
ui/rollup_overlays
Figure 5.7: The overlays rollup

You can control the visibility of the spots and labels on both images separately using the left or right button, respectively. Match vectors can only be controlled as a whole for both images.

Clicking one of the small control buttons will toggle the visibility of the respective objects between three modes: visible, non-visible, and auto-visibility (controlled by context).

The button Gel images only is useful to blind out the overlaid objects temporarily for a short, undisturbed glance on the original images, e.g. during spot editing. The overlays will reappear according to the overlay rollup settings when you release the button.


icons/fade

Figure 5.8: Button to temporarily hide all objects

The Navigator Rollup

The Navigator rollup shows an overview of the whole gel image. The current window is represented by a rectangle. Click and drag this rectangle to move around within the image.
ui/rollup_navigator
Figure 5.9: The navigator rollup

The Zoom Rollup

The Zoom rollup displays a fourfold zoom of the gel image around the current mouse position.
ui/rollup_zoom
Figure 5.10: The zoom rollup

The Expression Profile Rollup

The Expression Profile rollup shows you at a glance the normalized volume of a certain spot on each gel image of your project in comparison. Simply point with the mouse pointer on a detected spot you want to examine.
ui/rollup_barcharts
Figure 5.11: The Expression Profile rollup. The columns are colored according to the replicate group. The black lines indicate the mean plus minus the relative standard deviation.

The 3D Spots Rollup

The 3D spots rollup visualizes a selected spot in a three-dimensional representation. It is highly configurable:

Choose Preferences... from the File menu of the Dual View and switch to the 3D Spots tab to change the settings. Please refer to section 9.10 for more details.


ui/rollup_3d
Figure 5.12: The 3D spots rollup

Using the 3D Spots Rollup
After opening the rollup, please switch to the Spots Tool on the Tool Panel and left click somewhere on the gel image in the Dual View. You can click on any spot (within the spot boundary) to see the spot focused in the rollup, or between spots, anywhere on the background, and see the area around the point you clicked on. Control the view in the rollup by clicking right into it:

The pI/MW Calibration Rollup

The rollup shows the estimated pI and MW for the current mouse position, it updates as you move the mouse. Delta2D can estimate the isoelectric point and molecular weight of a spot according to known data for other spots on the gel. This is accomplished by building a mathematical model of the relation between pI/MW values and a spot's position on the gel. The known data is taken from label aspects (Scout data), in the pI and MW attributes. More spots with known pI/MW values make the model more accurate.


ui/rollup_piMw
Figure 5.13: The pI/MW Calibration rollup

Configuring the Data Source for pI/MW estimation

The precondition to configure pI/MW estimation is the availability of applicable reference data in any scout (for more about scouts please refer to section 7.7) of some labels. This can be the manually edited physicochemical properties scout, the table data scout with arbitrary defineable data fields, or any web scout providing adequate data.

Go to the Project Manager and select Preferences from the File menu. Switch to the Labeling tab. The Source field lets you choose from all scouts containing adequate data. Select the scout you want to use for the estimation and specify in the fields below which data fields are to be interpreted as pI and MW values.

Example You know the pI/MW values for 4 points on your gel and want to be able to see them for other interesting spots or regions. Here is how to proceed:

Now you can open the pI/MW Calibration rollup and just read the pI/MW for any region on this gel you are pointing to.


ui/preferences_labelingPIMW_scaled
Figure 5.14: Setting the data source for pI/MW-Calibration

The Rollups Menu

You can use the Rollups menu to control the appearance of rollups – either as a group or individually (see table 5.3).
Show all Show all rollups.
Hide all Hide all rollups.
Expand all Expand all rollups.
Collapse all Collapse all rollups.
Colors Show or hide the Colors rollup.
Overlays Show or hide the Overlays rollup.
Navigator Show or hide the Navigator rollup.
Zoom Show or hide the Zoom rollup.
Expression Profiles Show or hide the Expression Profiles rollup.
3D spots Show or hide the 3D spots rollup.
pI/MW Calibration Shor or hide the pI/MW calibration rollup.

Table 5.3: The Rollups menu.

5.3 Navigating in Images

There are two possibilities to adjust the view: The zoom tool bar icons/ZoomIn16icons/ZoomOut16icons/Zoom10016icons/ZoomFitImage16 for quick access to predefined views and the zoom tool icons/zoom-tool16 for precise determination of the current view. With the buttons icons/ZoomIn16 and icons/ZoomOut16 you zoom in (resp. out), whereas the button icons/Zoom10016 resets the view to the natural size of the image. With icons/ZoomFitImage16 you fit the image size to the actual window size.

The zoom tool allows you to adjust more precisely the region you want to magnify. It is activated by using the tool panel in the top left area of the main window (Figure 5.3).

Press the zoom tool button icons/zoom-tool16 to activate zoom mode. The mouse cursor will change to a magnifying glass. Click anywhere inside the image to enlarge it. Click and drag to specify a region that should be zoomed in. Clicking and dragging with the right mouse button will change the mouse cursor temporarily to act as a magnifying glass as long as the right mouse button is pressed. If you need a magnifying glass also while working with the label tool or others, it might be more convenient to use the Zoom Rollup (See Figure 5.10).

Use the Navigator Rollup (Figure 5.9) to shift the visible region of your image without changing your zoom ratio.

5.4 Enhancing the Images View

Controlling Background Display

Depending on the background level of your images, it may now be advisable to enhance the images. In Delta2D, background is computed for the whole image, and background levels may vary from one region to another. For each gel image, Delta2D generates an adaptive background image that can be subtracted from the original to give a "background free image".

Try it: Use Images |\ Show background to switch background visibility on and off. You can use the tabs at the bottom of the Dual View window to switch between the gel images and the dual channel image. Often the dual channel image without background is clearer than the complete dual channel image.


imageprocessing/dual_channel_w_background_scaled    imageprocessing/dual_channel_wo_background_scaled
Figure 5.15: A dual channel image with background switched on and off.

The same background subtraction mechanism will be used later in the quantitation step. You can adjust background subtraction either when quantifying spots manually with Spots |\ Quantify |\ ...(see 6.3 for details), or directly for the actual view: Select Images |\ Background Region |\ gelname.
ui/dialog_background_region_scaled
Figure 5.16: Visual background settings

The now upcoming dialog lets you set the same parameter for background detection as described in section 6.3, but with one difference: changing the background parameter here affects only the current view. There are two more options you can switch on or off. They determine how the Visual background region set here interacts with the Local background region set in the Quantitation dialog.
Show visual background region in spot detection dialog
means that this setting will be handed over to the Spot detection dialog. It can be seen, when you open the Spot detection dialog, but will not be applied to quantitative data before you start a new quantitation.
Overwrite visual background region after spot detection
means the opposite way of communication: if you change this parameter in the spot detection dialog, it will be changed here as well.

The purpose of these options is to keep the visual background region in sync with the technical background region, thus the default setting for both options is checked. Please note that the visual background is linked to the background detection controlled by the quantitation dialog. With the default settings it has influence on spot quantity.

The Histograms Dialog

Adjusting histograms is advisable when your image does not use the full dynamic range (i.e. there is no bright white or no black in it), or if there is a homogeneous background.

Delta2D allows you to compensate for differences in brightness and contrast between master and sample gel images by adjusting the image histograms. This can result in production of clearer dual channel images. Histogram adjustments are controlled with the Histograms dialog, illustrated in figure 5.17.


ui/dialog_histograms_scaled
Figure 5.17: The histograms dialog.

You can invoke the Histograms dialog from the Images menu by choosing the Images |\ Histograms. . . menu entry, by using the keyboard shortcut Ctrl-H, or by clicking on the Histograms icon icons/Enhance16 in the tool bar.

________________________________________________________________________________

Note:
Histogram adjustment is saved individually for each image. It affects the generation of dual channel images and the representation of images in the Gel Regions View, but leaves the spot quantities unchanged. It is meant to enhance the view of the gel images without changing quantitative data. This is in accordance with Delta2D's principle of leaving original data unchanged as far as possible.
Histograms or Amplitude Rescaling?

Delta2D offers two tools to correct the visual representation of gel images with poor contrast: amplitude rescaling and Histogram adjusting. They complement one another and can be used solely or in combination, just as required.

Amplitude rescale is a standard approach in image processing, which rescales the effectively used range of gray values in an image to the maximum usable range. For example: if you have an 8-bit image (which can define one of 256 gray values for each pixel, and let 0 being black and 256 being white), where the darkest pixel has the gray value 40 (dark gray) and the lightest 180 (light gray; quite a gray and shallow looking image), amplitude rescale represents the value of 40 as 0 (perfect black), 180 as 256 (perfect white) and the intermediate gray values rescaled respectively. Thus you have a much more plastic and vivid representation of your image without having altered the information contained. Depending on your gel images, the effect of amplitude rescale you can observe can vary in a wide range: the enhancement can be either hardly visible if your images already use a wide range of gray values, or it can even make spots visible you could not see before if your images use only a small bandwidth of gray values.

But of course this approach has a drawback as well: loading and displaying images in the Gel Image View takes slightly more time, especially if according to your zoom settings only a part of the image would be loaded, because for amplitude rescale the complete image has to be analyzed. Thus, the recommended setting depends on your gel images: if the effect of amplitude rescale is hardly visible, you can switch it off (please refer to section 5.5 on how to do so) to load images faster; if your images are generally more flat and poor in contrast, amplitude rescale can be a great help.

Amplitude rescale is no more than a rough pre-enhancement, which can be sufficient in many cases, but cannot take into account problems with artificial signals like speckles or gel breaks. This evokes the necessity of additional fine tuning the enhancement process. Histogram adjusting gives you the full control of the enhancement process. You can change the rescale settings smoothly while watching how the representation alters with your changes. But you can also let Delta2D adjust the histogram settings of an image automatically in consideration of another images contrast situation to make them both better comparable.

Automatic Histogram Equalization
Delta2D can automatically balance different levels of brightness and contrast bitween your gel images. Simply open the Histograms dialog and click on the Equalize button. Alternatively, you can click directly on the Equalize icon icons/Equalize16 in the tool bar. Delta2D will automatically balance the gray scale levels in your images. After equalization, the total gray scale volume in both images will be the same. This result will always be achieved by making the darker of the two images lighter.
Manual Histogram Equalization
You also have complete manual control over the brightness and contrast balance of your images.

The current gray scale histogram of both images of the Gel Image View is displayed in the dialog. The histogram display shows you how many pixels are contained at each gray scale level in the corresponding images.

To achieve optimal equalization please proceed as follows:

If done that way you have perfectly equalized images in the dual view.

Manually Adjusting the Balance Between Two Images
The vertical slider in the center of the dialog can be moved manually as well. Move it towards the image you would like to see more dominantly to adjust the relative gray scale levels between the two images. The results of the changes you make will be displayed dynamically in the image on the right hand side of the dialog.
Modifying the Histogram for a Single Image
Two sliders below each image histogram allow you to modify the histogram. The position of the left-hand (black) slider indicates the point in the histogram that will be represented by the darkest pixel in the displayed image. The right-hand (white) slider indicates the point in the histogram that will be represented by the lightest pixel in the displayed image.

Manipulating the slider positions allows you to suppress image regions containing pixel values outside a specified range from the display.

Managing the Histograms Dialog
It may be worthwhile to bear a couple of tricks in mind while working with the Histograms dialog.
Locking the dual channel image
Normally, if you make adjustments to the histogram of an individual image, the dynamic image display will change to show only that image. If you want to be able to watch the effect on the dual channel image while you make the adjustments, check the box marked Lock dual channel.
Resizing the dialog
Enlarging the dialog itself may give you better control over fine histogram adjustments, since the histograms and image display will be scaled up to fit in a larger dialog.
Repacking the dialog
After rescaling the dialog, you can use the keyboard shortcut Ctrl-* to tidy up the layout of the dialog.
Applying or discarding changes
Clicking the dialog's OK button will apply the changes to the images displayed in Delta2D's main frame. Clicking the dialog's Reset button will reset all the histogram values to the values that existed at the time the dialog was invoked. Clicking the Cancel button will dispose of the dialog without any changes being applied.
About the Histogram Adjustment Process
Histogram adjustment is a classical image processing technique that works by applying the following rules to each pixel in the image:
  1. if the pixel is brighter than a given threshold, make it completely white
  2. if the pixel is darker than another threshold, make it completely black
  3. otherwise apply a linear change to the gray-level of the pixel

Adjusting histograms is advisable when your image does not use the full dynamic range (i.e. there is no bright white or no black in it) or if there is a homogeneous background.

You may also wish to keep the following points in mind when making adjustments to the image histograms:

5.5 Preferences for Image Preparation

The preferences dialog, reachable via File |\ Preferences and there on the tab Image Preparation lets you set different groups of options as follows:


ui/preferences_imageprep_scaled
Figure 5.18: Preferences: Image preparation

Prescale
Scales larger images down to the given pixel count. Smaller images are not affected. Prescaling happens when images are loaded and is transparent to the user. Use this option to improve performance for large images. The scale factor for both images is determined by the first image loaded. The pixel count must be set to 50 at least.
Amplitude rescale
Enhance images by amplitude rescale when they are loaded. If this option is checked the gray values of an image are rescaled linearly so that the darkest pixel becomes black and the lightest pixel becomes white.

5.6 Visual Comparison of two Gel Images

Delta2D's approach to analyzing 2D gel electrophoresis images relies on advanced image processing technology that compensates for the differences in spot positions between gel images. These differences are due to variations in running conditions and the gel casting process. They are what makes comparing and analyzing 2D gel electrophoresis images so difficult and error prone.

When you hold two similar gel images next to each other, you may have the impression that the spot patterns on one gel are more or less a distorted version of the patterns on the other. The process of distorting (or "un-distorting") images is called warping. Delta2D's warping algorithms help you to generate dual channel images on which corresponding spots are perfectly overlaid. In the dual channel image, differences in protein expression levels can then be easily recognized. The same algorithm that is used in producing dual channel images will be used in the subsequent quantitation step to obtain accurate and reliable spot matching information.


imageprocessing/dual_channel_a    imageprocessing/dual_channel_b
Figure 5.19: A region of the dual channel image, before and after exact warp. Corresponding spots are overlaid exactly, allowing for easy identification of spots with changed expression level.

5.7 Warping Gel Images

In Delta2D 3.6 there is one warp mode per gel pair. It can be exact, global, automatic, implicit, or identical. Here is a more detailed description of the warp modes:

exact
All spots that are connected by a match vector will be perfectly overlaid after warping. Other spots will be warped according to match vectors in their neighborhood. This is the recommended warp mode in combination with the SmartVectors.
global
Corrects for global gel distortions such as growing or shrinking, rotation, stretching. Set a few match vectors then use global to see more correspondences. Global warp is a good start for setting more and more match vectors by hand. It is almost never suitable for producing the final dual channel image because there are local distortions, too.
automatic
Let Delta2D try to automatically find match vectors using the SmartVectors Technology and apply this match map to an exact warp. If match vectors are present they will be used to guide the automatic warping process. As with exact warping, spots that are connected by a match vector will be perfectly overlaid.
identical
This is just no warping at all. Identical transforms can be used for registering images that are from the same gel but display different samples or multiple aspects of a sample.
implicit
Warp the images by a combination of explicit transforms (these can be exact, global, automatic, or identical) that connects them. Example: Image B has a valid warping to image A, image C is also connected to image A, then image C can be compared to B using implicitly the existing warpings: C |\ A |\ B. You will usually have implicit warps for most of the gel pairs in your project.

The mode is used for producing the dual channel image as well as for matching spots in the quantitation tables.

Automatic Warping

To start the automatic warping process, set the warp mode icons/warpmode_dual_view16 to automatic and click on the button icons/Warped16. Alternatively, you can select first Matches |\ Warp mode |\ Automatic and then Matches |\ Warp from the menu. Using the SmartVectors Technology, Delta2D will analyze similarities in the gel images and propose a match map containing non-approved match vectors. This match map will be applied for an exact warp. The result is displayed as a dual channel image. In general, the more similar the images, the better the result of the automatic warping process will be.
Improving the Results of Automatic Warping
You can assist the SmartVectors Technology by setting a few initial match vectors (see section 5.8), and then using Matches |\ Warp again.

________________________________________________________________________________

Note:
You can employ the SmartVectors Technology and manually define match vectors iteratively to improve the result, if needed.

Read more at www.decodon.com/Support/Howto/SmartVectors.html

Do a Global Warp

Set the warp mode to global by selecting Matches |\ Warp Mode |\ Global and select Matches |\ Warp to do a global warp operation. To warp the sample image, Delta2D will use a special smooth transformation, so that corresponding spots are roughly aligned, but not perfectly overlapped yet. As a result you will see that the match vectors (connecting corresponding spots in the sample and the master image) are shortened substantially. Many common global distortions of gel images, like shrinking or rotation, can be compensated by a global warp operation.
imageprocessing/global_warp_a    imageprocessing/global_warp_b
Figure 5.20: A region of the dual channel image, before and after global warp. Corresponding spots are not overlaid exactly, but much closer than in the original image. Further correspondences can be identified more easily.

After the global warp you will see more corresponding spot patterns because the sample image is better aligned to the master image. Fix some more matches. You do not have to fix every correspondence you see, assigning a single spot pair is usually sufficient to align the region around it. Since all vectors are weighted similarly for the global transform outliers can be recognized very easily. That's why the global warp is often used for finding warping errors.

Do an Exact Warp

Set the warp mode to exact by selecting Matches |\ Warp Mode |\ Exact and select Matches |\ Warp to do an exact warp. Exact Warp means that Delta2D will warp the sample image such that the corresponding spots given by the match vectors are exactly overlapping. Delta2D's image processing makes sure that all other spots are overlaid as accurately as possible. The difference of result in comparison to the global warp can be seen in figure 5.21.
Add More Match Vectors if Necessary
After the exact warp you may see some spot pairs that are not exactly aligned. You can add more match vectors, then warp again to see the effect of your new match vectors. Warping (either exactly or globally) can be done anytime, match vectors will always be properly adjusted. Use Warp |\ Unwarp to see the unwarped dual channel image.
imageprocessing/exact_warp_result    imageprocessing/global_warp_b
Figure 5.21: An image region with well-aligned spots after exact warp (left image) in comparison to the same region after global warp (right image).

_________________________________________________________________________________________________________________________________________________________
Note:
Whatever you have selected as the warp mode for the gel image pair will take precedence over the match vectors that you have provided. For example, when you have a match map and selected implicit warp mode, the gel images will be warped using whatever indirect connection is available, ignoring your match map. Switching the warp mode to exact or automatic will let Delta2D use the match map for warping.

5.8 More About Match Vectors

Match vectors connect corresponding spots (Figure 5.22). They are used by Delta2D to warp one image to another reference image to eliminate the differences in spot positions. The warping can be specified by using match vectors alone, or by using them to guide the SmartVectors Technlogy. Only a tiny fraction of all spot pairs has to be connected by match vectors because Delta2D uses a match vector to align an entire image region.

Before you start to set match vectors, make sure that match vector tool is activated by clicking icons/match-tool16 in the tool panel.

________________________________________________________________________________

Note:
With version 3.4 we have introduced Undo and Redo for match vector operations. Thus you can try setting a couple of match vectors, study the resulting dual channel image and go back to previous match maps if you like.

imageprocessing/match_vectors_detail
Figure 5.22: Setting match vectors.

Some corresponding spot patterns are immediately visible in the dual channel image. To set one correspondence:

________________________________________________________________________________

Note:
It is important to draw all match vectors from sample (orange) to master image (blue).
_________________________________________________________________________________________________________________________________________________________
Note:
In order to use automatic snapping of match vectors the option Match Vector Snap in the preferences dialog (Section 5.9) must be enabled.
Now specify some more spots in the sample image (orange) which correspond to spots in the master image (blue). These correspondences will be used to warp the sample image onto the master image. Go ahead and fix about 15 corresponding spots this way, starting with the most obvious ones. Try to find matches that are well-distributed over the whole image. You can change a match vector by dragging one of its points with the mouse. Matches can be deleted by right-clicking on one of their end points.
Match Vector Snap

By default, any match vector you set will snap to the nearest spot maximum. This speeds up the setting of match vectors substantially. You can change this behavior using the Matching tab in File |\ Preferences. To switch snapping temporarily, hold down the control key while you are creating or editing match vectors. Double clicking on the match vector will place both ends at their nearest spot maxima.

Creating Match Vectors by Double Click
If you want to connect two corresponding spots with a match vector and both spots are close to the mouse pointer, you can double click somewhere between the spots to create the new match vector. Usually, this situation can occur after doing a global warp or when you want to do some corrections on an exact or automatic warp.

Right-clicking on a match vector opens a context menu. Select Delete to delete the match vector, use Adjust to adjust both ends to their nearest spot maximum.

Saving the Match Map

The match map contains the information about the spot correspondences that you have assigned. It is saved automatically in the gel pool. If you wish to save it to an external file, select Matches |\ Export. You can reload it later by selecting Matches |\ Import....

________________________________________________________________________________

Note:
Saving match maps is not available in the evaluation version.

Saving the Warped Image

The warped sample image is not retained in the pool, but it can be recomputed anytime using the match map. You can export the warped sample image using File |\ Export Sample.... Select File |\ Export Dual Channel... to save the dual channel image.

________________________________________________________________________________

Note:
Images exported in warped state can be used for documentation purposes only. They are not suitable for further quantitative analysis of any kind (reimported in Delta2D or imported in other software). Warping alters the complete image, which affects spot size as well. According to Delta2D's principle to leave original data unchanged, all quantitative analysis is done on the original, unwarped images.

5.9 Preferences for Match Vectors


ui/preferences_matching_scaled
Figure 5.23: Preferences: Match Vectors

Match vector snap to spot
If this option is selected, match vectors will snap to the nearest spot when they are moved around. This option can be temporarily toggled by pressing Ctrl while moving the match vector.

5.10 Defining a Warp Strategy for the Complete Project

To obtain satisfying results, it is worth to take one or two things into account:

Thanks to implicit warping we don't need to set up a warping between every single gel image. That's why this is the default warp mode when inserting images to a project. We only have to make sure that every gel image in our project is connected to at least one other image with a valid warping. There can be several intermediate steps (each of them exact, global, automatic, or identical) in-between two images. Again, this chain of intermediate steps will be used both for producing dual channel images and building expression profiles of the spots. Delta2D will always minimize the number of intermediate steps, and it will prefer manually specified warpings (exact, global, automatic with match vectors, or identical) over the implicit warpings.

Of course we could assign the warp modes manually between the respective images in our project. With four images this wouldn't be that hard, but later on, when having bigger projects, this can become quite a labor. Why waste time doing humdrum work if there is a more convenient way? Switch back to the Project Manager. Choose Project |\ Warp Strategy . . . from the menu of the Project Manager or click on the button icons/Strategy16 to open the Warping Strategy Manager. This is simply a useful tool to automate the assignment of warp modes to the gel images of a project. It takes care that no gel is left out and no warping cycle is created accidentally.


ui/dialog_warping_strategy_scaled
Figure 5.24: Apply complete warping strategies at once

_________________________________________________________________________________________________________________________________________________________
Note:
Please note, that the Strategy Manager alters assignments done manually before by setting every warp mode according to the chosen strategy. So use it at the very early stage of a new project, and don't touch it any more later on. Of course, warp modes can be changed manually at any time; then you have to take care for the consistency of your warping strategy yourself.
Delta2D visualizes the available connections and the chosen warp modes in the project manager (See figure 4.9).

The Warping Strategy Manager (see figure 5.24) lets you choose between basic warping strategies:

icons/StrategyGroupFirst Group
This will be the most frequently applied strategy. It assumes that your image groups correspond gel replicates, and that the difference within groups is smaller than between groups. Within groups, images are warped with one warp mode (default: automatic) and the first image of each other group is warped to the first image of the first group with another warp mode (default: exact).
imageprocessing/warping_strategy_group_first
Figure 5.25: Group Warping Strategy

icons/StrategyFollow Chain
All images of your project are connected like one long chain in the sequence of their appearance in the project, no matter to which group they belong. This strategy is recommended, if your samples have been taken at successive points of time in your experiment.
imageprocessing/warping_strategy_follow
Figure 5.26: Chain Warping Strategy

icons/StrategyGroup Chained Group
Combination of the two above strategies, applicable in case your image groups correspond gel replicates, and the groups represent successive points of time in an experiment.
imageprocessing/warping_strategy_group
Figure 5.27: Chained Group Warping Strategy

icons/StrategyOneToAll One-to-all
Here one gel image takes the role of a master and all other gel images are connected only to this one.
imageprocessing/warping_strategy_one_to_all
Figure 5.28: One-To-All Warping Strategy

icons/StrategyInGel In Gel Standard
Warp each standard image to the first standard image. Other images are warped to the standard image from the same gel, if possible. This is the default Warping Strategy for Projects using an internal standard and hence only available if the current project marked as DIGE Project. (Please refer to section 4.7 for more on DIGE Projects.)
imageprocessing/warping_strategy_ingel
Figure 5.29: In-Gel Standard Warping Strategy

5.11 Interpretation of the Dual Channel Image

Delta2D's dual channel imaging allows for quick and easy identification of changes in expression levels between gel images. Warping of the sample gel image onto the master gel image is essential for this: Since corresponding spots are now overlaid, the colors on the display give a direct indication of their relative expression levels (see Figure 5.30).

For better interpretation, you may wish to hide match vectors using the overlay rollup as described in section 5.2 (use Rollups |\ Overlays to open the overlays rollup). Additionally, you may wish to switch off background or to adjust the histograms settings.


ui/visual_comparison_result_scaled
Figure 5.30: The result of the visual comparison process.

In the dual channel image orange means that a spot is only present (or much stronger) in the sample gel image, while blue spots are only present (or much stronger) in the master gel image. You can now identify whole sets of spots whose expression levels vary.

ui/rollup_colors   

Figure 5.31: How colors are combined in the dual channel image.

Open the Colors rollup using Rollups |\ Colors. The colored square shows how colors are combined in the dual channel image (see Figure 5.30 and Figure 5.31). Consider it as a diagram with two axes: on the vertical axis is the intensity of a sample spot, and master spot intensities are shown on the horizontal axis. The color code for common background pixels is in the bottom left corner, common spots have the color of the top right corner. For any possible combination of master and sample intensities, the diagram shows the color code that is displayed by Delta2D.

Move the mouse pointer over the dual channel image and watch the color square. A small circle inside the color square shows the current location in the color diagram. A numerical display of the intensity ratio (sample / master) is shown below the color square. Even though these values are computed only for small regions of the gel images, they are already quite useful indicators for the expression ratio of a spot.

For printing or presentation purposes, Delta2D's color scheme can be changed to an arbitrary combination of colors for master, sample, background and common pixels.

5.12 Questions and Answers About Warping

5.13 Using Color

Color Schemes

The Color Schemes Dialog
The Color Schemes dialog (figure 5.32) allows you to control the colors that will be used for displaying Delta2D's dual channel images.

The Color Schemes dialog can be invoked from the Images menu, using the Images |\ Color schemes. . . menu entry. Alternatively, you can click directly on the Color Schemes button icons/colors in the tool bar.


ui/dialog_color_schemes_scaled
Figure 5.32: The color schemes dialog.

Display Modes and Color Schemes
Delta2D uses two different display modes: absolute mode and ratio mode. Color schemes can be configured individually for each mode. Whenever you invoke the Color Schemes dialog, it will allow you to configure the color scheme for the current mode. If Delta2D is in absolute mode when you invoke the Color Schemes dialog, you will be able to edit the color scheme used in absolute mode. If Delta2D is in ratio mode, you will be able to edit ratio mode's color scheme.

The currently selected color scheme is presented in the center of the Color Schemes dialog (figure 5.33).


ui/color_schemes_display_scaled
Figure 5.33: The color schemes display.

The color scheme display can be interpreted as follows:

If you are editing the scheme for ratio mode (see figure 5.34), you can choose two additional colors for highlighting points with only a relatively small ratio between the sample and master spot levels. Those colors are displayed in the middle of the top edge and of the right edge respectively. The ratio mode was implemented for a more fine grained representation of expression changes especially for faint spots.


ui/color_schemes_ratiomode_scaled

Figure 5.34: The color schemes display for ratio mode.

Using Predefined Color Schemes
Delta2D provides you with several predefined color schemes. To use a predefined color scheme, simply select one from the drop-down box.
ui/dialog_color_scheme_1_scaled   ui/dialog_color_scheme_2_scaled   ui/dialog_color_scheme_3_scaled   ui/dialog_color_scheme_4_scaled
Figure 5.35: Some predefined color schemes

Defining Your Own Color Schemes
It is also possible to define your own color schemes to suit your needs, e.g. for printout or presentation. Creating your own color scheme is easy – take the following steps:
Create a New Scheme
To create a new scheme, click on the New Color Scheme icon icons/New16. A new scheme will be created with the same colors and a similar name to the currently selected scheme.
Select New Colors for the Scheme
You can now configure the colors to use in your new scheme. First, click on the corner of the color scheme display corresponding to the color you want to edit. For example, if you want to define a new color for sample spots, click on the top left corner of the color scheme display.

You can then choose a new color to use for highlighting the selected image feature. There are three methods available for doing this, accessible at the bottom of the Color Schemes dialog. The three color controls are described individually below.

Color swatches
This is the simplest color control to use. Simply select the color you want to use from the palette of available colors.
Hue-saturation-brightness (HSB) control
Using this tab, you can control the hue, saturation and brightness of a color separately. Select which of the three values you want to change by using the HSB radio buttons, and change the value by using the slider or by entering a value directly into the text field provided.
Red-green-blue (RGB) control
This control panel allows you to configure the levels of red, green and blue that are combined to produce the desired color. You can set these levels using the sliders provided, or by typing a value between 0 and 255 directly into the corresponding entry field.

It is recommended that you choose strongly contrasting colors for master spots, sample spots and the spot overlap, and an unobtrusive color for the image background, to help you to visualize the differences between two gel images quickly and clearly.

Renaming the New Scheme

When it was created, the new color scheme was assigned a name automatically. You may wish to change it to something more intuitive. See the next section for instructions on how to do so.

Renaming a Color Scheme

You may wish to rename a color scheme, particularly after you have created a new scheme which was assigned a name automatically. Click on the Rename Color Scheme icon icons/Edit16 to enable the name editing mode. You can then type a new name for the scheme directly into the drop-down box's text field.

You can't rename one of Delta2D's predefined color schemes.

Deleting a Color Scheme

Simply select the scheme you want to delete from the drop-down box, and then click on the Remove Color Scheme icon icons/Remove16.

You can't delete one of Delta2D's predefined color schemes.

Using Ratio Mode

Even more information can be gained by using Delta2D's ratio mode. This is a unique visualization tool that shows expression ratios directly on the gel images (Figure 5.36), without being affected by the absolute intensity of the spots. A region with weak intensity and an expression ratio of 2 is displayed exactly in the same shade of color as another region with strong intensity but the same expression ratio. Thus, you can easily recognize regions of special interest without being distracted by regions of high intensity.

Ratio mode works best with images that have a low background level. Therefore you should switch off background using the layer control and adjust the histograms, if necessary. Select Images |\ Ratio mode to activate ratio mode display.


imageprocessing/ratio_mode_scaled
Figure 5.36: A gel region shown in ratio mode.

Observe how the color square changes (Figure 5.31): pixels are now color-coded according to the sample / master intensity ratio. Pixels with an intensity ratio between 0.5 and 2 are dark-colored, while higher ratios get bright colors. When both spots are saturated or very weak, ratios cannot be computed reliably. Therefore the color square is black in the lower left corner (weak spots) and white in the upper right corner (saturated spot maxima).