junidude14 commited on
Commit
1769bf1
·
verified ·
1 Parent(s): 250472c

Archive 4 checkpoints (1-4)

Browse files
paper-releases/pbisc-diffusion/updates/20261008T022410Z-deconv-scsemi-deck/diffusion/dataset/server_1/model8/plans/paired_finetune_intradataset_20260927/scores/ye2026_sepsis/scsemi_budget_20261002/fold0/arms/scsemi_n10__raw/deg_top50_lists.csv ADDED
@@ -0,0 +1,252 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ celltype,source,rank,gene_id
2
+ T cell,observed,1,ENSG00000110077
3
+ T cell,observed,2,ENSG00000163606
4
+ T cell,observed,3,ENSG00000102245
5
+ T cell,observed,4,ENSG00000171115
6
+ T cell,observed,5,ENSG00000262655
7
+ T cell,observed,6,ENSG00000216937
8
+ T cell,observed,7,ENSG00000135426
9
+ T cell,observed,8,ENSG00000145687
10
+ T cell,observed,9,ENSG00000173208
11
+ T cell,observed,10,ENSG00000166750
12
+ T cell,observed,11,ENSG00000167106
13
+ T cell,observed,12,ENSG00000070190
14
+ T cell,observed,13,ENSG00000115415
15
+ T cell,observed,14,ENSG00000082512
16
+ T cell,observed,15,ENSG00000166432
17
+ T cell,observed,16,ENSG00000160593
18
+ T cell,observed,17,ENSG00000116138
19
+ T cell,observed,18,ENSG00000156299
20
+ T cell,observed,19,ENSG00000185621
21
+ T cell,observed,20,ENSG00000133805
22
+ T cell,observed,21,ENSG00000137992
23
+ T cell,observed,22,ENSG00000174123
24
+ T cell,observed,23,ENSG00000178562
25
+ T cell,observed,24,ENSG00000071575
26
+ T cell,observed,25,ENSG00000107863
27
+ T cell,observed,26,ENSG00000116525
28
+ T cell,observed,27,ENSG00000121289
29
+ T cell,observed,28,ENSG00000181722
30
+ T cell,observed,29,ENSG00000188641
31
+ T cell,observed,30,ENSG00000124459
32
+ T cell,observed,31,ENSG00000197548
33
+ T cell,observed,32,ENSG00000138641
34
+ T cell,observed,33,ENSG00000152683
35
+ T cell,observed,34,ENSG00000183337
36
+ T cell,observed,35,ENSG00000172575
37
+ T cell,observed,36,ENSG00000171817
38
+ T cell,observed,37,ENSG00000173065
39
+ T cell,observed,38,ENSG00000100242
40
+ T cell,observed,39,ENSG00000011523
41
+ T cell,observed,40,ENSG00000173214
42
+ T cell,observed,41,ENSG00000177272
43
+ T cell,observed,42,ENSG00000158623
44
+ T cell,observed,43,ENSG00000128513
45
+ T cell,observed,44,ENSG00000100351
46
+ T cell,observed,45,ENSG00000070269
47
+ T cell,observed,46,ENSG00000104689
48
+ T cell,observed,47,ENSG00000133103
49
+ T cell,observed,48,ENSG00000065413
50
+ T cell,observed,49,ENSG00000134146
51
+ T cell,observed,50,ENSG00000170581
52
+ B cell,observed,1,ENSG00000113088
53
+ B cell,observed,2,ENSG00000066923
54
+ B cell,observed,3,ENSG00000102245
55
+ B cell,observed,4,ENSG00000184613
56
+ B cell,observed,5,ENSG00000058866
57
+ B cell,observed,6,ENSG00000215788
58
+ B cell,observed,7,ENSG00000127152
59
+ B cell,observed,8,ENSG00000081059
60
+ B cell,observed,9,ENSG00000171643
61
+ B cell,observed,10,ENSG00000172673
62
+ B cell,observed,11,ENSG00000010610
63
+ B cell,observed,12,ENSG00000182489
64
+ B cell,observed,13,ENSG00000156052
65
+ B cell,observed,14,ENSG00000163689
66
+ B cell,observed,15,ENSG00000248905
67
+ B cell,observed,16,ENSG00000091129
68
+ B cell,observed,17,ENSG00000109943
69
+ B cell,observed,18,ENSG00000066294
70
+ B cell,observed,19,ENSG00000188322
71
+ B cell,observed,20,ENSG00000174123
72
+ B cell,observed,21,ENSG00000162804
73
+ B cell,observed,22,ENSG00000172164
74
+ B cell,observed,23,ENSG00000152495
75
+ B cell,observed,24,ENSG00000153898
76
+ B cell,observed,25,ENSG00000104490
77
+ B cell,observed,26,ENSG00000122223
78
+ B cell,observed,27,ENSG00000196975
79
+ B cell,observed,28,ENSG00000137766
80
+ B cell,observed,29,ENSG00000172575
81
+ B cell,observed,30,ENSG00000126821
82
+ B cell,observed,31,ENSG00000114013
83
+ B cell,observed,32,ENSG00000140853
84
+ B cell,observed,33,ENSG00000203710
85
+ B cell,observed,34,ENSG00000216937
86
+ B cell,observed,35,ENSG00000188906
87
+ B cell,observed,36,ENSG00000147138
88
+ B cell,observed,37,ENSG00000100351
89
+ B cell,observed,38,ENSG00000135426
90
+ B cell,observed,39,ENSG00000151490
91
+ B cell,observed,40,ENSG00000186814
92
+ B cell,observed,41,ENSG00000197548
93
+ B cell,observed,42,ENSG00000140750
94
+ B cell,observed,43,ENSG00000197385
95
+ B cell,observed,44,ENSG00000035403
96
+ B cell,observed,45,ENSG00000115956
97
+ B cell,observed,46,ENSG00000100242
98
+ B cell,observed,47,ENSG00000071575
99
+ B cell,observed,48,ENSG00000071073
100
+ B cell,observed,49,ENSG00000140548
101
+ B cell,observed,50,ENSG00000058091
102
+ Monocyte,observed,1,ENSG00000115590
103
+ Monocyte,observed,2,ENSG00000087116
104
+ Monocyte,observed,3,ENSG00000100079
105
+ Monocyte,observed,4,ENSG00000155659
106
+ Monocyte,observed,5,ENSG00000166428
107
+ Monocyte,observed,6,ENSG00000140545
108
+ Monocyte,observed,7,ENSG00000113088
109
+ Monocyte,observed,8,ENSG00000173369
110
+ Monocyte,observed,9,ENSG00000138821
111
+ Monocyte,observed,10,ENSG00000081059
112
+ Monocyte,observed,11,ENSG00000138795
113
+ Monocyte,observed,12,ENSG00000168685
114
+ Monocyte,observed,13,ENSG00000078053
115
+ Monocyte,observed,14,ENSG00000146122
116
+ Monocyte,observed,15,ENSG00000179344
117
+ Monocyte,observed,16,ENSG00000184613
118
+ Monocyte,observed,17,ENSG00000186810
119
+ Monocyte,observed,18,ENSG00000100385
120
+ Monocyte,observed,19,ENSG00000174705
121
+ Monocyte,observed,20,ENSG00000152495
122
+ Monocyte,observed,21,ENSG00000109321
123
+ Monocyte,observed,22,ENSG00000013725
124
+ Monocyte,observed,23,ENSG00000172575
125
+ Monocyte,observed,24,ENSG00000153823
126
+ Monocyte,observed,25,ENSG00000172543
127
+ Monocyte,observed,26,ENSG00000147138
128
+ Monocyte,observed,27,ENSG00000110448
129
+ Monocyte,observed,28,ENSG00000115085
130
+ Monocyte,observed,29,ENSG00000160856
131
+ Monocyte,observed,30,ENSG00000173114
132
+ Monocyte,observed,31,ENSG00000168209
133
+ Monocyte,observed,32,ENSG00000111796
134
+ Monocyte,observed,33,ENSG00000008517
135
+ Monocyte,observed,34,ENSG00000167286
136
+ Monocyte,observed,35,ENSG00000198851
137
+ Monocyte,observed,36,ENSG00000102245
138
+ Monocyte,observed,37,ENSG00000143184
139
+ Monocyte,observed,38,ENSG00000113263
140
+ Monocyte,observed,39,ENSG00000073861
141
+ Monocyte,observed,40,ENSG00000172673
142
+ Monocyte,observed,41,ENSG00000173372
143
+ Monocyte,observed,42,ENSG00000183918
144
+ Monocyte,observed,43,ENSG00000198821
145
+ Monocyte,observed,44,ENSG00000027869
146
+ Monocyte,observed,45,ENSG00000178562
147
+ Monocyte,observed,46,ENSG00000065675
148
+ Monocyte,observed,47,ENSG00000124181
149
+ Monocyte,observed,48,ENSG00000106178
150
+ Monocyte,observed,49,ENSG00000141384
151
+ Monocyte,observed,50,ENSG00000196935
152
+ NK cell,observed,1,ENSG00000185215
153
+ NK cell,observed,2,ENSG00000100079
154
+ NK cell,observed,3,ENSG00000106066
155
+ NK cell,observed,4,ENSG00000110077
156
+ NK cell,observed,5,ENSG00000171916
157
+ NK cell,observed,6,ENSG00000170298
158
+ NK cell,observed,7,ENSG00000124507
159
+ NK cell,observed,8,ENSG00000010610
160
+ NK cell,observed,9,ENSG00000121552
161
+ NK cell,observed,10,ENSG00000196159
162
+ NK cell,observed,11,ENSG00000197629
163
+ NK cell,observed,12,ENSG00000172243
164
+ NK cell,observed,13,ENSG00000120708
165
+ NK cell,observed,14,ENSG00000126759
166
+ NK cell,observed,15,ENSG00000172322
167
+ NK cell,observed,16,ENSG00000140749
168
+ NK cell,observed,17,ENSG00000120594
169
+ NK cell,observed,18,ENSG00000137393
170
+ NK cell,observed,19,ENSG00000184731
171
+ NK cell,observed,20,ENSG00000197467
172
+ NK cell,observed,21,ENSG00000121807
173
+ NK cell,observed,22,ENSG00000169744
174
+ NK cell,observed,23,ENSG00000104093
175
+ NK cell,observed,24,ENSG00000241399
176
+ NK cell,observed,25,ENSG00000151474
177
+ NK cell,observed,26,ENSG00000087253
178
+ NK cell,observed,27,ENSG00000102349
179
+ NK cell,observed,28,ENSG00000100154
180
+ NK cell,observed,29,ENSG00000101842
181
+ NK cell,observed,30,ENSG00000140543
182
+ NK cell,observed,31,ENSG00000261371
183
+ NK cell,observed,32,ENSG00000198223
184
+ NK cell,observed,33,ENSG00000136205
185
+ NK cell,observed,34,ENSG00000138119
186
+ NK cell,observed,35,ENSG00000101542
187
+ NK cell,observed,36,ENSG00000095637
188
+ NK cell,observed,37,ENSG00000168329
189
+ NK cell,observed,38,ENSG00000219481
190
+ NK cell,observed,39,ENSG00000035403
191
+ NK cell,observed,40,ENSG00000161638
192
+ NK cell,observed,41,ENSG00000147576
193
+ NK cell,observed,42,ENSG00000135426
194
+ NK cell,observed,43,ENSG00000170989
195
+ NK cell,observed,44,ENSG00000123636
196
+ NK cell,observed,45,ENSG00000185697
197
+ NK cell,observed,46,ENSG00000100385
198
+ NK cell,observed,47,ENSG00000160991
199
+ NK cell,observed,48,ENSG00000172575
200
+ NK cell,observed,49,ENSG00000006530
201
+ NK cell,observed,50,ENSG00000185989
202
+ DC,observed,1,ENSG00000179639
203
+ DC,observed,2,ENSG00000153823
204
+ DC,observed,3,ENSG00000163606
205
+ DC,observed,4,ENSG00000198561
206
+ DC,observed,5,ENSG00000081059
207
+ DC,observed,6,ENSG00000118922
208
+ DC,observed,7,ENSG00000150054
209
+ DC,observed,8,ENSG00000106034
210
+ DC,observed,9,ENSG00000112182
211
+ DC,observed,10,ENSG00000154229
212
+ DC,observed,11,ENSG00000074964
213
+ DC,observed,12,ENSG00000123607
214
+ DC,observed,13,ENSG00000165983
215
+ DC,observed,14,ENSG00000013725
216
+ DC,observed,15,ENSG00000136111
217
+ DC,observed,16,ENSG00000171408
218
+ DC,observed,17,ENSG00000104361
219
+ DC,observed,18,ENSG00000134852
220
+ DC,observed,19,ENSG00000100105
221
+ DC,observed,20,ENSG00000120162
222
+ DC,observed,21,ENSG00000150636
223
+ DC,observed,22,ENSG00000186260
224
+ DC,observed,23,ENSG00000111846
225
+ DC,observed,24,ENSG00000133059
226
+ DC,observed,25,ENSG00000104228
227
+ DC,observed,26,ENSG00000186854
228
+ DC,observed,27,ENSG00000114982
229
+ DC,observed,28,ENSG00000149292
230
+ DC,observed,29,ENSG00000171843
231
+ DC,observed,30,ENSG00000135362
232
+ DC,observed,31,ENSG00000109099
233
+ DC,observed,32,ENSG00000100890
234
+ DC,observed,33,ENSG00000187912
235
+ DC,observed,34,ENSG00000130023
236
+ DC,observed,35,ENSG00000116852
237
+ DC,observed,36,ENSG00000012174
238
+ DC,observed,37,ENSG00000269713
239
+ DC,observed,38,ENSG00000113761
240
+ DC,observed,39,ENSG00000137942
241
+ DC,observed,40,ENSG00000171617
242
+ DC,observed,41,ENSG00000135040
243
+ DC,observed,42,ENSG00000066651
244
+ DC,observed,43,ENSG00000120262
245
+ DC,observed,44,ENSG00000146373
246
+ DC,observed,45,ENSG00000115594
247
+ DC,observed,46,ENSG00000151422
248
+ DC,observed,47,ENSG00000151014
249
+ DC,observed,48,ENSG00000141447
250
+ DC,observed,49,ENSG00000115998
251
+ DC,observed,50,ENSG00000152315
252
+ DC,generated,1,ENSG00000198755
paper-releases/pbisc-diffusion/updates/20261008T022410Z-deconv-scsemi-deck/diffusion/dataset/server_1/model8/plans/paired_finetune_intradataset_20260927/scores/ye2026_sepsis/scsemi_cv_20261002/fold3/README.md ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # score_ft.py output: ye2026_sepsis, 16 scored donors
2
+
3
+ Arms: scsemi__raw. Every arm is scored on the same donors against the same observed reference.
4
+
5
+ ## Inputs and fixed contracts
6
+ - Observed reference: `/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paired_finetune_intradataset_20260927/scoring_cache/ye2026_sepsis/reference.npz` (sha bac12da8a241), built from datadir:/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paired_finetune_intradataset_20260927/data/ye2026_sepsis;
7
+ observed cells sum exactly to the features pseudobulk of every donor. Observed labels: /home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paired_finetune_intradataset_20260927/scoring_cache/ye2026_sepsis/observed_labels/labels/labels.parquet.
8
+ - Generated cells: `generated_counts` read out once with Poisson(seed 20260916) over the **whole NPZ in row order**
9
+ (`poisson_readout.poisson_integerise`), then the scored donors' rows. These integer counts are used for labels, embedding,
10
+ depth and the contrast. Pseudobulk uses the summed `generated_counts` (rates), as `score_generated.py`.
11
+ - Labels: frozen f01common scANVI (`predict_scanvi.py`, CPU, zero query epochs), six-type gate ['T cell', 'B cell', 'Monocyte', 'NK cell', 'DC', 'Other']; query genes =
12
+ the 1,006-gene annotation list minus genes the dataset's sc assay did not measure in every sample (1006 genes).
13
+ - Scoring genes: 6k panel genes measured by both assays in every sample of the dataset (5975 genes).
14
+
15
+ ## Definitions
16
+ 1. **Composition**: fraction of each donor's cells per six-type label (all generated cells; all observed QC cells).
17
+ `comp_l1` = sum over the six labels of |generated - observed| (immicro_common.l1). `comp_l1_obs_loo_null` = L1 of the
18
+ donor's observed composition to the mean of the *other scored donors'* observed compositions. `composition_top1` =
19
+ fraction of donors whose generated composition is closest (L1) to their own observed composition.
20
+ 2. **Pseudobulk**: `pb_r` = Pearson r of CPM-log1p(summed generated_counts) vs CPM-log1p(observed pseudobulk) on the scoring
21
+ genes (evaluate_realbulk.cpm_log1p / paired_r). `pb_top1` = the donor's generated pseudobulk is closest (Pearson) to its own
22
+ observed pseudobulk among the 16 scored donors (immicro_common.retrieval = evaluate_realbulk.top1 arithmetic).
23
+ 3. **Precision / coverage / density** (stage_b_embed.py functions): per-cell CP10K over the scoring genes + log1p; PCA-50
24
+ (randomized, random_state 20260925) and k = 10 real-real k-NN balls fitted on **R1 of the scored donors only**.
25
+ Reference rule (independent of fold and arm): per donor, cells in canonical order (library_id+barcode), one
26
+ permutation from `default_rng([20260925, uint64(sha256(donor)[:8])])`; R1 = first n, R2 = next n,
27
+ n = min(150, n_cells // 2) (2400 R1 cells here). Generated query: per donor n cells (the donor's R1 size),
28
+ without replacement, `default_rng([20260926, same key])`. Precision = fraction of generated cells inside any R1 ball
29
+ (Kynkaanniemi 2019); coverage = fraction of R1 cells whose ball holds a generated cell; density = Naeem 2020.
30
+ Per-donor precision = that donor's generated cells; per-donor coverage = that donor's R1 cells (the pooled values are
31
+ their n-weighted means; plain means when every donor has 150 reference cells). R2 (held-out real cells of the same donors) is the
32
+ perfect-generator control: precision 0.9967, coverage 1.0000.
33
+ **Depth matched**: stage_b_embed depth matching run pairwise (R1 vs this arm): per donor and within-donor rank of detected
34
+ genes, both cells are thinned by UMI sampling without replacement to the smaller detected-gene count; PCA kept from
35
+ un-thinned R1, radii recomputed on thinned R1; fresh rng(20260929) per arm. R2 control: precision
36
+ 0.9971, coverage 1.0000.
37
+ 4. **Monocyte %** = 100 x Monocyte fraction (all cells) per donor; **median UMI per cell** = median over cells of the
38
+ Poisson-read (generated) / observed counts summed over the scoring genes (per donor, and pooled).
39
+ 5. **Group contrast** (T, B, Monocyte, NK): case groups ['adult_sepsis', 'ped_sepsis'] (n = 13) vs control groups ['adult_HC', 'adult_ICU_ctrl', 'ped_HC', 'ped_ICU_ctrl'] (n = 3); rule: explicit --case-groups / --control-groups; groups from features groups.
40
+ Genes per type = scoring genes detected (count > 0) in >= 1 % of the scored donors' observed
41
+ cells of that type. Primary statistic `mean_cp10k`: per-cell CP10K over the scoring genes; per donor the mean over its
42
+ cells of the type (donors with >= 1 such cell); group mean = mean over the group's donors (donor-balanced);
43
+ logFC = log2(case mean + 1) - log2(control mean + 1). Secondary `pseudobulk_log1p_cpm`: the SLE benchmark evaluator's
44
+ statistic (donor x type summed counts, log1p CPM over the scoring genes, mean case - mean control;
45
+ evaluate_generated_vs_truth.group_log_fold_change). Both are computed on the generated cells (their frozen labels) and on
46
+ the observed cells; `r_generated` = Pearson r of the two logFC vectors. Broadcast baseline `r_broadcast`: the same
47
+ observed vector against the logFC of the input bulk (condition NPZ `bulk_counts` of the arm, scoring genes, per-donor
48
+ CP10K resp. log1p CPM, group means). `partial_r_generated_given_broadcast`: r of the OLS residuals of observed and
49
+ generated logFC on the bulk logFC (residual_specificity.py).
50
+ 6. **Top-50 DEG overlap** (contrast.csv rows `statistic = welch_top50_deg`; summary `deg_top50`): the SLE benchmark's score (`total_top50_overlap` of
51
+ `bulk2sc-paper/scripts/evaluate_generated_vs_truth.py`, Welch backend: the "top-50 DEG 81 / 84" of the final model), run
52
+ with the evaluator's own functions on the same donor x type pseudobulks as the contrast. Per cell type, observed and
53
+ generated separately: donor x type summed counts on all 5975 scoring genes (donors of the two groups with
54
+ >= 1 cell of the type) -> `welch_bh_deg` (log1p CPM, two-sided Welch t-test case vs control, Benjamini-Hochberg over the
55
+ genes with a defined p-value; needs >= 2 donors per group) -> `top_deg_genes` (FDR < 0.05, descending |logFC|,
56
+ first 50; shorter when fewer genes pass). `top50_overlap` = |observed list & generated list|; `top50_jaccard`
57
+ the evaluator's Jaccard. Summary `sum` = total over the scored types (the quantity reported as 81), `max` = the sum of
58
+ the observed list lengths (the "of 262"), `sum_4type` = T + B + Monocyte + NK. A type is scored when its observed test
59
+ is defined; an arm whose generated test is undefined for a scored type gets overlap 0. Types: T cell, B cell, Monocyte, NK cell, DC
60
+ (aggregates: /home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paired_finetune_intradataset_20260927/scoring_cache/ye2026_sepsis/deg_reference.npz).
61
+ **Broadcast analogue** (`top50_overlap_broadcast`, as `sle_broadcast.py` `broadcast_input_bulk`; not part of the
62
+ published benchmark): the same test on the arm's condition bulk_counts (scoring genes, the 13 + 3
63
+ donors), one whole-PBMC top-50 list, compared with every type's observed list.
64
+
65
+ ## Files
66
+ - `per_donor.csv`: one row per arm x donor (all per-donor quantities above).
67
+ - `summary.json`: per arm the donor means / pooled values, provenance (NPZ sha, receipt check, generation metadata,
68
+ Poisson nnz of the whole NPZ, annotation contract), and the reference block (PCA, R2 control).
69
+ - `contrast.csv`: per arm x cell type x statistic (`mean_cp10k`, `pseudobulk_log1p_cpm`: logFC r; `welch_top50_deg`:
70
+ top-50 DEG overlap, T / B / Monocyte / NK / DC; columns of the other kind are empty).
71
+ - `arms/<arm>/labels/` (predict_scanvi.py labels + manifest), `arms/<arm>/generated_cells.parquet` (NPZ row, donor, label,
72
+ UMI on the scoring genes, P/C subsample flag), `arms/<arm>/deg_top50_lists.csv` (observed, generated and broadcast
73
+ top-50 gene lists, Ensembl ids, rank order).
paper-releases/pbisc-diffusion/updates/20261008T022410Z-deconv-scsemi-deck/diffusion/dataset/server_1/model8/plans/paired_finetune_intradataset_20260927/scores/ye2026_sepsis/scsemi_cv_20261002/fold4/README.md ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # score_ft.py output: ye2026_sepsis, 16 scored donors
2
+
3
+ Arms: scsemi__raw. Every arm is scored on the same donors against the same observed reference.
4
+
5
+ ## Inputs and fixed contracts
6
+ - Observed reference: `/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paired_finetune_intradataset_20260927/scoring_cache/ye2026_sepsis/reference.npz` (sha bac12da8a241), built from datadir:/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paired_finetune_intradataset_20260927/data/ye2026_sepsis;
7
+ observed cells sum exactly to the features pseudobulk of every donor. Observed labels: /home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paired_finetune_intradataset_20260927/scoring_cache/ye2026_sepsis/observed_labels/labels/labels.parquet.
8
+ - Generated cells: `generated_counts` read out once with Poisson(seed 20260916) over the **whole NPZ in row order**
9
+ (`poisson_readout.poisson_integerise`), then the scored donors' rows. These integer counts are used for labels, embedding,
10
+ depth and the contrast. Pseudobulk uses the summed `generated_counts` (rates), as `score_generated.py`.
11
+ - Labels: frozen f01common scANVI (`predict_scanvi.py`, CPU, zero query epochs), six-type gate ['T cell', 'B cell', 'Monocyte', 'NK cell', 'DC', 'Other']; query genes =
12
+ the 1,006-gene annotation list minus genes the dataset's sc assay did not measure in every sample (1006 genes).
13
+ - Scoring genes: 6k panel genes measured by both assays in every sample of the dataset (5975 genes).
14
+
15
+ ## Definitions
16
+ 1. **Composition**: fraction of each donor's cells per six-type label (all generated cells; all observed QC cells).
17
+ `comp_l1` = sum over the six labels of |generated - observed| (immicro_common.l1). `comp_l1_obs_loo_null` = L1 of the
18
+ donor's observed composition to the mean of the *other scored donors'* observed compositions. `composition_top1` =
19
+ fraction of donors whose generated composition is closest (L1) to their own observed composition.
20
+ 2. **Pseudobulk**: `pb_r` = Pearson r of CPM-log1p(summed generated_counts) vs CPM-log1p(observed pseudobulk) on the scoring
21
+ genes (evaluate_realbulk.cpm_log1p / paired_r). `pb_top1` = the donor's generated pseudobulk is closest (Pearson) to its own
22
+ observed pseudobulk among the 16 scored donors (immicro_common.retrieval = evaluate_realbulk.top1 arithmetic).
23
+ 3. **Precision / coverage / density** (stage_b_embed.py functions): per-cell CP10K over the scoring genes + log1p; PCA-50
24
+ (randomized, random_state 20260925) and k = 10 real-real k-NN balls fitted on **R1 of the scored donors only**.
25
+ Reference rule (independent of fold and arm): per donor, cells in canonical order (library_id+barcode), one
26
+ permutation from `default_rng([20260925, uint64(sha256(donor)[:8])])`; R1 = first n, R2 = next n,
27
+ n = min(150, n_cells // 2) (2400 R1 cells here). Generated query: per donor n cells (the donor's R1 size),
28
+ without replacement, `default_rng([20260926, same key])`. Precision = fraction of generated cells inside any R1 ball
29
+ (Kynkaanniemi 2019); coverage = fraction of R1 cells whose ball holds a generated cell; density = Naeem 2020.
30
+ Per-donor precision = that donor's generated cells; per-donor coverage = that donor's R1 cells (the pooled values are
31
+ their n-weighted means; plain means when every donor has 150 reference cells). R2 (held-out real cells of the same donors) is the
32
+ perfect-generator control: precision 0.9975, coverage 1.0000.
33
+ **Depth matched**: stage_b_embed depth matching run pairwise (R1 vs this arm): per donor and within-donor rank of detected
34
+ genes, both cells are thinned by UMI sampling without replacement to the smaller detected-gene count; PCA kept from
35
+ un-thinned R1, radii recomputed on thinned R1; fresh rng(20260929) per arm. R2 control: precision
36
+ 0.9958, coverage 1.0000.
37
+ 4. **Monocyte %** = 100 x Monocyte fraction (all cells) per donor; **median UMI per cell** = median over cells of the
38
+ Poisson-read (generated) / observed counts summed over the scoring genes (per donor, and pooled).
39
+ 5. **Group contrast** (T, B, Monocyte, NK): case groups ['adult_sepsis', 'ped_sepsis'] (n = 12) vs control groups ['adult_HC', 'adult_ICU_ctrl', 'ped_HC', 'ped_ICU_ctrl'] (n = 4); rule: explicit --case-groups / --control-groups; groups from features groups.
40
+ Genes per type = scoring genes detected (count > 0) in >= 1 % of the scored donors' observed
41
+ cells of that type. Primary statistic `mean_cp10k`: per-cell CP10K over the scoring genes; per donor the mean over its
42
+ cells of the type (donors with >= 1 such cell); group mean = mean over the group's donors (donor-balanced);
43
+ logFC = log2(case mean + 1) - log2(control mean + 1). Secondary `pseudobulk_log1p_cpm`: the SLE benchmark evaluator's
44
+ statistic (donor x type summed counts, log1p CPM over the scoring genes, mean case - mean control;
45
+ evaluate_generated_vs_truth.group_log_fold_change). Both are computed on the generated cells (their frozen labels) and on
46
+ the observed cells; `r_generated` = Pearson r of the two logFC vectors. Broadcast baseline `r_broadcast`: the same
47
+ observed vector against the logFC of the input bulk (condition NPZ `bulk_counts` of the arm, scoring genes, per-donor
48
+ CP10K resp. log1p CPM, group means). `partial_r_generated_given_broadcast`: r of the OLS residuals of observed and
49
+ generated logFC on the bulk logFC (residual_specificity.py).
50
+ 6. **Top-50 DEG overlap** (contrast.csv rows `statistic = welch_top50_deg`; summary `deg_top50`): the SLE benchmark's score (`total_top50_overlap` of
51
+ `bulk2sc-paper/scripts/evaluate_generated_vs_truth.py`, Welch backend: the "top-50 DEG 81 / 84" of the final model), run
52
+ with the evaluator's own functions on the same donor x type pseudobulks as the contrast. Per cell type, observed and
53
+ generated separately: donor x type summed counts on all 5975 scoring genes (donors of the two groups with
54
+ >= 1 cell of the type) -> `welch_bh_deg` (log1p CPM, two-sided Welch t-test case vs control, Benjamini-Hochberg over the
55
+ genes with a defined p-value; needs >= 2 donors per group) -> `top_deg_genes` (FDR < 0.05, descending |logFC|,
56
+ first 50; shorter when fewer genes pass). `top50_overlap` = |observed list & generated list|; `top50_jaccard`
57
+ the evaluator's Jaccard. Summary `sum` = total over the scored types (the quantity reported as 81), `max` = the sum of
58
+ the observed list lengths (the "of 262"), `sum_4type` = T + B + Monocyte + NK. A type is scored when its observed test
59
+ is defined; an arm whose generated test is undefined for a scored type gets overlap 0. Types: T cell, B cell, Monocyte, NK cell, DC
60
+ (aggregates: /home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paired_finetune_intradataset_20260927/scoring_cache/ye2026_sepsis/deg_reference.npz).
61
+ **Broadcast analogue** (`top50_overlap_broadcast`, as `sle_broadcast.py` `broadcast_input_bulk`; not part of the
62
+ published benchmark): the same test on the arm's condition bulk_counts (scoring genes, the 12 + 4
63
+ donors), one whole-PBMC top-50 list, compared with every type's observed list.
64
+
65
+ ## Files
66
+ - `per_donor.csv`: one row per arm x donor (all per-donor quantities above).
67
+ - `summary.json`: per arm the donor means / pooled values, provenance (NPZ sha, receipt check, generation metadata,
68
+ Poisson nnz of the whole NPZ, annotation contract), and the reference block (PCA, R2 control).
69
+ - `contrast.csv`: per arm x cell type x statistic (`mean_cp10k`, `pseudobulk_log1p_cpm`: logFC r; `welch_top50_deg`:
70
+ top-50 DEG overlap, T / B / Monocyte / NK / DC; columns of the other kind are empty).
71
+ - `arms/<arm>/labels/` (predict_scanvi.py labels + manifest), `arms/<arm>/generated_cells.parquet` (NPZ row, donor, label,
72
+ UMI on the scoring genes, P/C subsample flag), `arms/<arm>/deg_top50_lists.csv` (observed, generated and broadcast
73
+ top-50 gene lists, Ensembl ids, rank order).
paper-releases/pbisc-diffusion/updates/20261008T022410Z-deconv-scsemi-deck/diffusion/dataset/server_1/model8/plans/paired_finetune_intradataset_20260927/scores/ye2026_sepsis/scsemi_cv_20261002/pooled/README.md ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # score_ft.py output: ye2026_sepsis, 82 scored donors
2
+
3
+ Arms: scsemi__raw. Every arm is scored on the same donors against the same observed reference.
4
+
5
+ ## Inputs and fixed contracts
6
+ - Observed reference: `/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paired_finetune_intradataset_20260927/scoring_cache/ye2026_sepsis/reference.npz` (sha bac12da8a241), built from datadir:/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paired_finetune_intradataset_20260927/data/ye2026_sepsis;
7
+ observed cells sum exactly to the features pseudobulk of every donor. Observed labels: /home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paired_finetune_intradataset_20260927/scoring_cache/ye2026_sepsis/observed_labels/labels/labels.parquet.
8
+ - Generated cells: `generated_counts` read out once with Poisson(seed 20260916) over the **whole NPZ in row order**
9
+ (`poisson_readout.poisson_integerise`), then the scored donors' rows. These integer counts are used for labels, embedding,
10
+ depth and the contrast. Pseudobulk uses the summed `generated_counts` (rates), as `score_generated.py`.
11
+ - Labels: frozen f01common scANVI (`predict_scanvi.py`, CPU, zero query epochs), six-type gate ['T cell', 'B cell', 'Monocyte', 'NK cell', 'DC', 'Other']; query genes =
12
+ the 1,006-gene annotation list minus genes the dataset's sc assay did not measure in every sample (1006 genes).
13
+ - Scoring genes: 6k panel genes measured by both assays in every sample of the dataset (5975 genes).
14
+
15
+ ## Definitions
16
+ 1. **Composition**: fraction of each donor's cells per six-type label (all generated cells; all observed QC cells).
17
+ `comp_l1` = sum over the six labels of |generated - observed| (immicro_common.l1). `comp_l1_obs_loo_null` = L1 of the
18
+ donor's observed composition to the mean of the *other scored donors'* observed compositions. `composition_top1` =
19
+ fraction of donors whose generated composition is closest (L1) to their own observed composition.
20
+ 2. **Pseudobulk**: `pb_r` = Pearson r of CPM-log1p(summed generated_counts) vs CPM-log1p(observed pseudobulk) on the scoring
21
+ genes (evaluate_realbulk.cpm_log1p / paired_r). `pb_top1` = the donor's generated pseudobulk is closest (Pearson) to its own
22
+ observed pseudobulk among the 82 scored donors (immicro_common.retrieval = evaluate_realbulk.top1 arithmetic).
23
+ 3. **Precision / coverage / density** (stage_b_embed.py functions): per-cell CP10K over the scoring genes + log1p; PCA-50
24
+ (randomized, random_state 20260925) and k = 10 real-real k-NN balls fitted on **R1 of the scored donors only**.
25
+ Reference rule (independent of fold and arm): per donor, cells in canonical order (library_id+barcode), one
26
+ permutation from `default_rng([20260925, uint64(sha256(donor)[:8])])`; R1 = first n, R2 = next n,
27
+ n = min(150, n_cells // 2) (12300 R1 cells here). Generated query: per donor n cells (the donor's R1 size),
28
+ without replacement, `default_rng([20260926, same key])`. Precision = fraction of generated cells inside any R1 ball
29
+ (Kynkaanniemi 2019); coverage = fraction of R1 cells whose ball holds a generated cell; density = Naeem 2020.
30
+ Per-donor precision = that donor's generated cells; per-donor coverage = that donor's R1 cells (the pooled values are
31
+ their n-weighted means; plain means when every donor has 150 reference cells). R2 (held-out real cells of the same donors) is the
32
+ perfect-generator control: precision 0.9805, coverage 0.9997.
33
+ **Depth matched**: stage_b_embed depth matching run pairwise (R1 vs this arm): per donor and within-donor rank of detected
34
+ genes, both cells are thinned by UMI sampling without replacement to the smaller detected-gene count; PCA kept from
35
+ un-thinned R1, radii recomputed on thinned R1; fresh rng(20260929) per arm. R2 control: precision
36
+ 0.9796, coverage 0.9998.
37
+ 4. **Monocyte %** = 100 x Monocyte fraction (all cells) per donor; **median UMI per cell** = median over cells of the
38
+ Poisson-read (generated) / observed counts summed over the scoring genes (per donor, and pooled).
39
+ 5. **Group contrast** (T, B, Monocyte, NK): case groups ['adult_sepsis', 'ped_sepsis'] (n = 61) vs control groups ['adult_HC', 'adult_ICU_ctrl', 'ped_HC', 'ped_ICU_ctrl'] (n = 21); rule: explicit --case-groups / --control-groups; groups from features groups.
40
+ Genes per type = scoring genes detected (count > 0) in >= 1 % of the scored donors' observed
41
+ cells of that type. Primary statistic `mean_cp10k`: per-cell CP10K over the scoring genes; per donor the mean over its
42
+ cells of the type (donors with >= 1 such cell); group mean = mean over the group's donors (donor-balanced);
43
+ logFC = log2(case mean + 1) - log2(control mean + 1). Secondary `pseudobulk_log1p_cpm`: the SLE benchmark evaluator's
44
+ statistic (donor x type summed counts, log1p CPM over the scoring genes, mean case - mean control;
45
+ evaluate_generated_vs_truth.group_log_fold_change). Both are computed on the generated cells (their frozen labels) and on
46
+ the observed cells; `r_generated` = Pearson r of the two logFC vectors. Broadcast baseline `r_broadcast`: the same
47
+ observed vector against the logFC of the input bulk (condition NPZ `bulk_counts` of the arm, scoring genes, per-donor
48
+ CP10K resp. log1p CPM, group means). `partial_r_generated_given_broadcast`: r of the OLS residuals of observed and
49
+ generated logFC on the bulk logFC (residual_specificity.py).
50
+ 6. **Top-50 DEG overlap** (contrast.csv rows `statistic = welch_top50_deg`; summary `deg_top50`): the SLE benchmark's score (`total_top50_overlap` of
51
+ `bulk2sc-paper/scripts/evaluate_generated_vs_truth.py`, Welch backend: the "top-50 DEG 81 / 84" of the final model), run
52
+ with the evaluator's own functions on the same donor x type pseudobulks as the contrast. Per cell type, observed and
53
+ generated separately: donor x type summed counts on all 5975 scoring genes (donors of the two groups with
54
+ >= 1 cell of the type) -> `welch_bh_deg` (log1p CPM, two-sided Welch t-test case vs control, Benjamini-Hochberg over the
55
+ genes with a defined p-value; needs >= 2 donors per group) -> `top_deg_genes` (FDR < 0.05, descending |logFC|,
56
+ first 50; shorter when fewer genes pass). `top50_overlap` = |observed list & generated list|; `top50_jaccard`
57
+ the evaluator's Jaccard. Summary `sum` = total over the scored types (the quantity reported as 81), `max` = the sum of
58
+ the observed list lengths (the "of 262"), `sum_4type` = T + B + Monocyte + NK. A type is scored when its observed test
59
+ is defined; an arm whose generated test is undefined for a scored type gets overlap 0. Types: T cell, B cell, Monocyte, NK cell, DC
60
+ (aggregates: /home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paired_finetune_intradataset_20260927/scoring_cache/ye2026_sepsis/deg_reference.npz).
61
+ **Broadcast analogue** (`top50_overlap_broadcast`, as `sle_broadcast.py` `broadcast_input_bulk`; not part of the
62
+ published benchmark): the same test on the arm's condition bulk_counts (scoring genes, the 61 + 21
63
+ donors), one whole-PBMC top-50 list, compared with every type's observed list.
64
+
65
+ ## Files
66
+ - `per_donor.csv`: one row per arm x donor (all per-donor quantities above).
67
+ - `summary.json`: per arm the donor means / pooled values, provenance (NPZ sha, receipt check, generation metadata,
68
+ Poisson nnz of the whole NPZ, annotation contract), and the reference block (PCA, R2 control).
69
+ - `contrast.csv`: per arm x cell type x statistic (`mean_cp10k`, `pseudobulk_log1p_cpm`: logFC r; `welch_top50_deg`:
70
+ top-50 DEG overlap, T / B / Monocyte / NK / DC; columns of the other kind are empty).
71
+ - `arms/<arm>/labels/` (predict_scanvi.py labels + manifest), `arms/<arm>/generated_cells.parquet` (NPZ row, donor, label,
72
+ UMI on the scoring genes, P/C subsample flag), `arms/<arm>/deg_top50_lists.csv` (observed, generated and broadcast
73
+ top-50 gene lists, Ensembl ids, rank order).