Expand description
ChEBI record → Quin mapping (AST-04). ChEBI record → Quin mapping (AST-04).
Maps accepted ChebiRecord values
from AST-03 into evidence-preserving, parity-valid NQuin
slices plus a cold validation / lexicon report.
§Mapping (per accepted record)
| # | Predicate IRI | Object |
|---|---|---|
| 1 | rdf:type | chebi:Compound |
| 2 | chebi:accession | 60-bit hash of accession (same as subject) |
| 3 | chebi:hasName | 60-bit hash of name (surface in lexicon) |
| 4 | chebi:hasParent | 60-bit hash of CHEBI:{parent_id} (optional) |
| 5 | chebi:fromRelease | 60-bit hash of release_label; metadata low 32 = source_line |
Subject for every Quin is q_hash(accession). Context is
q_hash(release_label). No network; no new Host/Vibe invoke IDs.
Hot API: map_records_into — caller-buffered. Report types may allocate.
Structs§
- Lexicon
Entry - Bounded lexicon / hash note for a surface string projected as a 60-bit object.
- MapBudgets
- Caller ceilings for one mapping pass.
- MapConflict
- One identifier collision or mapping refusal inside a batch.
- MapReport
- Result of a successful (possibly partially conflicted) mapping pass.
Enums§
- MapError
- Fail-closed errors for ChEBI Quin mapping.
Constants§
- CLASS_
CHEBI_ COMPOUND - Object class for a ChEBI compound.
- PRED_
ACCESSION - Predicate: accession string evidence.
- PRED_
FROM_ RELEASE - Predicate: release provenance; source_line in metadata.
- PRED_
HAS_ NAME - Predicate: display name (hashed; surface in lexicon note).
- PRED_
HAS_ PARENT - Predicate: parent compound accession hash.
- PRED_
RDF_ TYPE - Predicate: RDF typing.
- QUINS_
PER_ RECORD_ BASE - Quins emitted for every mapped record (type, accession, name, provenance).
Functions§
- map_
records_ into - Project accepted ChEBI records into caller-buffered Quins.
- quin_
parity_ valid - True when Quin parity matches the AGENTS.md XOR fold.
- quins_
for_ record - How many Quins one record would emit (including optional parent).