Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/malecns-subgraph.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
# small enough to belong in git; the rest are artifacts.
# ------------------------------------------------------------------
- name: Build the scale ladder
if: ${{ github.event.inputs.ladder_sizes != '' }}
if: ${{ github.event_name == 'schedule' || github.event.inputs.ladder_sizes != '' }}
env:
SIZES: ${{ github.event.inputs.ladder_sizes || '1000,5000,10000,25000,50000' }}
MINW: ${{ github.event.inputs.min_weight || '5' }}
Expand Down Expand Up @@ -125,7 +125,7 @@ jobs:
name: malecns-neighborhoods
path: data/derived/malecns_*_neighborhood.json
- name: Upload the scale ladder (every rung, including the large ones)
if: ${{ github.event.inputs.ladder_sizes != '' }}
if: ${{ github.event_name == 'schedule' || github.event.inputs.ladder_sizes != '' }}
uses: actions/upload-artifact@v4
with:
name: malecns-scale-ladder
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ jobs:
- name: Install
run: |
python -m pip install --upgrade pip wheel setuptools
python -m pip install -e ".[dev,viz]"
python -m pip install -e ".[dev,viz,browser-test]"
python -m playwright install --with-deps chromium

- name: Record the environment
run: |
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ jobs:
python-version: "3.12"
- run: |
python -m pip install --upgrade pip wheel setuptools
python -m pip install -e ".[dev,viz]"
python -m pip install -e ".[dev,viz,browser-test]"
- name: install Chromium for the static-browser smoke check
run: python -m playwright install --with-deps chromium
- name: pytest (slow suite)
run: pytest -q -m slow
- name: verify the artifact manifest
Expand Down
3 changes: 2 additions & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ abstract: >-
are demonstrated on cuts of the public MaleCNS v1.0 connectome, where the
headline result is methodological: a dependence verdict obtained on one
extract of a network can invert on another extract of the same network, and
the extract's recurrence rather than its size predicts which way.
the saved extracts associate the verdict change more with recurrence than node
count, without isolating recurrence as a cause.
Concretely, FlyLab maps a compound and a free concentration onto a typed engagement
panel for insect receptors and their vertebrate counterparts at the same
dose, converts the insect side through a fixed mechanism table into gain
Expand Down
15 changes: 8 additions & 7 deletions HANDOFF.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# FlyLab handoff (v0.6.1, 2026-09-20)
# FlyLab handoff (v0.6.1, 2026-09-24)

Read this first if you are Claude, GPT, or another agent continuing the repo.
Owner: https://github.com/pinkysworld/FlyLab
Package version: **0.6.0** in `CITATION.cff` and in the paper. **`flylab/__init__.py` and `pyproject.toml` both still say `0.5.0`** — see Issues; those files are not mine to edit.
Package version: **0.6.0** in `CITATION.cff`, `flylab/__init__.py`, `pyproject.toml` and the paper.

## What the project is

Expand Down Expand Up @@ -64,7 +64,7 @@ flylab serve # http://127.0.0.1:8765

Read these before writing any new claim into the paper, the README or a PR description.

