The template-based chemical identification process proceeds in four steps:
Step 1: Create a template from a prototypical image. This step defines the pattern of peaks, graphics, and annotations, with associated metadata, that will be matched in subsequent target images. Figure 1 illustrates a template created from an image.
|
| Figure 1: An example template created from a prototypical image. |
Step 2: Load the template for a target image. Figure 2 illustrates the template created in the previous step overlaid on a target image. Misregistration between peaks in the template and blobs in the target data is corrected by pattern matching in Step 3.
|
| Figure 2: A template overlaid on a target image. |
Step 3: Match the template peaks to the blobs in the target image. This step computes a geometric transformation (scale and translation) of the template to align and match the template peaks with blobs in the target image. Matches also can be restricted by conditions imposed by CLIC expressions (described below) associated with template peaks. If no peaks are matched, then the identity transform is used. Then, all peaks, graphics, and annotations in the template are shown at their transformed positions with line segments illustrating matches between template peaks and blobs in the target image. The user can examine and then confirm or reject the matching. If the matching is not satisfactory, it is possible to change the pattern matching parameters or to edit the template, and then recompute the matching. Figure 3 shows a matching between a template and target image.
|
| Figure 3: A template matched with target data and visually transformed. |
Step 4: Apply the template to copy the chemical information from the template to the target image. When a satisfactory matching and transformation is applied, the metadata from the template peaks are copied to the matched blobs and the graphics and annotations are copied into their transformed locations. Note that even after this step, it is possible to modify the blob metadata, graphics, and annotations in the target image. Figure 4 shows the target image with the chemical information from the template.
|
| Figure 4: The target image with chemical information from the template. |
|
| Figure 5: The Template Object Table |
Peak objects are fundamental to a template. Peak objects are similar to blobs, but have only descriptive information about the peak and do not have data as blobs do. Peak objects specify the retention time for each separation dimension and may have optional metadata: chemical name, group name, constellation name, characteristic ions, CLIC expression, mass spectrum, inclusion flag, internal standard flag, internal standard association, exclusion flag, add text flag, add chemical structure flag, and color. Graphics, text, and chemical structure objects in templates have the same information that they have in images.
Template objects are displayed only in template mode. Template peaks are displayed as colored, unfilled circles. Template graphics are displayed with color-coded lines that are dashed, so they can be distinguished easily from image graphics if image graphics are displayed in template mode. The Template configuration panel, accessible from Configure -> Configure Settings, allows setting of visibility options and default colors for template objects. Figure 2 illustrates the graphical display for template objects. As is typical, the template peak locations in this example are slightly different than the locations of the blob peaks.
To load a template from a file, select Filter -> Load Template from the menu or click the Load Template button (which is accessible in Template cursor mode.) The Load Template dialog, illustrated in Figure 6, provides access to a browser that allows the user to view the template before loading (i.e., without modifying the existing template). The Load Template dialog also allows the user to specify whether the selected template file is to be used to over-write the existing template or is to be added to the existing template. Template peaks and graphics must be unique, so any conflicting objects will not be added and a message will be displayed in a popup. The Load Template dialog is closed by clicking the Dismiss button.
|
| Figure 6: The Load Template dialog. |
Template objects can be copied from objects in the image: template peaks from image blobs, template graphics from image graphics, etc. In this way, a pattern of objects from the image can be recorded in a template so that it can be used to identify similar patterns in subsequent images.
Peak objects can be added to the template with descriptive information abstracted from blobs in an image. First, select blob mode from the palette and select blobs for which peaks are to be added to the template. (Metadata such as chemical name, etc., typically are set, as desired, in the blobs, but may be added or modified in the peak.) Then, click the Add to template button, as shown in Figure 7.
|
| Figure 7: The Add to template button is used to create template peaks from image blobs or to copy graphical objects and annotations to a template. |
A template peak is created for each selected blob with metadata from that blob. Template peaks must have unique retention times, so if a template has an existing peak at the same retention times, then the new peak will not be added and a message will be displayed in a popup. New peaks are added to the template with descriptive information extracted from each blob. The chemical, group, and constellation names; characteristic ions; flags; and color settings are simply copied from each blob to a peak in the template. For multi-channel images, the mass spectrum is extracted from the blob according to the Type of mass spectrum setting in the Library Search configuration (either the blob's peak mass spectrum or its integrated mass spectrum). The peak's CLIC expression is not extracted from the blob and currently must be defined interactively by the analyst as described below.
|
| Figure 8: The Template configuration panel. |
Text and chemical structure objects in an image can be copied to the template in text mode and chemical structure mode in the same manner as graphics are copied from the image to the template.
The Image Viewer palette has a button to set the cursor mode to template mode. Next to the template cursor-mode button, there is a pull-down template mode selector. The selectable template cursor modes, illustrated in Figure 9, are:
The actions for drawing template graphics, text, and chemical structure objects and editing vertices are the same as for the corresponding objects, as described in Graphics and Text and Chemical Structure Annotations. Draw Template Peak is performed similarly to drawing a graphics point. If template objects are drawn (rather than added from blobs, graphics, text, or chemical structures in the image or from a file), then the metadata for the object is initially empty and must be provided interactively.
|
| Figure 9: Template cursor modes. |
Once a template is created by any combination of reading from a file, copying from the image, or drawing directly into the template, it can be written to a file for subsequent re-use. To save a template, select File -> Save Template from the menu and designate the folder and file name. The template is stored as a text file tagged using an eXtensible Markup Language (XML) schema. Saved templates contain all of the objects in the template, with metadata.
The handles of selected template objects can be used to relocate knots by using click-and-drag with the left mouse-button. A selected template object can be translated in-full by click-and-drag with the left mouse-button, beginning in the interior of the object. Multiple selected template objects also can be relocated using click-and-drag with the left mouse-button.
When a template object is selected, clicking the right mouse-button brings up a template object metadata popup, in which metadata, such as the name, can be assigned. When multiple template peaks, multiple graphics, multiple text objects, or multiple chemical structure objects are selected, then clicking the right mouse-button brings up a popup for shared metadata. These metadata popups resemble the metadata popups for multiple blobs, graphics, text, and chemical structures in the image. No shared metadata popup is available if objects of different types are selected.
The matching algorithm can be parameterized via the Template configuration pane from Configure -> Configure Settings on the Image Viewer menu bar. The parameters are the center, half-width, and half-height of the translation search window; the center, half-width, and half-height of the scale search window, and the horizontal and vertical distance thresholds for matching a template peak and target peak. Figure 8 illustrates the Template dialog.
Match Template provides a visualization of the matching, but the image is not updated (e.g., blob metadata are not changed). Figure 10 illustrates the result of matching the template peaks to the image peaks. Template peak matches are shown as color-filled circles at the matched location.
|
| Figure 10: The matching algorithm matches the template peaks to the image peaks and graphically highlights the matched locations with filled circles. |
If the algorithm fails to match all peaks, a popup
provides a Template Matching Report about the matching results,
including the matching transform and details of each matched and unmatched
peak. GC Image can be configured to prepare the matching report regardless of
whether or not all peaks were matched.
If the template matching algorithm does not yield satisfactory results, the user
has two options to improve the matching:
Once a satisfactory match is achieved, the metadata from the blob is applied to
the image by selecting Filter -> Apply Template from the menu or
clicking the Apply Template button (which is accessible in Template
cursor mode). Applying the template causes the metadata from the template peaks
to be copied into the corresponding blobs (as determined by template matching).
Also, template graphics, text, and chemical structures are copied with their
metadata into the image at their transformed positions. Figure 11 illustrates
the result of applying the template to the image.
An unsatisfactory matching can be cleared by selecting
"Filter -> Clear Template Match", by modifying the template, or by
performing matching again. It is not necessary that the matching be perfect. A
largely correct, but imperfect match can be corrected interactively after the
template is applied.
|
| Figure 11: After the template is applied to the image, the metadata of the matched peaks is set with the template metadata. |
Note that even after applying the template, it is possible to modify the metadata of the blobs in the target image and other objects in the target image. GC Image has tools that facilitate such changes. GC Image has tools that are especially useful for correcting mismatched blobs. The Image Viewer menu and tool bar provide access to Cut Metadata, Copy Metadata, and Paste Metadata. These allow the user to quickly transfer metadata from a misidentified blob to the correct blob. The blob must be selected with a blob selection tool before the blob metadata can be cut, copied, or pasted. Also, blob metadata can be set directly as described in Peak Detection and Analysis; graphics can be edited as described in Graphics; and text and chemical structures can be edited as described in Text and Chemical Structure Annotations .
It is possible to perform Update Template so that
the template objects are transformed according to the matching with the current
image. This allows users to easily correct for retention-time drift, update a
template for new conditions or columns, or otherwise update a template.
To update a template, select "Filter -> Update Template". If the Update
Template configuration is set to relocate peaks by Matched Locations,
then the matched peaks are relocated to the positions of the corresponding
matched blobs. If the Update Template configuration is set to relocate
peaks by Matched Transform, then the matched peaks are relocated according to
the matching transform. Other template objects, such as graphics, are relocated
according to the matching transform.
The tool, pictured in Figure 12, resembles a calculator, with a display
box for the expression and buttons for numbers, functions, arithmetic
operators, logical operators, relational operators, and parentheses for
grouping. The user builds the expression by typing directly in the display box
and/or clicking buttons. Buttons for Back and Clear also are
available to construct the expression.
Computer Language for Identifying Chemicals (CLIC)
GC Image provides tools for constructing and applying selection expressions
using the Computer Language for Identifying Chemicals (CLIC). A user can build
powerful expression with rule-based criteria for selecting blobs or extracting
a CLIC image based on retention time, mass spectrum, and/or blob
characteristics. For example, a simple expression in the selection language is: Retention(1)>15
This expression could be used to select all blobs in which the
largest-valued pixel (i.e.
, the peak) has first-dimension retention time greater than 15 minutes or to
form a image that retains the values of all pixels with first-dimension
retention time greater than 15 minutes (and sets the values of all other pixels
to zero).
|
| Figure 12: CLIC Expression tool. |
Once constructed, the tool can be used to apply the expression either pixel-by-pixel or blob-by-blob, depending on the setting of the radio buttons. In pixel selection mode, the expression is applied by clicking the Generate CLIC Image button, which produces an image in which pixels that evaluate to true are unchanged and pixels that evaluate to false are set to zero (i.e., masked). In blob selection mode, the expression is applied by clicking the Select Blobs button, which causes the blobs that evaluate to true to be selected and the blobs that evaluate to false to be un-selected.
The CLIC Image Viewer provides a Save button, which
allows a user to save a CLIC image to a separate file. The button invokes a
file browser to specify the location and name of the GCI (.gci) file.
All blob characteristics (e.g., compound name, volume, retention times of the
peak, etc.) that are selected in the current blob table configuration are
available for inclusion in the expression via a pull-down menu. These functions
can be combined with numbers, operators, and parentheses. For example, "Peak_I
> 10" will select all blobs for which the first-column retention time of the
peak is greater than 10 minutes. A more complex expression, "(Peak_I > 10)
& (Peak_II < 3) & (Volume > 100)", selects all blobs for which
the first-column retention time of the peak is greater than 10 minutes, the
second-column retention time of the peak is less than 3 seconds, and the volume
(i.e., total response integrated across the 2D peak) is greater than 100.
The functions available for GCxGC-MS data are:
The operators available for selection expressions are:
Here is a more interesting example selection expression: CLIC expressions can be stored and recalled with the selection calculator. To
save an expression, type a name for the expression in the Name
text box before evaluating the expression. To recall an expression, select the
expression from the list of named expressions. The user is prompted before
overwriting a previously saved expression or reading to replace the current
expression.
CLIC expressions also can be defined for graphical objects, template peaks, and
template graphical objects. In included graphical objects, blob sets are
determined both by intersection or inclusion in the graphical object and by the
CLIC expression. In templates, peaks will match a blob only if the blob
satisfies the CLIC expression (as well as the template pattern) and when the
template is applied then template graphical objects are copied with CLIC
expressions to the image.
Contents
Previous: GCxGC-MS Data Processing
and Analysis
Next: Comparative Analysis and Visualization
GC Image™ Users' Guide © 2001–2007 by GC Image, LLC, and the
University of Nebraska.
There are two blob selection modes for GCxGC-MS data: peak mode, which uses the
mass spectrum of the blob's peak-valued pixel, or integrated mode, which uses
the mass spectrum formed by summing the mass spectra of all pixels in the blob.
(Retention(2)>2.5)&((Ordinal(128)=1)|(Ordinal(142)=1))
This expression can be used to select all blobs that have a peak with
second-column retention time of greater than 2.5 seconds and which have maximum
mass spectral intensity at either mass/z=128 or mass/z=142.