diff options
| author | Pjotr <wrk@bosa.lan> | 2026-11-12 16:57:28 +0000 |
|---|---|---|
| committer | Pjotr <wrk@bosa.lan> | 2026-11-12 16:57:28 +0000 |
| commit | 99a92f8060e76da0357a30df746c70081646bd28 (patch) | |
| tree | 7f66683ea529e6b73b3381642456a0294f44aa34 /info_files | |
| parent | 84ad4d1e3f96ad45fdf3d72abfbcf516802e4532 (diff) | |
| download | gn-bnw-main.tar.gz | |
BNW's computation does not need the web application: run.sh drives three C
programs over files in a per-run directory, and everything above that is file
assembly and rendering. bin/bnw does the same pipeline -- network_score, the
k-best search, structure -- in a private working directory, and reports one row
per candidate edge with its posterior and whether it survived the threshold.
The reference for all of it is the running bnw-container, not a memory of it:
its six continuous traits example was run through the web application
(bn_genenet.php -> execute_bn_gom.php) and the resulting files kept as fixtures
in test/golden/. test/parity_check.py compares our continuous_input.txt and
structure_input.txt against those, and the driver's own stdout against the
file. Today: byte-identical, 5 edges.
Four things that run settled, each of which had been guessed wrong or not at
all:
* continuous_input.txt is header, then a TYPE LINE (1 = continuous, n =
n-level discrete), then data. network_score reads the type before the
data, and the web application's file is one line longer than the matrix
because of it. Without the line the first data row shifts and
network_score segfaults.
* structure exits with an uninitialised status while writing a correct file.
The web application ignores the status; the driver now judges it by its
output and only fails if the file is missing.
* get_kbest_nets.cc used SGI's <ext/hash_set>, which modern libstdc++ no
longer has. It now uses std::unordered_set with an explicit hasher
(specialising std::hash for a pointer type is not allowed), and build.sh
compiles the C with -std=gnu89 because the sources predate C99.
* our run leaves postProbEachEdge.txt with per-edge posteriors; the web
application's flow leaves none behind, so the posteriors are information
the endpoint can report that the web app never showed.
Exit codes are part of the contract GN4 will code against: 0 ok, 2 bad input,
3 the computation failed, 77 the binaries are not installed (a conventional
skip, so a test suite can run where BNW is not).
Build output is gitignored. AI plan and status updated in
info_files/gn4-integration-plan.md; README gained a "Headless driver" section.
Diffstat (limited to 'info_files')
| -rw-r--r-- | info_files/gn4-integration-plan.md | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/info_files/gn4-integration-plan.md b/info_files/gn4-integration-plan.md index b0276eb0..c155e782 100644 --- a/info_files/gn4-integration-plan.md +++ b/info_files/gn4-integration-plan.md @@ -1,6 +1,8 @@ # Plan: BNW as a GeneNetwork4 endpoint -Status: **plan, nothing implemented**. Written from the code in this +Status: **Phase 0 and Phase 1 done** (the driver exists and matches the web +application on BNW's own example; see `test/parity_check.py` and the README's +*Headless driver* section). The GN4 endpoint is not started. Written from the code in this repository and from how GN4 already embeds the other engines (`/compute/bulklmm`, `/compute/qtl2`, `/compute/gemma/ravanan`), so that the first commit of real work has a target to hit and a parity test to pass. @@ -166,6 +168,26 @@ Acceptance: byte-identical `structure_input.txt` and `postProbEachEdge.txt` to Phase 0's golden files, and one documented invocation that reproduces the web app's answer. +**Done (2026-11-12).** `bin/bnw` exists; on the six continuous traits of BNW's +own 8-node example its `structure_input.txt` is byte-identical to the +container's, and `test/parity_check.py` checks that plus the input file on every +run. Four things the reference run settled: + +* the input file is header, then a **type line** (1 = continuous, n = n-level + discrete), then data -- `network_score` reads the type before the data, which + is why the web application's `continuous_input.txt` has one more line than the + matrix; +* `structure` exits with an uninitialised status while writing a correct file, + so it must be judged by its output -- the web application ignores the status + and so does the driver; +* `get_kbest_nets.cc` used SGI's `<ext/hash_set>`; it now uses + `std::unordered_set` with an explicit hasher (specialising `std::hash` for a + pointer type is not allowed), and `build.sh` compiles the C with + `-std=gnu89` because the sources predate C99; +* the driver produces `postProbEachEdge.txt` with per-edge posteriors; the web + application's flow leaves none in `/var/lib/genenet/bnw/`, so the posteriors + are new information the endpoint can report. + Acceptance: byte-identical `structure_input.txt` and `postProbEachEdge.txt` to Phase 0's golden files. |
