agentsclimarketplace

Jcamp file parsing

Skill HolobiomicsLab/asb-skill-collections/collections/metabolomics/v2/skills/jcamp-file-parsing

Use when you receive uploaded spectral data in JCAMP format (jcamp) as input to the /api/v1/chemspectra/file/convert endpoint, or when you need to extract and validate metadata and peak information from an existing JCAMP file before converting to another format or performing spectral analysis.From its SKILL.md

Install
npx -y skills add HolobiomicsLab/asb-skill-collections --skill jcamp-file-parsing

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 15 stars15 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its file declares

Copied from the file, not written here

The file declares its own license as CC-BY-4.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

7.1 KB, ~1.2k tokens by cl100k_base, as published. Nobody here has run it

jcamp-file-parsing

Summary

Parse and validate JCAMP spectral files received via HTTP POST to the ChemSpectra App file-conversion API, extracting metadata and spectral parameters for standardized internal representation. This skill is essential when ingesting vendor-neutral NMR/IR/MS data in JCAMP format for downstream spectral processing and format conversion.

When to use

Apply this skill when you receive uploaded spectral data in JCAMP format (jcamp) as input to the /api/v1/chemspectra/file/convert endpoint, or when you need to extract and validate metadata and peak information from an existing JCAMP file before converting to another format or performing spectral analysis.

When NOT to use

  • Input file is in RAW or mzML format — use vendor-specific or proteowizard-based parsing instead.
  • JCAMP file is already embedded in a serialized database record — extract the file first before parsing.
  • Metadata validation is not required and only raw binary spectral arrays are needed — use direct array extraction without full JCAMP parsing.

Inputs

  • JCAMP spectral file (binary or text format)
  • HTTP POST request body containing uploaded JCAMP file
  • JCAMP metadata headers (e.g., TITLE, JCAMP-DX, DATATYPE)
  • JCAMP data blocks (e.g., NMR, IR, MS spectral arrays)

Outputs

  • Parsed spectral metadata (sample name, acquisition parameters, spectral type)
  • Extracted peak table (chemical shifts, intensities, multiplicities for NMR)
  • Standardized internal spectral representation
  • Validated JCAMP structure (confirmed header and data block integrity)

How to apply

Receive the JCAMP file as part of an HTTP POST request to the file-conversion endpoint. Parse the JCAMP format using the ChemSpectra App backend parser (built into the Flask service) to extract spectral metadata (e.g., sample name, acquisition parameters, spectral type) and peak tables. Validate that required JCAMP header fields and data blocks are present and correctly formatted. Convert the parsed JCAMP data into the backend's standardized internal representation for NMR/IR/MS spectral data. If the JCAMP file is well-formed and metadata is complete, proceed to serialization or further processing; if validation fails, return an error response indicating the parsing issue. The skill succeeds when metadata and peak tables are accurately extracted without data loss.

Related tools

Examples

curl -X POST http://localhost:3007/api/v1/chemspectra/file/convert -F '[email protected]'

Evaluation signals

  • Parsed metadata matches expected JCAMP header fields (TITLE, JCAMP-DX, DATATYPE, DATACLASS present and non-empty).
  • Extracted peak table contains same number and order of peaks as the original JCAMP data block (verified by count comparison).
  • Spectral parameters (frequency, nucleus type, solvent for NMR; resolution, range for IR) are correctly transferred to internal representation.
  • HTTP response status is 200 OK with converted file artifact when parsing succeeds; 4xx error when JCAMP structure is malformed.
  • No data truncation or loss in chemical shift values, intensities, or multiplicities during parsing and serialization.

Limitations

  • JCAMP variant/version differences may cause parsing failures if the backend does not support all JCAMP-DX versions or extensions.
  • Files with non-standard or corrupted JCAMP header lines will fail validation; error messages may not pinpoint the exact malformed field.
  • Large JCAMP files (many data points or complex peak structures) may incur parsing latency and consume significant memory during internal representation construction.
  • Metadata extraction assumes standard JCAMP naming conventions; custom or proprietary metadata fields in JCAMP files may be silently dropped.

Evidence

  • [other] Receive HTTP POST request containing an uploaded spectral file (jcamp, RAW, or mzML format) at the /api/v1/chemspectra/file/convert endpoint.: "Receive HTTP POST request containing an uploaded spectral file (jcamp, RAW, or mzML format) at the /api/v1/chemspectra/file/convert endpoint."
  • [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."
  • [other] Convert the spectral file to a standardized internal representation, extracting metadata and spectral parameters.: "Convert the spectral file to a standardized internal representation, extracting metadata and spectral parameters."
  • [intro] 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] Serialize the converted file to jcamp output format with peak tables and metadata.: "Serialize the converted file to jcamp output format with peak tables and metadata."

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.