Submitted:
24 October 2026
Posted:
26 October 2026
You are already at the latest version
Abstract
The same CRISPR interference knockdown changes expression differently in different cell lines. Testing whether a gene-level feature such as chromatin accessibility explains these differences is difficult because neighbouring genes share regulatory elements and copy-number segments, so genes are not independent; in simulation, standard gene-level tests reached false-positive rates of up to 25.8% at a nominal 5% level. cdtest is a Python package that keeps the response fixed and permutes the feature in genome-ordered blocks, with chromosome-arm adjustment, noise-corrected response differences, test-inversion confidence intervals and planted-signal power benchmarks. On real outcomes it held the nominal level under a decoy-free null (4.9% at 5%), and all confirmatory results can be recomputed in under a minute from deposited intermediates. Applied to essential-gene screens in four human cell lines, it detected planted effects of 0.5% partial variance explained with at least 80% power in a matched pair, found no detectable accessibility effect in that pair, and flagged an association that depended on the choice of signal track.
Keywords:
Perturb-seq
; CRISPR interference
; chromatin accessibility
; ATAC-seq
; permutation test
; conditional randomization test
; false positive control
; context-dependent gene regulation
; reproducibility
1. Introduction
Genome-scale CRISPR interference (CRISPRi) Perturb-seq screens now measure the transcriptome-wide effect of the same knockdowns in several cell lines [1,2]. The effects differ between lines: median cross-line correlations of transcriptome-wide knockdown effects were 0.74 for K562–Jurkat and 0.75 for HepG2–RPE1, but only 0.40 for K562–RPE1 [3]. After noise correction, a perturbation-by-cell-line interaction accounts for 23.5% of response variance, and neither baseline expression nor co-essentiality predicts it in a new line [4]. Other work has decomposed shared and gene-specific responses [5], linked context-dependent responses to genomic features such as copy number and TP53 status [6], or added chromatin data to perturbation models [7,8], while deep perturbation models do not yet outperform simple linear baselines [9]. A natural next question is whether a gene-level property, such as how accessible a gene’s promoter and enhancers are in each line, explains where the responses of two lines diverge.
Answering that question with a valid test is harder than it looks, for three reasons. First, noise varies: a response difference is noisier for lowly expressed genes and for knockdowns with few cells, and a squared noisy estimate is positive even when the true effect is zero. Second, genes are not independent: co-regulated neighbours respond together and share regulatory elements and copy-number segments, so thousands of genes carry far fewer independent observations, and tests that treat genes as independent are anti-conservative, as shown for gene-set tests [10,11]. Third, accessibility is confounded: it tracks expression and copy number, both of which also drive response divergence.
cdtest addresses these problems by randomizing the feature rather than the response. A conditional randomization test holds the outcome fixed and redraws the feature from its distribution given the covariates, so its p-value is valid whatever the dependence among outcomes, provided the redraws are exchangeable with the real feature [12]. For gene-level genomic features, that dependence can be read from the feature alone, because it follows genome position. Dependence along the genome has long been handled by resampling contiguous segments: block subsampling for genome-wide statistics [13] and region-set permutation tests such as regioneR, which randomize region positions while respecting chromosome structure [14]. cdtest applies the same idea to a gene-level regression with covariates, with a block size chosen from the feature alone. Existing cell-side randomization tests for single-cell CRISPR screens, such as SCEPTRE, answer a different question: whether a perturbation affects a gene [15]. cdtest packages the feature-side test together with a noise-corrected outcome for Perturb-seq data, a feature-only block-size rule, test-inversion confidence intervals, comparator tests and benchmarks that measure calibration and power on simulated and real data [16]. It is intended for anyone testing a gene-level annotation (accessibility, transcription-factor binding, conservation, copy number) against a gene-level response summary.
2. Materials and Methods
2.1. Software Architecture
cdtest is a pure-Python package (src/cdtest) built on NumPy, SciPy, pandas and statsmodels, with the analysis pipeline as scripts and a pytest suite (Table 1). The statistical test, its comparators and the block-size rules live in a single module (crt.py) that takes plain arrays, so it can be used on any gene-level response and feature. The remaining modules build the Perturb-seq outcome, the accessibility features and the benchmarks used in this report. A synthetic quick-start (examples/quickstart.py) runs in about 30 s on a laptop without downloaded data and prints the expected output given in the repository README. The processed inputs of every confirmatory analysis (about 10 MB) are deposited with the code (intermediates/), and one script (scripts/reproduce_from_intermediates.py) recomputes Table 2 and the use-case figures from them in under a minute (except the exploratory RPE1 diagnostic and the 4D Nucleome fold-change rows of the signal-track comparison, which need the raw RPE1 data and are redrawn from the deposited result files), without the roughly 100 GB of raw data or the ATAC-seq pipeline, and compares every number with the committed results.
2.2. Outcome: Noise-Corrected Response Difference
For each knockdown p, gene g and line, cdtest computes a pseudobulk log2 fold change β against the line’s own non-targeting controls, from library-size-normalised counts with a pseudocount of 0.1. Each gene’s mean effect over all kept knockdowns (the generic response) is subtracted, giving the knockdown-specific effect β̃. To remove the bias that sampling noise adds to a squared estimate, cdtest builds 50 fake screens per line by drawing control cells as pseudo-knockdowns of matched size, passes them through the same generic subtraction, and takes the mean squared fake effect s̃2. The outcome for a pair of lines A and B is Mg = (1/P) Σp [(β̃2A − s̃2A) − (β̃2B − s̃2B)], so a positive Mg means the gene’s knockdown-specific responses are larger in A (Figure 1A). Reliability is the Spearman–Brown split-half value, with cells split at random within each knockdown and within controls (median over 20 splits).
2.3. Effect Model and Test Statistic
The effect model is Mg = θ·xg + f(Cg) + εg, where xg is the feature difference (A − B) and f(C) adjusts for covariates. In the use case below, f(C) contains an intercept, a natural cubic spline with 4 degrees of freedom on each line’s log2 mean control expression, the log2 expression variances, the expression difference, the copy-number difference at the transcription start site (TSS), promoter CpG observed/expected ratio and one indicator per chromosome arm. Because the design can be rank-deficient, all projections use an orthonormal basis Q of its column space. The statistic is the least-squares estimate θ̂, computed by Frisch–Waugh–Lovell as T = ⟨rx, M⟩ / ⟨rx, rx⟩, where rx is the residual of x on Q.
2.4. Feature-Side Block Permutation
The main null permutes the feature, not the response. The covariate-residualised feature rx is ordered by chromosome and TSS position, each chromosome arm is cut into consecutive blocks of k genes (a shorter remainder joins the previous block, and an arm with fewer than k genes forms one block), and blocks are exchanged only with blocks of equal size while keeping gene order inside each block. T∗ is recomputed for B replacement features (B = 9,999 by default), and the one-sided p-value is (1 + #{T∗b ≥ T}) / (1 + B), with the two-sided version defined on |T|. The p-value is valid under the assumption that the permuted features are exchangeable with the real one given (M, C), whatever the dependence, heteroscedasticity or distribution of M [12,17]. With covariates the residual feature is only approximately block-exchangeable, with an error of order rank(C)/G, and dependence can cross block boundaries; the benchmarks below measure the cost of both. With an intercept-only design the test is exact under block exchangeability, which a unit test checks over 2,000 replicates.
2.5. Block Size from the Feature Alone
The block size k is chosen from the residual feature only, so the response never influences the null. The base rule (v1.0) takes the smallest gene lag at which the within-arm autocorrelation of rx falls below 0.05, bounded to [5,50]. The default rule (“x4”) uses four times that lag, bounded to [5,100]; it was selected in a pre-specified simulation described under Validation. Alternative rules (a 0.01 threshold, 2× and 3× multiples, integrated autocorrelation time, and the Politis–White automatic block length [18,19]) are available through the k_rule argument.
2.6. Chromosome-Arm Terms
In real data the residual feature can carry long-range, arm-scale structure that block permutation cannot exchange. In the development pair of the use case, autocorrelation of the residual combined accessibility feature at gene lags 1, 5, 10, 25, 50 and 100 was 0.38, 0.22, 0.18, 0.15, 0.05 and 0.05, and 19.5% of its variance lay between chromosome arms, which we attribute to residual copy-number error. Without arm terms the block rule hit its cap (k = 100), only 41% of genes lay in exchangeable blocks, and the null distribution was centred near the observed statistic (null mean −0.0184 against θ̂ = −0.0224). Adding one indicator per arm to C reduced the autocorrelation to 0.23, 0.05, 0.02, 0.02, −0.04 and 0.01, gave k = 20 with 96% of genes in exchangeable blocks and a null mean of −0.0026, and left θ̂ unchanged. The stated cost is that any genuine arm-scale effect of the feature is removed together with the artefact.
2.7. Confidence Intervals, Effect Size and Comparators
Because T is linear in M, a hypothesised value θ0 is tested with the same permutation draws: T(θ0) = T − θ0 and T∗b(θ0) = T∗b − θ0·c∗b, where c∗b is the slope of the replacement statistic in θ. The 95% confidence interval is every θ0 for which both one-sided p-values exceed 0.025. Partial R2 = T2|rx|2 / |rM|2 is divided by the reliability of M to express the share of reproducible variance, with an interval from 500 multinomial resamples over knockdowns. For comparison, the same module implements ordinary least squares with genes treated as independent, unrestricted permutation, permutation within expression-difference bins, permutation within strata of expression and copy-number state, a CAMERA-style variance-inflation correction [10], a decoy-feature null and blocks defined by co-accessibility clusters.
2.8. Using cdtest
A test on new data needs a response vector, a feature vector, a covariate table and gene coordinates:
from cdtest import crt
from cdtest.covariates import arm_indicators
Z = np.column_stack([crt.build_design(C, spline_cols=(“expr_A”, “expr_B”), df=4),
arm_indicators(genes[“arm”]) [0]])
res = crt.block_permutation_test(M, x, Z=Z, chrom=genes[“chrom”],
pos=genes[“pos”], arm=genes[“arm”], B=9999, k_rule=“x4”, rng=20261011)
lo, hi, _ = res.ci(sd_x=float(np.std(x)))
The result object holds θ̂ (res.T), the one- and two-sided p-values, the chosen block size and the test-inversion interval. The synthetic benchmark (python -m cdtest.simulate), the block-size selection (python -m cdtest.k_rule_sim) and the planted-signal benchmark are run from the command line. All analyses in this report ran on one Apple M5 Pro workstation with 48 GB of memory; the quick-start runs in about 30 s and the test suite in about 10 s on a laptop.
2.9. Use of AI-Assisted Tools
The author used Claude (Anthropic) [35] as an assistant during this work: for help writing and debugging code, for assistance with parts of the analysis, and for language editing and formatting of the manuscript. The author set the research question, designed the study, directed the analysis, checked all code, results and text, and takes full responsibility for the content of this manuscript. Figures were generated by plotting code from the result files; no AI tool was used to create or edit figure images.
3. Results
3.1. Synthetic Benchmark
We simulated 192 settings that crossed response module correlation (0, 0.1, 0.3, 0.5), feature module sharing (0, 0.3, 0.6), feature–expression confounding (0, 0.3), homoscedastic or heteroscedastic noise and four effect sizes, with 2,000 genes on 44 arms, 200 replicates per setting and B = 999 (Figure 2A). Naive least squares, unrestricted permutation, expression-bin permutation and stratified permutation held the 5% level whenever response or feature lacked module structure (4.9–5.4%). When both shared modules, their false-positive rate averaged 14.8–15.4% and reached 23.8–25.8% in the worst cell. Block permutation with the v1.0 rule averaged 7.9% under shared structure (worst cell 10.2%; mean interval coverage 0.928), while blocks equal to the true modules (5.1%) and blocks four times the v1.0 size (5.3%) held the nominal level, which located the excess in the block-size rule rather than in block permutation itself. The CAMERA-style correction was conservative (1.8%).
3.2. Selection of the Default Block-Size Rule
Before any real-data test, eight feature-only rules were compared in a targeted simulation of 64 shared-structure null cells with four module-size designs and 1,000 replicates per cell (102,400 replicates in total), under a selection criterion committed before the run (worst cell ≤ 6.5% at α = 0.05 and ≤ 2% at α = 0.01). No rule met the criterion; for scale, an exactly valid test passes that worst-of-64 threshold only 38% of the time at 1,000 replicates. Under the pre-specified fallback, the rule with the lowest worst-case false-positive rate was adopted: x4, with a mean false-positive rate of 5.4% (worst cell 7.0%), against 7.9% (11.5%) for v1.0 and 5.0% (6.5%) for oracle blocks. The cost was power: at a planted partial R2 of 0.5% and matched false-positive rate, power fell from 0.449 (v1.0) to 0.257 (x4).
3.3. Planted Signal in Real Outcomes
To measure calibration and power on real dependence structure, known effects θ·v were added to the real outcome M, where v was a decoy accessibility difference from seven non-screened cell lines with near-zero similarity to the pair’s own feature (|similarity| < 0.05), at partial R2 of 0, 0.25, 0.5, 1 and 2% with 500 replicates per level (Figure 2B–D). On the development pair the main test rejected at rates of 0.122, 0.652, 0.782, 1 and 1, a detection limit (80% power at nominal 5%) of 1%. All level-0 rejections came from the two decoys whose own association with M was significant (two-sided p = 0.018 and 0.019); excluding them, the level-0 rate was 0.000, against 0.226 (0.136 without the two decoys) for naive least squares. In the matched pair K562–Jurkat the test detected 0.5% partial R2 with at least 80% power (level-0 rate 0.076 ± 0.052 with all decoys and 0.000 without the two with a significant own effect; naive least squares 0.318). In RPE1–HepG2 four of six decoys carried their own association with M, so the detection limit was 2% with all decoys and 0.5% with the two clean decoys (naive least squares level-0 rate 0.426). The benchmark therefore also reports the planted results with and without decoys that carry their own signal.
3.4. Decoy-Free Calibration on Real Outcomes
Because the level-0 planted results depend on which decoys are excluded, version 0.2.0 adds a null that needs no decoys. In each pair, the pair’s own accessibility difference was circularly shifted within every chromosome arm by an independent random offset. The shift keeps the feature’s values, its within-arm autocorrelation and its arm composition, but breaks its alignment with M, so its true effect is zero by construction (2,000 shifts per pair; main test with B = 999). Over the six pairs the main test rejected at two-sided 5% for 4.9% of shifted features (Wilson 95% interval 4.5–5.3%; per pair 3.2–6.9%), and naive least squares for 5.2%. With the full covariate set including arm terms, both were therefore close to nominal on these real outcomes. Used as a reference distribution for the observed estimate, the shifted features gave a two-sided p of 0.0005, the smallest possible with 2,000 shifts, in each of the three RPE1-containing pairs and 0.80 in K562–Jurkat, in agreement with the main test. On the same-line outcome, circularly shifted pair features were rejected at 4.8% (2,000 shifts; 95% interval 3.9–5.8%), and planted effects of 0.25% partial R2 were detected 96% of the time, so the test is calibrated and sensitive there too. By contrast, 6 of the 21 accessibility differences between pairs of decoy lines were associated with the same-line outcome at 5% (B = 9,999; 11 of 21 with naive least squares). The three rejections among the six pair features in the same-line control (Use case) therefore reflect a component that accessibility differences in general share with the difference between the two K562 screens, not miscalibration of the test.
3.5. Accessibility Pipeline and Unit Tests
Accessibility features for lines without ENCODE processing were built with a local pipeline that follows the ENCODE ATAC-seq pipeline v1.9.1 [20] (fastp 1.4.0 [21], Bowtie 2 2.5.5 [22], SAMtools 1.24 [23], ENCODE blacklist v2 [24], BEDTools 2.31.1 [25], MACS3 3.0.5 [26,27] and IDR 2.0.3 [28]). On ENCODE K562 data (ENCSR868FGK; first 40 million read pairs per replicate) it reproduced ENCODE’s own promoter signal with Spearman 0.967 and Pearson 0.972 over 53,476 genes (protein-coding genes: Spearman 0.986), passing the pre-stated criterion of Spearman ≥ 0.9, and recovered 82.6% of ENCODE IDR peaks (97.6% within its top 300,000 pooled peaks). The test suite contains 72 tests covering the test statistic, the randomization validity check, covariates, features, annotations, the simulator and the reproduction of the primary results. On a fresh clone, 59 pass and 13 annotation checks that need the full annotation build are skipped; the passing tests include recomputing θ̂, the block size, partial R2 and the B = 9,999 p-values of both matched pairs from the deposited intermediates, and a continuous-integration workflow runs them on every commit.
3.6. Use Case: Does Baseline Chromatin Accessibility Explain Context-Dependent Knockdown Responses?
We applied cdtest to the essential-gene CRISPRi Perturb-seq screens in K562 and RPE1 [1] and in Jurkat and HepG2 [2], which share 2,053 knockdowns (Figure 1A). The primary test used two matched pairs that share tissue class, TP53 status and growth mode, K562–Jurkat and RPE1–HepG2 [3], so that accessibility cannot stand in for those labels; the four mixed pairs were secondary, RPE1–K562 served as the development pair, and two K562 screens gave a same-line baseline and control. Canonical p53 targets [29] served as a positive control. Features were bulk ATAC-seq promoter accessibility (TSS ± 1 kb), distal accessibility (distance-weighted signal from union peaks 2.5–100 kb from the TSS) and their equal-weight combination, from ENCODE data [20] for K562, HepG2 and seven decoy lines and from the local pipeline for Jurkat [30] and RPE1 (4D Nucleome Data Portal, generated by the Ren laboratory [31,32]), quantile-normalised across 11 lines and corrected for copy number [33,34]. Hypotheses, thresholds and pair orientations were fixed in a frozen analysis plan before any response difference was computed; three dated amendments (the block-size rule, the signal track and the arm terms) were made before the matched pairs were analysed, each with the original version reported as a sensitivity analysis, and the plan and its amendments are in the repository, with git tags for v1.0, v1.1 and v1.3 [16].
The outcome was reproducible in every pair (split-half reliability 0.863–0.996). Its reproducible variance was 3.6 times the same-line baseline for K562–Jurkat and 42.7–152.8 times for the other pairs (Figure 1C). K562 and Jurkat are both TP53-mutant leukaemia lines grown in suspension, so the same knockdowns change expression in them in similar ways, and there is little divergence for any feature to explain; the K562–Jurkat test is therefore informative about effects above its detection limit, not about very small ones. The pipeline passed its pre-set positive control: in the development pair the 25 kept core p53 targets had mean M 0.131, against 0.050 ± 0.020 for 1,000 expression-matched random gene sets (z = 4.1, empirical p = 0.001; Figure 1B), so p53 targets responded more in p53 wild-type RPE1 than in p53-null K562.
3.7. Use Case Results
Neither matched pair supported the primary hypothesis that a gene more accessible in one line responds more strongly in that line (Table 2; Figure 3). K562–Jurkat gave a well-powered null: θ̂ = 0.0002 (95% CI −0.0021 to 0.0014), with accessibility explaining 0.001% of the reproducible variance of M (bootstrap upper bound 0.023%), in a pair where an effect of 0.5% partial R2 would have been detected with at least 80% power. RPE1–HepG2 gave an association of the opposite sign (θ̂ = −0.0173; 95% CI −0.0263 to −0.0140; two-sided p = 0.0001), and the same negative association appeared in every pair containing RPE1 (RPE1–K562 θ̂ = −0.0224; Jurkat–RPE1 −0.0219) and in none of the other three. The Holm-adjusted p-values in Table 2 are both 1 because the primary hypothesis is one-sided (θ > 0): the negative RPE1–HepG2 estimate has a one-sided p of 1, and K562–Jurkat’s one-sided p of 0.645 becomes 1 after adjustment. Likewise, the pooled matched contrast (θ̂ = −0.0055; 95% CI −0.0104 to −0.0041; two-sided p = 0.0001; Figure 3) is driven by RPE1–HepG2 and does not support the hypothesis.
Table 2.
Primary test in the two matched pairs (combined accessibility feature).
| Pair (A − B) | θ̂ | 95% CI | Two-sided p | Holm p (H1) | Partial R2/reliability [95% bootstrap] |
|---|---|---|---|---|---|
| K562 − Jurkat | 0.0002 | −0.0021 to 0.0014 | 0.8381 | 1 | 0.001% [0.000%, 0.023%] |
| RPE1 − HepG2 | −0.0173 | −0.0263 to −0.0140 | 0.0001 | 1 | 0.770% [0.607%, 0.905%] |
Main test: block permutation of the covariate-residualised feature with the x4 rule and chromosome-arm terms, B = 9,999; k = 20 (K562 − Jurkat) and 28 (RPE1 − HepG2). Holm p refers to the one-sided primary hypothesis θ > 0, so a negative estimate gives a Holm p of 1. Planted-signal detection limits: 0.5% (K562 − Jurkat); 2% with all decoys and 0.5% with clean decoys (RPE1 − HepG2).
The diagnostics built into cdtest traced this association to the data rather than to biology. With MACS2 fold-change features the RPE1–HepG2 estimate was −0.0043 (two-sided p = 0.2672), and replacing only the RPE1 column of the insertion-count feature matrix by fold change removed the association in all three RPE1 pairs (θ̂ = +0.0044, +0.0023 and +0.0039; p = 0.668, 0.238 and 0.161; Figure 4B). In an exploratory, post hoc diagnostic, the association was unchanged by alternative RPE1 copy-number tracks, thinning to lower depth, single replicates, excluding chromosomes 10 and X or any single chromosome, and excluding p53 target genes; it lay entirely in the part of the RPE1 insertion-count signal that fold change does not share, in the library with the lowest insertion TSS enrichment of the 11 (10.6, against 13.7–28.3; Figure 4C). The choice of signal track had been made earlier for a separate reason: fold-change promoter signal was negatively rank-correlated with expression (Spearman −0.147 in RPE1 and −0.090 in K562), whereas insertion counts gave the expected positive relation (+0.111 and +0.113). A result that holds under only one summary of the same reads is reported as unconfirmed.
The same-line control showed a second route to spurious association. Two screens of the same line share their chromatin, so no accessibility difference should explain the difference between them, yet three of six accessibility differences associated with it at 5% (RPE1–K562 feature θ̂ = −0.00135, p = 0.0017; RPE1–HepG2 −0.00093, p = 0.0194; K562–Jurkat +0.00074, p = 0.0448; Figure 4A), at a standardised size of about 60% of the corresponding cross-line effect. A calibrated test controls false positives under its null but cannot tell a technical component of a feature from a biological one; a same-line control can.
4. Discussion
Three routes produced, or could produce, associations that are not chromatin biology: gene-level tests that ignore dependence (up to 25.8% false positives in simulation), features that track technical divergence between screens, and the choice of signal track. Decoy features are not guaranteed to be null: under the main test, 17 of 43 decoy accessibility differences with near-zero similarity to the pair’s own feature were associated with M at 5%, against about 2.1 expected, and 6 of 21 were associated even with the same-line outcome. Since the test is calibrated on these outcomes (circular-shift null above), these associations are real signal carried by accessibility differences in general, which is why a same-line control is needed. On these real data, naive and block-permutation estimates were similar once the full covariate set including arm terms was included (the naive standard error was within 3–18% of the spread of the block null, and all tests agreed in sign and significance in five of six pairs), so conditioning on covariates provided much of the protection alongside the permutation scheme. We recommend that analyses relating gene-level chromatin features to perturbation responses use dependence-aware randomization with arm terms, a same-line control and a signal-track sensitivity analysis; cdtest provides all three.
Limitations
Validity rests on exchangeability of the permuted residual feature; with covariates this holds only approximately, block size is estimated from the data, and the default rule trades power for calibration (power 0.257 against 0.449 at 0.5% partial R2 in simulation). Arm terms remove genuine arm-scale effects together with copy-number error. In simulated genomes without arm-scale structure, adding arm terms shortened the blocks chosen by the x4 rule and raised the false-positive rate in the most strongly shared setting from about 5% to about 9%; arm terms are meant for data whose residual feature carries arm-scale structure, and their calibration should be checked on the data, as with the circular-shift null above. The test establishes association, not cause. In the use case, accessibility came from bulk profiles in cultures different from those screened, both matched pairs cross two studies, the RPE1 diagnostic was post hoc and rests on a single RPE1 dataset, Jurkat and RPE1 were processed with a local pipeline (unique reads with mapping quality ≥ 30, SAMtools duplicate marking and MACS3) rather than the official ENCODE pipeline, and a planned Jurkat sensitivity analysis with a second accessibility dataset has not been run.
Software Availability
- Project name: cdtest
- Project home page: https://github.com/Fire-Dev2/chromatin-divergence
- Operating system(s): Platform independent
- Programming language: Python
- Other requirements: Python 3.10 or higher; numpy, scipy, pandas, statsmodels, joblib, matplotlib, pyarrow; optional h5py, pyBigWig and pyfaidx for the real-data pipeline; ATAC-seq tools listed in environment-atac.yml, with a Dockerfile
- License: MIT
- Version: 0.2.0
Data Availability Statement
All input data are public (Table 3). The processed intermediates from which every confirmatory result is recomputed (gene annotation, copy number, gene-level accessibility features for 11 lines, control-cell expression moments and the outcome vectors M, with md5 checksums), result tables, figure source data and the frozen analysis plan with its tagged amendments are in the repository [16]. The version described here is release v0.2.0 of the repository.
Author Contributions
T.H.N. conceived the study, developed the methodology and software, performed the analyses and validation, and wrote and revised the manuscript, with AI assistance as described in Section 2.9. The author has read and agreed to the posted version of the manuscript.
Funding
This work received no specific funding.
Institutional Review Board Statement
Not applicable. This study uses only publicly available data from cell lines.
Informed Consent Statement
Not applicable.
Acknowledgments
The author thanks the Ren laboratory (University of California San Diego) and the 4D Nucleome project for the hTERT-RPE1 ATAC-seq data (4DN experiment set 4DNES48BA2C8), the ENCODE Consortium for ATAC-seq data and the processing pipeline, Replogle, Nadig, Weissman and colleagues for releasing the Perturb-seq screens, Gottardi Zamperla and colleagues for the Jurkat ATAC-seq data, and DepMap (Broad Institute) for copy-number data.
Conflicts of Interest
The author declares no conflicts of interest.
Availability & Implementation
cdtest is written in Python and released under the MIT license at https://github.com/Fire-Dev2/chromatin-divergence.
Abbreviations
ATAC-seq: assay for transposase-accessible chromatin using sequencing; CI: confidence interval; CPM: counts per million; CRISPRi: CRISPR interference; FC: fold change; IDR: irreproducible discovery rate; MACS: model-based analysis of ChIP-seq; OLS: ordinary least squares; TSS: transcription start site.
References
- Replogle, J.M.; Saunders, R.A.; Pogson, A.N.; Hussmann, J.A.; Lenail, A.; Guna, A.; et al. Mapping information-rich genotype-phenotype landscapes with genome-scale Perturb-seq. Cell 2022, 185, 2559–2575.e28. [Google Scholar] [CrossRef] [PubMed]
- Nadig, A.; Replogle, J.M.; Pogson, A.N.; Murthy, M.; McCarroll, S.A.; Weissman, J.S.; et al. Transcriptome-wide analysis of differential expression in perturbation atlases. Nat. Genet. 2025, 57, 1228–1237. [Google Scholar] [CrossRef] [PubMed]
- Nadig, A.; Replogle, J.M.; Pogson, A.N.; McCarroll, S.A.; Weissman, J.S.; Robinson, E.B.; et al. Transcriptome-wide characterization of genetic perturbations. bioRxiv 2024. [Google Scholar] [CrossRef] [PubMed]
- Molina, A.; Zhang, X. Perturbation response decomposition enables biologically aligned generalization to unseen perturbations and cellular contexts. bioRxiv 2026. [Google Scholar] [CrossRef]
- Liang, H.; Singh, R. COMPASS: Component-Wise Inference of Shared and Gene-Specific Perturbation Response. bioRxiv 2026. [Google Scholar] [CrossRef]
- Maffa, S.; Boyle, I.A.; Ward, L.; Colgan, W.N.; Borck, P.; Simerzin, A.; et al. Dissecting context-dependent cancer vulnerabilities using Perturb-seq. bioRxiv 2026. [Google Scholar] [CrossRef]
- Ruan, J.; He, C.; Quan, R.; Xue, F.; Yang, Z.; Yang, Y. Beyond the Transcriptome: Chromatin-Informed Prediction of Cell-State-Dependent Perturbation Responses. arXiv 2026, arXiv:2610.09054. [Google Scholar] [CrossRef]
- Metzner, E.; Southard, K.M.; Norman, T.M. Multiome Perturb-seq unlocks scalable discovery of integrated perturbation effects on the transcriptome and epigenome. Cell Syst. 2025, 16, 101161. [Google Scholar] [CrossRef] [PubMed]
- Ahlmann-Eltze, C.; Huber, W.; Anders, S. Deep-learning-based gene perturbation effect prediction does not yet outperform simple linear baselines. Nat. Methods 2025, 22, 1657–1661. [Google Scholar] [CrossRef] [PubMed]
- Wu, D.; Smyth, G.K. Camera: a competitive gene set test accounting for inter-gene correlation. Nucleic Acids Res. 2012, 40, e133. [Google Scholar] [CrossRef] [PubMed]
- Efron, B.; Tibshirani, R. On testing the significance of sets of genes. Ann. Appl. Stat. 2007, 1, 107–129. [Google Scholar] [CrossRef]
- Candès, E.; Fan, Y.; Janson, L.; Lv, J. Panning for gold: ‘model-X’ knockoffs for high dimensional controlled variable selection. J. R Stat. Soc. Ser. B Stat. Methodol. 2018, 80, 551–577. [Google Scholar] [CrossRef]
- Bickel, P.J.; Boley, N.; Brown, J.B.; Huang, H.; Zhang, N.R. Subsampling methods for genomic inference. Ann. Appl. Stat. 2010, 4, 1660–1697. [Google Scholar] [CrossRef]
- Gel, B.; Díez-Villanueva, A.; Serra, E.; Buschbeck, M.; Peinado, M.A.; Malinverni, R. regioneR: an R/Bioconductor package for the association analysis of genomic regions based on permutation tests. Bioinformatics 2016, 32, 289–291. [Google Scholar] [CrossRef] [PubMed]
- Barry, T.; Wang, X.; Morris, J.A.; Roeder, K.; Katsevich, E. SCEPTRE improves calibration and sensitivity in single-cell CRISPR screen analysis. Genome Biol. 2021, 22, 344. [Google Scholar] [CrossRef] [PubMed]
- Nambi, T.H. cdtest (Version 0.2.0) [Computer software]; GitHub, 2026; Available online: https://github.com/Fire-Dev2/chromatin-divergence/releases/tag/v0.2.0.
- Hemerik, J.; Goeman, J. Exact testing with random permutations. TEST. 2018, 27, 811–825. [Google Scholar] [CrossRef] [PubMed]
- Politis, D.N.; White, H. Automatic block-length selection for the dependent bootstrap. Econom. Rev. 2004, 23, 53–70. [Google Scholar] [CrossRef]
- Patton, A.; Politis, D.N.; White, H. Correction to “Automatic block-length selection for the dependent bootstrap” by D. Politis and H. White. Econom. Rev. 2009, 28, 372–375. [Google Scholar] [CrossRef]
- ENCODE Project Consortium; Abascal, F.; Acosta, R.; Addleman, N.J.; Adrian, J.; Afzal, V.; et al. Expanded encyclopaedias of DNA elements in the human and mouse genomes. Nature 2020, 583, 699–710. [Google Scholar] [CrossRef] [PubMed]
- Chen, S.; Zhou, Y.; Chen, Y.; Gu, J. fastp: an ultra-fast all-in-one FASTQ preprocessor. Bioinformatics 2018, 34, i884–i890. [Google Scholar] [CrossRef] [PubMed]
- Langmead, B.; Salzberg, S.L. Fast gapped-read alignment with Bowtie 2. Nat. Methods 2012, 9, 357–359. [Google Scholar] [CrossRef] [PubMed]
- Danecek, P.; Bonfield, J.K.; Liddle, J.; Marshall, J.; Ohan, V.; Pollard, M.O.; et al. Twelve years of SAMtools and BCFtools. GigaScience 2021, 10, giab008. [Google Scholar] [CrossRef] [PubMed]
- Amemiya, H.M.; Kundaje, A.; Boyle, A.P. The ENCODE Blacklist: identification of problematic regions of the genome. Sci. Rep. 2019, 9, 9354. [Google Scholar] [CrossRef] [PubMed]
- Quinlan, A.R.; Hall, I.M. BEDTools: a flexible suite of utilities for comparing genomic features. Bioinformatics 2010, 26, 841–842. [Google Scholar] [CrossRef] [PubMed]
- Zhang, Y.; Liu, T.; Meyer, C.A.; Eeckhoute, J.; Johnson, D.S.; Bernstein, B.E.; et al. Model-based analysis of ChIP-Seq (MACS). Genome Biol. 2008, 9, R137. [Google Scholar] [CrossRef] [PubMed]
- Doherty, P.; Hu, Q.; Zhuang, Z.; Zhang, H.; Penikalapati, S.C.; Liu, S.; et al. MACS3: a peak-calling platform for bulk and single-cell regulatory genomics. Genom. Proteom. Bioinform. 2026, qzag097. [Google Scholar] [CrossRef] [PubMed]
- Li, Q.; Brown, J.B.; Huang, H.; Bickel, P.J. Measuring reproducibility of high-throughput experiments. Ann. Appl. Stat. 2011, 5, 1752–1779. [Google Scholar] [CrossRef]
- Fischer, M. Census and evaluation of p53 target genes. Oncogene 2017, 36, 3943–3956. [Google Scholar] [CrossRef] [PubMed]
- Gottardi Zamperla, M.; Illi, B.; Barbi, V.; Cencioni, C.; Santoni, D.; Gagliardi, S.; et al. HDAC6 inhibition disrupts HDAC6-P300 interaction reshaping the cancer chromatin landscape. Clin. Epigenet. 2024, 16, 109. [Google Scholar] [CrossRef] [PubMed]
- Dekker, J.; Belmont, A.S.; Guttman, M.; Leshyk, V.O.; Lis, J.T.; Lomvardas, S.; et al. The 4D nucleome project. Nature 2017, 549, 219–226. [Google Scholar] [CrossRef] [PubMed]
- Reiff, S.B.; Schroeder, A.J.; Kırlı, K.; Cosolo, A.; Bakker, C.; Mercado, L.; et al. The 4D Nucleome Data Portal as a resource for searching and visualizing curated nucleomics data. Nat. Commun. 2022, 13, 2365. [Google Scholar] [CrossRef] [PubMed]
- DepMap; Broad Institute. DepMap 24Q4 Public [Dataset]. Figshare+ 2024. [Google Scholar] [CrossRef]
- Volpe, E.; Colantoni, A.; Corda, L.; Di Tommaso, E.; Pelliccia, F.; Ottalevi, R.; et al. The reference genome of the human diploid cell line RPE-1. Nat. Commun. 2025, 16, 7751. [Google Scholar] [CrossRef] [PubMed]
- Anthropic. Claude [Large language model]. 2026. Available online: https://claude.ai.
- National Center for Biotechnology Information. Gene Expression Omnibus. Available online: https://www.ncbi.nlm.nih.gov/geo/ (accessed on 11 Oct 2026).
- ENCODE Project. ENCODE portal. Available online: https://www.encodeproject.org (accessed on 11 Oct 2026).
- 4D Nucleome Project. 4DN Data Portal. Available online: https://data.4dnucleome.org (accessed on 11 Oct 2026).
- Mudge, J.M.; Carbonell-Sala, S.; Diekhans, M.; Martinez, J.G.; Hunt, T.; Jungreis, I.; et al. GENCODE 2025: reference gene annotation for human and mouse. Nucleic Acids Res. 2025, 53, D966–D975. [Google Scholar] [CrossRef] [PubMed]
Figure 1.
Use-case design and outcome. (A) Design: four screened lines, two matched pairs (K562 − Jurkat, RPE1 − HepG2), four mixed pairs and the same-line pair K562 essential − K562 genome-wide; outcome M, accessibility features and the feature-side block-permutation test. (B) Outcome M in the development pair RPE1 − K562 (5,262 genes; 1,314 knockdowns; red ticks: the 25 kept core p53 targets) and the p53 positive control: mean M of the 25 targets (0.131) against 1,000 expression-matched random sets (0.050 ± 0.020 SD; error bar ± 2 SD); z = 4.1, empirical p = 0.001. (C) Reproducible variance of M (SD2 × reliability) relative to the same-line baseline (log scale): K562 − Jurkat 3.6×, other pairs 42.7–152.8×; white numbers give split-half reliability. †: pair contains RPE1.
Figure 1.
Use-case design and outcome. (A) Design: four screened lines, two matched pairs (K562 − Jurkat, RPE1 − HepG2), four mixed pairs and the same-line pair K562 essential − K562 genome-wide; outcome M, accessibility features and the feature-side block-permutation test. (B) Outcome M in the development pair RPE1 − K562 (5,262 genes; 1,314 knockdowns; red ticks: the 25 kept core p53 targets) and the p53 positive control: mean M of the 25 targets (0.131) against 1,000 expression-matched random sets (0.050 ± 0.020 SD; error bar ± 2 SD); z = 4.1, empirical p = 0.001. (C) Reproducible variance of M (SD2 × reliability) relative to the same-line baseline (log scale): K562 − Jurkat 3.6×, other pairs 42.7–152.8×; white numbers give split-half reliability. †: pair contains RPE1.

Figure 2.
Calibration and power of the test. (A) Synthetic benchmark: false-positive rate at 5% against response module correlation, by feature module sharing and confounding, one line per test. Gene-level tests reach 23.8–25.8% in the worst cell under shared structure. (B) Planted signal in real M, development pair RPE1 − K562: rejection rate at nominal 5% (left) and power at matched 5% false-positive rate (right) against planted partial R2, main test and comparators, with cluster-robust Monte Carlo error bars; dotted black line: main test without decoys that have a significant own association with M. (C–D) The same for K562 − Jurkat (detection limit 0.5%) and RPE1 − HepG2 (2% with all decoys; 0.5% with the two clean decoys).
Figure 2.
Calibration and power of the test. (A) Synthetic benchmark: false-positive rate at 5% against response module correlation, by feature module sharing and confounding, one line per test. Gene-level tests reach 23.8–25.8% in the worst cell under shared structure. (B) Planted signal in real M, development pair RPE1 − K562: rejection rate at nominal 5% (left) and power at matched 5% false-positive rate (right) against planted partial R2, main test and comparators, with cluster-robust Monte Carlo error bars; dotted black line: main test without decoys that have a significant own association with M. (C–D) The same for K562 − Jurkat (detection limit 0.5%) and RPE1 − HepG2 (2% with all decoys; 0.5% with the two clean decoys).

Figure 3.
Primary test across pairs. Effect θ̂ of the combined accessibility difference (insertion counts per million) on the response difference M, with 95% confidence intervals by test inversion, for each pair and for the pooled matched and pooled mixed contrasts (4,688 genes common to all pairs). Blue: matched pairs; orange: mixed pairs; squares: pooled contrasts. Main test: block permutation of the covariate-residualised feature (x4 rule, chromosome-arm terms), B = 9,999. Every RPE1-containing pair (†) is negative. Right-hand columns: two-sided p and, for the matched pairs, Holm p, planted-signal detection limit (all decoys / clean decoys) and partial R2/reliability.
Figure 3.
Primary test across pairs. Effect θ̂ of the combined accessibility difference (insertion counts per million) on the response difference M, with 95% confidence intervals by test inversion, for each pair and for the pooled matched and pooled mixed contrasts (4,688 genes common to all pairs). Blue: matched pairs; orange: mixed pairs; squares: pooled contrasts. Main test: block permutation of the covariate-residualised feature (x4 rule, chromosome-arm terms), B = 9,999. Every RPE1-containing pair (†) is negative. Right-hand columns: two-sided p and, for the matched pairs, Holm p, planted-signal detection limit (all decoys / clean decoys) and partial R2/reliability.

Figure 4.
Sources of spurious association. (A) Same-line control: θ̂ and two-sided p of each pair’s combined accessibility difference against M = K562 essential − K562 genome-wide; 3 of 6 reject at 5% (RPE1 − K562 p = 0.0017); right, exploratory: partial correlation of single-line features with same-line M (+0.046 to +0.079). (B) Signal-track sensitivity: θ̂ with insertion-count features (primary) and fold-change features for the matched pairs, and with only the RPE1 column replaced by 4DN-processed fold change for the three RPE1-containing pairs. (C) Exploratory (post hoc) RPE1 diagnostic: θ̂ with 95% confidence intervals for selected variants in the three RPE1-containing pairs. Replacing only the RPE1 column by fold change (4DN-processed or local) removes the association; copy-number, depth, replicate, chromosome and p53-gene variants do not. The full variant set is in the repository [16].
Figure 4.
Sources of spurious association. (A) Same-line control: θ̂ and two-sided p of each pair’s combined accessibility difference against M = K562 essential − K562 genome-wide; 3 of 6 reject at 5% (RPE1 − K562 p = 0.0017); right, exploratory: partial correlation of single-line features with same-line M (+0.046 to +0.079). (B) Signal-track sensitivity: θ̂ with insertion-count features (primary) and fold-change features for the matched pairs, and with only the RPE1 column replaced by 4DN-processed fold change for the three RPE1-containing pairs. (C) Exploratory (post hoc) RPE1 diagnostic: θ̂ with 95% confidence intervals for selected variants in the three RPE1-containing pairs. Replacing only the RPE1 column by fold change (4DN-processed or local) removes the association; copy-number, depth, replicate, chromosome and p53-gene variants do not. The full variant set is in the repository [16].

Table 1.
Main modules and scripts of cdtest.
| Component | Purpose |
|---|---|
| crt.py | Effect model, feature-side block permutation, block-size rules, test-inversion intervals, partial R2, comparator tests |
| aim1.py, screens.py | Pseudobulk effects, generic-response removal, noise null and outcome M from Perturb-seq count matrices |
| features.py, atac.py | Promoter, distal and combined accessibility features from insertion counts or fold-change tracks |
| covariates.py, annot.py | Covariate design f(C), gene annotation, copy number and chromosome arms |
| simulate.py, k_rule_sim.py, planted.py | Synthetic benchmark, block-size rule selection, planted-signal benchmark on real outcomes |
| scripts/ | Data download, local ATAC-seq pipeline, analysis runs and figure generation |
| examples/quickstart.py | Synthetic demonstration without downloaded data (about 30 s) |
| tests/ | Unit tests, including the randomization-validity check |
Modules are in src/cdtest unless stated otherwise.
Table 3.
Public data sources used in the use case.
| Data | Accession / source | Use |
|---|---|---|
| K562 essential and genome-wide, RPE1 essential CRISPRi Perturb-seq | Figshare+ doi:10.25452/figshare.plus.20029387; SRA PRJNA831566 [1] | Outcome; same-line baseline |
| Jurkat and HepG2 essential CRISPRi Perturb-seq | GEO GSE264667 [2,36] | Outcome |
| K562 and HepG2 ATAC-seq | ENCODE ENCSR868FGK, ENCSR291GJU [37] | Features; pipeline validation |
| Decoy-line ATAC-seq (GM12878, HCT116, MCF-7, A549, IMR-90, PC-3, Panc1) | ENCODE ENCSR637XSC, ENCSR872WGW, ENCSR422SUG, ENCSR032RGS, ENCSR200OML, ENCSR499ASS, ENCSR591PIX [37] | Decoy features; planted signal |
| hTERT-RPE1 ATAC-seq | 4DN 4DNES48BA2C8 [38] | Features (local pipeline) |
| Jurkat ATAC-seq | GEO GSE273644 [30,36] | Features (local pipeline) |
| Copy number | DepMap 24Q4 [33]; RPE1 karyotype [34] | Copy-number correction; covariate |
| Gene annotation | GENCODE release 50 [39] | Genes and TSSs |
| p53 targets | Fischer 2017 core set, 116 genes [29] | Positive control |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the author. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.