1. **The dependence verdict is a joint property of the prediction and the extract, and recurrence predicts it. That is the headline.** The same landscape, same instrument, no parameter changed: on the 1-hop `named` cut (mean degree 1.208, 85% of edges onto four seed cells, 184 of 1126 nodes with any input) 11 of 84 cells are topology-dependent, 42 composition-dominated and 31 no-effect at n = 1000 with Benjamini-Hochberg and a 1 % relative effect floor. On `taste_motor` (mean degree 10.4) the same cells give 54 / 0 / 30. The **scaling study** (`papers/scale_study.json`, T27, `flylab.analysis.scale`) then settles what the inversion tracks: over seven extracts the composition-dominated verdict survives on **exactly one**, the in-star, and `scale_1k` — *fewer* nodes than `named` (1000 vs 1126) but mean degree 22.9 — is already topology-dependent. **Recurrence, not size.** At 5k and 10k imidacloprid is distinguishable from *every* null; the top rungs run at n = 20 (resolution 0.048) and so confirm rather than establish. "Most predictions do not need the connectome" and "the topology-dependent set is exactly the chloride-channel blockers" are **withdrawn**. Never state a dependence result without the extract, its structure, the compound, the concentration, the readout, the *p* and the correction.
1. **The dependence verdict is a joint property of the prediction and the extract.** The saved comparisons are consistent with recurrence tracking the verdict, but they do not isolate a causal structural feature. On the 1-hop `named` cut (mean degree 1.208, 85% of edges onto four seed cells, 184 of 1126 nodes with any input) 11 of 84 cells are topology-dependent, 42 composition-dominated and 31 no-effect at n = 1000 with Benjamini-Hochberg and a 1 % relative effect floor. On `taste_motor` (mean degree 10.4) the same cells give 54 / 0 / 30. The **saved scaling study** (`papers/scale_study.json`, T27, `flylab.analysis.scale`) shows the composition-dominated verdict on **exactly one** of seven extracts, the in-star; `scale_1k` has *fewer* nodes than `named` (1000 vs 1126), mean degree 22.9, and is already topology-dependent. At 5k and 10k imidacloprid is distinguishable from all three ranked edge/wiring nulls; at 10k the separate plain transmitter-label permutation is indeterminate. At 25k and 50k the three ranked wiring nulls remain distinguishable, while the transmitter-label checks are not both distinguishable. Those rungs run at n = 20 (resolution 0.048) and so confirm rather than establish. The larger cut files and source Feathers are absent from the versioned checkout. A separate 2026-09-24 exploratory follow-up rebuilt the cuts from public v1.0 inputs and reran both confirmatory compounds at n = 100 (5k) and n = 50 (10k–50k); its eight profiles all classify topology-dependent, but n < 1000 and no across-profile correction was applied. See `data/derived/scale_study_high_power_2026-09-24.json`. The committed 1k node/edge lists match exactly and the larger cuts match T27's counts, but historical byte identity is unverified because those hashes were not recorded. "Most predictions do not need the connectome" and "the topology-dependent set is exactly the chloride-channel blockers" are **withdrawn**. Never state a dependence result without the extract, its structure, the compound, the concentration, the readout, the *p* and the correction.
1a. **Non-rejection is not equivalence.** Each mode carries a three-way verdict against a prespecified margin (0.332 Hz, 5% of the vehicle readout on `named`). For imidacloprid at n = 1000: equivalent within tolerance for rewire_degree_preserving, sign_permute_weight_matched, weight_permute, indeterminate for sign_permute. Never write "reproduces".
1b. **The transmitter null was biased.** Plain label permutation moves the cholinergic share of out-weight from 0.619 to 0.544 ± 0.027, putting the real graph at the 100th percentile of its own null. It is now reported as a joint target-set-and-sign null; the ladder's rank-3 rung is the weight-matched shuffle.
1c. **The instrument is validated.** Planted ground truth on a synthetic cut: the ladder recovered 2 of 3 planted topology-dependent effects at n = 200 and returned no false positive on the unplanted control. False-positive rate 0 of 18; detection by permutation count n=50: 0.61, n=200: 0.61, n=1000: 0.67, so effect size dominates.
Expand All @@ -83,8 +83,8 @@ Read these before writing any new claim into the paper, the README or a PR descr
## Issues

- #1 Gate 0 occupancy CLI — **closed**. #2 Gate 1 map-extracted taste GRNs — **closed in v0.5**. #3 Gate 2 five-drug panel — **closed**.
- **Open: version strings disagree.** `flylab/__init__.py` and `pyproject.toml` both report `0.5.0`; `CITATION.cff` and the manuscript say `0.6.0`. Pick one and bump the two package files. Not fixed here because those files belong to other owners.
- **Open: expression coverage is 0.205** and adult motor-neuron receptor expression is a confirmed literature gap — MN9, the main readout, carries the `unknown` default weight.
- **Version strings are aligned at `0.6.0`.** `flylab/__init__.py`, `pyproject.toml`, `CITATION.cff` and the manuscript currently agree.
- **Open: receptor annotation and MN9 expression.** The 0.205 value is the share of graph-node × receptor-key pairs with a coarse class-level annotation across the two committed cuts, not a share of cells measured to express receptors. GEO GSE141807 is now reprocessed into VNC-wide gene-detection fractions after published QC, but no cell-class labels are joined; see `data/literature/vnc_receptor_detection_GSE141807.yaml`. A two-cell discrepancy in one replicate versus the paper is recorded and unresolved. The dataset does not identify MN9, whose proboscis motor-neuron arbors are in the brain subesophageal zone; MN9 still carries the `unknown` default weight.
- **Open (new): `flylab/analysis/nullmodels.py` still exposes `connectome_information_score`**, a v0.5 summary superseded by the dependence class and the necessary information level. The paper no longer quotes it. Either delete it or document it as deprecated.
- **Open (new): docstrings in `flylab/` still say "occupancy" in places where the value is a functional engagement** (e.g. `flylab/pharm/occupancy.py` module name and several assay docstrings, `hill_occupancy` kept as a deprecated alias). The behaviour is correct and typed; the naming lags the paper.
- **Open (new): `flylab/analysis/predictions.py` still labels H1–H7 "pre-registered"** in its docstring and output fields. The paper now says *prospective*. Rename when convenient.
Expand Down Expand Up @@ -158,10 +158,11 @@ python scripts/reproduce_paper.py --list

## Next work, in order

