Skip to main content

Module chebi_query

Module chebi_query 

Source
Expand description

ChEBI in-memory chemical knowledge queries (AST-05). ChEBI chemical knowledge queries over an imported Quin slice (AST-05).

Bounded, in-memory APIs over caller-supplied &[NQuin] (and optional ChebiRecord index). Encoding must match crate::q42::chebi_map (subjects = q_hash(accession), predicates chebi:accession / hasName / hasParent / fromRelease).

No network. No Host/Vibe invoke IDs. Empty / ambiguous / limit paths fail closed with QueryError.

Structs§

ChemicalHit
One bounded chemical resolve / index hit (compact + cold licence note).
EvidenceHit
Provenance row from chebi:fromRelease.
QueryLimits
Caller ceilings for multi-hit and subgraph operations.
RelationHit
Parent / child edge discovered from chebi:hasParent Quins.
ReleaseDescription
Cold summary of one release / imported asset slice.

Enums§

QueryError
Typed query failures — empty / ambiguous / limit paths never succeed quietly.
Uncertainty
Evidence certainty attached to every hit.

Functions§

describe_release
Describe one release / asset slice: counts + licence obligation stub.
export_subgraph_into
Export Quins for the seed compound and related compounds within max_depth.
format_chebi_accession
Format CHEBI:{id} into a caller stack buffer; returns the UTF-8 prefix used.
lookup_children_into
Look up children that declare chebi:hasParent pointing at parent_accession.
lookup_evidence_into
Look up chebi:fromRelease provenance for an accession.
lookup_parents_into
Look up parent edges (chebi:hasParent) for a child accession.
normalize_accession_query
Normalize a resolve query to a canonical CHEBI:{id} accession string.
resolve_chemical_into
Resolve a chemical by accession (CHEBI:{id}) or bare numeric id into out.