Use when after solving for the concentration distribution matrix C using
Scanned 9/12/2026
Install to Claude Code
npx -y skills add HolobiomicsLab/asb-skill-collections --skill overlapped-peak-deconvolution-validation --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Overlapped Peak Deconvolution Validation?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/holobiomicslab-overlapped-peak-deconvolution-validation)More formats (shields.io, HTML) on the badges page.
---
name: overlapped-peak-deconvolution-validation
description: Use when after solving for the concentration distribution matrix C using
least squares optimization (minimize ||overlapped_peaks - S·C||²), validate that
the solution is physically meaningful and numerically accurate by checking whether
S·C faithfully reconstructs the input overlapped peak.
license: CC-BY-4.0
metadata:
edam_operation: http://edamontology.org/operation_3629
edam_topics:
- http://edamontology.org/topic_3172
- http://edamontology.org/topic_0091
tools:
- PyTorch
- Python 3
- NumPy
- GCMSFormer
techniques:
- GC-MS
license_tier: open
provenance_tier: literature
derived_from:
- doi: 10.1021/acs.analchem.3c05772
title: GCMSFormer
evidence_spans:
- '[pytorch](https://pytorch.org/)'
- '[python3](https://www.python.org/)'
claims: []
provenance:
collection: https://w3id.org/holobiomicslab/asb-skill/collection/metabolomics/v2
assembled_by: scripts/collect_metabolomics_collection.py
sources:
- build: coll_gcmsformer_cq
doi: 10.1021/acs.analchem.3c05772
title: GCMSFormer
dedup_kept_from: coll_gcmsformer_cq
schema_version: 0.2.0
attribution:
generator: AgenticScienceBuilder
original_doi: 10.1021/acs.analchem.3c05772
all_source_dois:
- 10.1021/acs.analchem.3c05772
zenodo_doi: 10.5281/zenodo.20794027
curators: []
promoter: Louis-Félix Nothias
sponsor: CNRS & Université Côte d'Azur
---
# overlapped-peak-deconvolution-validation
## Summary
Validates the deconvolution of overlapped GC-MS peaks by reconstructing the original overlapped intensity data from the predicted mass spectral matrix S and solved concentration distribution matrix C, then comparing the reconstruction against measured overlapped peak data. This post-hoc validation confirms that the least squares solution correctly decomposes the mixture.
## When to use
After solving for the concentration distribution matrix C using least squares optimization (minimize ||overlapped_peaks - S·C||²), validate that the solution is physically meaningful and numerically accurate by checking whether S·C faithfully reconstructs the input overlapped peak intensities. Use this skill when you need confidence that the deconvolution workflow has correctly separated component spectra and their relative abundances.
## When NOT to use
- The concentration matrix C has not yet been computed; perform least squares solve first.
- The input overlapped peaks are known to contain systematic noise or artifacts unrelated to the mixture model; residuals will be inflated and validation will be inconclusive.
- The mass spectral matrix S was not generated by the same GCMSFormer model or OPR method; mismatched peak dictionaries will cause validation to fail spuriously.
## Inputs
- resolved mass spectral matrix S (m × n matrix, m mass-to-charge ratios × n components)
- solved concentration distribution matrix C (n components × p time/scan points)
- input overlapped peak intensity data (m × p matrix, same shape as S·C)
## Outputs
- reconstructed overlapped peak intensity matrix (m × p, = S·C)
- residual error matrix (m × p, element-wise difference)
- scalar reconstruction error metric (e.g., mean squared error, L2 norm, or relative error)
## How to apply
Reconstruct the overlapped peak intensity data by computing the matrix product S·C, where S is the resolved mass spectral matrix (output from GCMSFormer) and C is the solved concentration distribution. Compare the reconstructed overlapped peaks element-wise against the input overlapped peak intensity data. Compute residual error (e.g., mean squared error or L2 norm of the difference) to quantify reconstruction fidelity. If residual error is negligible relative to the input peak intensities, the deconvolution is validated; large residuals indicate poor fit or numerical instability in the least squares solve step. Document the residual magnitude and any systematic deviations (e.g., negative concentrations, which are unphysical).
## Related tools
- **PyTorch** (matrix multiplication and tensor operations for computing S·C and residuals) — https://pytorch.org/
- **NumPy** (least squares solver (numpy.linalg.lstsq) and numerical error computation)
- **GCMSFormer** (predicts the mass spectral matrix S via Transformer model and orthogonal projection resolution) — https://github.com/zxguocsu/GCMSFormer
## Examples
```
import numpy as np; S_pred = model.predict(overlapped_input); C_solved = np.linalg.lstsq(S_pred, overlapped_peaks, rcond=None)[0]; reconstructed = S_pred @ C_solved; residual = np.linalg.norm(overlapped_peaks - reconstructed) / np.linalg.norm(overlapped_peaks); print(f'Relative reconstruction error: {residual:.4f}')
```
## Evaluation signals
- Reconstruction error (||overlapped_peaks - S·C||²) is small relative to the L2 norm of input overlapped_peaks (e.g., relative error < 5%).
- No negative or physically implausible values appear in the reconstructed peak intensity matrix.
- Residual matrix is approximately uniformly distributed around zero with no systematic bias toward over- or under-prediction.
- Reconstruction error is comparable to or smaller than the measurement noise floor of the GC-MS instrument.
- Visual overlay of reconstructed vs. input overlapped peaks shows close agreement across all mass-to-charge ratios and time points.
## Limitations
- Validation only confirms that the least squares solution reproduces the input overlapped peaks; it does not verify that the predicted pure mass spectra S are correct without reference to authentic standards.
- Residual error depends critically on the quality of the GCMSFormer predictions; if S contains systematic errors (e.g., missing peaks, incorrect isotope patterns), even a perfect least squares solve will fail validation.
- Overlapped peak data containing outliers, instrumental artifacts, or baseline drift will inflate residuals and may lead to false rejection of valid solutions.
- The method assumes the linear mixture model S·C is appropriate; deviations due to non-linear detector response or ion suppression effects will not be detected by this validation.
## Evidence
- [other] Validate the solution by reconstructing the overlapped peaks as S·C and comparing with the input overlapped data.: "Validate the solution by reconstructing the overlapped peaks as S·C and comparing with the input overlapped data."
- [readme] GCMSFormer can predict the pure mass spectra of all components in overlapped peaks (mass spectral matrix S), and then use the least squares method to find the concentration distribution matrix C.: "GCMSFormer can predict the pure mass spectra of all components in overlapped peaks (mass spectral matrix S), and then use the least squares method to find the concentration distribution matrix C."
- [other] minimize ||overlapped_peaks - S·C||² where C is the unknown concentration distribution.: "minimize ||overlapped_peaks - S·C||² where C is the unknown concentration distribution."
- [readme] With the aid of the orthogonal projection resolution method (OPR), GCMSFormer can predict the pure mass spectra of all components in overlapped peaks: "With the aid of the orthogonal projection resolution method (OPR), GCMSFormer can predict the pure mass spectra of all components in overlapped peaks"
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!