Archive 4 checkpoints (1-4)
Browse files- .gitattributes +1 -0
- paper-releases/pbisc-diffusion/updates/20261008T125804Z-deck-fig2-3-healthy-fig5-rare/diffusion/dataset/server_1/model8/plans/rare_states_paired_20261008/README.md +58 -0
- paper-releases/pbisc-diffusion/updates/20261008T125804Z-deck-fig2-3-healthy-fig5-rare/diffusion/dataset/server_1/model8/plans/rare_states_paired_20261008/out/contrasts.csv +0 -0
- paper-releases/pbisc-diffusion/updates/20261008T125804Z-deck-fig2-3-healthy-fig5-rare/diffusion/dataset/server_1/model8/plans/rare_states_paired_20261008/out/per_donor.csv +3 -0
- paper-releases/pbisc-diffusion/updates/20261008T125804Z-deck-fig2-3-healthy-fig5-rare/diffusion/dataset/server_1/model8/plans/rare_states_paired_20261008/tools/run_all.sh +23 -0
.gitattributes
CHANGED
|
@@ -108,3 +108,4 @@ paper-releases/pbisc-diffusion/updates/20261008T121550Z-deck-fig4-rules-no-broad
|
|
| 108 |
paper-releases/pbisc-diffusion/updates/20261008T121550Z-deck-fig4-rules-no-broadcast/diffusion/dataset/server_1/model8/presentations/2026-09-30--paper-summary--r00/PBISC-Diffusion_paper_summary_20260930.pptx filter=lfs diff=lfs merge=lfs -text
|
| 109 |
paper-releases/pbisc-diffusion/updates/20261008T125804Z-deck-fig2-3-healthy-fig5-rare/diffusion/dataset/server_1/model8/presentations/2026-09-30--paper-summary--r00/PBISC-Diffusion_paper_summary_20260930.pdf filter=lfs diff=lfs merge=lfs -text
|
| 110 |
paper-releases/pbisc-diffusion/updates/20261008T125804Z-deck-fig2-3-healthy-fig5-rare/diffusion/dataset/server_1/model8/presentations/2026-09-30--paper-summary--r00/PBISC-Diffusion_paper_summary_20260930.pptx filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 108 |
paper-releases/pbisc-diffusion/updates/20261008T121550Z-deck-fig4-rules-no-broadcast/diffusion/dataset/server_1/model8/presentations/2026-09-30--paper-summary--r00/PBISC-Diffusion_paper_summary_20260930.pptx filter=lfs diff=lfs merge=lfs -text
|
| 109 |
paper-releases/pbisc-diffusion/updates/20261008T125804Z-deck-fig2-3-healthy-fig5-rare/diffusion/dataset/server_1/model8/presentations/2026-09-30--paper-summary--r00/PBISC-Diffusion_paper_summary_20260930.pdf filter=lfs diff=lfs merge=lfs -text
|
| 110 |
paper-releases/pbisc-diffusion/updates/20261008T125804Z-deck-fig2-3-healthy-fig5-rare/diffusion/dataset/server_1/model8/presentations/2026-09-30--paper-summary--r00/PBISC-Diffusion_paper_summary_20260930.pptx filter=lfs diff=lfs merge=lfs -text
|
| 111 |
+
paper-releases/pbisc-diffusion/updates/20261008T125804Z-deck-fig2-3-healthy-fig5-rare/diffusion/dataset/server_1/model8/plans/rare_states_paired_20261008/out/per_donor.csv filter=lfs diff=lfs merge=lfs -text
|
paper-releases/pbisc-diffusion/updates/20261008T125804Z-deck-fig2-3-healthy-fig5-rare/diffusion/dataset/server_1/model8/plans/rare_states_paired_20261008/README.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Rare cell states in the four paired disease cohorts (2026-10-08)
|
| 2 |
+
|
| 3 |
+
**User request (2026-10-08, Fig. 5):** show rare-cell fractions and how well rare states are found, on the paired
|
| 4 |
+
disease cohorts.
|
| 5 |
+
- Main comparison: 5 donors (LoRA-5 vs scSemiProfiler with the same 5 donors as representatives), with zero-shot
|
| 6 |
+
shown for reference.
|
| 7 |
+
- 5-fold CV is reported separately.
|
| 8 |
+
- No new generation. CPU only.
|
| 9 |
+
|
| 10 |
+
## Method (`tools/rare_paired.py`)
|
| 11 |
+
|
| 12 |
+
- **Cohorts:** Ye 2026 sepsis, Imperial ESKD COVID, Giroux 2022, Ji 2025 ChILI
|
| 13 |
+
(`plans/paired_finetune_intradataset_20260927`).
|
| 14 |
+
- **5-donor draws** j = 0..4, arms:
|
| 15 |
+
- `zs_raw` (`fewshot_n5/zs__raw_all.npz`);
|
| 16 |
+
- `zs_cal`, `lora5` (`draw<j>/lora__raw.npz`);
|
| 17 |
+
- `scsemi5` (`draw<j>/scsemi5__raw.npz`).
|
| 18 |
+
- **5-fold, pooled:** `zs__raw`, `zs__cal`, `real_lora__raw` (`pooled/`), `scsemi__raw` (`pooled_scsemi_cv_20261002/`).
|
| 19 |
+
- **NPZ handling:**
|
| 20 |
+
- NPZs are read on server_1, or streamed from spark-0110 (`ssh -n`).
|
| 21 |
+
- Each sha256 must equal the receipt.
|
| 22 |
+
- The benchmark's Poisson read-out (whole NPZ, seed 20260916) is reproduced cell by cell against the recorded
|
| 23 |
+
`umi_scoring_genes`, so the benchmark's own frozen scANVI labels apply.
|
| 24 |
+
- **States:** the 15 literature marker rules of `plans/rare_states_screen_20261004/tools/states.json`.
|
| 25 |
+
- A marker rule is ≥ k marker genes detected in a parent type; a label rule uses AIFI L2.
|
| 26 |
+
- The negative control (platelet signal in monocytes) is left out of the figures.
|
| 27 |
+
- **Depth:** for marker states, observed parent cells are binomially thinned (seed 20261004) to the generated parent
|
| 28 |
+
median library on the measured panel genes. There is one constant per unit, arm and state.
|
| 29 |
+
- **Metrics** per unit, arm and state:
|
| 30 |
+
- pooled generated % and observed % within the parent;
|
| 31 |
+
- generated / observed ratio;
|
| 32 |
+
- Spearman over donors;
|
| 33 |
+
- detection AUROC (top vs bottom half of observed %);
|
| 34 |
+
- case-vs-control difference of donor means, observed vs generated, with its sign.
|
| 35 |
+
- **Runner:** `tools/run_all.sh` runs 96 extractions and the analysis in one bounded user scope (MemoryMax 24G, 4
|
| 36 |
+
threads). Finished extractions are skipped.
|
| 37 |
+
- Fix of 2026-10-08: a remote `ssh` inside the job loop read the job list from stdin. The loop now reads on fd 3 and
|
| 38 |
+
`ssh -n` is used, and the run was resumed. All 97 jobs finished, 0 failures.
|
| 39 |
+
|
| 40 |
+
**Outputs:** `out/summary.csv`, `out/contrasts.csv`, `out/per_donor.csv` (1,440 unit × arm × state rows).
|
| 41 |
+
`work/<ds>/<unit>/<arm>.npz` holds marker counts per labelled cell, with a receipt (NPZ sha, host, reproduction).
|
| 42 |
+
|
| 43 |
+
## Results
|
| 44 |
+
|
| 45 |
+
Deck: `tools/fig5_rare_states.py`, Fig. 5a–c. There are 56 state × cohort pairs with ≥ 30 observed state cells in
|
| 46 |
+
≥ 3 donors. A state a method never generates counts as that method's miss.
|
| 47 |
+
|
| 48 |
+
| | 5 donors (main) | 5-fold (separate) |
|
| 49 |
+
|---|---|---|
|
| 50 |
+
| LoRA closer to the observed fraction than scSemiProfiler | 51/56 | — |
|
| 51 |
+
| within 2-fold of observed: LoRA / scSemiProfiler | 19 / 5 | 25 / 9 |
|
| 52 |
+
| better donor ranking (Spearman) than scSemiProfiler | 43/56 | 38/56 |
|
| 53 |
+
| median Spearman: LoRA / scSemiProfiler | 0.24 / 0.18 | 0.32 / 0.24 |
|
| 54 |
+
| disease direction kept (states × draws): LoRA / scSemiProfiler / zero-shot | 73% / 61% / 66% | — |
|
| 55 |
+
|
| 56 |
+
**Caveat, stated on the slides:**
|
| 57 |
+
- Zero-shot, real bulk, is closer than LoRA-5 on some fractions; the counts are in the 5a notes.
|
| 58 |
+
- Most states are generated below their observed fraction (log2 ratio < 0).
|
paper-releases/pbisc-diffusion/updates/20261008T125804Z-deck-fig2-3-healthy-fig5-rare/diffusion/dataset/server_1/model8/plans/rare_states_paired_20261008/out/contrasts.csv
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
paper-releases/pbisc-diffusion/updates/20261008T125804Z-deck-fig2-3-healthy-fig5-rare/diffusion/dataset/server_1/model8/plans/rare_states_paired_20261008/out/per_donor.csv
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4db7f868ec59f7f3bfdd7cf84e18248bc26fbee7876063a35be3d952cc33d004
|
| 3 |
+
size 12021378
|
paper-releases/pbisc-diffusion/updates/20261008T125804Z-deck-fig2-3-healthy-fig5-rare/diffusion/dataset/server_1/model8/plans/rare_states_paired_20261008/tools/run_all.sh
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
# Every extraction (4 cohorts x (5 draws x 4 arms + 4 five-fold arms) = 96) and the analysis, one after another, in one
|
| 3 |
+
# bounded transient user unit (CPU only: MemoryMax 24G, no swap, 4 threads, Nice 10). Finished extractions are skipped,
|
| 4 |
+
# so a rerun resumes. Remote NPZs are streamed from spark-0110 and sha-checked by rare_paired.py.
|
| 5 |
+
# usage: run_all.sh (log: logs/run_all_<stamp>.log)
|
| 6 |
+
set -uo pipefail
|
| 7 |
+
P=/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/rare_states_paired_20261008
|
| 8 |
+
PY=/home/sj_server_1/miniforge3/envs/cxg_corpus/bin/python
|
| 9 |
+
LOG=$P/logs/run_all_$(date +%Y%m%dT%H%M%S).log
|
| 10 |
+
avail=$(awk '/MemAvailable/ {print int($2/1048576)}' /proc/meminfo)
|
| 11 |
+
(( avail - 32 > 24 )) || { echo "MemAvailable ${avail} GiB - 32 <= 24 GiB; not starting" >&2; exit 3; }
|
| 12 |
+
JOBS=$P/logs/jobs_$(date +%Y%m%dT%H%M%S).txt
|
| 13 |
+
: > "$JOBS"
|
| 14 |
+
for ds in ye2026_sepsis imperial_eskd giroux2022 ji2025_chili; do
|
| 15 |
+
for j in 0 1 2 3 4; do for a in zs_raw zs_cal scsemi5 lora5; do echo "extract $ds fewpair $j $a" >> "$JOBS"; done; done
|
| 16 |
+
for a in zs__raw zs__cal scsemi__raw real_lora__raw; do echo "extract $ds fivefold - $a" >> "$JOBS"; done
|
| 17 |
+
done
|
| 18 |
+
echo "analyze" >> "$JOBS"
|
| 19 |
+
systemd-run --user --scope --quiet -p MemoryMax=24G -p MemorySwapMax=0 -p CPUQuota=400% nice -n 10 \
|
| 20 |
+
env CUDA_VISIBLE_DEVICES= PYTHONDONTWRITEBYTECODE=1 OMP_NUM_THREADS=4 OPENBLAS_NUM_THREADS=4 \
|
| 21 |
+
bash -c 'n_fail=0; while IFS= read -r line <&3; do echo "JOB $(date +%FT%T) $line"; '"$PY"' '"$P"'/tools/rare_paired.py $line </dev/null \
|
| 22 |
+
|| { n_fail=$((n_fail+1)); echo "FAIL $line"; }; done 3< '"$JOBS"'; echo "DONE failed=$n_fail jobs=$(wc -l < '"$JOBS"')"' >> "$LOG" 2>&1
|
| 23 |
+
echo "log: $LOG"; tail -2 "$LOG"
|