Automatic rank recovery on full chromatograms
We simulated 16 full chromatograms of 10,000 scans × 550 ion channels (m/z 30–579), about 50 minutes per injection. Each of the 1,000 compounds occurred in eight randomly chosen samples, giving 8,000 peaks in total. Of these compounds, 990 had exponentially modified Gaussian (EMG) peaks and ten had shark-fin acid peaks. Both broadened with increasing concentration. The simulation included overdispersed counts, a smooth background, up to 2.93 seconds of retention drift and about 2% variation in scan spacing.
GCMSprime recovered all 1,000 compounds at the correct shared rank and called all 8,000 peaks with zero false positives, including all 80 acid peaks. Each fitted identity matched the same compound in all eight injections in which it occurred. On a 64 GB Windows laptop with eight physical cores and 16 logical processors, the fit took 29.03 seconds per sample for the 88 million ion measurements and peaked at 6.77 GiB of sampled process-tree working memory.
GNPS/MSHub estimated 1,414 shared components, 41.4% above the generating rank. The other five workflows report per-sample peaks or aligned feature groups. A dash indicates that the workflow reports no common factorisation rank.
| Workflow | Seconds/sample | Estimated rank (true 1,000) | TP (sensitivity) | FP | FN | Acid TP / 80 | Median absolute area error, % [P25, P75] |
|---|---|---|---|---|---|---|---|
| GCMSprime | 29.03 | 1,000 (exact) | 8,000 (100%) | 0 | 0 | 80 / 80 | 0.095 [0.041, 0.197] |
| MS-DIAL | 16.02 | — | 7,728 (96.6%) | 11,685 | 272 | 73 / 80 | 13.94 [5.86, 26.39] |
| mzmine GC-EI | 6.92 | — | 4,202 (52.5%) | 185 | 3,798 | 29 / 80 | 6.41 [2.51, 14.23] |
| eRah | 25.94 | — | 7,172 (89.7%) | 5,615 | 828 | 70 / 80 | 12.03 [5.62, 25.70] |
| AMDIS | 28.99 | — | 7,878 (98.5%) | 9,122 | 122 | 80 / 80 | 20.74 [14.34, 33.82] |
| xcms + CAMERA | 4.22 | — | 7,261 (90.8%) | 890 | 739 | 31 / 80 | 29.70 [23.15, 38.41] |
| MSHub | 15.05 | 1,414 | 7,179 (89.7%) | 12,184 | 821 | 50 / 80 | 15.42 [5.96, 35.47] |
For each correctly matched peak we calculated the absolute difference between estimated and true area as a percentage of its true area. Brackets give the 25th and 75th percentiles across those peaks.
Of MSHub’s 1,414 deconvolved components, 1,072 contributed at least one correctly matched occurrence. Occurrence-to-factor assignments
Each program was timed in isolation on the same 64 GB Windows laptop with eight physical cores and 16 logical processors. Seconds per sample means wall time divided by 16 for the whole batch. The comparison includes any required input conversion or staging and the program’s native analysis. GCMSprime’s time includes reading and fitting an independent PSF standard, the coupled fit and native results export. Simulation, common-format result extraction and accuracy scoring are outside the timed comparison. One run per program gives a descriptive timing for these files and this machine.
Timing boundaries
| Workflow | Native analysis (s/sample) | Input conversion or staging (s/sample) | Through result extraction (s/sample) |
|---|---|---|---|
| GCMSprime | 29.03 | — | 29.51 |
| MS-DIAL | 12.26 | 3.76 | 17.40 |
| mzmine GC-EI | 3.51 | 3.41 | 6.93 |
| eRah | 25.94 | — | 26.46 |
| AMDIS | 25.75 | 3.24 | 29.57 |
| xcms + CAMERA | 4.22 | — | 4.99 |
| MSHub | 14.99 | 0.06 | 15.38 |
The headline time adds native analysis and separately timed input conversion or staging. A dash means the workflow read its inputs directly. The last column also includes extracting peak tables and spectra into the common in-memory representation, before saving that record or comparing it with truth.
Simulation and scoring
Individual chromatograms contain 479–517 true peaks. The L0glm library supplies spectra on m/z 41–298. The selected spectra have compound signal in 245 of the 550 recorded channels. A smoothly varying background fitted to the measured gcmsData2 window supplies the background on m/z 41–298. The additional channels carry low background. Counts have quasi-Poisson variance proportional to the mean, with dispersion 783.18 estimated from gcmsData2. Measured on the recorded scan grids, the median within-compound Spearman correlation between area and half-height width was 0.86 for EMGs and 0.94 for acids. The nominal compound centres follow a regular grid with one deliberately close pair. Concentration-dependent broadening and the subset present in each injection determine the actual overlap. The retention-index (RI) scale is synthetic and time-calibrated for each injection. Reference spectra, occurrence labels and true rank are used in scoring.
GCMSprime calibrated the time-varying PSF on a separately generated
20-peak standard. It used a 16-thread budget with up to eight
simultaneous sample initialisations, 32 pooled mass-channel groups and
the final local rank search
(batch = list(workers = 8L, coupling = list(penalty_search = TRUE))).
The search compares changes to the original-ion GIC. It receives neither
the expected number of compounds nor their spectra. The other programs
used their local GC–EI workflows. The settings and software versions
accompany the results.
eRah used a minimum peak width of 2 seconds. The xcms matched filter
used a 2.6-second FWHM and a signal-to-noise threshold of 1.5. CAMERA
grouped peaks by FWHM with perfwhm = 0.8 and required four
ions. AMDIS used PEAKWIDTH = 16, SENSIT = 60,
RESOLUTION = 0 and PEAKSHAPE = 0. MSHub used
its standalone deconvolution workflow. The original CDFs were generated
with logconNMF and GCMSprime 0.1.0.9012. The disk-backed fit used
GCMSprime 0.1.0.9015 and logconNMF 0.1.0.9016 on those same files.
Each recovered spectrum competes against all 1,000 references, including compounds absent from that sample. A true positive requires a reciprocal best match with spectral cosine ≥0.70, within ±30 simulated RI units, to a compound present in that sample. The score allows one credit per sample and reference. Extra calls, including duplicates, count as false positives. Sensitivity uses all 8,000 occurrences as its denominator. Acid recovery uses all 80.
Here the shared rank counts distinct compounds across injections. At a detection height of 1% of each peak’s own apex, the median number of co-eluting peaks per scan was one, the 95th percentile was three and the maximum was five. The fitted model separates compounds by their elution times as well as their spectra. The unrestricted nonnegative rank of the stacked scan-by-ion matrix is at most 550, its number of ion columns.
Quantification and spectral recovery
| Workflow | Area adjusted R² | Median absolute area error, % [P25, P75] | Median spectral cosine | Mean ion-support F1 | Median profile cosine |
|---|---|---|---|---|---|
| GCMSprime | 0.999982 | 0.095 [0.041, 0.197] | 0.9999995 | 0.995 | 0.999994 |
| MS-DIAL | 0.700129 | 13.94 [5.86, 26.39] | 0.9925397 | 0.901 | 0.996864 |
| mzmine GC-EI | 0.966560 | 6.41 [2.51, 14.23] | 0.9975148 | 0.874 | — |
| eRah | 0.853212 | 12.03 [5.62, 25.70] | 0.9957392 | 0.794 | 0.001678 |
| AMDIS | 0.499773 | 20.74 [14.34, 33.82] | 0.9972175 | 0.894 | 0.970942 |
| xcms + CAMERA | 0.951953 | 29.70 [23.15, 38.41] | 0.9807221 | 0.604 | 0.971638 |
| MSHub | 0.305059 | 15.42 [5.96, 35.47] | 0.9857457 | 0.913 | — |
Among GCMSprime’s 8,000 matched occurrences, the median absolute peak area error was 0.095% [0.041%, 0.197%] and ordinary adjusted R² on the log₁₀ scale was 0.999982. The area panels use ordinary least-squares regression with pointwise 95% prediction intervals. Square axes span 7.5 to 10.5 on both log₁₀ scales. The fits include every positive matched pair, including observations outside the displayed limits. The dashed diagonal marks exact area recovery.
Areas use each program’s exported ion intensities and its acquisition clock to convert to integrated total-ion equivalents. Accuracy is conditional on a correct match. The first table gives the missed and extra calls alongside it.
The first distribution includes all reciprocal library hits. Crosses identify hits to references absent from the sample. All cosines use their measured values on the logit scale. Of the 8,000 GCMSprime spectra, 5,656 scored above 0.999999 and the maximum was 0.9999999913. Exact ion-support matches occupy a separate position at 1, with the violin showing the remaining observations. Ion-support F1 compares the nonzero ions at or above 0.1% of each spectrum’s own base peak and is averaged over correct matches.
To compare whole elution profiles, we chose the EMG compound and the acid with the largest total simulated area in their respective classes before examining any fit. Solid curves show fitted profiles and dashed curves the simulated profiles, in total-ion intensity per scan. Colours run from low to high simulated area. Each compound occurred in eight samples and had zero true intensity in the other eight. The mean profile cosine includes all eight positive occurrences, with a missed peak scoring zero.
CAMERA supplies a representative-ion trace scaled to the grouped area. The mzmine and MSHub exports provide spectra and areas without a sample-specific profile in this workflow.
Recovery of all ten shark-fin acids
For each acid and workflow, the first line gives the number of correctly identified peaks out of eight. Below it are the median absolute area error and its [25th, 75th] percentiles, all in percent of the true area. A dash means that no occurrence matched. The downloadable per-compound table also gives the median estimated-to-true area ratio and mean matched profile cosine where available.
| Acid ID | GCMSprime | MS-DIAL | mzmine | eRah | AMDIS | xcms+CAMERA | MSHub |
|---|---|---|---|---|---|---|---|
| 250 | 8/8 0.151 [0.099, 0.242] |
7/8 36.50 [24.78, 52.00] |
5/8 4.05 [3.70, 4.26] |
5/8 56.46 [55.30, 73.08] |
8/8 67.14 [52.06, 82.67] |
3/8 53.76 [48.81, 57.93] |
8/8 99.09 [80.28, 100.00] |
| 311 | 8/8 0.085 [0.027, 0.141] |
7/8 12.16 [10.62, 20.99] |
3/8 22.35 [20.84, 28.14] |
7/8 48.18 [44.66, 51.21] |
8/8 61.94 [57.53, 91.21] |
6/8 46.59 [45.93, 47.62] |
4/8 25.17 [10.82, 53.20] |
| 372 | 8/8 0.176 [0.066, 0.255] |
8/8 23.53 [5.92, 43.39] |
6/8 5.81 [1.18, 10.68] |
6/8 52.75 [45.69, 56.43] |
8/8 49.24 [42.57, 53.68] |
1/8 48.33 [48.33, 48.33] |
8/8 50.98 [39.76, 77.53] |
| 433 | 8/8 0.185 [0.071, 0.270] |
7/8 16.85 [10.16, 72.61] |
4/8 48.25 [40.42, 54.93] |
8/8 52.84 [38.72, 69.54] |
8/8 63.95 [26.48, 79.87] |
2/8 60.04 [59.16, 60.92] |
8/8 41.66 [34.02, 84.23] |
| 494 | 8/8 0.211 [0.122, 0.303] |
7/8 31.99 [24.55, 34.03] |
4/8 22.02 [19.99, 24.17] |
7/8 46.95 [43.03, 52.18] |
8/8 64.35 [45.47, 76.66] |
3/8 54.04 [51.81, 54.61] |
0/8 — |
| 556 | 8/8 0.102 [0.082, 0.141] |
7/8 12.86 [10.31, 23.68] |
7/8 22.07 [16.59, 25.68] |
8/8 28.19 [23.15, 36.62] |
8/8 60.58 [50.29, 66.03] |
5/8 52.92 [48.85, 55.31] |
8/8 42.31 [37.14, 50.66] |
| 617 | 8/8 0.082 [0.015, 0.205] |
8/8 22.38 [16.97, 32.19] |
0/8 — |
8/8 61.54 [44.05, 88.62] |
8/8 56.40 [44.66, 62.70] |
2/8 51.23 [50.91, 51.56] |
6/8 54.46 [30.64, 61.33] |
| 678 | 8/8 0.106 [0.047, 0.202] |
8/8 49.25 [13.80, 83.47] |
0/8 — |
8/8 49.37 [47.50, 56.97] |
8/8 65.70 [48.06, 72.36] |
7/8 56.99 [55.39, 61.78] |
0/8 — |
| 739 | 8/8 0.141 [0.095, 0.261] |
7/8 42.56 [30.68, 54.52] |
0/8 — |
7/8 40.08 [33.87, 48.35] |
8/8 50.03 [40.48, 71.23] |
2/8 51.67 [47.52, 55.83] |
8/8 52.83 [41.88, 87.69] |
| 800 | 8/8 0.190 [0.101, 0.309] |
7/8 30.51 [22.21, 36.39] |
0/8 — |
6/8 46.06 [28.58, 63.04] |
8/8 60.69 [40.28, 73.48] |
0/8 — |
0/8 — |
Convergence behaviour
On the 16 chromatograms the blind fit showed smooth, monotonic descent in the original-ion GIC over eight sweeps. Its final GIC differed by only 0.19% from that of a second fit started at the true elution profiles and compound identities and run for the same eight sweeps. Both fits estimated spectra, areas, elution profiles and background from the observed counts.
The curve joins 29 recorded updates. Several can occur within a sweep as the active set changes. The percentage gap is the absolute difference in final GIC divided by the magnitude of the truth-initialised fit’s GIC.
Reproduce the benchmark
Install the programs and set their local executable paths in the
named list control. The included R recipe generates the
common CDFs and their scoring key, fits the programs sequentially, then
scores the saved fits. Engine
setup and control list.
bench <- system.file("benchmarks", package = "GCMSbenchmark", mustWork = TRUE)
source(file.path(bench, "simulated-16.R"))
directory <- "full-chromatograms"
prepareFullBenchmark(directory)
methods <- c("GCMSprime", "MS-DIAL", "mzmine", "MSHub", "AMDIS", "xcms+CAMERA", "eRah")
for (m in methods) fitFullBenchmark(directory, m, control[[m]], ncores = 16L)
for (m in methods) scoreFullBenchmark(directory, m)
collectFullBenchmark(directory, methods, file.path(directory, "results"))
source(file.path(bench, "plot-simulated-16.R"))
plotBenchmark16(file.path(directory, "results"), file.path(directory, "figures"))CDF checksums · Reference spectra · Occurrence and area matrices · Summary and timing components · Matched peaks · Per-acid recovery · Recovery by abundance quartile · Software versions · Serial run log. The numerical input hashes cover scan times, masses and intensities. The whole-file hashes also include the CDF export timestamp.
Comparison with other software
In the seven workflows tested, GCMSprime obtained the highest sensitivity, the fewest false-positive calls and the most accurate peak areas. Across its 8,000 true positives, GCMSprime’s median absolute area error was 0.095% [0.041%, 0.197%]. AMDIS recovered 7,878 peaks with an error of 20.74% [14.34%, 33.82%] and called 9,122 extra peaks. Among the other six programs, mzmine GC-EI had the lowest median area error, 6.41% [2.51%, 14.23%], across its 4,202 true positives (adjusted R² = 0.966560).
GNPS/MSHub was the only other tested workflow to return a batch component count. It estimated 1,414 components, a 41.4% overestimate. Of those, 342 had no correctly matched occurrence. At the level of individual samples it made 12,184 false-positive calls and missed 821 true occurrences. The five per-sample workflows produced peak lists or aligned features without estimating a common factorisation rank. Their sensitivity ranged from 52.5% to 98.5%, and each made between 185 and 11,685 false-positive calls. The published settings and reciprocal-match rule apply to all counts below. Benchmark design and scoring · Factor assignments
| Workflow | Which choices affect peak recovery? | Result on the 16 chromatograms | Median absolute area error, % [P25, P75] |
|---|---|---|---|
| MS-DIAL | Model peaks are detected within each chromatogram before alignment. Smoothing, peak-detection thresholds and the deconvolution window affect which weak or overlapping components yield spectra. MS-DIAL GC–MS tutorial | 96.6% sensitivity and 11,685 false-positive calls. | 13.94 [5.86, 26.39] |
| mzmine GC-EI | Groups previously detected ion peaks by retention time and shape. The grouping tolerances and minimum ion count affect which components reach the peak list. GC-EI module | The fewest false-positive calls among the alternatives (185) and the most missed peaks (3,798). | 6.41 [2.51, 14.23] |
| eRah | Filters and resolves each sample before aligning compounds. Minimum peak width and detection thresholds influence which local spectra survive deconvolution. eRah manual | Missed 828 true occurrences and made 5,615 false-positive calls. | 12.03 [5.62, 25.70] |
| AMDIS | Representative ion traces supply the model peak shapes. Component width, resolution, sensitivity and shape settings affect splitting in crowded intervals. NIST user guide | Closest to GCMSprime on sensitivity (98.5%), with 122 missed occurrences and 9,122 false-positive calls. | 20.74 [14.34, 33.82] |
| xcms + CAMERA | The matched filter detects individual ion peaks with a specified width and signal-to-noise cutoff. CAMERA then groups detected ions into pseudospectra. Peak detection errors can therefore propagate into spectral grouping. CAMERA | Missed 739 occurrences and made 890 false-positive calls. | 29.70 [23.15, 38.41] |
| GNPS/MSHub | NMF separates compounds using aligned peak integrals across samples. Integration discards the scan-by-scan shapes that can help distinguish co-eluting compounds. Aksenov et al. · GNPS workflow | Estimated 414 more batch components than the true 1,000. Sample-level sensitivity was 89.7%. | 15.42 [5.96, 35.47] |
Matrix and tensor factorisation approaches
| Matrix or tensor method | How rank enters the fit | Limitation for these chromatograms |
|---|---|---|
| MCR-ALS, conventional GC–MS NMF and unimodal NMF | The analyst supplies the component count, often after an exploratory analysis. | Nonnegativity allows multiple maxima within a profile. Unimodality rules those out but still allows irregular shoulders and tails. Unimodal NMF · MCR-ALS · GC–MS NMF |
| Simultaneous NMF | A common factor links datasets at a specified rank. | Sharing spectra helps across samples. The basic factorisation leaves each compound’s elution shape unrestricted and supplies no chromatographic rule to choose between one broad peak and two neighbouring factors. Lee et al. |
| Global parametric GC–MS analysis | Candidate compound models are specified and fitted jointly. | The chosen peak family must describe the peaks in every sample. A good exponentially modified Gaussian model for a regular peak can leave a systematic residual at the sharp trailing edge of a shark-fin acid. Van Stokkum et al. |
| PARAFAC and shifted PARAFAC | Diagnostics such as core consistency compare specified ranks. | Standard trilinearity fixes each compound’s elution shape across samples up to amplitude. Allowing a retention shift moves the peak, while its width and asymmetry remain fixed. The simulated peaks broaden with concentration. Core consistency · Shifted factor models |
| Classical PARAFAC2 and PARADISe | PARADISe compares candidate ranks within retention intervals. A later automated workflow also selects and evaluates models. | PARAFAC2 lets profiles move, but their cross-products after scaling must agree across samples. Differential broadening changes how much neighbouring peaks overlap and can violate that condition. Choosing an interval model also leaves the task of assigning unique compounds across the chromatogram. Automated PARADISe · PARADISe |
| Flexible and fully constrained PARAFAC2 | Both cited formulations fit a specified number of components. | Flexible coupling relaxes the cross-product condition. AO-ADMM can impose sparsity, smoothness or nonnegativity on all modes. The analyst still specifies the rank and relevant regularisation settings in these least-squares fits. Cohen and Bro · Roald et al. |
| Shift-invariant trilinearity and PARAFAC2×N | Both fit a chosen model order. | A shifted copy of a common peak cannot reproduce concentration-dependent broadening. PARAFAC2×N accommodates drift in multiple separation dimensions. Its coupling constraints still leave the number of compounds to be selected. Shift-invariant trilinearity · PARAFAC2×N |
Ion-count variance in this simulation rises with the mean. Unweighted least squares assigns the same cost to an absolute residual at every intensity. Poisson MCR and KL-based NMF allow for signal-dependent variance. GCMSprime also estimates overdispersion, which determines how large a gain in fit must be to justify another profile or fragment ion. Cichocki et al. · Lavoie et al.
Multiset MCR and tensor fits on the same chromatographic window
How much does a compound gain from sharing its spectrum across injections? We cut scans 2,445–2,594 from each of the 16 full benchmark chromatograms around the first shark-fin acid (compound 250). These 150 scans include 550 ions, 15 distinct compounds with an apex in the window and 120 occurrences, plus tails from neighbouring compounds. Sample 002 is the first injection containing the acid. Eight compounds have their apex inside its window. The simulation determined which window to study. Rank estimation and data-only initialisation used only the observed counts in the selected injections.
In chemometric terminology, the shared-spectrum fit is a form of multiset multivariate curve resolution. It estimates a separate elution profile on each sample’s scan grid and a common mass spectrum per compound. Historical names for this approach to resolving mixtures include self-modelling curve resolution (SMCR) and self-modelling mixture analysis (SMMA). The fit here uses log-concave profiles, allows retention-time drift and selects compounds, sample occurrences and spectral ions by GIC. These simulated counts use quasi-Poisson noise. Camp · Lawton & Sylvestre
CANDECOMP (canonical decomposition) and PARAFAC (parallel factor analysis) are two names for the same tensor decomposition, usually abbreviated CP. Each compound contributes one time profile, one spectrum and an injection-specific amplitude. Flexible PARAFAC2 allows sample-specific profiles and penalises deviations from a common profile matrix after orthogonal transformation. Cohen & Bro · Kolda & Bader
The R ALS package takes starting concentrations. Its data-only runs here used NNDSVD and the package’s spectra-first update and stopping tolerance. The original MATLAB toolbox gives the analyst SVD and EFA diagnostics for choosing the rank. Its data-only runs used the authors’ pure-variable initialisation. Both MCR solvers used nonnegativity and per-injection unimodality. For a reproducible automatic comparison we applied the same permutation rule to both. We permuted scan order independently within each sample and ion 19 times and retained consecutive singular values above their pointwise 95th-percentile null values. We compared the covariance and correlation versions. Channel standardisation affects only this rank diagnostic. R ALS manual · MCR-ALS 2.0 toolbox
Sample 002 on its own
| Rank and start | Solver | Rank | Interior TP | Real tails | Unassigned (FP) | Median absolute area error, % [P25, P75] | Range, % | Acid area / truth | Seconds |
|---|---|---|---|---|---|---|---|---|---|
| Automatic, calibrated PSF | GCMSprime | 8 | 8/8 | 0 | 0 | 1.73 [1.19, 2.82] | 0.193–9.66 | 98.34% | — |
| Covariance, data-only | R ALS | 4 | 4/8 | 0 | 0 | 32.79 [25.38, 71.93] | 4.89–187.58 | 0.00% | 0.33 |
| Covariance, data-only | MCR-ALS 2.0 | 4 | 4/8 | 0 | 0 | 19.78 [7.63, 60.07] | 3.72–148.43 | 0.00% | 31.45 |
| Correlation, data-only | R ALS | 7 | 6/8 | 0 | 1 | 29.11 [11.15, 30.99] | 4.06–147.76 | 0.00% | 0.50 |
| Correlation, data-only | MCR-ALS 2.0 | 7 | 7/8 | 0 | 0 | 4.09 [1.99, 13.80] | 0.702–30.54 | 0.00% | 31.92 |
| Interior count supplied, data-only | R ALS | 8 | 7/8 | 0 | 1 | 30.22 [15.14, 32.20] | 1.86–136.96 | 66.61% | 0.14 |
| Interior count supplied, data-only | MCR-ALS 2.0 | 8 | 8/8 | 0 | 0 | 7.14 [2.64, 9.20] | 0.920–110.77 | 210.77% | 27.05 |
Area errors are percentages of the true area for the correctly detected interior peaks in the TP column. Brackets give the 25th and 75th percentiles. The range gives the smallest and largest errors. Real tails come from identified compounds with an apex outside the window. The single-sample GCMSprime run overlapped a website build, so its time is omitted.
The pure-variable MCR-ALS fit identified all eight compounds when given the interior count. It assigned 211% of the true acid area to the acid factor, with a second contribution on its leading edge. Neither automatic rank diagnostic recovered the acid in this single injection.
With the interior rank supplied and data-only starts, R ALS recovered seven of the eight peaks in sample 002 with a median absolute area error of 30.22% [15.14%, 32.20%]. MCR-ALS 2.0 recovered all eight with 7.14% [2.64%, 9.20%]. GCMSprime selected rank eight automatically, recovered all eight with zero unassigned calls, and gave 1.73% [1.19%, 2.82%] median absolute area error and 98.34% acid area recovery.
All 16 samples fitted together
| Rank and start | Solver | Rank | Interior TP | Real tails | Unassigned (FP) | Median absolute area error, % [P25, P75] | Range, % | Acid area / truth | Seconds |
|---|---|---|---|---|---|---|---|---|---|
| Automatic, calibrated PSF | GCMSprime | 19 | 120/120 | 21 | 0 | 0.160 [0.078, 0.408] | 0.0013–2.11 | 99.74% | 331.73 |
| Covariance, data-only | R ALS | 6 | 48/120 | 0 | 45 | 24.43 [7.06, 69.56] | 0.529–571.78 | 0.00% | 13.09 |
| Covariance, data-only | MCR-ALS 2.0 | 6 | 48/120 | 0 | 45 | 21.71 [14.19, 44.85] | 0.315–399.49 | 0.00% | 36.56 |
| Correlation, data-only | R ALS | 16 | 120/120 | 11 | 57 | 2.68 [0.812, 4.89] | 0.035–34.78 | 101.62% | 80.98 |
| Correlation, data-only | MCR-ALS 2.0 | 16 | 120/120 | 5 | 16 | 2.03 [1.18, 4.27] | 0.118–16.04 | 101.95% | 89.55 |
| Interior count supplied, data-only | R ALS | 15 | 120/120 | 7 | 49 | 2.40 [1.10, 5.41] | 0.039–35.35 | 102.88% | 59.95 |
| Interior count supplied, data-only | MCR-ALS 2.0 | 15 | 120/120 | 4 | 13 | 1.99 [1.09, 3.82] | 0.023–16.10 | 102.57% | 84.91 |
Standardising ion variances before rank selection changed the estimated count from 6 to 16. Both MCR implementations then recovered all 120 interior occurrences. R ALS also called 57 occurrences without a corresponding interior compound or identifiable tail. For the MATLAB toolbox this count was 16. With the interior rank of 15 supplied, their median absolute area errors were 2.40% [1.10%, 5.41%] for R ALS and 1.99% [1.09%, 3.82%] for MCR-ALS. Some factors can account for genuine signal from beyond either window boundary.
For comparison, the calibrated GCMSprime fit selected 19 factors, recovered 120/120 interior occurrences and assigned its 21 additional calls to identifiable tails, leaving zero unassigned calls. Median absolute area error was 0.160% [0.078%, 0.408%] across all 120 interior occurrences, and median acid area recovery across the eight positive injections was 99.74%. Scoring just the same eight peaks in sample 002 gives 0.636% area error in the joint fit, compared with 1.73% when that injection was analysed alone. With data-only starting factors and the interior count supplied, the corresponding joint-fit errors for those same eight peaks were 4.09% for R ALS and 1.738% for MCR-ALS 2.0. The latter matches the accuracy of the automatic single-sample GCMSprime fit on this window. Reading the window CDFs, estimating the dictionary, fitting and exporting the batch took 331.73 s, with another 5.63 s to calibrate the independent PSF standard. Reference fits, settings and timing scopes

