bio-crispr-screens-copy-number-correction
Corrects the gene-independent copy-number artifact in CRISPR-Cas9 screens (Aguirre 2016 / Munoz 2016 Cancer Discov) where amplified loci appear essential from DNA-damage burden of simultaneous cuts. Covers the p53-dependent G2-arrest mechanism, CRISPRcleanR (Iorio 2018) unsupervised pre-hoc correction, CERES (Meyers 2017) joint CN + gene-effect model, Chronos (Dempster 2021) DepMap-standard population-dynamics + CN model with lowest residual bias, the decision tree by data availability, the Spearman LFC-vs-CN diagnostic, focal-amplification examples (ERBB2 in HER2+, MYC in colorectal, FGFR1 in head and neck), and CRISPRi/a alternatives that bypass the artifact. Use when screening cancer cell lines, diagnosing essentiality at amplified loci, choosing CRISPRcleanR / CERES / Chronos, deciding whether CN correction is needed before MAGeCK / BAGEL2 / drugZ, or switching from Cas9 to CRISPRi.
What this skill does
## Version Compatibility
Reference examples tested with: CRISPRcleanR 3.0+ (R/Bioconductor), Chronos 2.0+ (https://github.com/broadinstitute/chronos), CERES (legacy, superseded by Chronos), pandas 2.2+, numpy 1.26+, scipy 1.12+.
Before using code patterns, verify installed versions match. If versions differ:
- R: `packageVersion('CRISPRcleanR')`; `?ccr.CleanCN`
- Python: `pip show chronos-cn`; `chronos --help`
If code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.
## Copy-Number Bias Correction in CRISPR Screens
**"Correct copy-number artifacts in my cancer-cell-line screen"** -> Identify gene-independent depletion at amplified loci, apply CRISPRcleanR (pre-hoc, unsupervised, position-based) or Chronos (joint model, supervised with CN profile) to remove the artifact, then proceed to hit calling on corrected data.
- R: `CRISPRcleanR::ccr.CleanCN()` for unsupervised pre-hoc correction (no CN profile required)
- Python: Chronos (`chronos-cn`) for joint cell-population dynamics + CN modeling
- Python: CERES (legacy, superseded by Chronos)
## The Copy-Number Artifact (Mechanism)
**Aguirre AJ et al 2016 *Cancer Discov* 6:914** and **Munoz DM et al 2016 *Cancer Discov* 6:900** demonstrated that focal amplification regions in cancer cell lines appear systematically "essential" in CRISPR-Cas9 screens, independent of the gene's actual biology. The mechanism:
1. A focal amplification creates 4-50+ copies of a genomic region.
2. Each sgRNA targeting a gene in that region cuts at all copies simultaneously.
3. Multiple cuts trigger a p53-dependent DNA-damage response.
4. Cells arrest in G2 phase; the sgRNA appears depleted because its bearer cells don't proliferate.
5. The depletion is proportional to the number of simultaneous cuts, not the gene's essentiality.
**Consequence:** ERBB2 appears essential in HER2-amplified SK-BR-3 (24 copies). MYC appears essential in MYC-amplified colorectal lines (10+ copies). FGFR1 appears essential in FGFR1-amplified head-and-neck lines. These are all false positives.
**Affects:** All Cas9-KO screens in cancer cell lines. Universal, not conditional. Cannot be remediated by sequencing depth, library size, or replicate count. Requires explicit correction.
**Bypassed by:**
- CRISPRi (catalytically dead Cas9, no DNA damage) -> no artifact
- CRISPRa (catalytically dead Cas9) -> no artifact
- Base editing (single-strand nick + deaminase) -> reduced artifact (Hess 2016 demonstration)
- Prime editing (nick + RT) -> reduced artifact
## Correction Method Decision Tree
| Available data | Recommended method | Why |
|----------------|---------------------|-----|
| Cell-line panel without matched CN profile | CRISPRcleanR | Unsupervised; uses genomic position only |
| Single cell line with matched WGS/SNP-array CN | CRISPRcleanR or Chronos | Either works; Chronos more rigorous |
| DepMap-scale (1000+ cell lines, longitudinal) | Chronos | Population-dynamics + screen quality + CN; DepMap quarterly standard |
| Single cell line, multi-timepoint | Chronos | Leverages longitudinal counts |
| Need to integrate with downstream MAGeCK | CRISPRcleanR (pre-hoc) | Outputs corrected counts for any downstream tool |
| Multiple cell lines + multiple batches | Chronos | Joint modeling of all dimensions |
## CRISPRcleanR (Iorio 2018) - Unsupervised Pre-Hoc
**Goal:** Correct copy-number bias without requiring matched CN profile by detecting position-based systematic enrichment / depletion patterns.
**Approach:** Order sgRNAs by chromosomal coordinate; detect segments where sgRNAs show systematic depletion (or enrichment) inconsistent with single-gene biology; shift these segments toward the global mean. The intuition: focal amplifications create depletion bands extending tens to hundreds of kb; non-amplified essential genes are punctate.
```r
library(CRISPRcleanR)
# Load library annotation (sgRNA -> chromosomal coordinates)
data(KY_Library_v1.0) # KY library; replace with your library annotation
# OR use ccr.PrepareAnnotations() to make custom
# Load count data with first 2 cols: sgRNA, gene, then sample counts
counts <- read.table('counts.txt', header=TRUE, sep='\t')
# 1. Normalize and compute logFC
norm_counts <- ccr.NormfoldChanges(counts, min_reads=30,
EXPname='my_screen',
libraryAnnotation=KY_Library_v1.0)
# 2. Compute genome-sorted sgRNA fold changes
gw_log_fc <- ccr.logFCs2chromPos(norm_counts$norm_fold_changes,
KY_Library_v1.0)
# 3. Apply CRISPRcleanR correction
corrected <- ccr.GWclean(gw_log_fc, display=TRUE, label='my_screen')
# Output: corrected$corrected_logFCs and corrected$segments
# corrected_logFCs can replace LFCs downstream
# 4. Re-derive corrected counts for downstream MAGeCK
corrected_counts <- ccr.correctCounts(my_screen=norm_counts,
correction=corrected,
outprefix='cleanr_corrected',
libraryAnnotation=KY_Library_v1.0)
```
**Key parameter:** `min_reads=30` is the lower-count threshold for inclusion. This must match the library-coverage strategy; too high removes legitimate guides, too low keeps noisy guides.
**Output:** Pre-corrected LFCs and counts that can be fed into MAGeCK / BAGEL2 / drugZ as if they were the original screen data. The correction is independent of CN profile (unsupervised) and works on cell lines without matched WGS.
## Chronos (Dempster 2021) - Joint Population-Dynamics + CN Model
**Goal:** Estimate gene fitness while jointly accounting for copy-number-driven depletion, screen quality, and longitudinal cell-population dynamics.
**Approach:** Model the cell population over time as an ODE driven by per-gene fitness effects; add a separate term for copy-number-driven depletion; estimate all parameters via maximum-likelihood with regularization. Outputs a "gene effect score" normalized against the empirical distributions of essential and non-essential reference genes.
```python
# Chronos via the chronos-cn package
import chronos
# Inputs
# 1. Counts: rows = sgRNA, columns = samples (per-timepoint per-cell-line)
# 2. Sequence map: sgRNA -> cell line -> sample timepoint
# 3. Copy-number profile per cell line per genomic region
# 4. Guide-gene map
model = chronos.Chronos(
sequence_map=sequence_map, # which samples are from which cell line + condition
guide_gene_map=guide_gene_map,
reads=counts_df,
copy_number=copy_number_df, # per-cell-line CN profile
pretrained_offset=None,
)
model.train(
n_steps=2000,
learning_rate=0.1,
verify_normalize=True,
)
gene_effects = model.gene_effect() # cells x genes; standardized score
gene_probabilities = model.gene_probability() # probability of being essential
```
**DepMap convention:** A gene-effect score <-1 corresponds to "essential" in that cell line; <-0.5 is "depleting." Each DepMap release (quarterly) provides Chronos gene effects and probabilities.
**Critical:** Chronos benefits most from longitudinal data (multiple timepoints per cell line) but can run with multiple cell lines at single timepoint; it cannot run with a single screen (one line, one timepoint) without matched CN profile. For single-cell-line, single-timepoint screens without matched CN, use CRISPRcleanR instead.
## CERES (Legacy, Superseded by Chronos)
**Meyers RM et al 2017 *Nat Genet* 49:1779** introduced the first formal CN-correction method at DepMap scale. CERES decomposes per-sgRNA LFC as `sgRNA_efficacy * gene_effect - CN_term(copy_number)`, fitting jointly. Superseded by Chronos at DepMap in 2021 due to Chronos' better handling of screen quality and longitudinal data. CERES remains useful for cross-validation.
## Detect Uncorrected CN Bias
**Goal:** Verify that copy-number bias is cRelated in Writing & Docs
jax-development
IncludedUse this skill when the user is writing, debugging, profiling, refactoring, reviewing, benchmarking, parallelising, exporting, or explaining JAX code, or when they mention JAX, jax.numpy, jit, grad, value_and_grad, vmap, scan, lax, random keys, pytrees, jax.Array, sharding, Mesh, PartitionSpec, NamedSharding, pmap, shard_map, Pallas, XLA, StableHLO, checkify, profiler, or the JAX repo. It helps turn NumPy or PyTorch-style code into pure functional JAX, fix tracer/control-flow/shape/PRNG bugs, remove recompiles and host-device syncs, choose transforms and sharding strategies, inspect jaxpr/lowering/IR, and benchmark compiled code correctly.
nature-article-writer
IncludedDrafts, rewrites, diagnostically critiques, and style-calibrates primary research manuscripts for Nature and Nature Portfolio journals. Use when the user wants a Nature-style title, summary paragraph or abstract, introduction, results, discussion, methods, figure legends, presubmission enquiry, cover letter, reviewer response, or when a scientific draft sounds generic, jargon-heavy, structurally weak, or AI-ish and needs precise, broad-reader-friendly prose without inventing data, analyses, or references. Best for primary research articles and letters rather than reviews or press releases unless explicitly adapting one.
deckrd
IncludedDocument-driven framework that derives requirements, specifications, implementation plans, and executable tasks from goals through structured AI dialogue. Use when user says "write requirements", "create spec", "plan implementation", "derive tasks", "structure this feature", "break down into tasks", or "document this module". Also use for reverse engineering existing code into docs (/deckrd rev). Do NOT use for direct code writing — use /deckrd-coder after tasks are generated. Do NOT use when the user only wants to run or fix existing code without planning.
clinical-decision-support
IncludedGenerate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading, statistical analysis (hazard ratios, survival curves, waterfall plots), biomarker integration, and regulatory compliance. Outputs publication-ready LaTeX/PDF format optimized for drug development, clinical research, and evidence synthesis.
handling-sf-data
IncludedSalesforce data operations with 130-point scoring. Use this skill to create, update, delete, bulk import/export, generate test data, and clean up org records using sf CLI and anonymous Apex. TRIGGER when: user creates test data, performs bulk import/export, uses sf data CLI commands, needs data factory patterns for Apex tests, or needs to seed/clean records in a Salesforce org. DO NOT TRIGGER when: SOQL query writing only (use querying-soql), Apex test execution (use running-apex-tests), or metadata deployment (use deploying-metadata).
accelint-ac-to-playwright
IncludedConvert and validate acceptance criteria for Playwright test automation. Use when user asks to (1) review/evaluate/check if AC are ready for automation, (2) assess if AC can be converted as-is, (3) validate AC quality for Playwright, (4) turn AC into tests, (5) generate tests from acceptance criteria, (6) convert .md bullets or .feature Gherkin files to Playwright specs, (7) create test automation from requirements. Handles both bullet-style markdown and Gherkin syntax with JSON test plan generation and validation.