Simplify CausalBench sources, preprocessing, and verification notes
Browse files- real/causalbench/README.md +16 -25
real/causalbench/README.md
CHANGED
|
@@ -1,38 +1,29 @@
|
|
| 1 |
# CausalBench K562 and RPE1
|
| 2 |
|
| 3 |
-
Filtered single-cell CRISPRi
|
| 4 |
|
| 5 |
-
| Dataset | Cells |
|
| 6 |
| --- | ---: | ---: | --- |
|
| 7 |
-
| K562 | 162,751 | 622 |
|
| 8 |
-
| RPE1 | 162,733 | 383 |
|
| 9 |
|
| 10 |
-
|
| 11 |
|
| 12 |
-
|
| 13 |
|
| 14 |
-
|
| 15 |
|
| 16 |
-
|
| 17 |
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
-
|
| 21 |
|
| 22 |
-
|
| 23 |
-
2. For measured targets, retain perturbed cells whose target expression is at or below the control 10th percentile.
|
| 24 |
-
3. Remove zero-total cells, normalize totals to the retained-cell median using all original genes, and apply natural log1p.
|
| 25 |
-
4. Keep measured genes targeted in more than 100 retained cells. Preserve gene order and relabel unsupported targets `excluded`, retaining their rows.
|
| 26 |
|
| 27 |
-
|
| 28 |
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
Data are distributed under **CC BY 4.0**, credited to Replogle et al., as documented in the source repository. Cite the original data and the CausalBench paper when using these prepared matrices. Preparation code is available in the source repository with its original attribution and licensing.
|
| 32 |
-
|
| 33 |
-
## SHA-256
|
| 34 |
-
|
| 35 |
-
```text
|
| 36 |
-
455024efc9f40b877f7f9c1d55f9eaaf957c7995c6289ffbcd65251fc856fee5 causalbench_k562.tsv.gz
|
| 37 |
-
6ddd100eff9dbcab65ff94b662a87e9eb50de6401b5242c0f0108692c92cc408 causalbench_rpe1.tsv.gz
|
| 38 |
-
```
|
|
|
|
| 1 |
# CausalBench K562 and RPE1
|
| 2 |
|
| 3 |
+
Filtered single-cell CRISPRi data from [Replogle et al. (2022)](https://doi.org/10.25452/figshare.plus.20029387.v1), prepared following [CausalBench](https://doi.org/10.1038/s42003-025-07764-y). Data license: CC BY 4.0, credited to Replogle et al.
|
| 4 |
|
| 5 |
+
| Dataset | Cells | Genes | Prepared table |
|
| 6 |
| --- | ---: | ---: | --- |
|
| 7 |
+
| K562 | 162,751 | 622 | [causalbench_k562.tsv.gz](data/causalbench_k562.tsv.gz) |
|
| 8 |
+
| RPE1 | 162,733 | 383 | [causalbench_rpe1.tsv.gz](data/causalbench_rpe1.tsv.gz) |
|
| 9 |
|
| 10 |
+
Each gzip TSV contains gene-expression columns (Ensembl IDs) and an `intervention` column: a targeted gene ID, `non-targeting` for controls, or `excluded` for targets not retained by preprocessing. `excluded` cells are not controls.
|
| 11 |
|
| 12 |
+
## Sources and preprocessing
|
| 13 |
|
| 14 |
+
Inputs are the original [K562 counts](https://ndownloader.figshare.com/files/35773219), [RPE1 counts](https://ndownloader.figshare.com/files/35775606), and [perturbation summary workbook](https://ars.els-cdn.com/content/image/1-s2.0-S0092867422005979-mmc2.xlsx), using sheets `TabB_K562_day6_summary_stat` and `TabC_RPE1_summary_statistic`.
|
| 15 |
|
| 16 |
+
The reference is the authors' [preprocessing implementation at commit 1a2143c](https://github.com/causalbench/causalbench/blob/1a2143cffdc85f835b41ce8d52034be1bf903e71/causalscbench/data_access/utils/preprocessing.py), with strong-perturbation filtering enabled:
|
| 17 |
|
| 18 |
+
1. Keep controls and perturbations with >50 differentially expressed genes, knockdown <= -0.3, and >25 filtered cells in the summary.
|
| 19 |
+
2. For measured targets, keep perturbed cells whose target expression is at or below the control 10th percentile.
|
| 20 |
+
3. Remove zero-total cells, normalize cell totals to the retained-cell median using all original genes, and apply natural `log1p`.
|
| 21 |
+
4. Keep measured genes targeted in >100 retained cells; relabel unsupported targets `excluded` without dropping their rows.
|
| 22 |
|
| 23 |
+
K562 used the original function. RPE1 used a memory-saving implementation of the same rules. [Raw inputs, preparation code, and environment](https://huggingface.co/datasets/huggingbahl21/causalbench) are available for reproduction.
|
| 24 |
|
| 25 |
+
## Verification
|
|
|
|
|
|
|
|
|
|
| 26 |
|
| 27 |
+
Saved checks found that both raw count files matched the publisher's MD5 checksums. Full reconstruction from raw inputs using chunked code matched every saved NPZ expression value and the ordered gene and intervention labels. TSV export preserved those labels; its maximum absolute numerical difference from the NPZ was `2.3841e-7` for both datasets.
|
| 28 |
|
| 29 |
+
A small fixture also matched the unmodified authors' function. The full datasets were not rerun through that function during verification; these checks establish consistency with the implemented preprocessing, not an independent comparison against author-distributed processed matrices. The summary workbook was read locally because its remote verification request returned HTTP 403.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|