[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CTYVGCQVYQAHD5T8Q2VFEF":3,"skill-same:01M7CTYVGCQVYQAHD5T8Q2VFEF":59},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":6,"ownerHtmlUrl":31,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":32,"install":33,"resources":46},"01M7CTYVGCQVYQAHD5T8Q2VFEF","bio-crispr-screens-copy-number-correction",null,"Corrects the gene-independent copy-number artifact in CRISPR-Cas9 screens (Aguirre 2016 \u002F Munoz 2016 Cancer Discov) where amplified loci appear essential from DNA-damage burden of simultaneous cuts. Covers the gene-independent DNA-damage \u002F 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\u002Fa alternatives that bypass the artifact. Use when screening cancer cell lines, diagnosing essentiality at amplified loci, choosing CRISPRcleanR \u002F CERES \u002F Chronos, deciding whether CN correction is needed before MAGeCK \u002F BAGEL2 \u002F drugZ, or switching from Cas9 to CRISPRi.","mrsonord2240\u002Fopenscience-specialists","mrsonord2240","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F76487430?v=4","01M7CTEM40S43GSJZ9A3YCCXZK","Samuel Nord","01M7CTEM4K69JD1GBYNHVJ9ZP4",2,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Fcrispr-screen-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-crispr-screens-copy-number-correction\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: bio-crispr-screens-copy-number-correction\ndescription: Corrects the gene-independent copy-number artifact in CRISPR-Cas9 screens (Aguirre 2016 \u002F Munoz 2016 Cancer Discov) where amplified loci appear essential from DNA-damage burden of simultaneous cuts. Covers the gene-independent DNA-damage \u002F 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\u002Fa alternatives that bypass the artifact. Use when screening cancer cell lines, diagnosing essentiality at amplified loci, choosing CRISPRcleanR \u002F CERES \u002F Chronos, deciding whether CN correction is needed before MAGeCK \u002F BAGEL2 \u002F drugZ, or switching from Cas9 to CRISPRi.\ntool_type: mixed\nprimary_tool: CRISPRcleanR\n---\n\n## Version Compatibility\n\nReference examples tested with: CRISPRcleanR 3.0+ (R; github.com\u002Ffrancescojm\u002FCRISPRcleanR), Chronos 2.3.15 (`crispr_chronos`; checked 2026-09-16), CERES (legacy, superseded by Chronos), pandas 2.2+, numpy 1.26+, scipy 1.12+.\n\nBefore using code patterns, verify installed versions match. If versions differ:\n- R: `packageVersion('CRISPRcleanR')`; `?ccr.GWclean`\n- Python: `pip show crispr_chronos`; `python -c 'import chronos; print(chronos.__file__)'`\n\nIf code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.\n\n## Copy-Number Bias Correction in CRISPR Screens\n\n**Scope:** this Skill analyses screen data. It does not support treatment, therapy or other clinical\nrecommendations for an individual; an amplification that survives correction is a research finding,\nnot evidence for a therapy choice. Decline the clinical part of such a request and answer the\ncomputational part.\n\n**\"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.\n\n- R: `CRISPRcleanR::ccr.GWclean()` for unsupervised pre-hoc correction (no CN profile required)\n- Python: Chronos (`crispr_chronos`) for joint cell-population dynamics + CN modeling\n- Python: CERES (legacy, superseded by Chronos)\n\n## The Copy-Number Artifact (Mechanism)\n\n**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:\n\n1. A focal amplification creates 4-50+ copies of a genomic region.\n2. Each sgRNA targeting a gene in that region cuts at all copies simultaneously.\n3. Multiple cuts trigger a DNA-damage response and G2 arrest, in both TP53-mutant and TP53-wild-type lines but with larger magnitude in wild-type (Aguirre 2016).\n4. Cells arrest in G2 phase; the sgRNA appears depleted because its bearer cells don't proliferate.\n5. The depletion is proportional to the number of simultaneous cuts, not the gene's essentiality.\n\n**Consequence:** ERBB2 appears essential in HER2-amplified SK-BR-3. 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.\n\n**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.\n\nThe p53-dependence of Cas9-cut toxicity in general was characterized later, by Haapaniemi 2018 and Ihry 2018.\n\n**Bypassed by:**\n- CRISPRi (catalytically dead Cas9, no DNA damage) -> no artifact\n- CRISPRa (catalytically dead Cas9) -> no artifact\n- Base editing (single-strand nick + deaminase) -> reduced artifact\n- Prime editing (nick + RT) -> reduced artifact\n\n## Correction Method Decision Tree\n\n| Available data | Recommended method | Why |\n|----------------|---------------------|-----|\n| Cell-line panel without matched CN profile | CRISPRcleanR | Unsupervised; uses genomic position only |\n| Single cell line with matched WGS\u002FSNP-array CN | CRISPRcleanR | Chronos' CN correction (`alternate_CN`) refuses fewer than 3 cell lines, matched CN or not; it says so and points at CRISPRcleanR |\n| >=3 cell lines, CN available | Chronos | `alternate_CN`'s minimum; it fits the CN-effect curve across lines |\n| DepMap-scale (1000+ cell lines, longitudinal) | Chronos | Population-dynamics + screen quality + CN; DepMap quarterly standard |\n| Single cell line, multi-timepoint | Chronos for gene effects, CRISPRcleanR for CN correction | Chronos trains and scores fine on one line, but cannot CN-correct below 3 lines |\n| Need to integrate with downstream MAGeCK | CRISPRcleanR (pre-hoc) | Outputs corrected counts for any downstream tool |\n| Multiple cell lines + multiple batches | Chronos | Joint modeling of all dimensions |\n\n## CRISPRcleanR (Iorio 2018) - Unsupervised Pre-Hoc\n\n**Goal:** Correct copy-number bias without requiring matched CN profile by detecting position-based systematic enrichment \u002F depletion patterns.\n\n**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.\n\n```r\nlibrary(CRISPRcleanR)\n\n# Load library annotation (sgRNA -> chromosomal coordinates)\ndata(KY_Library_v1.0)   # KY library; replace with your library annotation\n# OR use ccr.PrepareAnnotations() to make custom\n\n# Load count data with first 2 cols: sgRNA, gene, then sample counts\ncounts \u003C- read.table('counts.txt', header=TRUE, sep='\\t')\n\n# 1. Normalize and compute logFC\nnorm_counts \u003C- ccr.NormfoldChanges(filename='counts.txt', min_reads=30,\n                                     EXPname='my_screen',\n                                     libraryAnnotation=KY_Library_v1.0)\n\n# 2. Compute genome-sorted sgRNA fold changes\ngw_log_fc \u003C- ccr.logFCs2chromPos(norm_counts$logFCs,\n                                   KY_Library_v1.0)\n\n# 3. Apply CRISPRcleanR correction\ncorrected \u003C- ccr.GWclean(gw_log_fc, display=TRUE, label='my_screen')\n# Output: corrected$corrected_logFCs and corrected$segments\n# corrected_logFCs can replace LFCs downstream\n\n# 4. Re-derive corrected counts for downstream MAGeCK\ncorrected_counts \u003C- ccr.correctCounts('my_screen',\n                                        norm_counts$norm_counts,\n                                        corrected,\n                                        KY_Library_v1.0,\n                                        OutDir='.\u002F')\n```\n\n**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.\n\n**Output:** Pre-corrected LFCs and counts that can be fed into MAGeCK \u002F BAGEL2 \u002F 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.\n\n## Chronos (Dempster 2021) - Joint Population-Dynamics + CN Model\n\n**Goal:** Estimate gene fitness while jointly accounting for copy-number-driven depletion, screen quality, and longitudinal cell-population dynamics.\n\n**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.\n\n```python\n# Chronos (pip install crispr_chronos, or pip install git+https:\u002F\u002Fgithub.com\u002Fbroadinstitute\u002Fchronos)\nimport chronos\nfrom chronos.hit_calling import get_probability_dependent\n\n# Every input is a dict keyed by library name, not a bare DataFrame, and Chronos checks the\n# schema below (chronos.check_inputs) before training:\n#\n# 1. readcounts    rows = sequence_ID (one per sequenced sample), columns = sgRNA.\n#                  This is the transpose of a MAGeCK count table; Chronos rejects the other\n#                  orientation with \"Chronos expects readcounts to have guides as columns,\n#                  sequence IDs as rows. Is your data transposed?\"\n# 2. sequence_map  columns sequence_ID, cell_line_name, days, pDNA_batch. Plasmid samples get\n#                  cell_line_name 'pDNA' and days 0, and every pDNA_batch used by a late\n#                  timepoint needs a pDNA row in the same library.\n# 3. guide_gene_map  columns sgrna, gene; one gene per sgRNA (duplicated sgRNAs are rejected).\n# 4. negative_control_sgrnas  dict library -> sgRNAs of non-targeting or known non-essential\n#                  genes. Optional in the signature only: without it, chronos.Chronos(...)\n#                  construction itself raises ValueError('excess_variance was passed as dict\n#                  without key for \u003Clibrary>: {}') -- before train() is ever called. An\n#                  UnboundLocalError for 'prior_variance' does occur one frame deeper, inside\n#                  _estimate_excess_variance, but Chronos catches it internally and re-raises\n#                  the ValueError above every time; it never reaches the caller under default\n#                  arguments (checked on Chronos 2.3.15).\n# 5. Copy-number profile: cell lines x genes, applied AFTER training (see below).\n\nchronos.check_inputs(                      # fail fast on schema and orientation\n    readcounts={'screen': readcounts_df},  # rows = sequence_ID, columns = sgRNA\n    guide_gene_map={'screen': guide_gene_map},\n    sequence_map={'screen': sequence_map},\n)\n\nmodel = chronos.Chronos(\n    sequence_map={'screen': sequence_map},\n    guide_gene_map={'screen': guide_gene_map},\n    readcounts={'screen': readcounts_df},\n    negative_control_sgrnas={'screen': negative_control_sgrnas},\n)\nmodel.train(nepochs=301)\ngene_effects = model.gene_effect                      # attribute, not a method call; lines x genes\n\n# Copy-number correction is a separate post-hoc step, not a constructor argument. It needs at\n# least 3 cell lines (RuntimeError below that), the CN frame must be lines x genes and cover\n# every gene in gene_effects, and it returns two objects: the corrected matrix and the\n# per-gene CN shifts it fitted.\ngene_effects_cn, cn_shifts = chronos.alternate_CN(gene_effects, copy_number_df)\ngene_probabilities = get_probability_dependent(gene_effects_cn, negative_control_genes, positive_control_genes)\n```\n\n**DepMap convention:** A gene-effect score \u003C-1 corresponds to \"essential\" in that cell line; \u003C-0.5 is \"depleting.\" Each DepMap release (quarterly) provides Chronos gene effects and probabilities.\n\n**Critical:** Chronos benefits most from longitudinal data (multiple timepoints per cell line) but can run with multiple cell lines at a single timepoint, and it trains on a single line with replicates too. Copy number is optional to *training*: Chronos trains without it and `alternate_CN` applies the correction afterwards. The correction itself has a hard minimum of 3 cell lines, so for one or two lines, CN-correct with CRISPRcleanR (pre-hoc, on the counts) and use Chronos only for the gene-effect scores, or not at all.\n\n## CERES (Legacy, Superseded by Chronos)\n\n**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.\n\n## Detect Uncorrected CN Bias\n\n**Goal:** Verify that copy-number bias is corrected (or detect it in raw data).\n\n**Approach:** For genes with matched CN profile, compute Spearman ρ between gene-level LFC and copy number. A negative correlation (-ρ) indicates amplified genes are depleted, i.e., CN artifact.\n\n```python\nimport pandas as pd\nfrom scipy.stats import spearmanr, mannwhitneyu\n\ndef detect_cn_bias(gene_lfc_df, cn_df, amplified_cn=4, diploid_cn=(1.5, 2.5), low_power_n=8):\n    '''Test whether amplified genes are depleted relative to diploid ones.\n\n    The genome-wide Spearman rho alone is not enough: a real focal amplicon covers a handful of\n    genes out of ~18,000, so rho stays near zero while those genes are severely depleted. On a\n    real HAP1 screen with a planted 8-gene 17q12 amplicon at CN 15, rho was -0.034 (not\n    \"biased\") while amplified genes averaged LFC -2.64 against -0.18 for diploid genes. Report\n    the stratified gap, and treat either signal as bias.\n\n    n_amplified>=3 is only the floor for the Mann-Whitney test to run at all, not a guarantee it\n    has power to detect a real effect. On the real HT-29 FAM84B\u002FMYC\u002FPOU5F1B block (CN=8)\n    post-CRISPRcleanR, the residual gap was still -0.98 logFC (MYC itself was left uncorrected;\n    its two flanking genes were), but n=3 gave p=0.208 -- bias_present reads False even though\n    the bias is real and substantial. Bootstrapping that same real 3-gene mixture at larger n\n    shows why: P(p\u003C0.01) is only ~0.04 at n=3, ~0.13 at n=8, ~0.30 at n=15 -- the test needs\n    dozens of amplified genes at this effect size before it reliably clears its own threshold.\n    Below `low_power_n` amplified genes, do not read bias_present=False as \"correction\n    succeeded\" -- check `suspicious_despite_ns` and the raw `amplified_vs_diploid_gap` instead.\n    '''\n    merged = gene_lfc_df.merge(cn_df, on='gene')\n    rho, p = spearmanr(merged['copy_number'], merged['lfc'])\n    amplified = merged[merged['copy_number'] > amplified_cn]['lfc']\n    diploid = merged[merged['copy_number'].between(*diploid_cn)]['lfc']\n    gap, p_gap = float('nan'), float('nan')\n    if len(amplified) >= 3 and len(diploid) >= 3:\n        gap = amplified.mean() - diploid.mean()\n        p_gap = mannwhitneyu(amplified, diploid, alternative='less').pvalue\n    low_power = len(amplified) \u003C low_power_n\n    return {\n        'cn_lfc_rho': rho,\n        'p_value': p,\n        'n_amplified_genes': len(amplified),\n        'amplified_mean_lfc': amplified.mean(),\n        'diploid_mean_lfc': diploid.mean(),\n        'amplified_vs_diploid_gap': gap,          # negative = amplified genes more depleted\n        'p_amplified_more_depleted': p_gap,\n        'bias_present': bool((rho \u003C -0.1 and p \u003C 0.01) or (gap \u003C -0.5 and p_gap \u003C 0.01)),\n        'low_power_floor': bool(low_power),        # test ran, but underpowered below low_power_n\n        'suspicious_despite_ns': bool(low_power and not pd.isna(gap) and gap \u003C -0.5),\n    }\n```\n\nRun it once genome-wide and once per candidate amplicon (pass only that region's genes plus the\ndiploid background), because a single amplicon is invisible in the genome-wide statistic.\n\n**Power caveat:** most candidate amplicons have only 3-10 member genes, and `n>=3` is the floor\nfor the focal Mann-Whitney test to run at all -- not a guarantee it can detect a real effect at\nthat size (`low_power_floor: true` in the output below `low_power_n=8`). Re-running this exact\nfunction on real post-CRISPRcleanR HT-29 data at a true 3-gene amplicon block gave\n`bias_present: False` (p=0.208) for a residual gap of -0.98 logFC units that was, in fact, still\nsubstantial. Below `low_power_n` amplified genes, do not treat `bias_present: False` as proof\nthe correction worked; check `suspicious_despite_ns` and the raw `amplified_vs_diploid_gap`\ninstead, and treat anything below -0.5 as still suspicious even when `p_amplified_more_depleted`\nis not significant.\n\n**Threshold (operational convention):** Spearman ρ \u003C-0.10 between LFC and CN indicates genome-wide CN bias, and an amplified-vs-diploid LFC gap below -0.5 with a significant one-sided test indicates focal bias the correlation misses. Either one means correct before hit calling. Run this diagnostic before AND after correction.\n\n## Reconciliation: When CN Correction Fails\n\nIf post-CRISPRcleanR or post-Chronos the CN-LFC Spearman is still significantly negative, the correction is incomplete. Possible causes:\n\n1. **Insufficient CN resolution:** A specific 4-copy region went undetected. Refine CN profile with deeper WGS.\n2. **CRISPRcleanR position-based correction missed it:** The amplification is small relative to the segmentation algorithm's resolution. Use Chronos with matched CN profile.\n3. **Genomic rearrangement creates a \"ghost\" amplification:** A complex rearrangement appears as normal CN but Cas9 cuts at multiple sites due to translocation breakpoints. Combine WGS structural variants with the analysis.\n4. **Cell line has an unusually strong cut-toxicity response:** The artifact may persist; use CRISPRi screens for that line.\n5. **`alternate_CN` fits one CN-effect curve across the whole panel:** it is a fitted average, not a per-line correction, so a single extreme-CN line can retain residual signal even after correction. On a real 3-line CN dose-response panel (CN=2\u002F8\u002F15), the CN=15 line's amplicon genes moved from -1.92 to only -1.20 -- still essential-looking -- while the essentials stayed untouched. Re-run `detect_cn_bias` per cell line, not only pooled, after `alternate_CN`.\n\n## Apply CN Correction to Pipeline\n\n**Workflow:**\n\n```\n1. mageck count (raw counts)\n2. screen-qc verification\n3. CN diagnostic: Spearman of LFC vs CN (if CN profile available)\n4. If bias detected:\n   a. CRISPRcleanR (pre-hoc) -> corrected counts -> MAGeCK \u002F BAGEL2 \u002F drugZ\n   OR\n   b. Chronos (joint model with CN profile) -> gene effects directly\n5. Re-diagnose: Spearman of CORRECTED LFC vs CN should be near zero\n6. Hit calling\n```\n\nFor DepMap-style large panels:\n```\nChronos handles batch + CN + screen quality in one step; no pre-correction needed.\n```\n\nFor Project Score-style panel (Behan 2019):\n```\nCRISPRcleanR was used historically; cross-check with Chronos when CN profile available.\n```\n\n## Failure Modes\n\n### CRISPRcleanR removes legitimate essential signal\n\n**Trigger:** A genuine essential gene happens to lie in a region with adjacent uncorrected non-essential signal; the segment-based correction includes the essential.\n**Mechanism:** CRISPRcleanR's `ccr.GWclean()` segments sgRNAs by position; segments containing multiple genes with directional consistency are corrected as a unit.\n**Symptom:** A known essential drops out of post-correction hit list.\n**Fix:** Inspect segments manually; if a known essential was within a corrected segment, investigate. Cross-check with non-CN-corrected MAGeCK + BAGEL2 to see if essential was a hit pre-correction.\n\n### Chronos refuses to CN-correct fewer than 3 cell lines\n\n**Trigger:** One or two cell lines, with or without a matched CN profile.\n**Mechanism:** `alternate_CN` fits the CN-to-gene-effect curve across cell lines, so it needs a panel; its own code raises below 3.\n**Symptom:** `RuntimeError: Correct for CN should not be used with fewer than 3 cell lines. Consider preprocessing with CRISPRCleanR` -- raised after a full training run, so budget for it before you spend the epochs.\n**Fix:** CN-correct the counts with CRISPRcleanR pre-hoc, then hit-call; Chronos training itself works on a single line (with `negative_control_sgrnas`) and its uncorrected gene effects are still useful for QC.\n\n### Spearman ρ still negative after CRISPRcleanR\n\n**Trigger:** Amplification is too small or complex for the segment-based approach.\n**Mechanism:** CRISPRcleanR detects systematic spatial patterns; isolated 4-copy regions can slip through.\n**Symptom:** Post-correction Spearman ρ -0.05 to -0.10 between LFC and CN.\n**Fix:** Refine CN profile (deeper WGS); apply Chronos with matched CN as alternative; or supplement with focal-amplification-aware methods.\n\n### Cell line lacks matched CN profile\n\n**Trigger:** Newly characterized line or rare patient-derived line; WGS not done.\n**Mechanism:** CRISPRcleanR needs no CN profile; Chronos trains without one too, but its `alternate_CN` correction cannot run without it.\n**Symptom:** Chronos gene effects still carry the artifact; CRISPRcleanR corrects unsupervised.\n**Fix:** Run SNP-array (cheap, fast) or low-coverage WGS to obtain CN profile; in interim, use CRISPRcleanR unsupervised mode.\n\n### CN amplification at non-coding region drives apparent essentiality\n\n**Trigger:** Amplification at a gene-poor region; sgRNAs at edge genes get artifactually depleted.\n**Mechanism:** Even non-essential genes adjacent to amplifications are depleted because the Cas9 cuts are at the amplified loci.\n**Symptom:** Non-essential genes near amplification show LFC \u003C0.\n**Fix:** Inspect chromosomal position of \"essential\" hits; flag genes within 100 kb of known amplifications for orthogonal validation. This is the classic Aguirre 2016 observation.\n\n## CRISPRi\u002Fa Alternative\n\n**For variant-function or non-cancer-line essentiality screens, switching to CRISPRi (catalytically dead dCas9-KRAB) avoids the artifact entirely.** No DNA double-strand breaks = no DNA-damage G2 arrest = no copy-number-driven depletion.\n\n| Approach | CN artifact | When to use |\n|----------|--------------|-------------|\n| Cas9 KO | YES; requires correction | Loss-of-function essentiality, traditional screens |\n| CRISPRi | NO | Cancer lines with focal amps; knockdown of cuttable-toxic genes |\n| CRISPRa | NO | Gain-of-function; activation screens |\n| Base editing | Reduced (single-strand nick) | Variant function |\n| Prime editing | Reduced | Precise edits |\n\nSee [[library-design]] for CRISPRi (Dolcetto) and CRISPRa (Calabrese) library options.\n\n## Quantitative Thresholds\n\n| Threshold | Value | Source \u002F Rationale |\n|-----------|-------|--------------------|\n| Spearman ρ (CN vs LFC) | \u003C-0.10 -> bias present | Operational convention |\n| Copies for detectable artifact | >6 | Operational convention; response scales with copy number (Aguirre 2016) |\n| CRISPRcleanR `min_reads` | 30 (default) | Iorio 2018; lower thresholds in low-coverage screens |\n| Chronos gene-effect threshold for \"essential\" | \u003C-1 (cancer line) | DepMap convention |\n| Chronos gene-probability for \"essential\" | >0.5 | DepMap convention (dependency-probability cutoff) |\n| Post-correction Spearman ρ | abs(ρ) \u003C0.05 | Acceptable correction quality |\n| Cell-line CN profile resolution | ≥SNP-array level | Below this, CRISPRcleanR unsupervised |\n| Cell lines needed for `chronos.alternate_CN` | ≥3 | Chronos 2.3.15 raises RuntimeError below this |\n| Amplified-vs-diploid LFC gap | \u003C -0.5 -> focal bias present | Catches single amplicons the genome-wide rho misses |\n| `detect_cn_bias` low-power floor | \u003C8 amplified genes -> distrust `bias_present: False` | Real HT-29 3-gene block: p=0.208 for a genuine -0.98 gap |\n\n## Common Errors\n\n| Error \u002F symptom | Cause | Solution |\n|-----------------|-------|----------|\n| `RuntimeError: Correct for CN should not be used with fewer than 3 cell lines` | `alternate_CN` needs a panel | CN-correct with CRISPRcleanR instead; Chronos can still score the screen |\n| `AssertionError: ... Is your data transposed?` | readcounts passed as guides x samples | Transpose: rows = sequence_ID, columns = sgRNA |\n| `ValueError: excess_variance was passed as dict without key for '\u003Clibrary>': {}` at `chronos.Chronos(...)` construction (not `train()`) | `negative_control_sgrnas` not supplied | Pass a dict of non-targeting\u002Fnon-essential sgRNAs per library |\n| CRISPRcleanR removes a known essential | Segment-based over-correction | Manually inspect segments; cross-check with non-corrected |\n| Spearman ρ still -0.15 after correction | Method too coarse for the amp | Refine CN profile; use Chronos |\n| ERBB2 listed as essential in SK-BR-3 | Uncorrected HER2 amplification | Always apply correction before hit calling |\n| CN profile missing for newly characterized line | Profile not generated | Run SNP-array \u002F low-coverage WGS |\n| Hits restricted to non-amplified regions only | Over-correction | Reduce CRISPRcleanR aggressiveness; check known biology |\n\n## References\n\n- Aguirre AJ et al. 2016. *Cancer Discov* 6:914. Copy-number gene-independent toxicity.\n- Munoz DM et al. 2016. *Cancer Discov* 6:900. CN amplification CRISPR artifacts.\n- Haapaniemi E et al. 2018. *Nat Med* 24:927. Cas9 cutting induces a p53-mediated DNA-damage response.\n- Ihry RJ et al. 2018. *Nat Med* 24:939. p53 inhibits Cas9 engineering in human pluripotent stem cells.\n- Meyers RM et al. 2017. *Nat Genet* 49:1779. CERES; first formal CN correction at DepMap scale.\n- Iorio F et al. 2018. *BMC Genomics* 19:604. CRISPRcleanR.\n- Dempster JM et al. 2021. *Genome Biol* 22:343. Chronos.\n- Behan FM et al. 2019. *Nature* 568:511. Project Score with CRISPRcleanR-corrected data.\n- Pacini C et al. 2021. *Nat Commun* 12:1661. Integrated cross-study dependencies; DepMap quality scoring.\n- DepMap Q4 2024+ data releases. https:\u002F\u002Fdepmap.org\u002Fportal\u002F\n\n## Related Skills\n\n- crispr-screens\u002Fscreen-qc - CN-LFC Spearman diagnostic; pre-correction QC\n- crispr-screens\u002Flibrary-design - Switch to Dolcetto (CRISPRi) to bypass artifact\n- crispr-screens\u002Fmageck-analysis - MAGeCK on CRISPRcleanR-corrected counts\n- crispr-screens\u002Fbagel-essentiality - BAGEL2 on CRISPRcleanR-corrected counts\n- crispr-screens\u002Fhit-calling - Cancer-line hit calling with Chronos\n- crispr-screens\u002Fbatch-correction - Chronos handles batch + CN jointly\n- crispr-screens\u002Fjacks-analysis - JACKS does not handle CN bias\n- clinical-databases\u002Fclinvar-lookup - Variant annotation downstream\n- copy-number\u002Fcopy-ratio-segmentation - CN profile derivation upstream\n","## Version Compatibility\n\nReference examples tested with: CRISPRcleanR 3.0+ (R; github.com\u002Ffrancescojm\u002FCRISPRcleanR), Chronos 2.3.15 (`crispr_chronos`; checked 2026-09-16), CERES (legacy, superseded by Chronos), pandas 2.2+, numpy 1.26+, scipy 1.12+.\n\nBefore using code patterns, verify installed versions match. If versions differ:\n- R: `packageVersion('CRISPRcleanR')`; `?ccr.GWclean`\n- Python: `pip show crispr_chronos`; `python -c 'import chronos; print(chronos.__file__)'`\n\nIf code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.\n\n## Copy-Number Bias Correction in CRISPR Screens\n\n**Scope:** this Skill analyses screen data. It does not support treatment, therapy or other clinical\nrecommendations for an individual; an amplification that survives correction is a research finding,\nnot evidence for a therapy choice. Decline the clinical part of such a request and answer the\ncomputational part.\n\n**\"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.\n\n- R: `CRISPRcleanR::ccr.GWclean()` for unsupervised pre-hoc correction (no CN profile required)\n- Python: Chronos (`crispr_chronos`) for joint cell-population dynamics + CN modeling\n- Python: CERES (legacy, superseded by Chronos)\n\n## The Copy-Number Artifact (Mechanism)\n\n**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:\n\n1. A focal amplification creates 4-50+ copies of a genomic region.\n2. Each sgRNA targeting a gene in that region cuts at all copies simultaneously.\n3. Multiple cuts trigger a DNA-damage response and G2 arrest, in both TP53-mutant and TP53-wild-type lines but with larger magnitude in wild-type (Aguirre 2016).\n4. Cells arrest in G2 phase; the sgRNA appears depleted because its bearer cells don't proliferate.\n5. The depletion is proportional to the number of simultaneous cuts, not the gene's essentiality.\n\n**Consequence:** ERBB2 appears essential in HER2-amplified SK-BR-3. 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.\n\n**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.\n\nThe p53-dependence of Cas9-cut toxicity in general was characterized later, by Haapaniemi 2018 and Ihry 2018.\n\n**Bypassed by:**\n- CRISPRi (catalytically dead Cas9, no DNA damage) -> no artifact\n- CRISPRa (catalytically dead Cas9) -> no artifact\n- Base editing (single-strand nick + deaminase) -> reduced artifact\n- Prime editing (nick + RT) -> reduced artifact\n\n## Correction Method Decision Tree\n\n| Available data | Recommended method | Why |\n|----------------|---------------------|-----|\n| Cell-line panel without matched CN profile | CRISPRcleanR | Unsupervised; uses genomic position only |\n| Single cell line with matched WGS\u002FSNP-array CN | CRISPRcleanR | Chronos' CN correction (`alternate_CN`) refuses fewer than 3 cell lines, matched CN or not; it says so and points at CRISPRcleanR |\n| >=3 cell lines, CN available | Chronos | `alternate_CN`'s minimum; it fits the CN-effect curve across lines |\n| DepMap-scale (1000+ cell lines, longitudinal) | Chronos | Population-dynamics + screen quality + CN; DepMap quarterly standard |\n| Single cell line, multi-timepoint | Chronos for gene effects, CRISPRcleanR for CN correction | Chronos trains and scores fine on one line, but cannot CN-correct below 3 lines |\n| Need to integrate with downstream MAGeCK | CRISPRcleanR (pre-hoc) | Outputs corrected counts for any downstream tool |\n| Multiple cell lines + multiple batches | Chronos | Joint modeling of all dimensions |\n\n## CRISPRcleanR (Iorio 2018) - Unsupervised Pre-Hoc\n\n**Goal:** Correct copy-number bias without requiring matched CN profile by detecting position-based systematic enrichment \u002F depletion patterns.\n\n**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.\n\n```r\nlibrary(CRISPRcleanR)\n\n# Load library annotation (sgRNA -> chromosomal coordinates)\ndata(KY_Library_v1.0)   # KY library; replace with your library annotation\n# OR use ccr.PrepareAnnotations() to make custom\n\n# Load count data with first 2 cols: sgRNA, gene, then sample counts\ncounts \u003C- read.table('counts.txt', header=TRUE, sep='\\t')\n\n# 1. Normalize and compute logFC\nnorm_counts \u003C- ccr.NormfoldChanges(filename='counts.txt', min_reads=30,\n                                     EXPname='my_screen',\n                                     libraryAnnotation=KY_Library_v1.0)\n\n# 2. Compute genome-sorted sgRNA fold changes\ngw_log_fc \u003C- ccr.logFCs2chromPos(norm_counts$logFCs,\n                                   KY_Library_v1.0)\n\n# 3. Apply CRISPRcleanR correction\ncorrected \u003C- ccr.GWclean(gw_log_fc, display=TRUE, label='my_screen')\n# Output: corrected$corrected_logFCs and corrected$segments\n# corrected_logFCs can replace LFCs downstream\n\n# 4. Re-derive corrected counts for downstream MAGeCK\ncorrected_counts \u003C- ccr.correctCounts('my_screen',\n                                        norm_counts$norm_counts,\n                                        corrected,\n                                        KY_Library_v1.0,\n                                        OutDir='.\u002F')\n```\n\n**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.\n\n**Output:** Pre-corrected LFCs and counts that can be fed into MAGeCK \u002F BAGEL2 \u002F 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.\n\n## Chronos (Dempster 2021) - Joint Population-Dynamics + CN Model\n\n**Goal:** Estimate gene fitness while jointly accounting for copy-number-driven depletion, screen quality, and longitudinal cell-population dynamics.\n\n**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.\n\n```python\n# Chronos (pip install crispr_chronos, or pip install git+https:\u002F\u002Fgithub.com\u002Fbroadinstitute\u002Fchronos)\nimport chronos\nfrom chronos.hit_calling import get_probability_dependent\n\n# Every input is a dict keyed by library name, not a bare DataFrame, and Chronos checks the\n# schema below (chronos.check_inputs) before training:\n#\n# 1. readcounts    rows = sequence_ID (one per sequenced sample), columns = sgRNA.\n#                  This is the transpose of a MAGeCK count table; Chronos rejects the other\n#                  orientation with \"Chronos expects readcounts to have guides as columns,\n#                  sequence IDs as rows. Is your data transposed?\"\n# 2. sequence_map  columns sequence_ID, cell_line_name, days, pDNA_batch. Plasmid samples get\n#                  cell_line_name 'pDNA' and days 0, and every pDNA_batch used by a late\n#                  timepoint needs a pDNA row in the same library.\n# 3. guide_gene_map  columns sgrna, gene; one gene per sgRNA (duplicated sgRNAs are rejected).\n# 4. negative_control_sgrnas  dict library -> sgRNAs of non-targeting or known non-essential\n#                  genes. Optional in the signature only: without it, chronos.Chronos(...)\n#                  construction itself raises ValueError('excess_variance was passed as dict\n#                  without key for \u003Clibrary>: {}') -- before train() is ever called. An\n#                  UnboundLocalError for 'prior_variance' does occur one frame deeper, inside\n#                  _estimate_excess_variance, but Chronos catches it internally and re-raises\n#                  the ValueError above every time; it never reaches the caller under default\n#                  arguments (checked on Chronos 2.3.15).\n# 5. Copy-number profile: cell lines x genes, applied AFTER training (see below).\n\nchronos.check_inputs(                      # fail fast on schema and orientation\n    readcounts={'screen': readcounts_df},  # rows = sequence_ID, columns = sgRNA\n    guide_gene_map={'screen': guide_gene_map},\n    sequence_map={'screen': sequence_map},\n)\n\nmodel = chronos.Chronos(\n    sequence_map={'screen': sequence_map},\n    guide_gene_map={'screen': guide_gene_map},\n    readcounts={'screen': readcounts_df},\n    negative_control_sgrnas={'screen': negative_control_sgrnas},\n)\nmodel.train(nepochs=301)\ngene_effects = model.gene_effect                      # attribute, not a method call; lines x genes\n\n# Copy-number correction is a separate post-hoc step, not a constructor argument. It needs at\n# least 3 cell lines (RuntimeError below that), the CN frame must be lines x genes and cover\n# every gene in gene_effects, and it returns two objects: the corrected matrix and the\n# per-gene CN shifts it fitted.\ngene_effects_cn, cn_shifts = chronos.alternate_CN(gene_effects, copy_number_df)\ngene_probabilities = get_probability_dependent(gene_effects_cn, negative_control_genes, positive_control_genes)\n```\n\n**DepMap convention:** A gene-effect score \u003C-1 corresponds to \"essential\" in that cell line; \u003C-0.5 is \"depleting.\" Each DepMap release (quarterly) provides Chronos gene effects and probabilities.\n\n**Critical:** Chronos benefits most from longitudinal data (multiple timepoints per cell line) but can run with multiple cell lines at a single timepoint, and it trains on a single line with replicates too. Copy number is optional to *training*: Chronos trains without it and `alternate_CN` applies the correction afterwards. The correction itself has a hard minimum of 3 cell lines, so for one or two lines, CN-correct with CRISPRcleanR (pre-hoc, on the counts) and use Chronos only for the gene-effect scores, or not at all.\n\n## CERES (Legacy, Superseded by Chronos)\n\n**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.\n\n## Detect Uncorrected CN Bias\n\n**Goal:** Verify that copy-number bias is corrected (or detect it in raw data).\n\n**Approach:** For genes with matched CN profile, compute Spearman ρ between gene-level LFC and copy number. A negative correlation (-ρ) indicates amplified genes are depleted, i.e., CN artifact.\n\n```python\nimport pandas as pd\nfrom scipy.stats import spearmanr, mannwhitneyu\n\ndef detect_cn_bias(gene_lfc_df, cn_df, amplified_cn=4, diploid_cn=(1.5, 2.5), low_power_n=8):\n    '''Test whether amplified genes are depleted relative to diploid ones.\n\n    The genome-wide Spearman rho alone is not enough: a real focal amplicon covers a handful of\n    genes out of ~18,000, so rho stays near zero while those genes are severely depleted. On a\n    real HAP1 screen with a planted 8-gene 17q12 amplicon at CN 15, rho was -0.034 (not\n    \"biased\") while amplified genes averaged LFC -2.64 against -0.18 for diploid genes. Report\n    the stratified gap, and treat either signal as bias.\n\n    n_amplified>=3 is only the floor for the Mann-Whitney test to run at all, not a guarantee it\n    has power to detect a real effect. On the real HT-29 FAM84B\u002FMYC\u002FPOU5F1B block (CN=8)\n    post-CRISPRcleanR, the residual gap was still -0.98 logFC (MYC itself was left uncorrected;\n    its two flanking genes were), but n=3 gave p=0.208 -- bias_present reads False even though\n    the bias is real and substantial. Bootstrapping that same real 3-gene mixture at larger n\n    shows why: P(p\u003C0.01) is only ~0.04 at n=3, ~0.13 at n=8, ~0.30 at n=15 -- the test needs\n    dozens of amplified genes at this effect size before it reliably clears its own threshold.\n    Below `low_power_n` amplified genes, do not read bias_present=False as \"correction\n    succeeded\" -- check `suspicious_despite_ns` and the raw `amplified_vs_diploid_gap` instead.\n    '''\n    merged = gene_lfc_df.merge(cn_df, on='gene')\n    rho, p = spearmanr(merged['copy_number'], merged['lfc'])\n    amplified = merged[merged['copy_number'] > amplified_cn]['lfc']\n    diploid = merged[merged['copy_number'].between(*diploid_cn)]['lfc']\n    gap, p_gap = float('nan'), float('nan')\n    if len(amplified) >= 3 and len(diploid) >= 3:\n        gap = amplified.mean() - diploid.mean()\n        p_gap = mannwhitneyu(amplified, diploid, alternative='less').pvalue\n    low_power = len(amplified) \u003C low_power_n\n    return {\n        'cn_lfc_rho': rho,\n        'p_value': p,\n        'n_amplified_genes': len(amplified),\n        'amplified_mean_lfc': amplified.mean(),\n        'diploid_mean_lfc': diploid.mean(),\n        'amplified_vs_diploid_gap': gap,          # negative = amplified genes more depleted\n        'p_amplified_more_depleted': p_gap,\n        'bias_present': bool((rho \u003C -0.1 and p \u003C 0.01) or (gap \u003C -0.5 and p_gap \u003C 0.01)),\n        'low_power_floor': bool(low_power),        # test ran, but underpowered below low_power_n\n        'suspicious_despite_ns': bool(low_power and not pd.isna(gap) and gap \u003C -0.5),\n    }\n```\n\nRun it once genome-wide and once per candidate amplicon (pass only that region's genes plus the\ndiploid background), because a single amplicon is invisible in the genome-wide statistic.\n\n**Power caveat:** most candidate amplicons have only 3-10 member genes, and `n>=3` is the floor\nfor the focal Mann-Whitney test to run at all -- not a guarantee it can detect a real effect at\nthat size (`low_power_floor: true` in the output below `low_power_n=8`). Re-running this exact\nfunction on real post-CRISPRcleanR HT-29 data at a true 3-gene amplicon block gave\n`bias_present: False` (p=0.208) for a residual gap of -0.98 logFC units that was, in fact, still\nsubstantial. Below `low_power_n` amplified genes, do not treat `bias_present: False` as proof\nthe correction worked; check `suspicious_despite_ns` and the raw `amplified_vs_diploid_gap`\ninstead, and treat anything below -0.5 as still suspicious even when `p_amplified_more_depleted`\nis not significant.\n\n**Threshold (operational convention):** Spearman ρ \u003C-0.10 between LFC and CN indicates genome-wide CN bias, and an amplified-vs-diploid LFC gap below -0.5 with a significant one-sided test indicates focal bias the correlation misses. Either one means correct before hit calling. Run this diagnostic before AND after correction.\n\n## Reconciliation: When CN Correction Fails\n\nIf post-CRISPRcleanR or post-Chronos the CN-LFC Spearman is still significantly negative, the correction is incomplete. Possible causes:\n\n1. **Insufficient CN resolution:** A specific 4-copy region went undetected. Refine CN profile with deeper WGS.\n2. **CRISPRcleanR position-based correction missed it:** The amplification is small relative to the segmentation algorithm's resolution. Use Chronos with matched CN profile.\n3. **Genomic rearrangement creates a \"ghost\" amplification:** A complex rearrangement appears as normal CN but Cas9 cuts at multiple sites due to translocation breakpoints. Combine WGS structural variants with the analysis.\n4. **Cell line has an unusually strong cut-toxicity response:** The artifact may persist; use CRISPRi screens for that line.\n5. **`alternate_CN` fits one CN-effect curve across the whole panel:** it is a fitted average, not a per-line correction, so a single extreme-CN line can retain residual signal even after correction. On a real 3-line CN dose-response panel (CN=2\u002F8\u002F15), the CN=15 line's amplicon genes moved from -1.92 to only -1.20 -- still essential-looking -- while the essentials stayed untouched. Re-run `detect_cn_bias` per cell line, not only pooled, after `alternate_CN`.\n\n## Apply CN Correction to Pipeline\n\n**Workflow:**\n\n```\n1. mageck count (raw counts)\n2. screen-qc verification\n3. CN diagnostic: Spearman of LFC vs CN (if CN profile available)\n4. If bias detected:\n   a. CRISPRcleanR (pre-hoc) -> corrected counts -> MAGeCK \u002F BAGEL2 \u002F drugZ\n   OR\n   b. Chronos (joint model with CN profile) -> gene effects directly\n5. Re-diagnose: Spearman of CORRECTED LFC vs CN should be near zero\n6. Hit calling\n```\n\nFor DepMap-style large panels:\n```\nChronos handles batch + CN + screen quality in one step; no pre-correction needed.\n```\n\nFor Project Score-style panel (Behan 2019):\n```\nCRISPRcleanR was used historically; cross-check with Chronos when CN profile available.\n```\n\n## Failure Modes\n\n### CRISPRcleanR removes legitimate essential signal\n\n**Trigger:** A genuine essential gene happens to lie in a region with adjacent uncorrected non-essential signal; the segment-based correction includes the essential.\n**Mechanism:** CRISPRcleanR's `ccr.GWclean()` segments sgRNAs by position; segments containing multiple genes with directional consistency are corrected as a unit.\n**Symptom:** A known essential drops out of post-correction hit list.\n**Fix:** Inspect segments manually; if a known essential was within a corrected segment, investigate. Cross-check with non-CN-corrected MAGeCK + BAGEL2 to see if essential was a hit pre-correction.\n\n### Chronos refuses to CN-correct fewer than 3 cell lines\n\n**Trigger:** One or two cell lines, with or without a matched CN profile.\n**Mechanism:** `alternate_CN` fits the CN-to-gene-effect curve across cell lines, so it needs a panel; its own code raises below 3.\n**Symptom:** `RuntimeError: Correct for CN should not be used with fewer than 3 cell lines. Consider preprocessing with CRISPRCleanR` -- raised after a full training run, so budget for it before you spend the epochs.\n**Fix:** CN-correct the counts with CRISPRcleanR pre-hoc, then hit-call; Chronos training itself works on a single line (with `negative_control_sgrnas`) and its uncorrected gene effects are still useful for QC.\n\n### Spearman ρ still negative after CRISPRcleanR\n\n**Trigger:** Amplification is too small or complex for the segment-based approach.\n**Mechanism:** CRISPRcleanR detects systematic spatial patterns; isolated 4-copy regions can slip through.\n**Symptom:** Post-correction Spearman ρ -0.05 to -0.10 between LFC and CN.\n**Fix:** Refine CN profile (deeper WGS); apply Chronos with matched CN as alternative; or supplement with focal-amplification-aware methods.\n\n### Cell line lacks matched CN profile\n\n**Trigger:** Newly characterized line or rare patient-derived line; WGS not done.\n**Mechanism:** CRISPRcleanR needs no CN profile; Chronos trains without one too, but its `alternate_CN` correction cannot run without it.\n**Symptom:** Chronos gene effects still carry the artifact; CRISPRcleanR corrects unsupervised.\n**Fix:** Run SNP-array (cheap, fast) or low-coverage WGS to obtain CN profile; in interim, use CRISPRcleanR unsupervised mode.\n\n### CN amplification at non-coding region drives apparent essentiality\n\n**Trigger:** Amplification at a gene-poor region; sgRNAs at edge genes get artifactually depleted.\n**Mechanism:** Even non-essential genes adjacent to amplifications are depleted because the Cas9 cuts are at the amplified loci.\n**Symptom:** Non-essential genes near amplification show LFC \u003C0.\n**Fix:** Inspect chromosomal position of \"essential\" hits; flag genes within 100 kb of known amplifications for orthogonal validation. This is the classic Aguirre 2016 observation.\n\n## CRISPRi\u002Fa Alternative\n\n**For variant-function or non-cancer-line essentiality screens, switching to CRISPRi (catalytically dead dCas9-KRAB) avoids the artifact entirely.** No DNA double-strand breaks = no DNA-damage G2 arrest = no copy-number-driven depletion.\n\n| Approach | CN artifact | When to use |\n|----------|--------------|-------------|\n| Cas9 KO | YES; requires correction | Loss-of-function essentiality, traditional screens |\n| CRISPRi | NO | Cancer lines with focal amps; knockdown of cuttable-toxic genes |\n| CRISPRa | NO | Gain-of-function; activation screens |\n| Base editing | Reduced (single-strand nick) | Variant function |\n| Prime editing | Reduced | Precise edits |\n\nSee [[library-design]] for CRISPRi (Dolcetto) and CRISPRa (Calabrese) library options.\n\n## Quantitative Thresholds\n\n| Threshold | Value | Source \u002F Rationale |\n|-----------|-------|--------------------|\n| Spearman ρ (CN vs LFC) | \u003C-0.10 -> bias present | Operational convention |\n| Copies for detectable artifact | >6 | Operational convention; response scales with copy number (Aguirre 2016) |\n| CRISPRcleanR `min_reads` | 30 (default) | Iorio 2018; lower thresholds in low-coverage screens |\n| Chronos gene-effect threshold for \"essential\" | \u003C-1 (cancer line) | DepMap convention |\n| Chronos gene-probability for \"essential\" | >0.5 | DepMap convention (dependency-probability cutoff) |\n| Post-correction Spearman ρ | abs(ρ) \u003C0.05 | Acceptable correction quality |\n| Cell-line CN profile resolution | ≥SNP-array level | Below this, CRISPRcleanR unsupervised |\n| Cell lines needed for `chronos.alternate_CN` | ≥3 | Chronos 2.3.15 raises RuntimeError below this |\n| Amplified-vs-diploid LFC gap | \u003C -0.5 -> focal bias present | Catches single amplicons the genome-wide rho misses |\n| `detect_cn_bias` low-power floor | \u003C8 amplified genes -> distrust `bias_present: False` | Real HT-29 3-gene block: p=0.208 for a genuine -0.98 gap |\n\n## Common Errors\n\n| Error \u002F symptom | Cause | Solution |\n|-----------------|-------|----------|\n| `RuntimeError: Correct for CN should not be used with fewer than 3 cell lines` | `alternate_CN` needs a panel | CN-correct with CRISPRcleanR instead; Chronos can still score the screen |\n| `AssertionError: ... Is your data transposed?` | readcounts passed as guides x samples | Transpose: rows = sequence_ID, columns = sgRNA |\n| `ValueError: excess_variance was passed as dict without key for '\u003Clibrary>': {}` at `chronos.Chronos(...)` construction (not `train()`) | `negative_control_sgrnas` not supplied | Pass a dict of non-targeting\u002Fnon-essential sgRNAs per library |\n| CRISPRcleanR removes a known essential | Segment-based over-correction | Manually inspect segments; cross-check with non-corrected |\n| Spearman ρ still -0.15 after correction | Method too coarse for the amp | Refine CN profile; use Chronos |\n| ERBB2 listed as essential in SK-BR-3 | Uncorrected HER2 amplification | Always apply correction before hit calling |\n| CN profile missing for newly characterized line | Profile not generated | Run SNP-array \u002F low-coverage WGS |\n| Hits restricted to non-amplified regions only | Over-correction | Reduce CRISPRcleanR aggressiveness; check known biology |\n\n## References\n\n- Aguirre AJ et al. 2016. *Cancer Discov* 6:914. Copy-number gene-independent toxicity.\n- Munoz DM et al. 2016. *Cancer Discov* 6:900. CN amplification CRISPR artifacts.\n- Haapaniemi E et al. 2018. *Nat Med* 24:927. Cas9 cutting induces a p53-mediated DNA-damage response.\n- Ihry RJ et al. 2018. *Nat Med* 24:939. p53 inhibits Cas9 engineering in human pluripotent stem cells.\n- Meyers RM et al. 2017. *Nat Genet* 49:1779. CERES; first formal CN correction at DepMap scale.\n- Iorio F et al. 2018. *BMC Genomics* 19:604. CRISPRcleanR.\n- Dempster JM et al. 2021. *Genome Biol* 22:343. Chronos.\n- Behan FM et al. 2019. *Nature* 568:511. Project Score with CRISPRcleanR-corrected data.\n- Pacini C et al. 2021. *Nat Commun* 12:1661. Integrated cross-study dependencies; DepMap quality scoring.\n- DepMap Q4 2024+ data releases. https:\u002F\u002Fdepmap.org\u002Fportal\u002F\n\n## Related Skills\n\n- crispr-screens\u002Fscreen-qc - CN-LFC Spearman diagnostic; pre-correction QC\n- crispr-screens\u002Flibrary-design - Switch to Dolcetto (CRISPRi) to bypass artifact\n- crispr-screens\u002Fmageck-analysis - MAGeCK on CRISPRcleanR-corrected counts\n- crispr-screens\u002Fbagel-essentiality - BAGEL2 on CRISPRcleanR-corrected counts\n- crispr-screens\u002Fhit-calling - Cancer-line hit calling with Chronos\n- crispr-screens\u002Fbatch-correction - Chronos handles batch + CN jointly\n- crispr-screens\u002Fjacks-analysis - JACKS does not handle CN bias\n- clinical-databases\u002Fclinvar-lookup - Variant annotation downstream\n- copy-number\u002Fcopy-ratio-segmentation - CN profile derivation upstream\n",{"name":5,"tool_type":24,"description":7,"primary_tool":25},"mixed","CRISPRcleanR","main","e0956dc9606356ab78468936b502e55a365282e2","specialists\u002Fcrispr-screen-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-crispr-screens-copy-number-correction",0,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists","https:\u002F\u002Fgithub.com\u002Fmrsonord2240","2026-10-12 03:19:04",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add mrsonord2240\u002Fopenscience-specialists --skill bio-crispr-screens-copy-number-correction",{"tool":39,"command":40},"bunx","bunx skills add mrsonord2240\u002Fopenscience-specialists --skill bio-crispr-screens-copy-number-correction",{"tool":42,"command":43},"pnpm","pnpm dlx skills add mrsonord2240\u002Fopenscience-specialists --skill bio-crispr-screens-copy-number-correction","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Fcrispr-screen-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-crispr-screens-copy-number-correction\u002FSKILL.md",true,[47,53],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"examples\u002Frun_crispr_cleanr.R","OTHER","其他",3580,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Fcrispr-screen-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-crispr-screens-copy-number-correction\u002Fexamples\u002Frun_crispr_cleanr.R",{"path":54,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":57,"sourceHtmlUrl":58},"usage-guide.md","REFERENCE","参考文档",7797,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Fcrispr-screen-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-crispr-screens-copy-number-correction\u002Fusage-guide.md",[60,67,74,81,88,95],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M7CW36A6QAGWFE2C008M1XPG","bio-workflows-metabolomics-pipeline","Orchestrates the untargeted LC-MS metabolomics pipeline end-to-end (xcms 4.x feature extraction, QC\u002Fdrift\u002Fnormalization, confidence-stratified annotation, permutation-validated statistics, background-aware pathway mapping), naming what each stage decides and where it silently fails. Use when running a full LC-MS metabolomics study from raw mzML to enriched pathways and needing the honest handoffs between stages. Each stage defers to its component skill for parameters and traps; for stable-isotope flux (a separate branch, not this untargeted flow) see metabolomics\u002Fisotope-tracing.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-workflows-metabolomics-pipeline\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M7CW2Y18623NA2S1Y30FRQW1","bio-metabolomics-xcms-preprocessing","Programmatic untargeted LC-MS feature extraction in R with the modern xcms 4.x MsExperiment\u002FXcmsExperiment API, taking raw mzML to a feature table via CentWave peak detection, retention-time alignment, peak-density correspondence, gap-filling, CAMERA redundancy collapse, and built-in QC feature filtering. Use when converting centroided LC-MS runs into a features-by-samples matrix and deciding centWave\u002Fgrouping\u002Falignment parameters. For drift correction and QC\u002FCV filtering execution see metabolomics\u002Fnormalization-qc; for metabolite identification see metabolomics\u002Fmetabolite-annotation; for the MS-DIAL GUI alternative with MS2Dec deconvolution see metabolomics\u002Fmsdial-preprocessing; for downstream statistics see metabolomics\u002Fstatistical-analysis.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-metabolomics-xcms-preprocessing\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M7CW2M364HVWPNQEKE2WP4PP","bio-metabolomics-statistical-analysis","Decision-grade statistical analysis for metabolomics intensity tables. Covers transformation and scaling (Pareto vs unit-variance as a hidden hypothesis), unsupervised structure (PCA\u002FHCA for QC), permutation-validated PLS-DA\u002FOPLS-DA (R2 vs Q2, double CV, VIP as heuristic), univariate testing (Welch\u002FMann-Whitney\u002FANOVA\u002FLMM with covariate adjustment), and dependence-aware multiple testing. Use when testing which metabolites differ, building or validating a discriminant model, choosing a scaling, or correcting many correlated tests. For sample-wise normalization\u002Fdrift correction see metabolomics\u002Fnormalization-qc; for ML classifiers and selection-inside-CV leakage see machine-learning\u002Fbiomarker-discovery and machine-learning\u002Fmodel-validation; for pathway interpretation see metabolomics\u002Fpathway-mapping; for design\u002Fpower\u002Fmultiplicity regime see experimental-design\u002Fmultiple-testing.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-metabolomics-statistical-analysis\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M7CW2BCBF851WYE03Z8XPEDQ","bio-metabolomics-pathway-mapping","Maps metabolomics results to biological pathways via over-representation (ORA), metabolite-set enrichment (MSEA\u002FQEA), mummichog\u002FPSEA on raw m\u002Fz peaks, and network-diffusion enrichment (FELLA), with correct background-set construction and honest interpretive ceilings. Use when interpreting differential metabolites or an untargeted LC-MS feature table in pathway context, choosing ORA vs MSEA vs mummichog vs topology, or setting the reference\u002Fbackground set. For annotation confidence levels feeding ORA see metabolomics\u002Fmetabolite-annotation; for gene-set concepts see pathway-analysis\u002Fgo-enrichment and pathway-analysis\u002Fgsea; for joint gene+metabolite pathways see multi-omics-integration\u002Fmofa-integration.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-metabolomics-pathway-mapping\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":19},"01M7CW21NSZMCPMF7D9CHJM718","bio-metabolomics-normalization-qc","Designs QC, corrects signal drift, removes batch effects, filters features, normalizes samples, and imputes missing values for untargeted LC-MS\u002FGC-MS metabolomics, framing each step as a measurement model that can create or erase biological signal. Use when processing a peak\u002Ffeature table before statistical analysis, choosing a drift-correction or sample-normalization method, deciding QC RSD vs D-ratio filtering, or handling left-censored missing values. The feature table is produced by metabolomics\u002Fxcms-preprocessing or metabolomics\u002Fmsdial-preprocessing; transformation\u002Fscaling for modeling defers to metabolomics\u002Fstatistical-analysis; cross-study design issues link to experimental-design\u002Fbatch-design.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-metabolomics-normalization-qc\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":19},"01M7CW1SWVM0NYHVE6Q7MA3G7R","bio-metabolomics-msdial-preprocessing","Runs the MS-DIAL preprocessing workflow (peak picking, MS2Dec spectral deconvolution, alignment, gap-filling) and imports the alignment-result table into R or Python with honest filtering. Use when preprocessing LC-MS DDA\u002FDIA (SWATH) or GC-MS raw data with MS-DIAL, deciding MS-DIAL vs XCMS, configuring the MSDIALCUI console run, or parsing an MS-DIAL export into a clean feature matrix. For programmatic R peak detection and the feature-table-as-artifact framing see metabolomics\u002Fxcms-preprocessing; for lipid annotation mode see metabolomics\u002Flipidomics; for MSI-level confidence honesty see metabolomics\u002Fmetabolite-annotation; for drift correction and QC see metabolomics\u002Fnormalization-qc.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-metabolomics-msdial-preprocessing\u002FSKILL.md",[],[]]