nx_supplement_batch.nx
buildroot/runtime/nx_supplement_batch.nx
about
nx_supplement_batch.nx -- C5.4 + C4.4: batch CLI with user-extensible
compound DB + RT calibration + multi-file processing.
USAGE (3 positional args, then peak files):
nx_supplement_batch <compounds-or-dash> <cal-or-dash> <peak1> [peak2] ...
compounds-or-dash: path to user-defined compound TSV file, or "-"
to use only the 24-compound built-in seed DB.
Format (one per line, '#' comments):
id|name|SMILES|reg_code|citation
reg_code: 0=UNK 1=APPROVED 2=RESTRICTED 3=BANNED 4=RX
cal-or-dash: path to RT calibration CSV, or "-" for mass-only.
Format (per C7.1):
# id ref_rt_seconds tolerance_seconds
4 740.0 30.0
peak1, peak2, ...: one or more peak text files to process.
EXAMPLES:
# Built-in DB, no RT cal, 3 samples
$ nx_supplement_batch - - lot_A.txt lot_B.txt lot_C.txt
# Built-in DB + RT cal, 3 samples
$ nx_supplement_batch - rt_cal.csv lot_A.txt lot_B.txt lot_C.txt
# Lab's extended DB + RT cal, 50 samples
$ nx_supplement_batch lab_compounds.tsv rt_cal.csv samples/*.txt
EXIT CODE:
Total banned detections summed across all samples.
Pipe straight to LIMS:
$ nx_supplement_batch - - samples/*.txt | \
jq -r 'select(.verdict.recommendation=="REJECT") | .sample_id'
dependencies 10 imports · 0 importers
imports: nx_chem.nxnx_chem_molecule.nxnx_chem_smiles.nxnx_chem_periodic.nxnx_chem_valence.nxnx_chem_mass.nxnx_chem_isotope_pattern.nxnx_chem_adulterant_db.nxnx_chem_peak_list.nxnx_chem_report_json.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 50 | func process_one_sample(db: *AdulterantDB, peak_path: *u8) -> nx_int |
| 92 | func is_dash_sentinel(p: *u8) -> nx_int called by 1: main |
| 98 | func main(argc: i64, argv: *i64) -> i64 |