code wiki / (root) / nx_qc_svc.nx

nx_qc_svc.nx

buildroot/runtime/nx_qc_svc.nx

17524 B445 linesdepth 7pulls 14 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_qc_svc.nx -- QUALITY-CONTROL / ANALYTICAL SERVICE FACADE. The third organ on the nx_service base, over the analytical-chemistry domain: screen an observed LC-MS peak against the peptide-adulterant catalog across charge states, report a compound's detectability, and verify a label-claim dose. WHY THIS IS PRODUCTION INFRASTRUCTURE, NOT A DEMO. 21 CFR 111 -- the dietary-supplement cGMP rule the operator must satisfy before a fill run -- requires 100% identity testing of every incoming dietary ingredient and finished-product testing against specification. This facade is the compute behind that: given a peak an instrument actually reports, it says which prohibited peptide it is (across the charge ladder a [M+H]+-only method misses), and given a measured amount it says whether the label is honest. Three facades now share one nx_service base across three unrelated domains (go-to-market, lab science, analytical QC) -- the architecture scales. USAGE: nx_qc_svc <verb> [args...] describe screen <observed_mz_q4> <tol_ppm_q1> (which prohibited peptide is this peak?) detect <entry_id> (mass, charge ladder, blind-spot flag) label <measured_ug> <declared_ug> (USP dose recovery + verdict) Same discipline: NO new domain logic, every number from a gated library. genealogy_id: supplement_adulterant_arc + service_infrastructure

dependencies 11 imports · 0 importers

nx_syscalls.nx nx_service.nx nx_grounding.nx nx_peptide.nx nx_peptide_formula.nx nx_peptide_isotope.nx nx_peptide_msms.nx nx_peptide_deconv.nx nx_peptide_identify.nx nx_peptide_denovo.nx nx_qc_svc.nx

diagram shows first 10 each side; +1 more imports, +0 more importers in the complete lists below.

imports: nx_syscalls.nxnx_service.nxnx_grounding.nxnx_peptide.nxnx_peptide_formula.nxnx_peptide_isotope.nxnx_peptide_msms.nxnx_peptide_deconv.nxnx_peptide_identify.nxnx_peptide_denovo.nxnx_supplement_screen.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main nx_json_new sys_mmap qc_dispatch nsvc_arg qc_describe nsvc_ok_open nj_putc nj_kv_int nj_key nj_putstr nj_putc ↻ nj_puti nj_putc ↻ sys_mmap ↻ nj_comma nj_putc ↻ nj_kv_str nj_key ↻ nj_putstr ↻ nj_kv_bool nj_key ↻ nj_puts nj_putc ↻ nj_key ↻ nj_kv_str ↻ nj_comma ↻ nj_kv_int ↻ nj_key ↻ nj_puts ↻ nsvc_ok_close_g nsvc_ground nj_comma ↻ nj_kv_str ↻ gnd_name nj_kv_bool ↻ gnd_is_verified gnd_meaning nsvc_ok_close nj_putc ↻

structs

none

consts

38const QC_MAGIC_8192: i64 = 8192
40const QC_SVC: *u8 = "qc" as *u8

functions

44func qc_describe(j: *NxJson) -> i64
74func qc_denovo(j: *NxJson, argc: i64, argv: *i64) -> i64
123func qc_identify(j: *NxJson, argc: i64, argv: *i64) -> i64
180func qc_deconv(j: *NxJson, mz_lo: i64, mz_hi: i64) -> i64
218func qc_msms(j: *NxJson, seq: *u8) -> i64
264func qc_envelope(j: *NxJson, seq: *u8) -> i64
302func qc_screen(j: *NxJson, mz_q4: i64, tol_ppm_q1: i64) -> i64
335func qc_detect(j: *NxJson, id: i64) -> i64
375func qc_label(j: *NxJson, measured: i64, declared: i64) -> i64
400func qc_dispatch(argc: i64, argv: *i64, j: *NxJson) -> i64
440func main(argc: i64, argv: *i64) -> i64