The dataset viewer is not available for this split.
Error code: StreamingRowsError
Exception: TypeError
Message: Couldn't cast array of type
struct<shared_perts: int64, target_in_panel: int64, target_expressed: int64, kept_perts: int64, genes_common: int64, genes_any: int64, genes_all: int64, J: int64, nonfinite_entries: int64, weight_cap: double, kd_median: struct<K562: double, RPE1: double, HepG2: double, Jurkat: double>, kdrel_median: struct<K562: double, RPE1: double, HepG2: double, Jurkat: double>>
to
{'shared_perts': Value('int64'), 'genes_any': Value('int64'), 'genes_all': Value('int64'), 'J': Value('int64'), 'nonfinite': Value('int64'), 'weight_cap': Value('float64'), 'kd_median': {'K562': Value('float64'), 'RPE1': Value('float64'), 'HepG2': Value('float64'), 'Jurkat': Value('float64')}}
Traceback: Traceback (most recent call last):
File "/src/services/worker/src/worker/utils.py", line 149, in get_rows_or_raise
return get_rows(
dataset=dataset,
...<4 lines>...
column_names=column_names,
)
File "/src/libs/libcommon/src/libcommon/utils.py", line 274, in decorator
return func(*args, **kwargs)
File "/src/services/worker/src/worker/utils.py", line 129, in get_rows
rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
File "/src/services/worker/src/worker/utils.py", line 544, in safe_iter
yield from ds.decode(False) if ds.features else ds
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 3074, in __iter__
for key, example in ex_iterable:
^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2578, in __iter__
for key, pa_table in self._iter_arrow():
~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2603, in _iter_arrow
for key, pa_table in self.ex_iterable._iter_arrow():
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 577, in _iter_arrow
for key, pa_table in iterator:
^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 459, in _iter_arrow
for key, pa_table in self.generate_tables_fn(**gen_kwags):
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 373, in _generate_tables
self._cast_table(pa_table, json_field_paths=json_field_paths),
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 132, in _cast_table
pa_table = table_cast(pa_table, self.info.features.arrow_schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2394, in table_cast
return cast_table_to_schema(table, schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2328, in cast_table_to_schema
cast_array_to_feature(
~~~~~~~~~~~~~~~~~~~~~^
table[name] if name in table_column_names else pa.array([None] * len(table), type=schema.field(name).type),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
feature,
^^^^^^^^
)
^
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 1870, in wrapper
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2170, in cast_array_to_feature
raise TypeError(f"Couldn't cast array of type\n{_short_str(array.type)}\nto\n{_short_str(feature)}")
TypeError: Couldn't cast array of type
struct<shared_perts: int64, target_in_panel: int64, target_expressed: int64, kept_perts: int64, genes_common: int64, genes_any: int64, genes_all: int64, J: int64, nonfinite_entries: int64, weight_cap: double, kd_median: struct<K562: double, RPE1: double, HepG2: double, Jurkat: double>, kdrel_median: struct<K562: double, RPE1: double, HepG2: double, Jurkat: double>>
to
{'shared_perts': Value('int64'), 'genes_any': Value('int64'), 'genes_all': Value('int64'), 'J': Value('int64'), 'nonfinite': Value('int64'), 'weight_cap': Value('float64'), 'kd_median': {'K562': Value('float64'), 'RPE1': Value('float64'), 'HepG2': Value('float64'), 'Jurkat': Value('float64')}}Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
Contexts as Measurements: derived CRISPRi response matrices
Derived data for the study "Contexts as Measurements", which asks whether measuring a biological system in more cellular contexts can substitute for performing more interventions in one context. The theory predicts it cannot, beyond a specific bound, and the data here are what that prediction was tested against.
Code, results and the full write-up: https://github.com/bryanc5864/contexts-as-measurements
The quantitative claims and their provenance are in RESULTS.md there; every number in it is
re-checked against these files' derived outputs by src/eval/check_claims.py.
What this is, and what it is not
This repository holds derived matrices, not raw sequencing data and not trained models. There are no models: the study's estimators are ridge regressions and simulations fitted on the fly, so there is no checkpoint to deposit.
The pipeline is: public single-cell CRISPRi screens -> pseudobulk log fold changes per
(perturbation, gene) with standard errors (pb_*) -> a gene/perturbation universe shared across
cell lines, with independent replicate halves (fourline_*, ho_*). The pb_* step is the
expensive one; it is why these files are deposited rather than left to be recomputed.
Licence and attribution
CC BY-NC-SA 4.0 - non-commercial, attribution required, and derivatives must carry the same licence. This is inherited, not chosen: these matrices are derived from the uniformly reprocessed single-cell CRISPRi deposit at figshare 34002315 (crispyx v0.1.4), which is CC BY-NC-SA 4.0. Redistribution here is permitted under that licence's ShareAlike terms, and the same terms bind anyone who redistributes these files or works derived from them.
The code in the GitHub repository is MIT licensed. That licence does not extend to these data.
Underlying screens and summary statistics:
- Uniformly processed single-cell CRISPRi screens, figshare 34002315 (crispyx v0.1.4), CC BY-NC-SA 4.0 - source of every file here.
- Nadig et al. 2025, Nature Genetics, differential-expression summary statistics, figshare 29498366 - used elsewhere in the study for cross-checks.
- The four essential-gene lines are K562 and RPE1 (Replogle et al.) and HepG2 and Jurkat (Nadig et al.); the held-out pluripotent screens are iPSC (Feng, gwsf and gwsnf) and H1 hESC (Pan).
Please cite the original screens as well as this deposit.
Contents
43 files, 19.06 GiB.
Pseudobulk per screen (pb_*)
One file per cell line or screen: per-perturbation log fold change against non-targeting controls,
with standard errors, for every gene passing expression filters. *_batchsplit variants repeat the
build with replicate halves defined by sequencing batch instead of by cell, which is the stricter
replicate scheme.
Arrays: lfc_full and se_full are (perturbations x genes); lfc_s0h0, lfc_s4h1 and similar are
the per-half estimates; ctrl_mean is the control mean expression per gene; n_cells the cells per
perturbation; genes and perts the labels.
| file | size | arrays |
|---|---|---|
pb_H1_Pan.npz |
1.47 GB | genes (6609,); perts (2975,); lfc_full (2975, 6609); se_full (2975, 6609) (+24 more) |
pb_H1_Pan_meta.json |
0.0 MB | build metadata (source files, parameters, gene/perturbation universe) |
pb_HepG2.npz |
1.55 GB | genes (9623,); perts (2160,); lfc_full (2160, 9623); se_full (2160, 9623) (+24 more) |
pb_HepG2_batchsplit.npz |
1.55 GB | genes (9623,); perts (2160,); lfc_full (2160, 9623); se_full (2160, 9623) (+24 more) |
pb_HepG2_batchsplit_meta.json |
0.0 MB | build metadata (source files, parameters, gene/perturbation universe) |
pb_HepG2_meta.json |
0.0 MB | build metadata (source files, parameters, gene/perturbation universe) |
pb_Jurkat.npz |
1.50 GB | genes (8881,); perts (2270,); lfc_full (2270, 8881); se_full (2270, 8881) (+24 more) |
pb_Jurkat_batchsplit.npz |
1.50 GB | genes (8881,); perts (2270,); lfc_full (2270, 8881); se_full (2270, 8881) (+24 more) |
pb_Jurkat_batchsplit_meta.json |
0.0 MB | build metadata (source files, parameters, gene/perturbation universe) |
pb_Jurkat_meta.json |
0.0 MB | build metadata (source files, parameters, gene/perturbation universe) |
pb_K562.npz |
1.29 GB | genes (8563,); perts (2021,); lfc_full (2021, 8563); se_full (2021, 8563) (+24 more) |
pb_K562_batchsplit.npz |
1.29 GB | genes (8563,); perts (2021,); lfc_full (2021, 8563); se_full (2021, 8563) (+24 more) |
pb_K562_batchsplit_meta.json |
0.0 MB | build metadata (source files, parameters, gene/perturbation universe) |
pb_K562_meta.json |
0.0 MB | build metadata (source files, parameters, gene/perturbation universe) |
pb_RPE1.npz |
1.44 GB | genes (8749,); perts (2204,); lfc_full (2204, 8749); se_full (2204, 8749) (+24 more) |
pb_RPE1_batchsplit.npz |
1.44 GB | genes (8749,); perts (2204,); lfc_full (2204, 8749); se_full (2204, 8749) (+24 more) |
pb_RPE1_batchsplit_meta.json |
0.0 MB | build metadata (source files, parameters, gene/perturbation universe) |
pb_RPE1_meta.json |
0.0 MB | build metadata (source files, parameters, gene/perturbation universe) |
pb_iPSC_sf.npz |
973.7 MB | genes (6748,); perts (1886,); lfc_full (1886, 6748); se_full (1886, 6748) (+24 more) |
pb_iPSC_sf_meta.json |
0.0 MB | build metadata (source files, parameters, gene/perturbation universe) |
pb_iPSC_snf.npz |
1.45 GB | genes (6747,); perts (2876,); lfc_full (2876, 6747); se_full (2876, 6747) (+24 more) |
pb_iPSC_snf_meta.json |
0.0 MB | build metadata (source files, parameters, gene/perturbation universe) |
Four-line aligned tensors (fourline_*)
The four essential-gene lines restricted to their shared gene and perturbation universe.
r, w, eff, se are (lines x genes x perturbations). The _halves file is
(lines x seeds x 2 halves x genes x perturbations) and is what the independent-replicate design
reads: regressors from half 0, targets from half 1.
| file | size | arrays |
|---|---|---|
fourline.npz |
415.8 MB | r (4, 6632, 1119); w (4, 6632, 1119); eff (4, 6632, 1119); se (4, 6632, 1119) (+4 more) |
fourline_batchsplit_lfc.npz |
258.3 MB | r (4, 6640, 698); w (4, 6640, 698); eff (4, 6640, 698); se (4, 6640, 698) (+4 more) |
fourline_batchsplit_lfc_halves.npy |
707.2 MB | array (4, 5, 2, 6640, 698) |
fourline_batchsplit_lfc_meta.json |
0.1 MB | build metadata (source files, parameters, gene/perturbation universe) |
fourline_lfc.npz |
258.3 MB | r (4, 6640, 698); w (4, 6640, 698); eff (4, 6640, 698); se (4, 6640, 698) (+4 more) |
fourline_lfc_halves.npy |
707.2 MB | array (4, 5, 2, 6640, 698) |
fourline_lfc_meta.json |
0.1 MB | build metadata (source files, parameters, gene/perturbation universe) |
fourline_meta.json |
0.1 MB | build metadata (source files, parameters, gene/perturbation universe) |
Held-out five-state tensors (ho_*)
The same construction with one held-out pluripotent screen added as a fifth state, restricted to
perturbations shared by all five. These are the inputs to the pre-registered confirmatory
experiment. ho_iPSC_sf is the pre-registered primary screen (369 shared perturbations),
ho_H1_Pan the secondary (354). ho_iPSC_snf (79) was excluded in advance as too small.
| file | size | arrays |
|---|---|---|
ho_H1_Pan_lfc.npz |
160.5 MB | r (5, 6498, 354); w (5, 6498, 354); eff (5, 6498, 354); se (5, 6498, 354) (+4 more) |
ho_H1_Pan_lfc_halves.npy |
438.7 MB | array (5, 5, 2, 6498, 354) |
ho_H1_Pan_lfc_meta.json |
0.1 MB | build metadata (source files, parameters, gene/perturbation universe) |
ho_iPSC_sf_lfc.npz |
171.1 MB | r (5, 6640, 369); w (5, 6640, 369); eff (5, 6640, 369); se (5, 6640, 369) (+4 more) |
ho_iPSC_sf_lfc_halves.npy |
467.3 MB | array (5, 5, 2, 6640, 369) |
ho_iPSC_sf_lfc_meta.json |
0.1 MB | build metadata (source files, parameters, gene/perturbation universe) |
ho_iPSC_snf_lfc.npz |
36.8 MB | r (5, 6640, 79); w (5, 6640, 79); eff (5, 6640, 79); se (5, 6640, 79) (+4 more) |
ho_iPSC_snf_lfc_halves.npy |
100.1 MB | array (5, 5, 2, 6640, 79) |
ho_iPSC_snf_lfc_meta.json |
0.1 MB | build metadata (source files, parameters, gene/perturbation universe) |
On-target knockdown checks (escape_*)
Per-perturbation on-target knockdown and its residual against the expected control count, used to screen out perturbations that did not take effect.
| file | size | arrays |
|---|---|---|
escape_HepG2.npz |
0.0 MB | perts (698,); escape (698,); residual (698,); expected_ctrl_count (698,) |
escape_Jurkat.npz |
0.0 MB | perts (698,); escape (698,); residual (698,); expected_ctrl_count (698,) |
escape_K562.npz |
0.0 MB | perts (698,); escape (698,); residual (698,); expected_ctrl_count (698,) |
escape_RPE1.npz |
0.0 MB | perts (698,); escape (698,); residual (698,); expected_ctrl_count (698,) |
Loading
from huggingface_hub import hf_hub_download
import numpy as np
# the primary confirmatory input
p = hf_hub_download("bryan7264/contexts-as-measurements", "ho_iPSC_sf_lfc.npz", repo_type="dataset")
d = np.load(p)
print(d["r"].shape) # (5 states, genes, perturbations)
# the replicate halves the design actually uses
h = hf_hub_download("bryan7264/contexts-as-measurements", "ho_iPSC_sf_lfc_halves.npy", repo_type="dataset")
H = np.load(h, mmap_mode="r") # (5, 5, 2, genes, perts); mmap, it is 467 MB
Use mmap_mode="r" for the _halves arrays and the pb_* files unless you need them resident;
several are over 1 GB.
Files are grouped by prefix in the listing above but stored flat, matching data/processed/ in the
code repository. To use them with that code, place them there:
hf download bryan7264/contexts-as-measurements --repo-type dataset --local-dir data/processed
Reproducing these files from source
Nothing here is irreducible; data/raw is deliberately not deposited, because it is a verbatim
copy of the public figshare deposits above and re-hosting it would add nothing. To rebuild from
scratch (expect tens of GB of downloads and a few hours):
$PY src/data/download.py --groups core,single_cell,genomewide
$PY src/data/download.py --groups effects,heldout
for L in K562 RPE1 HepG2 Jurkat; do $PY src/data/pseudobulk.py --line $L; done
for L in K562 RPE1 HepG2 Jurkat; do $PY src/data/pseudobulk.py --line $L --split batch; done
$PY src/data/build_responses.py lfc
$PY src/data/build_responses.py batchsplit
One caveat recorded in the interest of accuracy: the streaming pseudobulk implementation that
produced the pb_* files is no longer verified against an independent implementation. It agreed
with an in-memory version to 4.8e-7 when last tested on 2026-11-19, but that reference was lost and
its code path removed, so tests/test_pseudobulk_stream.py now skips rather than passes. The files
themselves are unaffected; the independent check behind them is currently missing. See section 8 of
RESULTS.md.
- Downloads last month
- 10