dcat-ap-plus-chromatography
A LinkML extension of Chem-DCAT-AP for liquid and gas chromatography, with a computing layer that derives retention quantities from stated metadata, each with its unit, its uncertainty and its provenance.
Status: alpha. The schema and the interfaces may still change between minor versions.
Overview
The Data Catalog Vocabulary application profile extended by NFDI4Chem and NFDI4Cat (DCAT-AP-PLUS) and its chemistry extension, Chem-DCAT-AP, describe a dataset and the chemistry behind it in the Resource Description Framework (RDF). This package adds what a chromatographic dataset needs: the run, the column and its facets, the mobile phase and its program, the peaks, and the quantities measured or computed on them.
It then completes a catalogue by computation. Values the records do not state, but which follow from what they state (column volume, dwell time, retention factor, plate number, elution composition), are derived by published formulas. Each derived value carries its unit from Quantities, Units, Dimensions and Types (QUDT), its propagated standard uncertainty, and an activity of the PROV Ontology (PROV-O) that names the formula, its premises and its assumptions. A stated value is checked against the derived one and never overwritten. No reasoner is involved: every question receives a verdict, and a question that cannot be answered names what blocked it and what would unblock it.
The heavy computing (gradient elution, the fit of contact numbers, the carrier gas) runs in a Rust core compiled into every wheel.
Standards
| Standard | Role |
|---|---|
| DCAT-AP-PLUS 0.1.0rc4, Chem-DCAT-AP 0.1.0rc3 | imported profiles that the schema extends |
| LinkML | schema language; OWL, SHACL shapes, a JSON-LD context and pydantic models are generated from the schema |
| PROV-O | the activities behind runs, analyses and computed values |
| QUDT | units and quantity kinds |
| SHACL | validation of catalogues and of SciDatS metadata |
| SciDatS | parquet tables with DCAT-AP-PLUS metadata; the extension registers as a profile |
| TriG, JSON-LD | the RDF datasets the package writes |
Parts
| Part | Modules | What it does |
|---|---|---|
| Schema | schema |
47 classes, 48 slots and two enumerations: runs, columns as facets, mobile phases, peaks, measured and computed quantities with a standard uncertainty, peak tables, simulations, corroborations, computing steps and the sample role. Every class and slot has an IRI of its own. |
| Census and artefacts | census, artefacts |
Reports which distinctions of the schema the emitted RDF cannot carry. Generates OWL, SHACL shapes and a JSON-LD context from the emitted IRIs, and repairs three defects of the generated shapes. |
| Provenance and verdicts | provenance, verdicts |
Tags every value as stated by its source or supplied by a named convention. Gives every step of a question one verdict and names what blocked it. |
| Comparison | comparability, corroboration, linkage, retention |
Compares runs on stated facets under declared tolerances, and corroborates retention times at a declared floor. Links records by elimination on witnessed differences before any ranking. |
| Refinement | refinement, scores, admission |
Computes the nests, cells and pair statuses of a stage, and requirement levels from what each field does. Admits a new slot under six conditions and names it by the partition of the records it induces. |
| Publication | status, propagation |
Publishes a value only when it leads its best alternative, the candidate "none of these" included, by a threshold that bounds the probability of a wrong publication. Rules propagate published values. |
| Reading and storage | operations, identifiers, emission |
Reads records from their PROV-O and QUDT descriptions without a program. Keys a stage by the SHA-256 of its files and writes everything computed about it as one RDF dataset, in TriG and JSON-LD. The default graph of that dataset holds the published values only. |
| Computing steps | computing, main |
Computes nodes from stated nodes by published formulas: column volume, dwell time, retention factor, plate number, elution composition, and for gas chromatography the hold-up time of an open tube, the compressibility factor and the mean velocity. |
| Elution | transport, ladder, carrier |
Isocratic transport (retention law, plate height, resolution, peak capacity), gradient elution solved exactly for piecewise-linear programs, and the carrier gas as an ideal gas in viscous flow. |
| SciDatS files | profile, datamodel |
Registers the extension as a SciDatS profile, so that a SciDatS file carries a run, its analysis and its peaks as typed models of the extension. |
| Transfer and separation trees | contacts, branching, ranks |
Contact descriptions of columns and eluents, a response model that predicts elution orders for new descriptions, and separation trees that send the compounds one dimension leaves together to another. |
| Rust core | rust |
elute, elution-composition, retention-factor, carrier and contact-numbers, one answer or one refusal per record. |
The package does not read vendor files. An external converter, such as raw2dcat, writes the RDF descriptions that the package reads.
Installation
Python 3.13. Wheels for Linux, macOS and Windows carry the compiled Rust core.
pip install dcat-ap-plus-chromatography # the package
pip install "dcat-ap-plus-chromatography[scidats]" # and SciDatS files
pip install "dcat-ap-plus-chromatography[generators]" # and OWL, SHACL and context generation from the schema
Installing from the source distribution compiles the Rust core and needs a Rust toolchain.
Usage
Complete a catalogue by computing steps and write the stated and derived graphs as one dataset:
from pathlib import Path
from dcat_ap_plus_chromatography.main import complete_file
completion = complete_file(Path("catalogue.ttl"), Path("completed.trig"))
for node in completion.derived:
print(node.subject, node.slot, node.quantity)
for blocked in completion.declined:
print(blocked.subject, blocked.step, blocked.reason)
Write a peak table as a SciDatS file, with a PeakTableDataset of the extension as its metadata:
from scidats import SciDatS
from dcat_ap_plus_chromatography import profile
profile.register()
sd = SciDatS(dataframe=peaks) # one row per peak
profile.attach(sd, dataset) # validated by the extension's models
sd.write_parquet("peaks.scidats.parquet")
conforms, report = profile.validate(SciDatS(input_filename="peaks.scidats.parquet").graph)
Ask the Rust core directly; a record it cannot answer is refused with the reason:
from dcat_ap_plus_chromatography import rust
rust.ask("retention-factor", retention_time=4.2, hold_up_time=0.735) # {'retention_factor': 4.714...}
rust.ask("retention-factor", retention_time=4.2) # Refusal(label='absent', blocker='`hold_up_time` has no value', needs=None)
The formulas are also available in Python:
from dcat_ap_plus_chromatography import ladder
program = ladder.Program((0.0, 2.0, 17.0, 20.0), (0.05, 0.05, 0.999, 0.999))
ladder.elute(program, ladder.ContactNumbers(log_factor=3.0, sensitivity=12.0), holdup_time=0.735, dwell=1.0)
Results on public data
RepoRT datasets 0187–0196 hold one column and one program at five flow rates, in two ionisation modes. Contact numbers fitted on four flow rates predict the retention times of the fifth with a median absolute error of 0.013 min, over 690 analyte–mode pairs. The run, written as a SciDatS file, conforms to the extension's shapes, and computing steps complete it from the column dimensions RepoRT states. Notebook 20 reproduces this from the PyPI packages alone.
Documentation
The source repository holds the specification (23 parts, each with its rules, decisions and checks), 21 notebooks that show every part on synthetic records and on public retention data, and the changelog.
Data
Notebooks 14–17 and 19 read extracts of RepoRT (Kretschmer et al., Nature Methods 21, 153–155, 2024) in
docs/notebooks/data/report, licensed Creative Commons Attribution-ShareAlike 4.0
(CC BY-SA 4.0) as RepoRT is. Notebook 20
downloads the files it reads from RepoRT at a fixed commit.
Layout
The heavy computing runs in Rust. Python is the prototype, the reference the Rust code is tested against, and the language of the notebooks. TypeScript carries the web interface. The three share one version.
| Path | Language | What | Tool |
|---|---|---|---|
crates/chromatography-core/ |
Rust | elution, the contact ladder and its fit, the carrier gas, transport; the tool protocol as JSON in and out; no I/O | cargo |
crates/chromatography-tool/ |
Rust | the chromatography tool <name> command |
cargo |
crates/chromatography-wasm/ |
Rust | the core for browsers, through the same protocol | wasm-pack |
crates/chromatography-py/ |
Rust | the extension module dcat_ap_plus_chromatography._core, built by maturin into every wheel |
maturin |
packages/chromatography/ |
TypeScript | @dcat-ap-plus/chromatography: typed calls of the tools and an SVG figure of a program and its elutions |
npm |
src/dcat_ap_plus_chromatography/, tests/ |
Python 3.13 | the prototype and reference; schema, stage, emission | uv |
docs/notebooks/ |
Python | demonstrations | uv |
tests/fixtures/core/ |
JSON | values of the Python reference that the Rust and TypeScript tests must reproduce |
Development
Requires uv, the Rust toolchain pinned in rust-toolchain.toml,
wasm-pack and Node 20 or later.
# Python
uv sync # compiles the extension module from crates/chromatography-py with maturin
uv run pre-commit install --install-hooks
uv run ruff check .
uv run ruff format --check .
uv run zuban check
uv run pytest
uv run --group notebooks python docs/notebooks/build.py
uv run --group docs sphinx-build -W -b html docs docs/_build
# Rust
cargo fmt --all --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace
# WebAssembly and TypeScript (the build runs wasm-pack first)
npm ci
npm run build
npm run typecheck
npm test
After a change to a Python reference function, regenerate the fixtures with
uv run python scripts/generate_core_fixtures.py; a test fails while they are out of date. Commit messages follow
Conventional Commits; see
CONTRIBUTING.md.
Citation
Sachikonye, K. F. (2026). dcat-ap-plus-chromatography (version 0.1.1) [Software]. https://pypi.org/project/dcat-ap-plus-chromatography/
Acknowledgement
Kundai Farai Sachikonye, University of Greifswald. Developed within NFDI4Cat, the National Research Data Infrastructure for Catalysis-Related Sciences, funded by the German Research Foundation (DFG), project number 441926934.
Licence
MIT. The RepoRT extracts in docs/notebooks/data/report are CC BY-SA 4.0.
Metadata
Release files for dcat-ap-plus-chromatography 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dcat_ap_plus_chromatography-0.1.1.tar.gz | 213.8 kB | Without provenance | Details for dcat_ap_plus_chromatography-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dcat_ap_plus_chromatography-0.1.1-cp313-abi3-win_amd64.whl | CPython 3.13 | abi3 | Windows x86-64 | Details for dcat_ap_plus_chromatography-0.1.1-cp313-abi3-win_amd64.whl |
Total release size: 637.6 kB
Release files / dcat_ap_plus_chromatography-0.1.1.tar.gz
| Download URL | dcat_ap_plus_chromatography-0.1.1.tar.gz |
|---|---|
| Size | 213.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7688375f9ef841273c88eed62d2815e720bd88546cb4890cba03553eafa25e24
|
|
BLAKE2b-256 checksum How to use checksums |
6de6ff8bc7a0a70f3dbb9c0037b1699931630ff28092a217cf8cdd179c2a7711
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / dcat_ap_plus_chromatography-0.1.1-cp313-abi3-win_amd64.whl
| Download URL | dcat_ap_plus_chromatography-0.1.1-cp313-abi3-win_amd64.whl |
|---|---|
| Size | 423.9 kB |
| Tags | CPython 3.13 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
8c6c25d01bef1eb3a5f0a77058d925b8b37f4af1f0313d804a846d4fc96b7fdc
|
|
BLAKE2b-256 checksum How to use checksums |
cd9632fec47b066b3f958aceafe491bf9c1d00efbac82a0ba6ed69c7b41a3fd4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for dcat-ap-plus-chromatography 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.