Archive 4 checkpoints (1-4)
Browse files- paper-releases/pbisc-diffusion/updates/20261005T121346Z-scsemi-cv-budget-interim/diffusion/dataset/server_1/model8/plans/paired_finetune_intradataset_20260927/scores/immicro/scsemi_cv_20261002/fold4/README.md +60 -0
- paper-releases/pbisc-diffusion/updates/20261005T121346Z-scsemi-cv-budget-interim/diffusion/dataset/server_1/model8/plans/paired_finetune_intradataset_20260927/scores/immicro/scsemi_cv_20261002/fold4/per_donor.csv +22 -0
- paper-releases/pbisc-diffusion/updates/20261005T121346Z-scsemi-cv-budget-interim/diffusion/dataset/server_1/model8/plans/paired_finetune_intradataset_20260927/scores/immicro/scsemi_cv_20261002/fold4/summary.json +207 -0
- paper-releases/pbisc-diffusion/updates/20261005T121346Z-scsemi-cv-budget-interim/diffusion/dataset/server_1/model8/plans/paired_finetune_intradataset_20260927/scores/immicro/scsemi_cv_20261002/pooled/README.md +60 -0
paper-releases/pbisc-diffusion/updates/20261005T121346Z-scsemi-cv-budget-interim/diffusion/dataset/server_1/model8/plans/paired_finetune_intradataset_20260927/scores/immicro/scsemi_cv_20261002/fold4/README.md
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# score_ft.py output: immicro, 21 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/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 21 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) (3150 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.9946, 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.9949, 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 (dataset immicro has no group contrast (use --groups-csv / --case-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`): not computed (contrast off).
|
| 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/20261005T121346Z-scsemi-cv-budget-interim/diffusion/dataset/server_1/model8/plans/paired_finetune_intradataset_20260927/scores/immicro/scsemi_cv_20261002/fold4/per_donor.csv
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
arm,donor,group,n_generated_cells,n_observed_cells,n_reference_cells,gen_T cell,obs_T cell,gen_B cell,obs_B cell,gen_Monocyte,obs_Monocyte,gen_NK cell,obs_NK cell,gen_DC,obs_DC,gen_Other,obs_Other,comp_l1,comp_l1_obs_loo_null,pb_r,pb_own_rank,pb_top1,precision,coverage,precision_depth_matched,coverage_depth_matched,mono_pct_gen,mono_pct_obs,median_umi_gen,median_umi_obs
|
| 2 |
+
scsemi__raw,HS8,DB1,1500,3652,150,0.658,0.6251369112814896,0.07133333333333333,0.06489594742606791,0.16133333333333333,0.15553121577217963,0.04133333333333333,0.11829134720700986,0.06533333333333333,0.028477546549835708,0.0026666666666666666,0.007667031763417305,0.1639167579408543,0.12540728817026567,0.6610110873132083,5,False,0.7533333333333333,0.10666666666666667,0.9333333333333333,0.4,16.133333333333333,15.553121577217963,1959.5,1817.0
|
| 3 |
+
scsemi__raw,HS11,DB6,1500,2886,150,0.7226666666666667,0.6056826056826057,0.072,0.061330561330561334,0.12933333333333333,0.24358974358974358,0.037333333333333336,0.04054054054054054,0.037333333333333336,0.04573804573804574,0.0013333333333333333,0.0031185031185031187,0.2553069993069993,0.2561903186031127,0.6734719829889487,6,False,0.7933333333333333,0.09333333333333334,0.9,0.4066666666666667,12.933333333333334,24.358974358974358,1955.0,2216.5
|
| 4 |
+
scsemi__raw,HS20,DB7,1500,1366,150,0.7033333333333334,0.7657393850658858,0.104,0.09882869692532943,0.07,0.08345534407027819,0.02266666666666667,0.029282576866764276,0.09733333333333333,0.015373352855051245,0.0026666666666666666,0.007320644216691069,0.17426256710590526,0.24496652935329646,0.6042765741781263,15,False,0.7066666666666667,0.04666666666666667,0.9866666666666667,0.3,7.000000000000001,8.345534407027818,1955.5,2271.0
|
| 5 |
+
scsemi__raw,HS27,DB2,1500,4030,150,0.7213333333333334,0.6540942928039702,0.08933333333333333,0.11464019851116625,0.094,0.1196029776674938,0.07133333333333333,0.0890818858560794,0.02266666666666667,0.015632754342431762,0.0013333333333333333,0.006947890818858561,0.14854590570719603,0.09660813635321817,0.6907831643352429,1,True,0.6933333333333334,0.28,0.9133333333333333,0.5733333333333334,9.4,11.96029776674938,1956.0,1575.5
|
| 6 |
+
scsemi__raw,HS28,DB5,1500,4446,150,0.73,0.594017094017094,0.07733333333333334,0.12010796221322537,0.128,0.1545209176788124,0.037333333333333336,0.11156095366621682,0.02666666666666667,0.015744489428699954,0.0006666666666666666,0.004048582995951417,0.2938101664417454,0.16876902964084625,0.6874030557661325,18,False,0.76,0.06,0.9,0.22666666666666666,12.8,15.45209176788124,1956.0,1941.5
|
| 7 |
+
scsemi__raw,HS41,DB7,1500,1392,150,0.7366666666666667,0.6458333333333334,0.088,0.15589080459770116,0.11666666666666667,0.14152298850574713,0.028666666666666667,0.035201149425287355,0.027333333333333334,0.014367816091954023,0.0026666666666666666,0.007183908045977011,0.20759770114942527,0.15926025034557173,0.6474777387394006,14,False,0.7066666666666667,0.02,0.9466666666666667,0.3333333333333333,11.666666666666666,14.152298850574713,1955.0,2276.0
|
| 8 |
+
scsemi__raw,HS45,DB7,1500,1980,150,0.6573333333333333,0.6646464646464646,0.064,0.08333333333333333,0.162,0.1191919191919192,0.04933333333333333,0.10606060606060606,0.06,0.022727272727272728,0.007333333333333333,0.00404040404040404,0.1667474747474747,0.0677355126799284,0.64239221022654,13,False,0.7133333333333334,0.04,0.88,0.3333333333333333,16.2,11.91919191919192,1957.0,2373.5
|
| 9 |
+
scsemi__raw,HS54,DB3,1500,5391,150,0.7746666666666666,0.7853830458171026,0.032,0.06362455945093674,0.11333333333333333,0.0849564088295307,0.034666666666666665,0.037655351511778894,0.042,0.02485624188462252,0.0033333333333333335,0.003524392506028566,0.09104136523836029,0.2552556292322815,0.6979338426350767,7,False,0.7466666666666667,0.05333333333333334,0.9333333333333333,0.4266666666666667,11.333333333333332,8.49564088295307,1957.0,2188.0
|
| 10 |
+
scsemi__raw,HS64,DB2,1500,3894,150,0.7113333333333334,0.6592193117616847,0.06866666666666667,0.0968156137647663,0.06333333333333334,0.13071391884951206,0.066,0.0901386748844376,0.08733333333333333,0.01848998459167951,0.0033333333333333335,0.004622496147919877,0.24191474062660498,0.05832869885289772,0.6138859272489249,8,False,0.8333333333333334,0.15333333333333332,0.9933333333333333,0.3933333333333333,6.333333333333334,13.071391884951206,1956.0,1596.0
|
| 11 |
+
scsemi__raw,HS70,DB4,1500,4513,150,0.7306666666666667,0.6470197208065588,0.05266666666666667,0.10104143585198316,0.128,0.11766009306448039,0.04133333333333333,0.10857522712164858,0.044,0.020385552847329937,0.0033333333333333335,0.005317970307999114,0.2352025998965951,0.10591968493419628,0.6748066147263265,15,False,0.7333333333333333,0.02666666666666667,0.8066666666666666,0.26666666666666666,12.8,11.766009306448039,1958.0,2181.0
|
| 12 |
+
scsemi__raw,HS74,DB5,1500,4719,150,0.7373333333333333,0.6753549480822209,0.05266666666666667,0.08645899554990465,0.09666666666666666,0.101716465352829,0.037333333333333336,0.11337147700784064,0.07266666666666667,0.018648018648018648,0.0033333333333333335,0.004450095359186269,0.231994066539521,0.10081092655634422,0.6483301345219625,20,False,0.78,0.03333333333333333,0.78,0.36,9.666666666666666,10.1716465352829,1954.0,1934.0
|
| 13 |
+
scsemi__raw,HS75,DB6,1500,2126,150,0.6613333333333333,0.6933207902163687,0.03866666666666667,0.07572906867356538,0.10866666666666666,0.15851364063969897,0.09866666666666667,0.04280338664158043,0.06933333333333333,0.023518344308560677,0.023333333333333334,0.0061147695202257765,0.23779366572593286,0.08535715114862408,0.6459372983252057,5,False,0.8133333333333334,0.08666666666666667,0.7666666666666667,0.5,10.866666666666665,15.851364063969896,1958.0,2141.5
|
| 14 |
+
scsemi__raw,HS76,DB1,1500,3892,150,0.6366666666666667,0.5775950668036999,0.11133333333333334,0.10405960945529291,0.142,0.1593011305241521,0.058666666666666666,0.10251798561151079,0.048666666666666664,0.04290853031860226,0.0026666666666666666,0.013617677286742035,0.14420692017814327,0.1898535091893846,0.6972291199937297,3,False,0.78,0.23333333333333334,0.8866666666666667,0.6333333333333333,14.2,15.93011305241521,1958.0,1764.0
|
| 15 |
+
scsemi__raw,HS77,DB2,1500,3662,150,0.6746666666666666,0.6826870562534134,0.03333333333333333,0.0488803932277444,0.13733333333333334,0.1851447296559257,0.11333333333333333,0.06499180775532495,0.038,0.012015292190060076,0.0033333333333333335,0.006280720917531403,0.1486524667758966,0.11335529711104537,0.6731119966193821,7,False,0.76,0.18666666666666668,0.8666666666666667,0.5133333333333333,13.733333333333334,18.51447296559257,1955.0,1437.0
|
| 16 |
+
scsemi__raw,HS87,DB5,1500,4067,150,0.7366666666666667,0.6801081878534546,0.062,0.08409146791246619,0.122,0.12490779444307844,0.03666666666666667,0.10154905335628227,0.03866666666666667,0.007376444553725104,0.004,0.001967051880993361,0.17976329809032052,0.08099383236904187,0.65765059009076,21,False,0.84,0.02666666666666667,0.84,0.23333333333333334,12.2,12.490779444307844,1956.0,1983.0
|
| 17 |
+
scsemi__raw,HS88,DB3,1500,5093,150,0.6666666666666666,0.6540349499312782,0.059333333333333335,0.040054977419988216,0.15533333333333332,0.20400549774199883,0.034,0.0738268211270371,0.07933333333333334,0.02297270763793442,0.005333333333333333,0.005105046141763205,0.1769979710714052,0.12525619231261487,0.6427297716720333,6,False,0.7333333333333333,0.09333333333333334,0.9666666666666667,0.5,15.533333333333331,20.400549774199884,1957.0,2032.0
|
| 18 |
+
scsemi__raw,HS93,DB1,1500,5125,150,0.7146666666666667,0.7139512195121951,0.066,0.08253658536585366,0.1,0.13873170731707318,0.06333333333333334,0.041951219512195125,0.054,0.016975609756097562,0.002,0.005853658536585366,0.11824390243902444,0.09891727748742493,0.6466583249989899,1,True,0.8733333333333333,0.10666666666666667,0.9933333333333333,0.5666666666666667,10.0,13.873170731707319,1956.0,1873.0
|
| 19 |
+
scsemi__raw,HS94,DB3,1500,4273,150,0.7213333333333334,0.7343786566814884,0.072,0.038380528902410484,0.12533333333333332,0.1352679616194711,0.044,0.06763398080973555,0.034,0.019424292066463844,0.0033333333333333335,0.004914579920430611,0.09639035806225128,0.13939202955397142,0.6988495286229254,1,True,0.7933333333333333,0.08,0.9333333333333333,0.5466666666666666,12.533333333333333,13.52679616194711,1956.0,2305.0
|
| 20 |
+
scsemi__raw,HS97,DB4,1500,4609,150,0.674,0.7179431546973313,0.08,0.0414406595790844,0.134,0.16294206986331092,0.06933333333333333,0.05467563462790193,0.034,0.018876111954870906,0.008666666666666666,0.004122369277500542,0.14577044912128437,0.13910150857913614,0.6475110308840104,14,False,0.7733333333333333,0.04666666666666667,0.9,0.32,13.4,16.29420698633109,1955.0,2171.0
|
| 21 |
+
scsemi__raw,HS103,DB6,1500,2442,150,0.7053333333333334,0.5941850941850941,0.05,0.0819000819000819,0.136,0.1601146601146601,0.034,0.14004914004914004,0.06333333333333334,0.01760851760851761,0.011333333333333334,0.006142506142506142,0.3241277641277642,0.16148029017475643,0.6325135216772144,8,False,0.8733333333333333,0.12,0.9266666666666666,0.48,13.600000000000001,16.01146601146601,1958.0,2156.5
|
| 22 |
+
scsemi__raw,HS104,DB4,1500,4870,150,0.732,0.657700205338809,0.07533333333333334,0.07268993839835729,0.12066666666666667,0.19815195071868583,0.03933333333333333,0.05626283367556468,0.03133333333333333,0.012320328542094456,0.0013333333333333333,0.002874743326488706,0.1919123887748118,0.10816478298818209,0.647788781015486,16,False,0.8133333333333334,0.03333333333333333,0.9,0.22,12.066666666666666,19.815195071868583,1957.0,2025.5
|
paper-releases/pbisc-diffusion/updates/20261005T121346Z-scsemi-cv-budget-interim/diffusion/dataset/server_1/model8/plans/paired_finetune_intradataset_20260927/scores/immicro/scsemi_cv_20261002/fold4/summary.json
ADDED
|
@@ -0,0 +1,207 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"schema": "paired_ft_scores.v1",
|
| 3 |
+
"dataset": "immicro",
|
| 4 |
+
"written_utc": "2026-10-05T12:06:13.445622+00:00",
|
| 5 |
+
"command": [
|
| 6 |
+
"/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paired_finetune_intradataset_20260927/tools/score_ft.py",
|
| 7 |
+
"--dataset",
|
| 8 |
+
"immicro",
|
| 9 |
+
"--out",
|
| 10 |
+
"/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paired_finetune_intradataset_20260927/scores/immicro/scsemi_cv_20261002/fold4",
|
| 11 |
+
"--threads",
|
| 12 |
+
"8",
|
| 13 |
+
"--arm",
|
| 14 |
+
"scsemi__raw=/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paired_finetune_intradataset_20260927/generated/immicro/fold4/scsemi__raw.npz"
|
| 15 |
+
],
|
| 16 |
+
"arms": [
|
| 17 |
+
"scsemi__raw"
|
| 18 |
+
],
|
| 19 |
+
"donors": [
|
| 20 |
+
"HS8",
|
| 21 |
+
"HS11",
|
| 22 |
+
"HS20",
|
| 23 |
+
"HS27",
|
| 24 |
+
"HS28",
|
| 25 |
+
"HS41",
|
| 26 |
+
"HS45",
|
| 27 |
+
"HS54",
|
| 28 |
+
"HS64",
|
| 29 |
+
"HS70",
|
| 30 |
+
"HS74",
|
| 31 |
+
"HS75",
|
| 32 |
+
"HS76",
|
| 33 |
+
"HS77",
|
| 34 |
+
"HS87",
|
| 35 |
+
"HS88",
|
| 36 |
+
"HS93",
|
| 37 |
+
"HS94",
|
| 38 |
+
"HS97",
|
| 39 |
+
"HS103",
|
| 40 |
+
"HS104"
|
| 41 |
+
],
|
| 42 |
+
"n_donors": 21,
|
| 43 |
+
"reference": {
|
| 44 |
+
"cache": "/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paired_finetune_intradataset_20260927/scoring_cache/immicro",
|
| 45 |
+
"reference_sha256": "c5e2547be3ec3b12cb0c0b404a49e14a046ae59d40be70427f98f083a76bce17",
|
| 46 |
+
"features_sha256": "735255066ce7ebbac13a1fdfd058e26f31edd60314cc02fd589b0a292dbbc838",
|
| 47 |
+
"n_r1_cells": 3150,
|
| 48 |
+
"pca": {
|
| 49 |
+
"n_components": 50,
|
| 50 |
+
"explained_variance_ratio_sum": 0.2925134599208832,
|
| 51 |
+
"n_fit_cells": 3150
|
| 52 |
+
},
|
| 53 |
+
"r2_control": {
|
| 54 |
+
"precision": 0.9946031746031746,
|
| 55 |
+
"coverage": 1.0,
|
| 56 |
+
"density": 2.7306349206349205,
|
| 57 |
+
"n_query": 3150,
|
| 58 |
+
"depth_matched": {
|
| 59 |
+
"precision": 0.9949206349206349,
|
| 60 |
+
"coverage": 1.0,
|
| 61 |
+
"density": 2.684730158730159
|
| 62 |
+
}
|
| 63 |
+
},
|
| 64 |
+
"observed_l1_loo_null_mean": 0.13719637503029242
|
| 65 |
+
},
|
| 66 |
+
"contrast_definition": {
|
| 67 |
+
"enabled": false,
|
| 68 |
+
"reason": "dataset immicro has no group contrast (use --groups-csv / --case-groups)"
|
| 69 |
+
},
|
| 70 |
+
"deg_definition": {
|
| 71 |
+
"enabled": false,
|
| 72 |
+
"reason": "contrast off"
|
| 73 |
+
},
|
| 74 |
+
"headline": {
|
| 75 |
+
"scsemi__raw": {
|
| 76 |
+
"comp_l1": 0.18924759662226268,
|
| 77 |
+
"comp_l1_obs_loo_null": 0.13719637503029242,
|
| 78 |
+
"precision": 0.7749206349206349,
|
| 79 |
+
"coverage": 0.09174603174603174,
|
| 80 |
+
"precision_dm": 0.9025396825396825,
|
| 81 |
+
"coverage_dm": 0.40634920634920635,
|
| 82 |
+
"pb_r_median": 0.6483301345219625,
|
| 83 |
+
"pb_top1": 0.14285714285714285,
|
| 84 |
+
"mono_pct_gen": 12.114285714285716,
|
| 85 |
+
"mono_pct_obs": 14.664491120050386,
|
| 86 |
+
"median_umi_gen": 1956.0,
|
| 87 |
+
"median_umi_obs": 1973.0,
|
| 88 |
+
"seconds": 7.1
|
| 89 |
+
}
|
| 90 |
+
},
|
| 91 |
+
"per_arm": {
|
| 92 |
+
"scsemi__raw": {
|
| 93 |
+
"arm": "scsemi__raw",
|
| 94 |
+
"npz": "/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paired_finetune_intradataset_20260927/generated/immicro/fold4/scsemi__raw.npz",
|
| 95 |
+
"npz_sha256": "ebd8aec0b6dada4f894203554b31504b7708885900d192434a22fc9c4c330fa7",
|
| 96 |
+
"receipt_verified": true,
|
| 97 |
+
"generation": {
|
| 98 |
+
"checkpoint": null,
|
| 99 |
+
"checkpoint_sha256": null,
|
| 100 |
+
"input_condition_path": "/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paired_finetune_intradataset_20260927/data/immicro/fold4/test_raw.npz",
|
| 101 |
+
"input_condition_sha256": "9e0a41119111a870b011b94fad6a53480b59eac0a709c61f0f314f74d8f201b8",
|
| 102 |
+
"seed": 20260927,
|
| 103 |
+
"steps": null,
|
| 104 |
+
"support_readout": "upstream (values <= 10 normalized units zeroed by fast_semi)",
|
| 105 |
+
"weights": null
|
| 106 |
+
},
|
| 107 |
+
"condition_for_broadcast": null,
|
| 108 |
+
"poisson": {
|
| 109 |
+
"seed": 20260916,
|
| 110 |
+
"rule": "whole NPZ, rows in NPZ order",
|
| 111 |
+
"nnz_whole_npz": 3960582,
|
| 112 |
+
"median_library_whole_npz_panel": 1956.0,
|
| 113 |
+
"n_rows_whole_npz": 31500
|
| 114 |
+
},
|
| 115 |
+
"annotation": {
|
| 116 |
+
"model_pt_sha256": "bf3655899e5abee435340fc008656c4a17342da0f30b70cfd43de8e9223e1930",
|
| 117 |
+
"zero_padded_model_genes": 1,
|
| 118 |
+
"label_counts": {
|
| 119 |
+
"T cell": 22210,
|
| 120 |
+
"Monocyte": 3816,
|
| 121 |
+
"B cell": 2130,
|
| 122 |
+
"DC": 1610,
|
| 123 |
+
"NK cell": 1588,
|
| 124 |
+
"Other": 146
|
| 125 |
+
},
|
| 126 |
+
"mean_l2_max_prob": 0.920776447873267,
|
| 127 |
+
"predict_seconds": 3.7
|
| 128 |
+
},
|
| 129 |
+
"n_donors": 21,
|
| 130 |
+
"n_generated_cells": 31500,
|
| 131 |
+
"composition": {
|
| 132 |
+
"l1_mean": 0.18924759662226268,
|
| 133 |
+
"l1_median": 0.1769979710714052,
|
| 134 |
+
"l1_obs_loo_null_mean": 0.13719637503029242,
|
| 135 |
+
"l1_generated_loo_mean_vs_observed_mean": 0.18274523170362508,
|
| 136 |
+
"composition_top1": 0.14285714285714285,
|
| 137 |
+
"mean_fraction_generated": {
|
| 138 |
+
"T cell": 0.705079,
|
| 139 |
+
"B cell": 0.067619,
|
| 140 |
+
"Monocyte": 0.121143,
|
| 141 |
+
"NK cell": 0.050413,
|
| 142 |
+
"DC": 0.051111,
|
| 143 |
+
"Other": 0.004635
|
| 144 |
+
},
|
| 145 |
+
"mean_fraction_observed": {
|
| 146 |
+
"T cell": 0.668001,
|
| 147 |
+
"B cell": 0.081749,
|
| 148 |
+
"Monocyte": 0.146645,
|
| 149 |
+
"NK cell": 0.07743,
|
| 150 |
+
"DC": 0.020687,
|
| 151 |
+
"Other": 0.005487
|
| 152 |
+
}
|
| 153 |
+
},
|
| 154 |
+
"pseudobulk": {
|
| 155 |
+
"n_genes": 5508,
|
| 156 |
+
"r_median": 0.6483301345219625,
|
| 157 |
+
"r_mean": 0.6586548712656966,
|
| 158 |
+
"top1": 0.14285714285714285,
|
| 159 |
+
"n_top1": 3,
|
| 160 |
+
"own_rank_median": 8.0,
|
| 161 |
+
"chance_top1": 0.047619047619047616
|
| 162 |
+
},
|
| 163 |
+
"precision_coverage": {
|
| 164 |
+
"precision": 0.7749206349206349,
|
| 165 |
+
"coverage": 0.09174603174603174,
|
| 166 |
+
"density": 0.23060317460317462,
|
| 167 |
+
"n_query": 3150,
|
| 168 |
+
"n_reference": 3150
|
| 169 |
+
},
|
| 170 |
+
"precision_coverage_depth_matched": {
|
| 171 |
+
"precision": 0.9025396825396825,
|
| 172 |
+
"coverage": 0.40634920634920635,
|
| 173 |
+
"density": 0.8062539682539682,
|
| 174 |
+
"detected_median_before": {
|
| 175 |
+
"R1": 359.0,
|
| 176 |
+
"Q": 122.0
|
| 177 |
+
},
|
| 178 |
+
"detected_median_after": {
|
| 179 |
+
"R1": 122.0,
|
| 180 |
+
"Q": 122.0
|
| 181 |
+
}
|
| 182 |
+
},
|
| 183 |
+
"monocyte_pct": {
|
| 184 |
+
"generated_mean_over_donors": 12.114285714285716,
|
| 185 |
+
"observed_mean_over_donors": 14.664491120050386,
|
| 186 |
+
"generated_pooled_cells": 12.114285714285716
|
| 187 |
+
},
|
| 188 |
+
"median_umi_per_cell_scoring_genes": {
|
| 189 |
+
"generated_pooled": 1956.0,
|
| 190 |
+
"observed_pooled": 1973.0,
|
| 191 |
+
"generated_mean_of_donor_medians": 1956.4285888671875,
|
| 192 |
+
"observed_mean_of_donor_medians": 2012.3095238095239
|
| 193 |
+
},
|
| 194 |
+
"seconds": 7.1
|
| 195 |
+
}
|
| 196 |
+
},
|
| 197 |
+
"code_sha256": {
|
| 198 |
+
"/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paired_finetune_intradataset_20260927/tools/score_ft.py": "ec5f40b4cea6d5062d0138f3b934abb6465e34cbfeac869c8a0906924c033aec",
|
| 199 |
+
"/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paired_finetune_intradataset_20260927/tools/ft_common.py": "4a6366b0f22208cd58714fc0261b8840c643b9d4569704d560cfd93534cbc747",
|
| 200 |
+
"/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/utility_studies_final6k_20260925/umap/cell_immicro_5arm/tools/stage_b_embed.py": "d056cfdf38fb0e5f478756f370174e993b75d0c973c48e02e21749175a4ca2da",
|
| 201 |
+
"/home/sj_server_1/PBISC/immun-pbmc-fm/bulk2sc-paper/scripts/evaluate_generated_vs_truth.py": "48b12d794782b840838853e93e0fc55fab00532c4b3698f4588e926b985d2881",
|
| 202 |
+
"/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/utility_studies_final6k_20260925/immicro/tools/immicro_common.py": "c5c30e917148cc5e664e91ea30c11bbdff9b6d1f53a3e0a13e16b1917eff37e9",
|
| 203 |
+
"/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/aifi_scanvi_rebuild_20260916/predict_scanvi.py": "482ee5dcf4d72b54bc36cbb6dcff62e5030bc7afc46cb5fb01eca73a82ee45a5",
|
| 204 |
+
"/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/aifi_scanvi_rebuild_20260916/poisson_readout.py": "8bfa080942fbcdc89ae23b276524a1a83266fb8cbc56b9af279e50f82e6cde38"
|
| 205 |
+
},
|
| 206 |
+
"seconds": 8.6
|
| 207 |
+
}
|
paper-releases/pbisc-diffusion/updates/20261005T121346Z-scsemi-cv-budget-interim/diffusion/dataset/server_1/model8/plans/paired_finetune_intradataset_20260927/scores/immicro/scsemi_cv_20261002/pooled/README.md
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# score_ft.py output: immicro, 107 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/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 107 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) (16050 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.9634, coverage 0.9999.
|
| 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.9635, coverage 0.9997.
|
| 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 (dataset immicro has no group contrast (use --groups-csv / --case-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`): not computed (contrast off).
|
| 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).
|