<title>Background</title> <p>Originally employed to analyze single or a small collection of targeted molecules, gas chromatography-mass spectrometry (GC-MS) and other chromatography-spectrometry technologies have emerged as viable tools for the wholesale fingerprinting of complex chemical mixtures. This has been made possible by the advent of computer-aided chemometrics, which in principle can lead to identification and quantification of most or all component chemicals. This advancement continues to profoundly benefit scientific disciplines as diverse as petroleum, diesel and biodiesel chemistry [##REF##17727864##1##,##REF##12830915##2##]; biomarker discovery [##REF##17054416##3##]; basic metabolic chemistry; drug metabolite identification; receptor-ligand and enzyme-substrate biochemistry; environmental toxicology [##REF##17417068##4##]; pharmacokinetics; functional genomics [##REF##18251859##5##] and metabolomics [##REF##16921475##6##,##REF##15389842##7##].</p> <p>Separations with mass detection yield <italic>mass chromatograms</italic>; with the intensity of the mass detector's response indexed both to the ion mass-to-charge ratio (<italic>mz</italic>) channel being monitored, and to the time elapsed since injection of the biochemical mixture onto the chromatographic column positioned upstream of the detector, <italic>i.e</italic>., to its retention time (<italic>RT</italic>). With modern mass spectrometers, the variation in <italic>mz </italic>of a chemical is usually modest and often can be ignored during data processing. <italic>RT </italic>variation can be appreciable, however, as illustrated in Figure ##FIG##0##1##, and nonlinear over the extent of a chromatogram as dramatically illustrated in Smith et al. [##REF##16448051##8##] and elsewhere [##REF##17466315##9##,##REF##17963529##10##]. Retention-time differences are caused by uncontrolled experimental variables such as column aging and instabilities in flow rates of mobile phases and the shape of thermal or mobile-phase gradients [##REF##17466315##9##,##REF##12184621##11##,##REF##15144199##12##]. Misalignment was a minor issue as long as multidimensional separation technologies were used to quantify a few molecular targets, but manual curation proves arduous if not impossible when each mass chromatogram displays hundreds of potentially significant features and an experiment contains hundreds of such analytical runs.</p> <p>The data produced from chromatography coupled with mass spectrometry can be viewed as <italic>three-way</italic>: along <italic>RT </italic>space, <italic>mz </italic>space, and analytical run space. Some of the most attractive and powerful three-way techniques, such as parallel factor analysis (PARAFAC) to further resolve peaks, assume <italic>trilinearity </italic>of data, a mathematical constraint such that multiple instances of a data feature align with each other along all three dimensions, which rarely if ever is achieved in real mass-chromatographic data, primarily due to <italic>RT </italic>misalignment. Techniques making no trilinearity assumption (<italic>e.g.</italic>, PARAFAC2 and MCR-ALS) still usually require alignment to facilitate parsing of the large matrix representing an entire, typical chemical profiling experiment into submatrices of computationally feasible size. This is particularly true since parsing must occur at locations along the chromatogram lacking peaks. Finally, two-way, one-run-at-a-time approaches such as AMDIS [##UREF##0##13##], when applied serially to multiple runs, <italic>e.g.</italic>, with the help of MET-IDEA [##REF##16808440##14##] or SpectConnect [##REF##17263323##15##], have been observed to produce an artifact where single chemical eluates are identified as multiple mass-chromatographic features [##UREF##1##16##], again largely the result of misalignment. Thus, a complete comparative analysis of data acquired in a non-targeted, profile-type experiment, involving many analytical runs, needs to include a robust alignment operation as an obligatory preprocessing step.</p> <p>Alignment algorithms have been described as falling within two categories based on whether they use feature detection or not [##REF##17963529##10##]. The best-known method that does not detect features is correlation optimized warping (COW), proposed by Nielson et al. [##UREF##2##17##]; it warps, i.e., linearly interpolates, one chromatogram to another by selecting input parameters such as section length and slack size that maximize the similarity between the two chromatograms using dynamic programming. Optimization of the input parameters is difficult, however, and performance is often questionable [##REF##14719890##18##,##REF##16643929##19##]. Variant warping algorithms, such as parametric and semi-parametric time warping, have been proposed to address these deficiencies (reviewed in [##REF##16643929##19##]). Feature-detection algorithms, in contrast, attempt to identify and match peaks throughout an entire set of runs. Although this approach requires one additional step for alignment, it generally produces superior results and adds the ability to integrate peak areas during the process. Recent examples of such methods include metAlign, MZmine, and XCMS [##REF##16448051##8##,##REF##16403790##20##,##UREF##3##21##]. These methods differ with regard to which features are used for matching, some employing only features evident in <italic>RT </italic>space [##REF##12830915##2##,##REF##14630657##22##], while others also use spectral information [##REF##16448051##8##,##REF##17963529##10##,##REF##12184621##11##,##REF##16403790##20##].</p> <p>We have developed and tested an improved <italic>RT </italic>alignment method that relies on feature detection and utilizes matching criteria based on both peak retention time and peak spectral data. Peaks in sample mass chromatograms are detected and matched to peaks in an arbitrarily selected reference chromatogram. Mass spectra provide information required to determine whether peaks from different samples are chemically identical components. In addition to retention data and mass spectra, our method utilizes an inherent property of chromatograms: peaks eluting near to each other tend to show similar deviations in their retention times, and thus can be initially processed as blocks of peaks. Through trial, or simulated, shifts of blocks along the <italic>RT </italic>axis relative to the reference chromatogram, and through reorganization of peaks into new blocks as needed, an optimal shift strategy is discovered. This shift information is applied to both the TIC and the full, two-dimensional matrix of raw data while warping only non-peak regions, in an effort to exactly preserve the shapes and integrated areas of key peaks. Thus, the result matrix can be used as a direct input to subsequent multivariate analysis.</p>
<title>Results</title> <title>Algorithm</title> <p>Our alignment method operates in a pairwise fashion: one mass chromatogram, a sample <italic>S</italic>, is aligned with a reference chromatogram, <italic>R</italic>. <italic>R </italic>can be any run from the set of all runs but, once selected, must be used for the entire set. Chromatographic peaks with acceptable signal-to-noise ratio (<italic>SN</italic>) and width are detected in <italic>R</italic>, and for each <italic>S </italic>as its processing is begun, by analyzing chromatograms with a published wavelet-based method [##REF##16820428##23##]. A <italic>peak set </italic>contains only those peaks actually used in the alignment process, accompanied by further information about them. An <italic>S </italic>peak set <italic>SP </italic>always includes all detected peaks that satisfy <italic>signal-to-noise </italic>and width criteria. An <italic>R </italic>peak set <italic>RP </italic>will typically contain only a subset of all peaks; it is a dynamic set, in that it is selected anew for every <italic>S</italic>, using only peaks most compatible with the <italic>S </italic>being processed. Accurate alignment is possible through the matching of peaks detected in select <italic>mz </italic>channels, <italic>i.e.</italic>, in select extracted ion chromatograms (EIC), instead of in the TIC, where coelution and higher baselines can muddy the picture. Overall, the alignment process for a pair of chromatograms involves (a) finding EIC peaks for the two, (b) iteratively matching them, which also yields retention discrepancy data, and (c) aligning, <italic>i.e.</italic>, warping and shifting, the sample chromatogram based on peak-match data. This pairwise alignment is repeated for every sample, matching to the same reference. Only the first two steps will be explained in detail in this paper.</p> <title>Peak detection</title> <p>The purpose of this step is to assemble two sets of peaks, for <italic>S </italic>and <italic>R</italic>, such that they closely resemble each other in size and in the mass-spectral characteristics of their elements. Let the set of peaks from a sample TIC be <italic>SP </italic>= {P<sub>1</sub>, P<sub>2</sub>,..., P<sub>n</sub>} and from a reference "inferred TIC" (details below) be <italic>RP </italic>= {Q<sub>1</sub>, Q<sub>2</sub>,..., Q<sub>m</sub>}. Their elements are ordered by elution time and each element can be envisioned as a group of EIC peaks, one resulting from each ion produced upon ionization, with possible fragmentation, of an eluted chemical component. Up to five EIC peaks per TIC peak are recorded in descending order by their signal-to-noise ratio (SN), thus, for instance, element <italic>x </italic>of <italic>SP </italic>is the set of EIC peaks, P<sub><italic>x </italic></sub>= {p<sub><italic>x</italic>1</sub>, p<sub><italic>x</italic>2</sub>,... p<sub><italic>xj</italic></sub>} where 1 ≤ <italic>x </italic>≤ <italic>n </italic>and 1 ≤ <italic>j </italic>≤ 5. Similarly for <italic>RP</italic>, Q<sub><italic>x </italic></sub>= {q<sub><italic>x</italic>1</sub>, q<sub><italic>x</italic>2</sub>,..., q<sub><italic>xk</italic></sub>}, 1 ≤ <italic>x </italic>≤ <italic>m</italic>, 1 ≤ <italic>k </italic>≤ 5, as illustrated in Figure ##FIG##1##2##. In this peak detection stage, all necessary EIC peaks are found for the alignment, accompanied by the requisite peak information: <italic>mz</italic>; width; retention time of apices; and <italic>SN</italic>. Since values for the time axis are in units of MS scan number and are discrete values, perhaps as few as eight across a peak, the peak maxima found by a peak detection algorithm will often deviate from their true apices. Thus, for more precise alignment, fractional top positions are determined for use in the actual alignment. It should be noted, however, that subsequent alignment involves only integral shifts in scan number, in order to preserve the matrix-like structure of mass-chromatographic data. Considering the three points acquired nearest the apex of a peak, each an ordered pair (x, y) where x is scan and y is intensity, we can solve the quadratic equation <italic>y </italic>= <italic>Ax</italic><sup>2 </sup>+ <italic>Bx </italic>+ <italic>C </italic>describing the unique downward-opening parabola defined by those points, using simple linear algebra. The true apex occurs at the position where the first derivative is zero, and will equal (-<italic>B/2A</italic>, <italic>C-B</italic><sup>2</sup>/<italic>4A</italic>).</p> <p>For actual detection of both TIC and EIC peaks, we use the continuous wavelet transform algorithm of Du <italic>et al</italic>. [##REF##16820428##23##] since it is robust to noise and readily available in the authors' MassSpecWavelet package for the R statistical language [##UREF##4##24##]. After NetCDF [##UREF##5##25##] files of <italic>S </italic>and <italic>R </italic>are read into matrices of intensities, the peak detection method proceeds as follows (symbol conventions are summarized in Table ##TAB##0##1##):</p> <p>1. Detect peaks in a sample TIC <italic>S </italic>whose <italic>SN </italic>ratios are greater than <italic>SNtic</italic>.</p> <p>2. Form peak set <italic>SP </italic>by finding, for each detected TIC peak, as many component EIC peaks as possible, not to exceed five, for which the distance between its apex and that of the TIC is less than <italic>pClose</italic>, the <italic>SN </italic>is greater than <italic>SNeic</italic>, the peak width is less than <italic>pWidth</italic>; and the <italic>SN </italic>is among the five highest <italic>SN </italic>of all EIC peaks passing these criteria. Retention times are expressed in fractions of scans by a quadratic interpolation of their apex positions, as described above.</p> <p>3. For each peak in <italic>SP</italic>, find EIC peaks in the reference run <italic>R</italic>, which have corresponding <italic>mz </italic>values.</p> <p>4. Group the found EIC peaks into a peak set <italic>RP</italic>, an "inferred TIC" peak set, by requiring that their apices fall within <italic>sDist </italic>of the corresponding EIC peak in <italic>S </italic>and within <italic>pClose </italic>of the inferred TIC peak in <italic>R</italic>. Additionally, the Pearson correlation of two numeric vectors of <italic>mz</italic>-ordered ion intensities, <italic>i.e.</italic>, spectra for the <italic>S </italic>TIC peak and the <italic>R </italic>inferred TIC peak, whose location is taken as the median <italic>RT </italic>of the grouped EIC peaks, must be greater than <italic>corMass</italic>.</p> <title>Iterative peak matching</title> <p>Once the peak sets for <italic>S </italic>and <italic>R </italic>are determined, peak matching can be initiated. Figure ##FIG##2##3## illustrates the overall process by which all <italic>S </italic>peaks are <italic>solved</italic>, <italic>i.e.</italic>, matched to an <italic>R </italic>peak or determined to have no match. The basic unit for iterative peak matching is a <italic>block </italic>which is composed of adjacent, unsolved peaks in <italic>S </italic>(or a single one); blocks are bound by either solved peaks or ends of the chromatogram. Initially, in the first iteration, the entire <italic>S </italic>peak set is one block. Each iteration identifies those peaks which remain unmatched, organizes them into new blocks, identifies new <italic>S-to-R </italic>peak matches within blocks, and discovers an <italic>RT </italic>shift value for each match that optimizes the alignment of subsequent peaks in its block. Besides recording the match, the method records the iteration number when a match was made, EIC <italic>mz </italic>information, and, importantly, the retention discrepancy, <italic>i.e.</italic>, the nearest integral number of MS scans by which the sample peak will need to be shifted in the final warp-and-shift alignment step to align it with the corresponding reference peak. After the final iteration, no peak in <italic>SP </italic>remains unsolved, <italic>i.e.</italic>, all are either matched with a reference peak, or evaluated as being unmatchable. In any iteration, if a peak is solved, its final location is fixed and no further adjustment will be made to it in later iterations.</p> <p>Retrieval of the best candidate peak from <italic>R </italic>against which to test the current <italic>S </italic>peak (Figure ##FIG##2##3##, upper right) is illustrated also in Figure ##FIG##1##2## (squares and triangles). The first step, comparing TIC peaks, ideally results in pairings of chemically identical chromatographic eluates. For this, one must exploit their underlying mass spectra. Spectra are treated as vectors of mass intensities and tested against each other by requiring that their Pearson correlation exceed a certain value. Once this criterion is met, the prominent EIC components of their spectra are tested to find the <italic>mz</italic>-matched EIC pair with the strongest <italic>SN</italic>. These are the "model" EIC peaks for that TIC peak pair, and their peak retention times are used instead of TIC retentions for more precise shifting.</p> <p>The peak matching method produces a set of matched results. A peak match is represented by a list containing an <italic>S </italic>EIC peak, the matching <italic>R </italic>EIC peak, the <italic>mz</italic>, the shift amount, and the final iteration number, <italic>e.g.</italic>,</p> <p></p> <p>where ϕ means there is no matching peak in <italic>R</italic>. Peaks are processed one-by-one according to their elution times. The current peak is matched only when (i) a candidate peak in <italic>R </italic>is within <italic>sDist </italic>of it, (ii) the Pearson correlation of the two peaks' mass spectra is greater than <italic>corMass</italic>, and (iii) the profile value of remaining peak deviations is greater than <italic>prof</italic>.</p> <p>A profile value is determined as follows: for a block of peaks <italic>SB </italic>= {b<sub>1</sub>, b<sub>2</sub>,..., b<sub><italic>l</italic></sub>}, where b<sub>1 </sub>is the current working peak and <italic>l </italic>does not exceed the initial size of <italic>SP</italic>, initial deviations of peaks from their candidate matches can be represented by the vector <italic>ID </italic>= {id<sub>1</sub>, id<sub>2</sub>,..., id<sub><italic>m</italic></sub>}, where <italic>m </italic>≤ <italic>l</italic>. The alignment that would perfectly align b<sub>1 </sub>is simulated by shifting all the peaks in <italic>SB </italic>by the integer-rounded value of id<sub>1</sub>, resulting in a vector of deviations after the simulation, <italic>SD </italic>= {sd<sub>1</sub>, sd<sub>2</sub>,...}; note that sd<sub>1 </sub>is less than |0.5|. Next, we will have an evaluation vector E = {|id<sub>1</sub>| - |sd<sub>1</sub>|, |id<sub>2</sub>| - |sd<sub>2</sub>|,...} where absolute values of the simulated deviations are subtracted from absolute values of the initial deviations. A positive value within <italic>E </italic>means that its corresponding peak in <italic>S </italic>is brought closer as a result of the simulation. The, <italic>profile value </italic>is defined as the ratio of positive values to the total number of values in <italic>E</italic>. A profile value of 0.5 would mean that, if all peaks in a block were shifted by the initially recorded deviation of the current peak from its candidate peak in <italic>R</italic>, then half of the remaining traceable peaks, including the current one, are also improved in alignment. Only if the above three conditions (i, ii and iii) are met will the current peak be recorded as a match. Otherwise, it remains unsolved so that it can be processed again in later iterations with smaller block sizes. For the last peak in <italic>SB</italic>, however, there is only one element in the <italic>E </italic>vector, the current peak itself, so the profile value is always 1 and thus uninformative. In such a case, we model the deviations of already matched peaks by loess regression and use the model to predict the deviation of the current peak. If the actual deviation falls within <italic>lpBound </italic>of the prediction, then the candidate matching peak in <italic>R </italic>is accepted as a match.</p> <p>In such a case of a single or the last peak in a block, block processing will always solve the peak, either as a match or as unmatchable, signified by ϕ. After the last peak in <italic>SB </italic>is solved and no more blocks remain to be processed, the iteration number is incremented, unsolved peaks are grouped into new blocks, and the match process continues until there are no unsolved peaks. The final size of the time axis is actually determined by the result of the first iteration during which all peaks are in one block. Peak matching simulations in subsequent iterations can affect the time domain only within the boundary of the peaks within blocks. Iterative peak matching is described in Figure ##FIG##3##4## and Table ##TAB##1##2##. Figure ##FIG##3##4## illustrates peak matching in a 700-scan region containing seven peaks (numbered 1–7) used for alignment testing. After three iterations, all peaks were solved, i.e., matched or unmatched. Four boxes show peak blocks created at the start of an iteration. The <italic>y </italic>values 1, 2 and 3 shown on an axis on the right side of the figure indicate within which iteration corresponding peak blocks were processed. Table ##TAB##1##2## shows shift amounts applied to the peaks in a block at the end of each iteration in the example of Figure ##FIG##3##4##. The processing of peaks in a block proceeds from left to right. A parenthesized shift number implies matching and ϕ means that a peak was determined to have no match. When a match occurs, that shift amount is propagated to the subsequent peaks in the same block. For instance, peak #5 was shifted 11 scans when peak 1 was matched, and an additional 4 scans for a match of peak #3. Since it was not matched in the first iteration, peak matching continues in the next iteration. When peak 4 was matched, a shift of -2 was propagated to peak 5 and, with the resulting total shift of 13, peak 5 was determined by criteria described in Figure ##FIG##2##3## to be matched, thus ending its processing.</p> <title>Testing</title> <p>Data in 45 files were used to test the alignment algorithm. They were acquired by a quadrupole GC-EI-MS system during a month-long study of the effect of life-span-altering mutations on metabolite levels in the soil nematode <italic>C. elegans</italic>. Unless specified otherwise, run #8 was selected as the reference and the rest of the runs were aligned to it in succession. Figure ##FIG##4##5## shows TIC for all samples, viewed from above with total ion intensities color-encoded, before and after alignment.</p> <p>As shown in Figure ##FIG##5##6##, iterative block-shifting identified peak deviations for all runs and aligned them appropriately, thus, drastically decreasing peak deviations to no more that 1 scan, or an average deviation of 0.25 scans. Since a scan lasts 0.78 seconds, this is a mean deviation of 0.2 sec and a maximum deviation of less than one second for runs lasting over an hour. This is a great improvement over the initial deviations (as much as 22 scans or 17.2 seconds) and was achieved with conservation of the shapes and areas of key peaks, because only non-peak regions are warped.</p> <p>The small remaining deviation results from the discrete nature of the chromatography time dimension.</p> <p>When the alignment was repeated on the same data but with different references, results were similar. Not only were similarly aligned chromatograms produced (see Additional Files ##SUPPL##0##1##, ##SUPPL##1##2## and ##SUPPL##2##3##), but similar progress was made in correcting deviations and solving unsolved peaks as iterations progressed (Figure ##FIG##6##7##). No matter which reference was used, most deviations were corrected in early iterations.</p> <title>Comparisons</title> <p>Two well known algorithms, COW and XCMS, mentioned earlier in this paper, were selected to further evaluate the performance of our block-shift method with respect to the correctness of the alignment and the preservation of peak areas, using the test data set. A full evaluation of the performance of the three methods under more diverse conditions could be the subject of a separate study, however, to our knowledge, even the limited comparison reported here between COW and XCMS is unprecedented. COW is available as a set of MATLAB scripts [##UREF##6##26##]; XCMS as an R package [##REF##16448051##8##]. As in block shifting, analytical run #8 was chosen as the reference for COW. XCMS does not require the choice of a reference, relying instead on median positions identified, well-behaved <italic>peak-groups </italic>[##REF##16448051##8##]. Four major TIC peaks were selected for these comparisons: one in the beginning; one near the end; and two from the middle of the time interval of chromatography. For each, the most prominent spectral <italic>mz </italic>value was identified, and its EIC chromatogram along the full extent of the chromatogram was used as the input for COW alignment. Both XMCS and block-shifting used as their input the entire set of EIC mass chromatograms for every run.</p> <p>The quality of alignment by these three approaches is compared in Figure ##FIG##7##8##. Table ##TAB##2##3## summarized their effects, if any, on peak integrated areas, this calculated by a method that considers area between the apex and a horizontal line drawn at 1/5<sup>th </sup>the height of the apex. Looking at Figure ##FIG##7##8##, Peak #1 appears to have been least precisely aligned by XCMS, peak #4 by COW. For COW and XCMS, the less symmetric peaks #2 and #3 appear to show some dependence of apical position on the height of peaks, a phenomenon not evident with block-shifting. Table ##TAB##2##3## illustrates that COW, and to a lesser extent, XCMS alignments are accompanied by artifactual distortions in peak area. We also observed peak <italic>shape </italic>differences (data not shown). As for the block-shift method, areas of two of the four peaks were perfectly preserved. Two and 13 of 45 analytical runs did show area distortion for peaks #2 and #3, respectively. This can be attributed to the inclusion of a peak tail region during integration which was excluded from the peak region during block-shift alignment, thus, was liable to be warped.</p>
<title>Discussion</title> <p>Robust alignment is an important step as it affects not only the quality of comparative post-data analysis but also which type of data analysis can be used [##REF##17466315##9##]. Our iterative block-shifting approach is well suited to subsequent data analysis methods that operate on matrices, because the discrete nature of the time axis is preserved, and should allow approaches that require trilinearity because resulting alignments are precise to within one scan unit. Additionally, it preserves areas and shapes of detected peaks.</p> <p>Precise alignment is possible through the recurrent use of mass spectral information in both peak detection and peak matching steps. Some alignment errors may not be prevented by spectral considerations, however, for instance, errors that might occur when multiple isobaric compounds are retained differently during chromatography. There is an additional requirement for peak matching that the match not adversely affect the alignment of too many of the remaining peaks in its block (as set by the <italic>prof </italic>parameter). The effect of the <italic>prof </italic>criterion is to delay the matching of potentially troublesome peaks such as isobaric compounds, ultimately until they exist alone in a block, at which time, the desireability of using them for alignment is evaluated by a loess-based smoothing criterion. This method potentially can calibrate even heavily misaligned peaks since peaks are found in an adjustable search range; we know of no other alignment algorithm for which the deviation in retention time from sample to sample can exceed the time between a peak and its neighbors [##REF##16448051##8##,##REF##14719890##18##].</p> <p>One drawback of iterative block shifting is that, while its final step of warping and shifting conserves detected peaks, undetected peaks are liable to be deformed since nonpeak regions are warped. For this reason, the stringency during detection of sample TIC peaks is kept very low to try to detect, and thus preserve, most or all peaks of experimental interest. In cases where much of the retention artifact occurs at the beginning of the chromatogram, warping artifacts will be minimal, since the leftmost correction is a simple block-shift. Finally, if an undetected, and thus, potentially distorted peak is detected by some other means subsequent to alignment and proves important in the experiment, an investigator can always recover true peak area and shape by referring to the original raw data file using adjacent matched and aligned peaks to help locate the feature of interest. Because most peaks are area-preserved by this method, it is expected that fewer instances will occur than with methods that generally distort area that will require a return to the raw data for quantification purposes.</p> <p>One disadvantage of typical pairwise alignment approaches is that the selection of the reference chromatogram can affect performance [##REF##17466315##9##,##UREF##6##26##]. No sample chromatogram is likely to include every peak from all the other chromatograms in a series. Our proposed method, while not free from this disadvantage, lessens the difficulty of selecting a good reference by using subsets of available peaks in the reference for the alignment of every other sample.</p>
<p>This is an open access article distributed under the terms of the Creative Commons Attribution License (<ext-link ext-link-type="uri" xlink:href="http://creativecommons.org/licenses/by/2.0"/>), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.</p> <title>Background</title> <p>Metabolomics, petroleum and biodiesel chemistry, biomarker discovery, and other fields which rely on high-resolution profiling of complex chemical mixtures generate datasets which contain millions of detector intensity readings, each uniquely addressed along dimensions of <italic>time </italic>(<italic>e.g.</italic>, <italic>retention time </italic>of chemicals on a chromatographic column), a <italic>spectral value </italic>(<italic>e.g., mass-to-charge ratio </italic>of ions derived from chemicals), and the <italic>analytical run number</italic>. They also must rely on data preprocessing techniques. In particular, inter-run variance in the retention time of chemical species poses a significant hurdle that must be cleared before feature extraction, data reduction, and knowledge discovery can ensue. <italic>Alignment methods</italic>, for calibrating retention reportedly (and in our experience) can misalign matching chemicals, falsely align distinct ones, be unduly sensitive to chosen values of input parameters, and result in distortions of peak shape and area.</p> <title>Results</title> <p>We present an iterative block-shifting approach for retention-time calibration that detects chromatographic features and qualifies them by retention time, spectrum, and the effect of their inclusion on the quality of alignment itself. Mass chromatograms are aligned pairwise to one selected as a reference. In tests using a 45-run GC-MS experiment, block-shifting reduced the absolute deviation of retention by greater than 30-fold. It compared favourably to COW and XCMS with respect to alignment, and was markedly superior in preservation of peak area.</p> <title>Conclusion</title> <p>Iterative block-shifting is an attractive method to align GC-MS mass chromatograms that is also generalizable to other two-dimensional techniques such as HPLC-MS.</p>
<title>Competing interests</title> <p>The authors declare that they have no competing interests.</p> <title>Authors' contributions</title> <p>MC conceived, developed the algorithm, and drafted the manuscript. RJSR and JT coordinated the project and revised the manuscript. All authors read and approved the final manuscript.</p> <title>Supplementary Material</title>
<title>Acknowledgements</title> <p>We wish to acknowledge Lulu Xu for conducting the GC-MS experiment and Stephen Jennings for helpful discussions on this study. This project was supported by NIH Grant Number P20 RR-16460 from the IDeA Networks of Biomedical Research Excellence (INBRE) program of the National Center for Research Resources and NIA program project grant #AG020641.</p> <p>This article has been published as part of <italic>BMC Bioinformatics </italic>Volume 9 Supplement 9, 2008: Proceedings of the Fifth Annual MCBIOS Conference. Systems Biology: Bridging the Omics. The full contents of the supplement are available online at <ext-link ext-link-type="uri" xlink:href="http://www.biomedcentral.com/1471-2105/9?issue=S9"/></p>
<fig position="float" id="F1"><label>Figure 1</label><caption><p><bold>Unaligned chromatograms</bold>. A 500-scan region is shown for each of two total-ion-current chromatograms, <italic>S </italic>and <italic>R</italic>, in a GC-MS experiment.</p></caption></fig> <fig position="float" id="F2"><label>Figure 2</label><caption><p><bold>Diagram of two peak sets</bold>. Peaks in a sample peak set <italic>SP </italic>match with peaks in a reference peak set <italic>RP</italic>. <italic>SP </italic>is composed of detected TIC peaks, <italic>i.e</italic>, capital <italic>P</italic>'s, in which individual EIC peaks, <italic>p</italic>'s, up to five, are arranged in descending order of their signal-to-noise ratios. Note that <italic>RP </italic>is a peak set composed of "inferred TIC" peaks since individual EIC peaks, <italic>q</italic>'s, are first identified by using the <italic>mz </italic>values of <italic>SP </italic>and then are grouped into a TIC peak. This also illustrates the matching of TIC peak <italic>P</italic><sub>1 </sub>to <italic>Q</italic><sub>1</sub>, but of P<sub>2 </sub>to <italic>Q</italic><sub>3 </sub>because, in the latter case, either peak <italic>Q</italic><sub>2 </sub>had no EIC component (<italic>q</italic><sub>21</sub><italic>and q</italic><sub>22</sub>) with a matching <italic>mz </italic>value, or the spectra of <italic>P</italic><sub>2 </sub>and <italic>Q</italic><sub>2 </sub>were insufficiently correlated, whereas Q<sub>3 </sub>met both of these conditions, with <italic>q</italic><sub>32 </sub>having matching <italic>mz</italic>.</p></caption></fig> <fig position="float" id="F3"><label>Figure 3</label><caption><p><bold>A flowchart of iterative peak matching</bold>. The left flowchart shows the overall iterative peak-matching flow, whereas, the right flowchart shows the flow within the subroutine for processing a single block.</p></caption></fig> <fig position="float" id="F4"><label>Figure 4</label><caption><p><bold>An example of iterative peak matching</bold>. A 700-scan region of <italic>S </italic>TIC is shown which has 7 detected peaks. Peaks are assigned to blocks at the start of each iteration, with blocks shown as boxes of height matching the iteration number. Intensities are log transformed for a better display of weak signals.</p></caption></fig> <fig position="float" id="F5"><label>Figure 5</label><caption><p><bold>Top plots showing all 45 runs, before and after alignment</bold>. These two heat-map-encoded top plots display the total ion current (TIC) for mass chromatograms of all 45 runs in a <italic>C</italic>. <italic>elegans </italic>experiment (see text), before and after alignment. Run #8 was used as the alignment reference. The brightness is proportional to the logarithm of intensity, so peaks are displayed as bright vertical bars. Initially, as the run number increases, the peaks are skewed to left, meaning the same peaks eluted earlier in higher-numbered (later) runs. The pattern also exhibits serious breaks and other nonlinearities. These imperfections were corrected by the alignment method and are not evident in the bottom image.</p></caption></fig> <fig position="float" id="F6"><label>Figure 6</label><caption><p><bold>Peak deviations before and after alignment</bold>. Retention-time deviations of matched peaks are color-coded in these two panels, before (top) and after (bottom) application of the described alignment method. The heat-map code is displayed to the right (Note the narrower range of deviations represented by colors in the lower panel). White cells represent instances where a peak in a run either was not detected or did not pass signal-to-ratio and peak-width criteria. Twenty-one peaks were omitted from the display because they met criteria in fewer than ten sample runs; their inclusion does not alter the result. Run #8 again was selected as the alignment reference. Several weeks, and a GC-MS re-tuning operation, occurred between runs 17 and 18.</p></caption></fig> <fig position="float" id="F7"><label>Figure 7</label><caption><p><bold>Robust iterative peak matching with different references</bold>. (a) Sums of absolute values of all sample-<italic>vs.</italic>-reference peak discrepancies are normalized to the pre-alignment (iter = 0) value and plotted as a function of the number of iterations completed. Data are compared for four independent alignments, with different runs selected as the reference. Regardless of which run was used as the reference, most peak retentions were corrected in early iterations (in the Ref #8 case, all peaks were solved by iteration 5 and no 6<sup>th </sup>iteration was done). Comparing the same references, the number remaining unsolved after each iteration is shown in (b).</p></caption></fig> <fig position="float" id="F8"><label>Figure 8</label><caption><p><bold>A comparison of retention-time alignment by three methods</bold>. Top panel: Unabridged total-ion-current (TIC) chromatograms for 45 analytical runs in a GC-MS metabolomics experiment, prior to alignment. Remaining panels: columns 1–4 show details for peaks labelled 1–4 in the top panel, both unaligned (top row), and aligned using COW [##UREF##2##17##] with automated parameter selection [##UREF##6##26##], using XCMS with three iterations [##REF##16448051##8##], and using iterative block-shifting with its default parameters, as described in the text (rows 2–4, respectively).</p></caption></fig>
<table-wrap position="float" id="T1"><label>Table 1</label><caption><p>Algorithm input variables</p></caption><table frame="hsides" rules="groups"><thead><tr><td align="center"><bold>Variable</bold></td><td align="center"><bold>Formal Definition</bold></td><td align="center"><bold>Default</bold></td></tr></thead><tbody><tr><td align="left"><italic>Sntic</italic></td><td align="left"><italic>SN </italic>threshold when detecting peaks in <italic>S </italic>TIC. Low values are used in order to include weak signals.</td><td align="center">1</td></tr><tr><td align="left"><italic>Sneic</italic></td><td align="left"><italic>SN </italic>threshold when detecting peaks in EIC chromatograms for <italic>S </italic>and <italic>R</italic>. Values higher than the <italic>SNtic </italic>are used to reduce the risk of matching noisy EIC peaks.</td><td align="center">5</td></tr><tr><td align="left"><italic>PWidth</italic></td><td align="left">Peak width threshold for every peak detection, in units of scans.</td><td align="center">12</td></tr><tr><td align="left"><italic>PClose</italic></td><td align="left">EIC-to-TIC peak apex distance threshold, in units of scans.</td><td align="center">2</td></tr><tr><td align="left"><italic>SDist</italic></td><td align="left">Search distance when finding candidate peaks in <italic>R</italic>, in units of scan number measuring from the apex of an <italic>S </italic>peak.</td><td align="center">15</td></tr><tr><td align="left"><italic>CorMass</italic></td><td align="left">Correlation coefficient threshold between two peaks.</td><td align="center">0.95</td></tr><tr><td align="left"><italic>Prof</italic></td><td align="left">Profile threshold for peak deviations.</td><td align="center">0.5</td></tr><tr><td align="left"><italic>LpBound</italic></td><td align="left">Lone peak boundary, in units of scan number.</td><td align="center">5</td></tr></tbody></table></table-wrap> <table-wrap position="float" id="T2"><label>Table 2</label><caption><p>Record of shifts during the peak matching stage in Figure 4.</p></caption><table frame="hsides" rules="groups"><thead><tr><td align="center">peak</td><td align="center" colspan="4">shift (in scan)</td></tr><tr><td/><td align="center"><bold>i = 1</bold></td><td align="center"><bold>i = 2</bold></td><td align="center"><bold>i = 3</bold></td><td align="center"><bold>Total</bold></td></tr></thead><tbody><tr><td align="center">1</td><td align="center">(11)</td><td align="center">-</td><td align="center">-</td><td align="center">11</td></tr><tr><td align="center">2</td><td align="center">11</td><td align="center">ϕ</td><td align="center">-</td><td align="center">11</td></tr><tr><td align="center">3</td><td align="center">(15)</td><td align="center">-</td><td align="center">-</td><td align="center">15</td></tr><tr><td align="center">4</td><td align="center">15</td><td align="center">(-2)</td><td align="center">-</td><td align="center">13</td></tr><tr><td align="center">5</td><td align="center">15</td><td align="center">(-2)</td><td align="center">-</td><td align="center">13</td></tr><tr><td align="center">6</td><td align="center">15</td><td align="center">-2</td><td align="center">(-1)</td><td align="center">12</td></tr><tr><td align="center">7</td><td align="center">15</td><td align="center">-2</td><td align="center">(-1)</td><td align="center">12</td></tr></tbody></table></table-wrap> <table-wrap position="float" id="T3"><label>Table 3</label><caption><p>Peak integration errors* caused by three alignment methods</p></caption><table frame="hsides" rules="groups"><thead><tr><td/><td align="center"><bold>1</bold></td><td align="center"><bold>2</bold></td><td align="center"><bold>3</bold></td><td align="center"><bold>4</bold></td></tr></thead><tbody><tr><td align="left"><bold>COW area %error ± SD</bold></td><td align="center">8.7 ± 5.2</td><td align="center">4.7 ± 3.8</td><td align="center">3.0 ± 2.4</td><td align="center">4.5 ± 3.2</td></tr><tr><td align="left"><bold>XCMS area %error ± SD</bold></td><td align="center">0.17 ± 00.14</td><td align="center">1.29 ± 0.91</td><td align="center">0.50 ± 0.89</td><td align="center">0.11 ± 0.10</td></tr><tr><td align="left"><bold>Block-shift area %error ± SD</bold></td><td align="center">0.000 ± 0.00</td><td align="center">0.002 ± 0.01</td><td align="center">0.18 ± 0.80</td><td align="center">0.000 ± 0.00</td></tr><tr><td colspan="5"><hr/></td></tr><tr><td align="left"><bold>Block <italic>vs</italic>. COW (<italic>t</italic>-test P val.)</bold></td><td align="center">&lt;10<sup>-10</sup></td><td align="center">&lt;10<sup>-10</sup></td><td align="center">&lt;10<sup>-10</sup></td><td align="center">&lt;10<sup>-10</sup></td></tr><tr><td align="left"><bold>Block <italic>vs</italic>. XCMS (<italic>t</italic>-test P val.</bold><bold>)</bold></td><td align="center">&lt;10<sup>-10</sup></td><td align="center">&lt;10<sup>-10</sup></td><td align="center">0.08</td><td align="center">&lt;10<sup>-10</sup></td></tr></tbody></table></table-wrap>
<disp-formula id="bmcM1"><label>(1)</label>{(p<sub>11</sub>, q<sub>11</sub>, 30, 5, 1), (p<sub>21</sub>, q<sub>32</sub>, 40, 3, 1), (p<sub>31</sub>, ϕ, 40, 3, 2),...}</disp-formula>
<supplementary-material content-type="local-data" id="S1"><caption><title>Additional file 1</title><p>Alignment result if run 1 is selected as the Reference.</p></caption></supplementary-material> <supplementary-material content-type="local-data" id="S2"><caption><title>Additional file 2</title><p>Alignment result if run 22 is selected as the Reference.</p></caption></supplementary-material> <supplementary-material content-type="local-data" id="S3"><caption><title>Additional file 3</title><p>Alignment result if run 36 is selected as the Reference.</p></caption></supplementary-material>
<table-wrap-foot><p>*area %error = 100% × (area<sub>aligned </sub>- area<sub>raw</sub>)/area<sub>raw</sub></p></table-wrap-foot>
<graphic xlink:href="1471-2105-9-S9-S15-1"/> <graphic xlink:href="1471-2105-9-S9-S15-2"/> <graphic xlink:href="1471-2105-9-S9-S15-3"/> <graphic xlink:href="1471-2105-9-S9-S15-4"/> <graphic xlink:href="1471-2105-9-S9-S15-5"/> <graphic xlink:href="1471-2105-9-S9-S15-6"/> <graphic xlink:href="1471-2105-9-S9-S15-7"/> <graphic xlink:href="1471-2105-9-S9-S15-8"/>
<media xlink:href="1471-2105-9-S9-S15-S1.jpg" mimetype="image" mime-subtype="jpeg"><caption><p>Click here for file</p></caption></media> <media xlink:href="1471-2105-9-S9-S15-S2.jpg" mimetype="image" mime-subtype="jpeg"><caption><p>Click here for file</p></caption></media> <media xlink:href="1471-2105-9-S9-S15-S3.jpg" mimetype="image" mime-subtype="jpeg"><caption><p>Click here for file</p></caption></media>
[{"surname": ["Stein"], "given-names": ["SE"], "article-title": ["An integrated method for spectrum extraction and compound identification from gas chromatography/mass spectrometry data"], "source": ["Journal of the American Society for Mass Spectrometry"], "year": ["1999"], "volume": ["10"], "fpage": ["770"], "lpage": ["781"], "pub-id": ["10.1016/S1044-0305(99)00047-1"]}, {"surname": ["Draper", "Beckmann", "Campbell", "Stewart", "Griffith", "Marshall", "Verral"], "given-names": ["J", "M", "S", "D", "W", "R", "S"], "article-title": ["Metabolite peak identification and data structure in a multi-site, large scale metabolomics experiment"], "source": ["2nd International Science Meeting of the Metabolomics Society Boston"], "year": ["2006"]}, {"surname": ["Nielsen", "Carstensen", "Smedsgaard"], "given-names": ["NPV", "JM", "J"], "article-title": ["Aligning of single and multiple wavelength chromatographic profiles for chemometric data analysis using correlation optimised warping"], "source": ["Journal of Chromatography A"], "year": ["1998"], "volume": ["805"], "fpage": ["17"], "lpage": ["35"], "pub-id": ["10.1016/S0021-9673(98)00021-1"]}, {"surname": ["Vorst", "Vos", "Lommena", "Staps", "Visser", "Binoa", "Hall"], "given-names": ["O", "CHRd", "A", "RV", "RGF", "RJ", "RD"], "article-title": ["A non-directed approach to the differential analysis of multiple LC-MS-derived metabolic profiles"], "source": ["Metabolomics"], "year": ["2005"], "volume": ["1"], "fpage": ["169"], "lpage": ["180"], "pub-id": ["10.1007/s11306-005-4432-7"]}, {"collab": ["R Development Core Team"], "source": ["R: A Language and Environment for Statistical Computing"], "year": ["2008"], "publisher-name": ["R Foundation for Statistical Computing, Vienna, Austria"], "comment": ["[ISBN 3-900051-07-0]"]}, {"article-title": ["NetCDF"]}, {"surname": ["Skov", "Berg", "Tomasi", "Bro"], "given-names": ["T", "F van den", "G", "R"], "article-title": ["Automated alignment of chromatographic data"], "source": ["Journal of Chemometrics"], "year": ["2006"], "volume": ["20"], "fpage": ["484"], "lpage": ["497"], "pub-id": ["10.1002/cem.1031"]}]
BMC Bioinformatics. 2008 Aug 12; 9(Suppl 9):S15