Both panels show the same acid in sample 002. Sharing the spectra across injections changed the recovered area from 66.61% to 110.33% for R ALS and from 210.77% to 102.40% for MCR-ALS 2.0. The tables summarise the acid ratio across the positive injections in each fit. We matched shared spectra to interior identities one-to-one at cosine ≥0.70, then called an occurrence above 1% of that factor’s largest area across the selected injections. In the single sample this includes each positive factor. An extra call counted as a real tail if both its spectral and temporal cosines reached 0.70 against a distinct outside-window compound contributing at least one count. Area accuracy is scored on true-positive interior occurrences. Acid area recovery is scored across all injections in which the acid was present. Timings are single serial measurements on the benchmark laptop (R 4.5.0, ALS 0.0.7, MATLAB R2025b, four MATLAB computational threads). They include rank diagnostics for automatic runs and process startup for MATLAB. Per-occurrence results and solver-only timings
Solver controls using GCMSprime initialisation
How much does the choice of starting spectrum and background affect
the subsequent fit? For this control, GCMSprime supplied the starting
factors. For sample 002 it used an independently measured PSF standard
and the observed counts of that injection alone. Its grouped PSF fit
(splogconNMF) produced eight candidate
spectra, their elution profiles and an estimated background.
All eight spectra were passed to the MCR methods. For the batch,
GCMSprime constructed 27 cross-sample candidates before
shared-factor refinement. We supplied 19 to each
solver, choosing successively by total area times the squared length of
the unit spectrum after projection away from the spectra already chosen.
Simulated spectra and true areas were used only for scoring.
Each solver fitted the observed counts after subtracting the GCMSprime background. R ALS used the prepared spectra and profiles and updated profiles first. MCR-ALS 2.0 started from the prepared spectra. The tensor controls used the spectra and profiles to initialise their factors. The times below start with the prepared factors. Constructing them took 219.76 s for sample 002 and 283.99 s for the batch in the instrumented run, with the PSF standard already calibrated.
| Data passed to GCMSprime | Refinement solver | Rank supplied | Interior TP | Real tails | Unassigned (FP) | Median absolute area error, % [P25, P75] | Range, % | Acid area / truth | Refinement (s) |
|---|---|---|---|---|---|---|---|---|---|
| Sample 002 | R ALS | 8 | 8/8 | 0 | 0 | 1.91 [0.244, 3.50] | 0.080–8.55 | 104.69% | 0.06 |
| Sample 002 | MCR-ALS 2.0 | 8 | 8/8 | 0 | 0 | 0.440 [0.166, 1.66] | 0.110–8.80 | 100.52% | 23.72 |
| 16 samples | R ALS | 19 | 120/120 | 22 | 34 | 1.36 [0.633, 2.72] | 0.016–18.29 | 98.35% | 8.12 |
| 16 samples | MCR-ALS 2.0 | 19 | 120/120 | 20 | 15 | 1.21 [0.711, 2.68] | 0.020–56.27 | 96.94% | 54.08 |
| 16 samples | CP | 19 | 115/120 | 5 | 29 | 8.62 [4.40, 17.08] | 0.157–93.76 | 74.40% | 4.50 |
| 16 samples | Flexible PARAFAC2 | 19 | 111/120 | 5 | 56 | 17.63 [7.98, 28.41] | 0.565–94.35 | 76.07% | 12.59 |
In sample 002, GCMSprime followed by MCR-ALS recovered all eight compounds with 0.44% median absolute area error and 100.52% acid area recovery. The corresponding figures for MCR-ALS started from its own pure-variable estimates at the same rank were 7.14% and 210.77%. The control measures how well each solver refines an already resolved set of spectra, given the GCMSprime background and component count. The raw-data results above measure performance with each method’s data-only initialisation.
Covering a full chromatogram
A 10,000-scan chromatogram takes 133 windows of 150 scans at a stride of 75, placing the last window flush with the chromatogram end. At the measured data-only, supplied-rank rates, fitting one injection at rank eight would take 19 s with R ALS or 60 min with MCR-ALS 2.0. Fitting the entire 16-injection batch jointly at rank 15 would take 2.21 h or 3.14 h, respectively. These are serial projections from one acid-containing window. They exclude window reconciliation and assume the same rank, overlap and convergence time in every window. The MATLAB projection includes a fresh process per window. Using just its measured pure-variable initialisation and numerical solve gives 18 min for one injection and 2.44 h for the joint batch before I/O and stitching.
We also timed a complete 10,000 × 550 chromatogram (sample 002) directly. With rank 100 and the spectrum of the brightest scan in each of 100 equal scan intervals as a start, both R ALS and MCR-ALS 2.0 exceeded a 60-second fitting deadline on this machine. The clock began with the observed matrix and starting spectra already in memory. The MATLAB measurement includes startup. Deadline results and reproducible test
There is a separate algebraic limit to rank selection by SVD.
Stacking 16 chromatograms gives a 160,000 × 550 matrix
with at most 550 singular directions. Tauler’s toolbox
uses the requested number of columns of the economy SVD in its PCA
reproduction step. Asking its original pcarep for rank
1,000 on a 600 × 550 matrix failed when the requested index range
exceeded 550. The same dimension bound holds on the full stack. Local
elution support and cross-sample matching can distinguish 1,000
chemical identities even when the augmented matrix has at most
550 independent spectral directions. This bound applies specifically to
an SVD-derived count and to this toolbox PCA step. It places no
universal ceiling of 550 on a structured, overcomplete factorisation. Recorded
toolbox diagnostic
Reproduce the window comparisons in R
remotes::install_github("tomwenseleers/logconNMF", subdir = "NMFbenchmarks",
dependencies = TRUE)
library(NMFbenchmarks)
one <- benchmarkNMFWindow(2, "ALS", rank = "parallel_cor", unimodal = TRUE)
joint <- benchmarkNMFWindow(1:16, "ALS", rank = "parallel_cor", unimodal = TRUE)
one$summary
joint$summary
installNMFtoolbox("MCR-ALS") # once, with MATLAB installed
benchmarkNMFWindow(2, "MCR-ALS", rank = 8, unimodal = TRUE)$summaryTo use the authors’ SVD or EFA workflow interactively, export the
observed matrices with writeMCRProject() and open the
generated script in MATLAB. The companion package also includes the
original flexible PARAFAC2 adapter, the nonnegative CP control, supplied
PSF starts and scripts for the full comparison. GCMSbenchmark accepts
all four methods for user-supplied ANDI-MS files. NMFbenchmarks
· GCMSbenchmark
Earlier attempts at automatic NMF or NTF best rank recovery
logconNMF estimates the rank from the ion data in two stages. First, L0glm regresses each chromatogram on shifted copies of the time-varying PSF. It selects peak positions jointly across ions with a grouped L₀ penalty, solving a sequence of convex, adaptively weighted ridge subproblems. After alignment, logconNMF alternates updates of the shared spectra and the sample-specific log-concave profiles. Its active-set search can drop a weak component, add a residual-supported candidate or fuse overlapping neighbours. A change is accepted only if it lowers the generalised information criterion (GIC) on the original ion channels. The penalty counts the free ion proportions in each shared spectrum and the degrees of freedom of each detected log-concave profile. Rank-selection objective
Among the published tests of conventional NMF on noisy simulated data that we reviewed, the largest rank recovered exactly was 150, which Squires et al. selected by minimum description length on a 1,000 × 2,000 matrix. Squires et al., Figs. 1–2
In chromatographic applications of MCR-ALS, PARAFAC and PARAFAC2, analysts typically specify candidate ranks and inspect the fitted spectra, elution profiles and residuals. A common practice is to divide the chromatogram into windows containing roughly one to ten components. Bro & Kiers · Johnsen et al. · van Stokkum et al.
We found no earlier published demonstration of a simultaneous chromatographic factorisation that selected 1,000 distinct compounds and verified their identities across all 8,000 occurrences. For example, the PARAFAC2-based GC–MS workflow PARADISe fits one retention window at a time. By default it evaluates models with one to eight components per window, including any components used for the baseline. The user can raise that upper limit. The rank of 1,000 recovered across the full batch is 125 times the default upper rank for a single PARADISe window. Johnsen et al. · PARADISe protocol, §12.1
Commercial GC–MS software
The vendor guides reviewed here do not specify a preset objective for deciding whether a better fit to the original ion counts justifies another compound, a more complex profile or additional fragment ions. Users can set peak width, height, area and signal-to-noise thresholds in AnalyzerPro. In MassHunter, the correlation window affects how many neighbouring peaks are resolved. These choices can change the peak list. The nine commercial workflows reviewed have no published result on these 16 chromatograms against which to compare rank recovery, false calls or area accuracy. Agilent MassHunter, p. 27 · SpectralWorks AnalyzerPro
In an independent GC–TOF-MS experiment, Lu et al. found that component width was the most influential setting for the versions of AnalyzerPro, ChromaTOF and AMDIS they tested. Some modern products use information across injections. LECO ChromaTOF Sync, for example, co-processes sample sets, although its public description leaves the criterion for selecting the batch compound count unspecified. LECO ChromaTOF Sync · Lu et al.
Vendor documentation for the nine workflows reviewed
- ACD/Labs Spectrus (MS Structure ID Suite)
- Agilent MassHunter Unknowns Analysis
- LECO ChromaTOF / ChromaTOF Sync
- Markes / SepSolve ChromSpace 1D
- MsMetrix GC-Analyzer / GCxGC-Analyzer
- Shimadzu LabSolutions Insight Explore GCMS
- SpectralWorks AnalyzerPro
- Thermo Scientific TraceFinder
- Wiley KnowItAll GC Expert / MS Expert
100-sample scalability benchmark
The 100 full chromatograms contained 10,000 scans and 550 channels each. Every one of the 5,000 distinct simulated compounds occurred in ten randomly chosen samples. This held the mean density at 500 peaks per sample (452–539) while reducing the proportion of samples containing each compound from 50% to 10%. The fitter received the CDFs and an independent PSF standard. The spectral library, retention-index scoring key and true profiles were reserved for simulation and validation. It used 32 initial mass-channel groups, original-ion refinement and automatic local rank search.
| Quantity | Result |
|---|---|
| True / estimated shared rank | 5,000 / 5,003 |
| True compounds with at least one reciprocal detection | 5,000 / 5,000 |
| True positive / false positive / missed occurrences | 50,000 / 1 / 0 |
| Sensitivity / precision | 100% / 99.998% |
| Shark-fin acid occurrences recovered | 500 / 500 |
| Median absolute peak area error, matched peaks (% [P25, P75]) | 0.062 [0.028, 0.119] |
| Median absolute peak area error, matched acids (% [P25, P75]) | 0.066 [0.027, 0.133] |
| Original-ion quasi-GIC | 243,809,331.9 |
| Elapsed time per sample / whole batch | 80.15 s / 133.58 min |
| Sampled peak process-tree working set | 8.095 GiB |
The run used 16 logical processors and included PSF calibration, reading the CDFs, building the dictionary, rank search and native exports. Truth scoring ran afterwards. The GCMSbenchmark scorer compared every called spectrum to all 5,000 references in each of the 100 samples and awarded one credit per reciprocal match within ±30 retention-index units at cosine ≥0.70. The shared rank counts fitted spectral factors across the batch. For 4,997 compounds, a single fitted factor accounted for all ten occurrences. The other three compounds each received two identities across their ten positive samples (9 + 1, 9 + 1 and 8 + 2). The one false-positive occurrence was a call for compound 4,886 in sample 29, where it was absent. Simulation, code and measured results







