peak-table-extraction
Summary
Extract and annotate spectral peaks into tabular form from NMR/IR/MS spectral files (jcamp, RAW, mzML). This skill parses vendor-agnostic or vendor-specific spectral data, identifies peak positions and intensities, and produces structured peak tables suitable for downstream analysis or visualization.
When to use
Apply this skill when you have raw or converted spectral data (jcamp, RAW, or mzML format) from NMR, IR, or MS instruments and need to identify individual peaks, extract their properties (chemical shift, m/z, intensity, width), and generate a structured peak table for annotation, comparison, or publication.
When NOT to use
- Input is already a pre-processed feature table or peak list (e.g., from external metabolomics software); use direct import instead.
- Spectral data is severely corrupted, truncated, or in an unsupported format not listed (jcamp, RAW, mzML).
- Analysis goal is raw spectral comparison or fingerprinting without peak identification; consider direct spectral alignment or dot-product matching instead.
Inputs
- jcamp spectral file (.dx or .jdx format)
- RAW vendor-specific spectral file (Orbitrap, Bruker, Agilent, Waters format)
- mzML mass spectrometry data file
- Parsed spectral data structure with metadata and intensity arrays
Outputs
- Peak table (CSV or tabular format with columns: m/z or ppm, intensity, line width, assignment)
- Annotated JCAMP file with peak table metadata embedded
- PNG image rendering with annotated peaks overlaid on spectrum
How to apply
Parse the input spectral file using the chem-spectra-app file parser to validate format and extract spectral metadata and raw data arrays. For vendor-specific RAW formats, route through proteowizard/pwiz-skyline via Docker (msconvert_docker service) to normalize to an intermediate representation. Identify peaks by applying spectral feature detection (local maxima, intensity thresholding, or deconvolution as implemented in chem-spectra-app). Extract each peak's position (chemical shift in ppm or m/z in Da), intensity (height or area), and optional line width or signal-to-noise ratio. Serialize the peak list into a structured table format (e.g., CSV or embedded in JCAMP output) with columns for chemical shift/m/z, intensity, assignment, and confidence. Validate that peak count and positions are consistent with the input spectral baseline and signal intensity distribution.
Related tools
- chem-spectra-app (Core file parser and peak detection engine; validates input spectral formats and extracts peak lists and metadata) — https://github.com/ComPlat/chem-spectra-app
- proteowizard/pwiz-skyline (Vendor-specific RAW file format decoder; normalizes Orbitrap, Bruker, Agilent, Waters formats via msconvert)
- Docker (msconvert_docker service) (Containerized service runner for proteowizard; isolates vendor library dependencies)
- Flask (HTTP API framework; serves /api/v1/chemspectra/file/convert and /zip_jcamp_n_img endpoints for peak extraction requests) — https://github.com/ComPlat/chem-spectra-app
- Python 3 (Implementation language for file parsing, peak detection, and table serialization logic)
Examples
curl -X POST http://localhost:3007/api/v1/chemspectra/file/convert -F 'file=@sample.jdx' | jq '.peak_table'
Evaluation signals
- Peak table row count matches expected number of spectral features (validate against manual inspection or literature baseline for reference compounds).
- Peak positions (ppm or m/z values) align with known chemical shift or mass ranges for target analyte class (e.g., aromatic 1H NMR 7–8 ppm, aliphatic 0–3 ppm).
- Peak intensity distribution is consistent with baseline-corrected spectral amplitude (no negative intensities, max intensity ≤ 100% normalized scale).
- Output JCAMP file is well-formed (parseable by downstream tools; metadata headers present and non-empty).
- Generated PNG visualization correctly overlays annotated peaks on spectrum without misalignment or clipping.
Limitations
- Peak detection accuracy depends on spectral signal-to-noise ratio; weak peaks or overlapping multiplets may be missed or merged.
- RAW file support is limited to formats recognized by proteowizard/pwiz-skyline; newer vendor formats may require library updates.
- mzML import assumes standards-compliant encoding; malformed or non-standard mzML files may fail to parse.
- Chemical shift assignment (e.g., 1H → carbon chain or aromatic group) is not automatic; peak table contains position and intensity only unless external reference library is provided.
Evidence
- [other] Extract spectral peaks and generate peak tables from the parsed data.: "Extract spectral peaks and generate peak tables from the parsed data."
- [other] Parse and validate the input spectral file format using the chem-spectra-app file parser.: "Parse and validate the input spectral file format using the chem-spectra-app file parser."
- [other] Parse and validate the input file format using proteowizard/pwiz-skyline via the Docker msconvert_docker service to handle vendor-specific RAW formats.: "Parse and validate the input file format using proteowizard/pwiz-skyline via the Docker msconvert_docker service to handle vendor-specific RAW formats."
- [readme] This backend web service provides NMR/IR/MS processing for jcamp/RAW/mzML files.: "This backend web service provides NMR/IR/MS processing for jcamp/RAW/mzML files."
- [other] Create modified JCAMP output file(s) incorporating the peak table annotations.: "Create modified JCAMP output file(s) incorporating the peak table annotations."
1---2name: peak-table-extraction3description: Use when you have raw or converted spectral data (jcamp, RAW, or mzML format) from NMR, IR, or MS instruments and need to identify individual peaks, extract their properties (chemical shift, m/z, intensity, width), and generate a structured peak table for annotation, comparison, or publication.4license: CC-BY-4.05---67# peak-table-extraction89## Summary1011Extract and annotate spectral peaks into tabular form from NMR/IR/MS spectral files (jcamp, RAW, mzML). This skill parses vendor-agnostic or vendor-specific spectral data, identifies peak positions and intensities, and produces structured peak tables suitable for downstream analysis or visualization.1213## When to use1415Apply this skill when you have raw or converted spectral data (jcamp, RAW, or mzML format) from NMR, IR, or MS instruments and need to identify individual peaks, extract their properties (chemical shift, m/z, intensity, width), and generate a structured peak table for annotation, comparison, or publication.1617## When NOT to use1819- Input is already a pre-processed feature table or peak list (e.g., from external metabolomics software); use direct import instead.20- Spectral data is severely corrupted, truncated, or in an unsupported format not listed (jcamp, RAW, mzML).21- Analysis goal is raw spectral comparison or fingerprinting without peak identification; consider direct spectral alignment or dot-product matching instead.2223## Inputs2425- jcamp spectral file (.dx or .jdx format)26- RAW vendor-specific spectral file (Orbitrap, Bruker, Agilent, Waters format)27- mzML mass spectrometry data file28- Parsed spectral data structure with metadata and intensity arrays2930## Outputs3132- Peak table (CSV or tabular format with columns: m/z or ppm, intensity, line width, assignment)33- Annotated JCAMP file with peak table metadata embedded34- PNG image rendering with annotated peaks overlaid on spectrum3536## How to apply3738Parse the input spectral file using the chem-spectra-app file parser to validate format and extract spectral metadata and raw data arrays. For vendor-specific RAW formats, route through proteowizard/pwiz-skyline via Docker (msconvert_docker service) to normalize to an intermediate representation. Identify peaks by applying spectral feature detection (local maxima, intensity thresholding, or deconvolution as implemented in chem-spectra-app). Extract each peak's position (chemical shift in ppm or m/z in Da), intensity (height or area), and optional line width or signal-to-noise ratio. Serialize the peak list into a structured table format (e.g., CSV or embedded in JCAMP output) with columns for chemical shift/m/z, intensity, assignment, and confidence. Validate that peak count and positions are consistent with the input spectral baseline and signal intensity distribution.3940## Related tools4142- **chem-spectra-app** (Core file parser and peak detection engine; validates input spectral formats and extracts peak lists and metadata) — https://github.com/ComPlat/chem-spectra-app43- **proteowizard/pwiz-skyline** (Vendor-specific RAW file format decoder; normalizes Orbitrap, Bruker, Agilent, Waters formats via msconvert)44- **Docker (msconvert_docker service)** (Containerized service runner for proteowizard; isolates vendor library dependencies)45- **Flask** (HTTP API framework; serves /api/v1/chemspectra/file/convert and /zip_jcamp_n_img endpoints for peak extraction requests) — https://github.com/ComPlat/chem-spectra-app46- **Python 3** (Implementation language for file parsing, peak detection, and table serialization logic)4748## Examples4950```51curl -X POST http://localhost:3007/api/v1/chemspectra/file/convert -F 'file=@sample.jdx' | jq '.peak_table'52```5354## Evaluation signals5556- Peak table row count matches expected number of spectral features (validate against manual inspection or literature baseline for reference compounds).57- Peak positions (ppm or m/z values) align with known chemical shift or mass ranges for target analyte class (e.g., aromatic 1H NMR 7–8 ppm, aliphatic 0–3 ppm).58- Peak intensity distribution is consistent with baseline-corrected spectral amplitude (no negative intensities, max intensity ≤ 100% normalized scale).59- Output JCAMP file is well-formed (parseable by downstream tools; metadata headers present and non-empty).60- Generated PNG visualization correctly overlays annotated peaks on spectrum without misalignment or clipping.6162## Limitations6364- Peak detection accuracy depends on spectral signal-to-noise ratio; weak peaks or overlapping multiplets may be missed or merged.65- RAW file support is limited to formats recognized by proteowizard/pwiz-skyline; newer vendor formats may require library updates.66- mzML import assumes standards-compliant encoding; malformed or non-standard mzML files may fail to parse.67- Chemical shift assignment (e.g., 1H → carbon chain or aromatic group) is not automatic; peak table contains position and intensity only unless external reference library is provided.6869## Evidence7071- [other] Extract spectral peaks and generate peak tables from the parsed data.: "Extract spectral peaks and generate peak tables from the parsed data."72- [other] Parse and validate the input spectral file format using the chem-spectra-app file parser.: "Parse and validate the input spectral file format using the chem-spectra-app file parser."73- [other] Parse and validate the input file format using proteowizard/pwiz-skyline via the Docker msconvert_docker service to handle vendor-specific RAW formats.: "Parse and validate the input file format using proteowizard/pwiz-skyline via the Docker msconvert_docker service to handle vendor-specific RAW formats."74- [readme] This backend web service provides NMR/IR/MS processing for jcamp/RAW/mzML files.: "This backend web service provides NMR/IR/MS processing for jcamp/RAW/mzML files."75- [other] Create modified JCAMP output file(s) incorporating the peak table annotations.: "Create modified JCAMP output file(s) incorporating the peak table annotations."