junidude14 commited on
Commit
67eeee3
·
verified ·
1 Parent(s): 21144a2

Archive 4 checkpoints (1-4)

Browse files
paper-releases/pbisc-diffusion/updates/20261012T130738Z-strictpairs-implementation/diffusion/dataset/server_1/model8/plans/paper_figures_strictpairs_20261012/archive/20261012T130738Z-strictpairs-implementation/snapshot/scores_pilot/diffusion_only/patient_mapping.csv ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ sample_id,donor_id
2
+ HS3,HS3
3
+ HS6,HS6
4
+ HS7,HS7
5
+ HS13,HS13
6
+ HS18,HS18
7
+ HS31,HS31
8
+ HS34,HS34
9
+ HS37,HS37
10
+ HS38,HS38
11
+ HS52,HS52
12
+ HS58,HS58
13
+ HS60,HS60
14
+ HS66,HS66
15
+ HS81,HS81
16
+ HS82,HS82
17
+ HS83,HS83
18
+ HS85,HS85
19
+ HS86,HS86
20
+ HS95,HS95
21
+ HS98,HS98
22
+ HS101,HS101
23
+ HS107,HS107
paper-releases/pbisc-diffusion/updates/20261012T130738Z-strictpairs-implementation/diffusion/dataset/server_1/model8/plans/paper_figures_strictpairs_20261012/archive/20261012T130738Z-strictpairs-implementation/snapshot/scores_pilot/diffusion_only/score/README.md ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # score_ft.py output: immicro, 22 scored donors
2
+
3
+ Arms: lora, pairedcal. 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/immicro/reference.npz` (sha c5e2547be3ec), built from datadir:/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paired_finetune_intradataset_20260927/data/immicro;
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/utility_studies_final6k_20260925/immicro/labels/observed_immicro/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 (1004 genes).
13
+ - Scoring genes: 6k panel genes measured by both assays in every sample of the dataset (5508 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 22 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) (3300 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.9958, 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.9936, 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): not computed (--no-contrast).
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`): not computed (--no-deg).
51
+
52
+ ## Files
53
+ - `per_donor.csv`: one row per arm x donor (all per-donor quantities above).
54
+ - `summary.json`: per arm the donor means / pooled values, provenance (NPZ sha, receipt check, generation metadata,
55
+ Poisson nnz of the whole NPZ, annotation contract), and the reference block (PCA, R2 control).
56
+ - `contrast.csv`: per arm x cell type x statistic (`mean_cp10k`, `pseudobulk_log1p_cpm`: logFC r; `welch_top50_deg`:
57
+ top-50 DEG overlap, T / B / Monocyte / NK / DC; columns of the other kind are empty).
58
+ - `arms/<arm>/labels/` (predict_scanvi.py labels + manifest), `arms/<arm>/generated_cells.parquet` (NPZ row, donor, label,
59
+ UMI on the scoring genes, P/C subsample flag), `arms/<arm>/deg_top50_lists.csv` (observed, generated and broadcast
60
+ top-50 gene lists, Ensembl ids, rank order).
paper-releases/pbisc-diffusion/updates/20261012T130738Z-strictpairs-implementation/diffusion/dataset/server_1/model8/plans/paper_figures_strictpairs_20261012/archive/20261012T130738Z-strictpairs-implementation/snapshot/scores_pilot/diffusion_only/score/arms/lora/generated_cells.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9144b7bf1556a3cdcab007d4ae4e97c0bdde1ba8be47e2a77af06650300e0351
3
+ size 291765
paper-releases/pbisc-diffusion/updates/20261012T130738Z-strictpairs-implementation/diffusion/dataset/server_1/model8/plans/paper_figures_strictpairs_20261012/archive/20261012T130738Z-strictpairs-implementation/snapshot/scores_pilot/diffusion_only/score/arms/lora/labels/labels.manifest.json ADDED
@@ -0,0 +1,156 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "dataset_id": "GSE314416_ImMicro",
3
+ "split": "generated",
4
+ "input_h5ad": "/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paper_figures_strictpairs_20261012/scores_pilot/diffusion_only/score/arms/lora/query.h5ad",
5
+ "method": "lora",
6
+ "out_parquet": "/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paper_figures_strictpairs_20261012/scores_pilot/diffusion_only/score/arms/lora/labels/labels.parquet",
7
+ "training_source": "/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/aifi_scanvi_rebuild_20260916/reference/aifi_reference_f01common.h5ad",
8
+ "target_truth_used_for_fitting": false,
9
+ "classifier": "aifi_scanvi_rebuild_20260916_frozen_predict[aifi_scanvi_f01common_v1]",
10
+ "labels": [
11
+ "T cell",
12
+ "B cell",
13
+ "Monocyte",
14
+ "NK cell",
15
+ "DC",
16
+ "Other"
17
+ ],
18
+ "l2_labels": [
19
+ "ASDC",
20
+ "CD14 monocyte",
21
+ "CD16 monocyte",
22
+ "CD56bright NK cell",
23
+ "CD56dim NK cell",
24
+ "CD8aa",
25
+ "DN T cell",
26
+ "Effector B cell",
27
+ "Erythrocyte",
28
+ "ILC",
29
+ "Intermediate monocyte",
30
+ "MAIT",
31
+ "Memory B cell",
32
+ "Memory CD4 T cell",
33
+ "Memory CD8 T cell",
34
+ "Naive B cell",
35
+ "Naive CD4 T cell",
36
+ "Naive CD8 T cell",
37
+ "Plasma cell",
38
+ "Platelet",
39
+ "Progenitor cell",
40
+ "Proliferating NK cell",
41
+ "Proliferating T cell",
42
+ "Transitional B cell",
43
+ "Treg",
44
+ "cDC1",
45
+ "cDC2",
46
+ "gdT",
47
+ "pDC"
48
+ ],
49
+ "n_cells": 33000,
50
+ "n_genes": 1005,
51
+ "note": "Evaluation-only annotation with a frozen AIFI scANVI (zero query-training epochs); L1 outside PBMC5 -> Other, never dropped.",
52
+ "label_source_column": "AIFI_L2 (reference) -> AIFI_L2_TO_L1 -> PBMC5 + Other",
53
+ "query_train_epochs": 0,
54
+ "confidence_threshold": 0.0,
55
+ "subset": false,
56
+ "evaluator_aligned": true,
57
+ "gene_space": {
58
+ "join_key": "ensembl_id",
59
+ "model_genes": 1005,
60
+ "query_genes": 1004,
61
+ "model_genes_missing_from_query_zero_padded": 1,
62
+ "query_genes_outside_model_dropped": 0,
63
+ "rule": "query is subset/reordered to the model's gene list; zero-padding of absent model genes is refused unless --allow-missing-genes"
64
+ },
65
+ "readout": null,
66
+ "query_build": {
67
+ "kind": "generated_npz",
68
+ "poisson_note": "one draw over the whole NPZ, then the scored donors' rows",
69
+ "readout": "poisson",
70
+ "seed": 20260916,
71
+ "set": "lora",
72
+ "source_path": "/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paper_figures_strictpairs_20261012/generated/immicro/healthy/fold0/n5/lora.npz",
73
+ "source_sha256": "b5cb9f117896f42c0174a90d3f99907562afcdcf9eeb6587b58fcc0335c84401"
74
+ },
75
+ "model": {
76
+ "scanvi_model_dir": "/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/aifi_scanvi_rebuild_20260916/runs/aifi_scanvi_f01common_v1/scanvi_model",
77
+ "model_pt_sha256": "bf3655899e5abee435340fc008656c4a17342da0f30b70cfd43de8e9223e1930",
78
+ "model_manifest": "/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/aifi_scanvi_rebuild_20260916/runs/aifi_scanvi_f01common_v1/MODEL_MANIFEST.json",
79
+ "held_out_summary": {
80
+ "l2_accuracy": 0.8692869740488788,
81
+ "l2_macro_f1": 0.8500925599737216,
82
+ "l1_accuracy": 0.9918367346938776,
83
+ "l1_macro_f1": 0.9715232379009036,
84
+ "pbmc5_other_accuracy": 0.9920886873267826,
85
+ "pbmc5_other_macro_f1": 0.9812088972148597
86
+ }
87
+ },
88
+ "label_counts": {
89
+ "celltype_l1_pred": {
90
+ "T cell": 22733,
91
+ "Monocyte": 4852,
92
+ "B cell": 2302,
93
+ "NK cell": 1518,
94
+ "DC": 1364,
95
+ "Other": 231
96
+ },
97
+ "aifi_l1": {
98
+ "T cell": 22733,
99
+ "Monocyte": 4852,
100
+ "B cell": 2302,
101
+ "NK cell": 1518,
102
+ "DC": 1364,
103
+ "ILC": 177,
104
+ "Erythrocyte": 37,
105
+ "Progenitor cell": 15,
106
+ "Platelet": 2
107
+ },
108
+ "aifi_l2": {
109
+ "Naive CD4 T cell": 6555,
110
+ "Memory CD4 T cell": 4768,
111
+ "Memory CD8 T cell": 3400,
112
+ "gdT": 3325,
113
+ "CD14 monocyte": 2887,
114
+ "Naive CD8 T cell": 2224,
115
+ "Memory B cell": 1859,
116
+ "Intermediate monocyte": 1181,
117
+ "cDC2": 1063,
118
+ "Treg": 884,
119
+ "CD56dim NK cell": 816,
120
+ "CD16 monocyte": 784,
121
+ "MAIT": 721,
122
+ "CD8aa": 696,
123
+ "CD56bright NK cell": 565,
124
+ "Naive B cell": 266,
125
+ "pDC": 237,
126
+ "ILC": 177,
127
+ "Effector B cell": 148,
128
+ "DN T cell": 143,
129
+ "Proliferating NK cell": 137,
130
+ "ASDC": 38,
131
+ "Erythrocyte": 37,
132
+ "cDC1": 26,
133
+ "Transitional B cell": 22,
134
+ "Proliferating T cell": 17,
135
+ "Progenitor cell": 15,
136
+ "Plasma cell": 7,
137
+ "Platelet": 2
138
+ }
139
+ },
140
+ "confidence": {
141
+ "mean_l2_max_prob": 0.9200920877980463,
142
+ "mean_l1_mass": 0.984205961227417,
143
+ "frac_l2_max_prob_ge_0.5": 0.976909090909091
144
+ },
145
+ "timings_s": {
146
+ "predict": 0.4,
147
+ "total": 0.7
148
+ },
149
+ "versions": {
150
+ "scvi-tools": "1.4.1",
151
+ "torch": "2.11.0+cu130",
152
+ "anndata": "0.12.19"
153
+ },
154
+ "device": "cpu",
155
+ "created_at_utc": "2026-10-12T11:06:44.362103+00:00"
156
+ }