1. **v0.7 gate 7 — expression coverage.** Either source adult motor-neuron receptor expression or declare the 0.205 coverage a permanent bound. A data problem, not a modelling one.
0. **Review the scale follow-up.** `data/derived/scale_study_high_power_2026-09-24.json` has an exploratory higher-power rerun, but it is not a replacement for T27 or confirmatory evidence. The scheduled ladder step is now conditioned to run on schedule as well as manual dispatch; after the workflow change reaches the remote branch, verify its uploaded artifact and preserve input/cut hashes. Any future higher n should be budgeted from measured runtimes, with the same simple degree-preserving graph and seeded permutation procedure.
1. **v0.7 gate 7 — receptor-expression evidence.** Determine whether adult VNC motor-neuron labels can be joined defensibly to the reprocessed GEO GSE141807 barcodes; if so, report class-specific detection with annotations, sample/sex composition, detection rule and dropout treatment. Resolve MN9 separately with a class-matched brain/SEZ atlas or targeted assay. Keep gains uniform unless this produces defensible cell-class evidence.
2. **The one allowed fit.** The uncertainty budget names it: the engagement→gain transformation. Calibrate it against evoked postsynaptic responses at a known synapse; do not fit a potency value.
3. **The free win.** Re-run the dependence and selectivity analyses against synapse-confidence strata: `weight_threshold` carries S1 0.294 and costs no bench time.
4. **One live assay.** Climbing first: a full published protocol and control statistics exist. Import by hand into `live_lab`; nothing else may write it.
5. **Housekeeping:** reconcile the version strings, mint the Zenodo DOI, and only then consider the predictions pre-registered.
5. **Housekeeping:** mint the Zenodo DOI; predictions remain prospective until a tagged release is externally archived.

**Do not** start a 166k-cell LIF, add a second connectome, invent live PER/climbing numbers, claim that no tool has combined connectomes and pharmacology (FlyBrainLab and the receptor-map whole-brain models exist and are cited), or accept a PR that only adds a prettier viewer.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ dependence | ablation | robustness | uncertainty

The result is not just a simulated firing rate. FlyLab records what evidence entered the model, which assumptions transformed it, which graph was used, and how strongly the prediction depends on those choices.

The browser bench saves your primary run and experiment-design settings in the current browser. Use **Export setup** and **Import setup** to share those settings as a versioned JSON preset; the preset contains inputs, not calculated results. On narrow screens, the two tab rows collapse into one grouped panel picker.

## Why it is different

### 1. Evidence is typed, not flattened into one fake "EC50" field
Expand All @@ -72,7 +74,7 @@ This makes it possible to separate effects that are sensitive to detailed wiring

The ladder itself is validated rather than assumed to work. A recurrent loop of known strength is planted in a synthetic graph of the same size, density and transmitter composition as a real cut, and the analysis is asked to find it; the unplanted control gives an empirical false-positive rate, and a power surface maps detection against effect size and permutation count.

**The verdict this analysis returns depends on the extract it is measured on, and recurrence — not size — predicts which way.** The repository's two committed cuts disagree: the same landscape classifies most cells composition-dominated on the sparse 1-hop `named` cut and none of them on the denser `taste_motor` cut. Run across a ladder of nested cuts of 1k to 50k cells (`flylab.analysis.scale`), the composition-dominated verdict survives on exactly one extract — the in-star — while a cut with *fewer* nodes but twenty times the mean degree is already topology-dependent. A dependence result is therefore only quotable together with the structure of the graph it was measured on.
**The verdict this analysis returns depends on the extract it is measured on.** The saved scale study associates the change more with recurrence than node count, but it does not isolate a causal structural feature. The repository's two committed cuts disagree: the same landscape classifies most cells composition-dominated on the sparse 1-hop `named` cut and none of them on the denser `taste_motor` cut. Across the saved 1k–50k ladder, only the `named` in-star is composition-dominated; `scale_1k` has fewer nodes but twenty times its mean degree and is already topology-dependent. At 5k and 10k the imidacloprid effect is distinguishable from all three ranked edge/wiring nulls; transmitter-label shuffles are separate and indeterminate at some rungs. The larger scale cut files are absent from this checkout, so those results remain imported observations. Quote any dependence result with the structure of the graph it was measured on.

### 3. Model conclusions are stress-tested

Expand All @@ -86,7 +88,7 @@ FlyLab includes:
| **Global uncertainty** | Which assumptions dominate variance in a model output? |
| **Value of information** | Which measurement or re-analysis would reduce the most model uncertainty? |
| **Claim provenance** | Which links in a result are observations, literature-derived inputs, modelling assumptions, or computations? |
| **Scale ladder** | Does the dependence verdict settle as the extract grows, and what structural property predicts it? |
| **Scale ladder** | How do dependence verdicts vary across saved extracts of different sizes and structure? |

Negative results are first-class outputs. If a conclusion depends on an asserted gain rule, or a connectome-specific interpretation is not supported by the null analysis, FlyLab is designed to show that rather than hide it.

Expand Down
Loading
Loading