alessandro-palma2 commited on
Commit
9801832
·
verified ·
1 Parent(s): a002ef7

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +123 -0
README.md CHANGED
@@ -1,3 +1,126 @@
1
  ---
2
  license: cc-by-4.0
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: cc-by-4.0
3
+ tags:
4
+ - single-cell
5
+ - flow-cytometry
6
+ - spectral-flow-cytometry
7
+ - haematopoiesis
8
+ - experimental-design
9
+ size_categories:
10
+ - 10M<n<100M
11
  ---
12
+
13
+ # LabCompass — Spectral Flow Cytometry haematopoiesis dataset
14
+
15
+ Measurements underlying **LabCompass**, a method for generative modeling of experimental design in
16
+ single-cell data. This dataset contains Spectral Flow Cytometry (SFC) profiles of *in vitro*
17
+ haematopoietic differentiation cultures, collected over successive rounds of a closed-loop
18
+ experimental design cycle.
19
+
20
+ Each round — a **loop** — proposes new culture protocols, runs them at the bench, and measures the
21
+ resulting cells. The measurements from each loop are published here as a separate file.
22
+
23
+ - **Code and full reproduction pipeline:** <https://github.com/theislab/LabCompass>
24
+ - **Wet-lab experiments and measurements:** Göttgens Lab
25
+ - **License:** CC-BY-4.0
26
+
27
+ ## ⚠️ These files are per-loop, not cumulative
28
+
29
+ `loops/loop3.h5ad` contains **only the cells measured in loop 3** — not loops 0–3 together. Models in
30
+ the paper are trained on the *accumulated* data, so a loop's training set is the concatenation of
31
+ every loop up to and including it:
32
+
33
+ ```
34
+ dataset(N) = concat(dataset(N-1), loopN)
35
+ ```
36
+
37
+ Concatenating them yourself is a few lines of `anndata`, but the exact chain matters (one loop
38
+ introduces new protocol axes that must be zero-filled on the earlier data — see below). The
39
+ reproduction repository ships a script that does it correctly:
40
+
41
+ ```bash
42
+ git clone https://github.com/theislab/LabCompass.git
43
+ python scripts/data/build_loop_datasets.py # downloads from this repo and builds the chain
44
+ python scripts/data/build_loop_datasets.py --variants 500k # subsampled only: far smaller and faster
45
+ ```
46
+
47
+ ## Files
48
+
49
+ Every loop is published in two variants: the full measurement set, and a subsampled version
50
+ (`_500k` suffix) intended for fast iteration. The suffix is a naming convention carried over from
51
+ the source data, not a guaranteed cell count — the subsampled files vary in size.
52
+
53
+ | Loop | Full | Subsampled | Approx. size (full) |
54
+ | --- | --- | --- | --- |
55
+ | 0 (baseline) | `loops/loop0.h5ad` | `loops/loop0_500k.h5ad` | 36 GB |
56
+ | 1 | `loops/loop1.h5ad` | `loops/loop1_500k.h5ad` | 2.5 GB |
57
+ | 2 | `loops/loop2.h5ad` | `loops/loop2_500k.h5ad` | 3.9 GB |
58
+ | 2.5 | `loops/loop2p5.h5ad` | `loops/loop2p5_500k.h5ad` | 2.7 GB |
59
+ | 3 | `loops/loop3.h5ad` | `loops/loop3_500k.h5ad` | 6.3 GB |
60
+ | 4 | `loops/loop4.h5ad` | `loops/loop4_500k.h5ad` | 0.9 GB |
61
+ | 4.5 | `loops/loop4p5.h5ad` | `loops/loop4p5_500k.h5ad` | 0.5 GB |
62
+ | 5 | `loops/loop5.h5ad` | `loops/loop5_500k.h5ad` | 6.3 GB |
63
+
64
+ Loop 0 is the baseline screen and is by far the largest. The half-steps (2.5, 4.5) are follow-up
65
+ rounds within a design cycle and accumulate like any other loop, giving the chain
66
+
67
+ ```
68
+ loop0 → loop1 → loop2 → loop2p5 → loop3 → loop4 → loop4p5 → loop5
69
+ ```
70
+
71
+ The full set is roughly 60 GB; the subsampled set is a few GB.
72
+
73
+ ## Format
74
+
75
+ Each file is an [AnnData](https://anndata.readthedocs.io/) `.h5ad` object:
76
+
77
+ - **`X`** — logicle-transformed SFC intensities: fluorescence channels and morphological scatter
78
+ features, one row per cell.
79
+ - **`obs`** — per-cell metadata, in three groups:
80
+ - *Acquisition:* `experiment_number`, `experiment_id`, `replicate`, `date`, `well_id`,
81
+ `cytometer`, `cytometer_serial_no`, `count_beads`, `cell_counts`, `source_id`.
82
+ - *Protocol axes* — the culture recipe, and the space LabCompass searches over. Cytokines and small
83
+ molecules carry their units in the column name, e.g. `scf_[ng_ml]`, `tpo_[ng_ml]`,
84
+ `il3_[ng_ml]`, `gm-csf_[ng_ml]`, `rhflt3l_[ng_ml]`, `ldl_[ng_ml]`, `sr1_[nm]`, `um171_[nm]`,
85
+ `um729_[µm]`, `butyzamide_[nm]`, `retinoic_acid_[µm]`, `mtg_[µm]`, `740-yp_[µm]`, alongside
86
+ culture conditions such as `o2_[%]` and `hydrogel_type`.
87
+ - *Annotation:* cell-type labels, where available.
88
+
89
+ `experiment_number` identifies the physical experiment a cell came from (loop 1, for instance, spans
90
+ experiments 206–210), which makes it a convenient way to check which loops are present in a
91
+ concatenated object.
92
+
93
+ ### The protocol schema grows across loops
94
+
95
+ Later loops vary axes that earlier loops never did. Loop 3 introduces `il7_[ng_ml]`,
96
+ `mcsf_[ng_ml]` and `ly_cocktail_[ul/well]`, which are absent from loops 0–2.5. When concatenating,
97
+ these must be **zero-filled on the earlier data** (they were held at zero, not missing) so both sides
98
+ share an `obs` schema. `build_loop_datasets.py` does this; a naive `anndata.concat` will silently
99
+ drop the columns instead.
100
+
101
+ ## Loading
102
+
103
+ ```python
104
+ import anndata as ad
105
+ from huggingface_hub import hf_hub_download
106
+
107
+ path = hf_hub_download(
108
+ repo_id="theislab/LabCompass",
109
+ filename="loops/loop3_500k.h5ad",
110
+ repo_type="dataset",
111
+ )
112
+ adata = ad.read_h5ad(path)
113
+ ```
114
+
115
+ ## Citation
116
+
117
+ <!-- TODO: replace with the published reference before release. -->
118
+
119
+ ```bibtex
120
+ @article{labcompass,
121
+ title = {TODO},
122
+ author = {Consoli, Lorenzo and Palma, Alessandro and others},
123
+ journal = {TODO},
124
+ year = {TODO},
125
+ }
126
+ ```