[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7ECM3TFG33JNH9B0G4WBRYA":3,"skill-same:01M7ECM3TFG33JNH9B0G4WBRYA":62},{"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":30,"commitSha":31,"skillDirectory":32,"forksCount":14,"repositoryHtmlUrl":33,"repositoryHomepageUrl":33,"ownerHtmlUrl":34,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":35,"install":36,"resources":49},"01M7ECM3TFG33JNH9B0G4WBRYA","bio-crispr-screens-screen-qc",null,"Quality control for pooled CRISPR screens covering library representation, Gini index, log-skew, replicate Pearson and Spearman concordance, essentialome precision-recall AUC against CEGv2 (Hart 2017), Cas9 cut-toxicity diagnostics, copy-number amplicon detection (Aguirre 2016 \u002F Munoz 2016), bottleneck propagation through plasmid pool, infection, selection, and endpoint stages, MOI verification, and DepMap-style screen-quality scoring. Use when assessing screen quality before hit calling, deciding whether to repeat or rescue a screen, diagnosing low-confidence hits, choosing between MAGeCK \u002F BAGEL2 \u002F Chronos based on quality grade, picking a normalization strategy from QC signatures, or evaluating whether an in-vivo screen retained adequate library complexity.","Mr-Nobody-Anonymous\u002FAll-skills","Mr-Nobody-Anonymous","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F184253119?v=4","01M7AEXFJHKTYQW5R0ZCQQTWFV","anonymous","01M7C00M3GQR4QKP9GZA42GFAK",0,"MIT","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-crispr-screens-screen-qc\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: bio-crispr-screens-screen-qc\ndescription: Quality control for pooled CRISPR screens covering library representation, Gini index, log-skew, replicate Pearson and Spearman concordance, essentialome precision-recall AUC against CEGv2 (Hart 2017), Cas9 cut-toxicity diagnostics, copy-number amplicon detection (Aguirre 2016 \u002F Munoz 2016), bottleneck propagation through plasmid pool, infection, selection, and endpoint stages, MOI verification, and DepMap-style screen-quality scoring. Use when assessing screen quality before hit calling, deciding whether to repeat or rescue a screen, diagnosing low-confidence hits, choosing between MAGeCK \u002F BAGEL2 \u002F Chronos based on quality grade, picking a normalization strategy from QC signatures, or evaluating whether an in-vivo screen retained adequate library complexity.\ntool_type: python\nprimary_tool: MAGeCK-VISPR\nsource: \"https:\u002F\u002Fgithub.com\u002FGPTomics\u002FbioSkills\"\nsource_repository: \"GPTomics\u002FbioSkills\"\nsource_path: \"crispr-screens\u002Fscreen-qc\u002FSKILL.md\"\nlicense: \"MIT\"\nimported_at: \"2026-09-20\"\n---\n\n## Version Compatibility\n\nReference examples tested with: MAGeCK 0.5+ (count + VISPR), MAGeCKFlute 2.0+ (R), pandas 2.2+, numpy 1.26+, scikit-learn 1.4+, matplotlib 3.8+, seaborn 0.13+.\n\nBefore using code patterns, verify installed versions match. If versions differ:\n- CLI: `mageck --version` then `mageck count --help`; R: `packageVersion('MAGeCKFlute')`\n- R: `packageVersion('MAGeCKFlute')` then `?BatchRemove` \u002F `?FluteRRA`\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## CRISPR Screen Quality Control\n\n**\"Audit my CRISPR screen quality before hit calling\"** -> Assess library representation, replicate concordance, depth, drift, and biological signal recovery using DepMap-grade metrics, then decide whether the screen is usable, salvageable, or must be repeated.\n\n- Python: `pandas` + `scikit-learn` for Gini, AUC, PCA; `MAGeCKFlute` (R) for one-shot QC dashboard\n- CLI: `mageck count` writes Gini and mapping stats unconditionally to `\u003Cprefix>.countsummary.txt` (`GiniIndex`, `Reads`, `Mapped`, `Percentage`); MAGeCK-VISPR for an interactive dashboard\n\n## QC Stage Hierarchy\n\nA pooled screen has six distinct bottlenecks where complexity can collapse. Audit each:\n\n| Stage | Metric | Acceptable threshold | Failure consequence |\n|-------|--------|----------------------|----------------------|\n| Plasmid pool | Gini, skew, % zero-count guides | Gini \u003C0.1, skew \u003C2 (Joung 2017 states \u003C10), zero \u003C0.5% | Missing guides cannot be screened; dropout indistinguishable from non-coverage |\n| Day-0 infection | Library coverage, MOI verification | ≥99% guide detection at 500x cells\u002FsgRNA; MOI 0.3 | Founder effects; polyclonality with high MOI |\n| Selection (puro\u002Fblast) | % cells surviving, time-course Gini | 30-40% survival at 5-7 days; Gini drift \u003C0.05 | Selection artifact; fast-growers enriched |\n| Endpoint | Replicate correlation, depth | Pearson >=0.8 on log-counts (MAGeCK-VISPR floor), Spearman >0.7-0.8, >500 reads\u002FsgRNA (Joung 2017 screening) | Noise dominates; FDR inflates |\n| Biological signal | CEGv2 PR-AUC, NEGv1 false-positive rate | PR-AUC >0.7 at FDR 5% (community \"passing\" convention); CEGv2 enrichment in top 1k | Screen lacks essentiality signal; hits not credible |\n| Copy-number artifact | Amplified-region enrichment, sgRNA-cut-count correlation | No correlation between sgRNA off-target count and depletion | False-positive essentiality at amplicons; ERBB2 in HER2+ etc. |\n\nEach metric below quantifies one of these stages.\n\n## Library Representation Metrics\n\n**Goal:** Detect dropout, oversaturation, and library bottlenecks at each sequencing stage.\n\n**Approach:** Compute per-sample zero-count fraction, low-count fraction (\u003C30 reads, the CRISPRcleanR `ccr.NormfoldChanges` default), and percentile-based skew, then track how these change between plasmid -> Day-0 -> endpoint to localize the bottleneck.\n\n```python\nimport pandas as pd\nimport numpy as np\n\ndef library_representation(counts_df):\n    '''Per-sample library coverage diagnostics.\n    counts_df: rows = sgRNAs, columns = samples (numeric counts).'''\n    out = pd.DataFrame(index=counts_df.columns)\n    out['n_sgrnas_detected'] = (counts_df > 0).sum()\n    out['pct_zero'] = (counts_df == 0).sum() \u002F len(counts_df) * 100\n    out['pct_lowcount'] = (counts_df \u003C 30).sum() \u002F len(counts_df) * 100\n    out['median_count'] = counts_df.median()\n    out['p10_count'] = counts_df.quantile(0.10)\n    out['p90_count'] = counts_df.quantile(0.90)\n    out['skew_ratio'] = out['p90_count'] \u002F out['p10_count'].replace(0, np.nan)\n    return out\n\ndef stage_specific_thresholds():\n    '''Stage conventions: Joung 2017 (zero-count, skew) + MAGeCK-VISPR (Gini).'''\n    return {\n        'plasmid':  {'pct_zero_max': 0.5, 'skew_max': 2.0, 'gini_max': 0.10},   # skew 2.0 is a stricter modern convention; Joung 2017 states \u003C10\n        'day_0':    {'pct_zero_max': 1.0, 'skew_max': 2.5, 'gini_max': 0.12},\n        'endpoint': {'pct_zero_max': 5.0, 'skew_max': 10.0, 'gini_max': 0.30},\n    }\n```\n\n**Interpretation:** Plasmid pool failing Gini \u003C0.1 indicates synthesis or amplification bias; the screen is unfit for use. Endpoint Gini drifting above 0.30 indicates either heavy biological selection (acceptable for strong-phenotype drug screens) or a bottleneck (must be diagnosed). The Day-0 vs plasmid delta isolates whether the issue arose during infection (cloning is unlikely to lose specific guides between extraction and infection -- the change happens in cells).\n\n## Gini Coefficient\n\n**Goal:** Quantify how unevenly reads are distributed across sgRNAs in a single sample.\n\n**Approach:** Sort non-zero counts ascending, compute Gini via the cumulative-fraction formula. Compare against stage-specific thresholds.\n\n```python\ndef gini(x):\n    '''Gini coefficient: 0 = perfect equality, 1 = maximal inequality.\n    Uses non-zero counts only; zero-count sgRNAs handled separately by % zero.'''\n    x = np.sort(x[x > 0].astype(float))\n    if x.size == 0:\n        return np.nan\n    n = x.size\n    cumx = np.cumsum(x)\n    return (n + 1 - 2 * np.sum(cumx) \u002F cumx[-1]) \u002F n\n```\n\n**Stage-specific thresholds:** only the plasmid Gini \u003C=0.1 is a published cutoff (MAGeCK-VISPR); the remaining grades are operational convention.\n\n| Stage | Excellent | Acceptable | Concerning | Failure |\n|-------|-----------|------------|------------|---------|\n| Plasmid pool | \u003C0.10 | \u003C0.15 | 0.15-0.20 | >0.20 |\n| Day 0 (post-infection) | \u003C0.12 | \u003C0.18 | 0.18-0.25 | >0.25 |\n| Endpoint (post-selection) | \u003C0.30 | \u003C0.40 | 0.40-0.55 | >0.55 |\n\nA Gini that climbs from 0.10 (plasmid) to 0.45 (endpoint) is expected when the screen exerts strong selection (drug, lethal-condition). A Gini that climbs to 0.45 without any biological selection (e.g., a control-vs-control timepoint comparison) indicates technical drift.\n\n## Replicate Concordance\n\n**Goal:** Verify that biological\u002Ftechnical replicates agree before testing for between-condition differences.\n\n**Approach:** Compute pairwise Pearson on log10(counts+1) (MAGeCK-VISPR convention) and Spearman ρ on raw rank, between every replicate pair within a condition. Flag any pair below the MAGeCK-VISPR floor of 0.8 Pearson on log-scale.\n\n```python\ndef replicate_concordance(counts_df, condition_map):\n    '''condition_map: {condition_name: [sample_col1, sample_col2, ...]}.'''\n    log_counts = np.log10(counts_df + 1)\n    rows = []\n    for cond, samples in condition_map.items():\n        if len(samples) \u003C 2:\n            continue\n        for i in range(len(samples)):\n            for j in range(i+1, len(samples)):\n                r_pearson = log_counts[[samples[i], samples[j]]].corr().iloc[0, 1]\n                r_spearman = counts_df[[samples[i], samples[j]]].corr(method='spearman').iloc[0, 1]\n                rows.append({'condition': cond, 'rep1': samples[i], 'rep2': samples[j],\n                             'pearson_log': r_pearson, 'spearman': r_spearman})\n    return pd.DataFrame(rows)\n```\n\n**Thresholds:** 0.8 Pearson is the MAGeCK-VISPR floor; the stricter grades are operational convention.\n\n| Metric | Excellent | Acceptable | Failure |\n|--------|-----------|------------|---------|\n| Pearson on log10(counts+1) | >0.95 | >0.85 | \u003C0.80 |\n| Spearman on raw ranks | >0.85 | >0.70 | \u003C0.60 |\n\n**When Pearson is high but Spearman is low**, a few outlier sgRNAs are driving correlation (one extreme guide dominates). Inspect the scatterplot; typically caused by PCR jackpotting at a single guide. Hit calling should use a method that ranks (RRA, drugZ) rather than one that fits per-sgRNA fold change directly.\n\n## Essentialome Recovery (CEGv2 PR-AUC)\n\n**Goal:** Verify the screen has detectable biological essentiality signal by checking whether known essentials (Hart 2017 CEGv2) drop out faster than known non-essentials (NEGv1).\n\n**Approach:** Compute precision-recall AUC where positives are CEGv2 genes and negatives are NEGv1; the screen \"passes\" if PR-AUC >0.7 (community convention; the CEGv2\u002FNEGv1 sets come from Hart 2017 \u002F Hart 2014).\n\n```python\nfrom sklearn.metrics import precision_recall_curve, auc, roc_auc_score\n\ndef essentialome_recovery(gene_lfc_df, cegv2_set, negv1_set):\n    '''gene_lfc_df: must have [\"gene\", \"lfc\"] columns (gene-level mean LFC, negative = depleted).\n    cegv2_set, negv1_set: sets of gene symbols from Hart 2017.'''\n    labeled = gene_lfc_df[gene_lfc_df['gene'].isin(cegv2_set | negv1_set)].copy()\n    labeled['is_essential'] = labeled['gene'].isin(cegv2_set).astype(int)\n    y_score = -labeled['lfc']  # negative LFC = depleted = more essential -> higher score\n    precision, recall, _ = precision_recall_curve(labeled['is_essential'], y_score)\n    return {\n        'pr_auc': auc(recall, precision),\n        'roc_auc': roc_auc_score(labeled['is_essential'], y_score),\n        'n_essential_detected': labeled['is_essential'].sum(),\n        'n_nonessential_detected': (1 - labeled['is_essential']).sum(),\n    }\n```\n\n**Source \u002F threshold:** Hart 2017 *G3* 7:2719 defines CEGv2 (~684 core essentials); NEGv1 (~927 non-essentials) comes from Hart 2014 *Mol Syst Biol* 10:733. Both lists at https:\u002F\u002Fgithub.com\u002Fhart-lab\u002Fbagel\u002Fblob\u002Fmaster\u002FCEGv2.txt and NEGv1.txt. DepMap convention: PR-AUC >0.7 at FDR 5% is the \"passing\" threshold; \u003C0.5 means the screen has no essentiality signal and is not interpretable.\n\n**When PR-AUC is low despite good Gini and Pearson**: cause is usually one of (a) Cas9 was not selected for before screen start (lots of Cas9-negative cells in the pool diluting signal), (b) puromycin selection truncated too aggressively (over-bottleneck), (c) the timepoint is too early (need 14-21 days for KO + decay + selection to manifest). Each has a different remediation.\n\n## Copy-Number Amplicon Bias Diagnostic\n\n**Goal:** Detect the Aguirre 2016 \u002F Munoz 2016 copy-number artifact where sgRNAs targeting amplified loci appear \"essential\" purely from DNA-damage burden.\n\n**Approach:** Bin genes by copy number (if known from matched WGS\u002FSNP-array) and check whether mean LFC correlates with CN. Alternatively, count off-target cut sites per sgRNA and check correlation with depletion -- amplified loci share many identical cut sites.\n\n```python\ndef cn_bias_diagnostic(gene_lfc_df, cn_df):\n    '''cn_df: per-gene copy number (from WGS\u002FSNP-array\u002Fmatched ASCAT).\n    Tests whether amplified genes show systematically lower LFC.'''\n    merged = gene_lfc_df.merge(cn_df, on='gene')\n    bins = pd.qcut(merged['copy_number'], q=5, duplicates='drop')\n    bin_lfc = merged.groupby(bins, observed=True)['lfc'].agg(['mean', 'median', 'std', 'count'])\n    from scipy.stats import spearmanr\n    rho, p = spearmanr(merged['copy_number'], merged['lfc'])\n    return {'cn_vs_lfc_rho': rho, 'cn_vs_lfc_p': p,\n            'amplified_mean_lfc': merged[merged['copy_number'] > 4]['lfc'].mean(),\n            'diploid_mean_lfc': merged[(merged['copy_number'] >= 1.5) & (merged['copy_number'] \u003C= 2.5)]['lfc'].mean(),\n            'per_bin': bin_lfc}\n```\n\n**Interpretation:** A Spearman ρ \u003C -0.1 between copy number and LFC indicates copy-number artifact. The diagnostic threshold is conservative -- Aguirre 2016 showed the effect scales with copy number and with the number of cut sites per sgRNA. Remediation: use CRISPRcleanR, CERES, or Chronos (see [[copy-number-correction]]) before hit calling.\n\n## Sequencing Depth Audit\n\n**Goal:** Verify that sequencing depth is sufficient to resolve fold changes at the smallest interesting effect size.\n\n**Approach:** Compute reads\u002FsgRNA per sample and the coefficient of variation (CV) of total reads across samples. Compare against Joung 2017's >100 reads\u002FsgRNA for plasmid QC and >500 for screening, or MAGeCK-VISPR's 300x.\n\n```python\ndef depth_audit(counts_df):\n    '''Verify depth: Joung 2017 recommends >100 reads\u002FsgRNA for plasmid QC and\n    >500 for screening; MAGeCK-VISPR uses 300x.'''\n    total = counts_df.sum()\n    n_sgrnas = len(counts_df)\n    depth = total \u002F n_sgrnas\n    cv = total.std() \u002F total.mean()\n    return pd.DataFrame({'total_reads': total, 'reads_per_sgrna': depth,\n                          'depth_grade': np.where(depth \u003C 100, 'FAIL',\n                                          np.where(depth \u003C 300, 'CAUTION',\n                                          np.where(depth \u003C 500, 'OK', 'EXCELLENT')))}).assign(across_sample_cv=cv)\n    # 100 = Joung 2017 plasmid-QC floor; 300 = MAGeCK-VISPR; 500 = Joung 2017 screening\n```\n\n**CV interpretation:** CV >0.5 across samples in total reads indicates demultiplexing imbalance or library-pooling error; even if individual samples pass depth thresholds, the relative count is then biased.\n\n## MOI Verification\n\n**Goal:** Confirm that infection occurred at MOI 0.3-0.5 so that ≤1 sgRNA\u002Fcell predominates.\n\n**Approach:** From titration plate (control wells with serial-diluted virus), compute infection efficiency, then verify by qPCR of integrated proviral copy number in the screen pool.\n\n| MOI | P(≥1 sgRNA\u002Fcell) | P(≥2 sgRNAs\u002Fcell) | Cells with 2+ guides as fraction of infected |\n|-----|------------------|--------------------|-----------------------------------------------|\n| 0.3 | 26% | 4% | 14% |\n| 0.5 | 39% | 9% | 23% |\n| 1.0 | 63% | 26% | 41% |\n\n**Decision rule:** Always titrate to 0.3. At 0.5, 14-23% of \"perturbed\" cells carry combinatorial perturbations that confound single-gene scoring. The Poisson math is non-negotiable -- there is no analytical correction for high-MOI confounding.\n\n## PCA and Batch Effect Detection\n\n**Goal:** Visualize whether samples cluster by biology or by batch.\n\n**Approach:** PCA on log10(counts+1); samples should cluster by condition, not by batch\u002Freplicate-day\u002Flibrary-lot.\n\n```python\nfrom sklearn.decomposition import PCA\n\ndef screen_pca(counts_df, metadata_df, condition_col='condition'):\n    '''metadata_df: rows = samples, columns include condition_col, batch (optional).'''\n    log_counts = np.log10(counts_df + 1).T  # samples as rows for PCA\n    pca = PCA(n_components=3)\n    pcs = pca.fit_transform(log_counts)\n    out = pd.DataFrame(pcs, columns=['PC1', 'PC2', 'PC3'], index=counts_df.columns)\n    out = out.join(metadata_df)\n    return out, pca.explained_variance_ratio_\n```\n\n**Interpretation:** If PC1 separates batches, see [[batch-correction]]. If PC1 separates conditions cleanly, the screen has interpretable biology. If neither separates anything, the screen has no signal (failed) or is dominated by technical noise.\n\n## Composite DepMap-Style Quality Score\n\n**Goal:** Generate a single quality grade combining all metrics for pipeline gating.\n\n**Approach:** Rescale each metric to a comparable 0-1 direction and average them into a single gate score. Screens scoring \u003C-1 SD are typically excluded from DepMap.\n\n```python\ndef composite_qc_score(per_sample_qc):\n    '''per_sample_qc: one row per sample, joining library_representation() output\n    (n_sgrnas_detected, reads_per_sgrna) with gini, pearson_min_replicate, pr_auc\n    and n_sgrnas_total.'''\n    metrics = {\n        'gini_inv': 1 - per_sample_qc['gini'],\n        'pearson': per_sample_qc['pearson_min_replicate'],\n        'pr_auc': per_sample_qc['pr_auc'],\n        'depth_log': np.log10(per_sample_qc['reads_per_sgrna']),\n        'detected_frac': per_sample_qc['n_sgrnas_detected'] \u002F per_sample_qc['n_sgrnas_total'],\n    }\n    return pd.DataFrame(metrics).mean(axis=1)\n```\n\nThis is a pipeline gate, not a publication metric. DepMap reports `gene effect score quality` (Chronos-derived) separately from screen quality; Pacini 2021 scores the latter with NNMD.\n\n## Failure Modes\n\n### High Gini in plasmid pool despite passing all design rules\n\n**Trigger:** Library was cloned and amplified through too many PCR cycles (>20) or used a high-GC-bias polymerase.\n**Mechanism:** Each PCR cycle compounds GC bias by ~5%; high-GC and low-GC guides become non-linear functions of starting abundance.\n**Symptom:** Gini >0.15 in plasmid, GC-content stratification of dropout.\n**Fix:** Cap PCR at 15 cycles for amplification; use Q5 \u002F NEBNext Ultra II \u002F KAPA HiFi (low-bias); re-sequence post-amp; if still bad, re-clone from glycerol stock.\n\n### Falling PR-AUC across timepoints despite stable Gini\n\n**Trigger:** Cas9 was not selected for before screen start; Cas9-negative cells in the pool dilute essentiality signal.\n**Mechanism:** Each Cas9-negative cell carries a sgRNA but no editing; its sgRNA persists despite biological essentiality of the target.\n**Symptom:** PR-AUC declines from 0.7 at week 1 to 0.4 at week 3; Gini and Pearson both pass.\n**Fix:** Always select Cas9-positive cells (FACS or blast) before infection. For a salvage of an already-run screen, model Cas9-expression heterogeneity as a noise floor and accept reduced sensitivity.\n\n### Apparent essentiality of amplified loci\n\n**Trigger:** Cancer cell line with focal amplification (ERBB2 in SK-BR-3, MYC in colorectal, FGFR1 in head and neck).\n**Mechanism:** Aguirre 2016 \u002F Munoz 2016: many simultaneous Cas9 cuts trigger a DNA-damage response and G2 arrest; sgRNAs at amplified loci appear depleted independently of target essentiality.\n**Symptom:** Hits include genes within known amplicons; sgRNAs with more genome-wide cut sites are more depleted.\n**Fix:** Apply CRISPRcleanR pre-hoc or use Chronos\u002FCERES with matched CN profile (see [[copy-number-correction]]). Always required for cancer-cell-line screens, not optional.\n\n### Outlier replicate dragging Pearson down\n\n**Trigger:** One technical replicate had a library-prep failure (low input, PCR jackpot, sequencing-lane swap).\n**Mechanism:** Outlier sample has different total reads or different per-sgRNA distribution but passes individual sample QC.\n**Symptom:** Pearson between replicates 0.85-0.90 with one pair as outlier; condition-level means look fine.\n**Fix:** Drop the outlier replicate; re-derive Pearson on the remaining pair. If only two replicates and one is outlier, the condition lacks replication and must be re-run.\n\n### Low Day-0 coverage from high MOI\n\n**Trigger:** Infection at MOI >0.5.\n**Mechanism:** Poisson: at MOI 0.5, 23% of infected cells carry multiple sgRNAs; the \"single-perturbation\" assumption underlying every analysis method is violated.\n**Symptom:** Apparent gene-gene interactions in single-gene screens; gene-level z-scores noisy; Pearson lower than expected for high-quality counts.\n**Fix:** No analytical correction. Re-titrate, re-infect at MOI 0.3, re-run screen.\n\n### CRISPRi\u002Fa screen with no signal on validated essentials\n\n**Trigger:** Library targets wrong TSS (Ensembl canonical vs FANTOM5 highest-rank).\n**Mechanism:** dCas9-KRAB knockdown is maximal within ±100 bp of the actual Pol II loading site; canonical annotation can be off 1-10 kb.\n**Symptom:** RPS\u002FRPL\u002FEIF families dropping out as expected (these have clean canonical TSSs) but downstream genes failing; PR-AUC on broader CEGv2 panel drops.\n**Fix:** Re-design library against FANTOM5 highest-CAGE-peak TSS (Sanson 2018); for tissue-specific lines, use matched CAGE \u002F GRO-seq.\n\n## Quantitative Thresholds\n\n| Threshold | Value | Source \u002F Rationale |\n|-----------|-------|--------------------|\n| Plasmid Gini | \u003C0.10 | Li W et al 2015 MAGeCK-VISPR *Genome Biol* 16:281 |\n| Plasmid skew ratio (p90\u002Fp10) | \u003C10 (Joung 2017); \u003C2 is a stricter modern convention | Joung 2017 *Nat Protoc* 12:828 |\n| % zero-count sgRNAs (plasmid) | \u003C0.5% | Joung 2017 *Nat Protoc* 12:828 |\n| % zero-count sgRNAs (endpoint) | \u003C1% ideal, \u003C5% tolerated | Li W et al 2015 *Genome Biol* 16:281 |\n| Replicate Pearson on log10(counts+1) | >=0.8 (MAGeCK-VISPR floor); >0.95 ideal | Li W et al 2015 MAGeCK-VISPR *Genome Biol* 16:281 |\n| Replicate Spearman | >0.70 | Operational convention |\n| CEGv2 PR-AUC at FDR 5% | >0.70 passing; >0.85 high quality | Community convention (CEGv2 from Hart 2017 *G3* 7:2719) |\n| Reads per sgRNA per sample | >100 plasmid QC and >500 screening (Joung 2017); 300+ (MAGeCK-VISPR) | Joung 2017; Li W et al 2015 |\n| Library coverage at infection | 500x cells\u002FsgRNA | Joung 2017; DepMap |\n| In-vivo coverage | 50-200x at endpoint | Bottleneck-limited; see [[in-vivo-screens]] |\n| MOI at infection | 0.3 strict | Poisson: P(≥2)=4% at 0.3 vs 9% at 0.5 |\n| CN-bias Spearman ρ (LFC vs copy number) | abs(ρ) \u003C0.10 | Operational convention |\n\n## Common Errors\n\n| Error \u002F symptom | Cause | Solution |\n|-----------------|-------|----------|\n| Plasmid Gini >0.2 | PCR over-amplification | Re-sequence; cap PCR at 15 cycles |\n| Endpoint PR-AUC \u003C0.5 | Cas9 not selected pre-screen | Select Cas9+; redo if mid-screen |\n| Pearson high, Spearman low | A few outlier sgRNAs dominate | Use RRA \u002F rank-based hit calling |\n| Replicate Pearson \u003C0.8 | Library-prep failure on one rep | Drop outlier; re-run if singleton |\n| % zero increases dramatically Day-0 -> endpoint | Selection bottleneck | Reduce selection pressure; or increase coverage |\n| Top hits include amplified-region genes | CN bias | CRISPRcleanR or Chronos |\n| MOI verification shows 0.6+ | Over-infected | Re-run at lower MOI; no rescue |\n| Detected fraction \u003C90% in Day 0 | Coverage too low | Increase cells; expect drift |\n\n## References\n\n- Joung J et al. 2017. *Nat Protoc* 12:828. Genome-wide screen protocol; coverage and depth conventions.\n- Li W et al. 2014. *Genome Biol* 15:554. MAGeCK.\n- Li W et al. 2015. *Genome Biol* 16:281. MAGeCK-VISPR; Gini, zero-count, depth and replicate-correlation QC cutoffs.\n- Wang B et al. 2019. *Nat Protoc* 14:756. MAGeCKFlute; QC dashboard.\n- Hart T et al. 2017. *G3* 7:2719. CEGv2 core-essential reference set; PR-AUC screen-quality benchmarking.\n- Hart T et al. 2014. *Mol Syst Biol* 10:733. Gold-standard essential and non-essential reference sets; source of NEGv1.\n- Aguirre AJ et al. 2016. *Cancer Discov* 6:914. Copy-number amplicon false-essentiality.\n- Munoz DM et al. 2016. *Cancer Discov* 6:900. Copy-number gene-independent toxicity.\n- Pacini C et al. 2021. *Nat Commun* 12:1661. Integrated cross-study dependencies; NNMD screen-quality metric and cross-study batch correction.\n- Meyers RM et al. 2017. *Nat Genet* 49:1779. CERES; mechanism of CN bias.\n- Sanson KR et al. 2018. *Nat Commun* 9:5416. Dolcetto\u002FCalabrese TSS rules.\n- Dempster JM et al. 2021. *Genome Biol* 22:343. Chronos screen-quality model.\n\n## Related Skills\n\n- crispr-screens\u002Flibrary-design - Compose libraries that pass plasmid QC\n- crispr-screens\u002Fmageck-analysis - Run MAGeCK count to generate QC inputs\n- crispr-screens\u002Fcopy-number-correction - Remediate Aguirre \u002F Munoz CN artifact\n- crispr-screens\u002Fbatch-correction - Address inter-batch \u002F cell-line confounding\n- crispr-screens\u002Fhit-calling - Pick method by QC grade\n- crispr-screens\u002Fin-vivo-screens - In-vivo-specific bottleneck QC\n","## Version Compatibility\n\nReference examples tested with: MAGeCK 0.5+ (count + VISPR), MAGeCKFlute 2.0+ (R), pandas 2.2+, numpy 1.26+, scikit-learn 1.4+, matplotlib 3.8+, seaborn 0.13+.\n\nBefore using code patterns, verify installed versions match. If versions differ:\n- CLI: `mageck --version` then `mageck count --help`; R: `packageVersion('MAGeCKFlute')`\n- R: `packageVersion('MAGeCKFlute')` then `?BatchRemove` \u002F `?FluteRRA`\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## CRISPR Screen Quality Control\n\n**\"Audit my CRISPR screen quality before hit calling\"** -> Assess library representation, replicate concordance, depth, drift, and biological signal recovery using DepMap-grade metrics, then decide whether the screen is usable, salvageable, or must be repeated.\n\n- Python: `pandas` + `scikit-learn` for Gini, AUC, PCA; `MAGeCKFlute` (R) for one-shot QC dashboard\n- CLI: `mageck count` writes Gini and mapping stats unconditionally to `\u003Cprefix>.countsummary.txt` (`GiniIndex`, `Reads`, `Mapped`, `Percentage`); MAGeCK-VISPR for an interactive dashboard\n\n## QC Stage Hierarchy\n\nA pooled screen has six distinct bottlenecks where complexity can collapse. Audit each:\n\n| Stage | Metric | Acceptable threshold | Failure consequence |\n|-------|--------|----------------------|----------------------|\n| Plasmid pool | Gini, skew, % zero-count guides | Gini \u003C0.1, skew \u003C2 (Joung 2017 states \u003C10), zero \u003C0.5% | Missing guides cannot be screened; dropout indistinguishable from non-coverage |\n| Day-0 infection | Library coverage, MOI verification | ≥99% guide detection at 500x cells\u002FsgRNA; MOI 0.3 | Founder effects; polyclonality with high MOI |\n| Selection (puro\u002Fblast) | % cells surviving, time-course Gini | 30-40% survival at 5-7 days; Gini drift \u003C0.05 | Selection artifact; fast-growers enriched |\n| Endpoint | Replicate correlation, depth | Pearson >=0.8 on log-counts (MAGeCK-VISPR floor), Spearman >0.7-0.8, >500 reads\u002FsgRNA (Joung 2017 screening) | Noise dominates; FDR inflates |\n| Biological signal | CEGv2 PR-AUC, NEGv1 false-positive rate | PR-AUC >0.7 at FDR 5% (community \"passing\" convention); CEGv2 enrichment in top 1k | Screen lacks essentiality signal; hits not credible |\n| Copy-number artifact | Amplified-region enrichment, sgRNA-cut-count correlation | No correlation between sgRNA off-target count and depletion | False-positive essentiality at amplicons; ERBB2 in HER2+ etc. |\n\nEach metric below quantifies one of these stages.\n\n## Library Representation Metrics\n\n**Goal:** Detect dropout, oversaturation, and library bottlenecks at each sequencing stage.\n\n**Approach:** Compute per-sample zero-count fraction, low-count fraction (\u003C30 reads, the CRISPRcleanR `ccr.NormfoldChanges` default), and percentile-based skew, then track how these change between plasmid -> Day-0 -> endpoint to localize the bottleneck.\n\n```python\nimport pandas as pd\nimport numpy as np\n\ndef library_representation(counts_df):\n    '''Per-sample library coverage diagnostics.\n    counts_df: rows = sgRNAs, columns = samples (numeric counts).'''\n    out = pd.DataFrame(index=counts_df.columns)\n    out['n_sgrnas_detected'] = (counts_df > 0).sum()\n    out['pct_zero'] = (counts_df == 0).sum() \u002F len(counts_df) * 100\n    out['pct_lowcount'] = (counts_df \u003C 30).sum() \u002F len(counts_df) * 100\n    out['median_count'] = counts_df.median()\n    out['p10_count'] = counts_df.quantile(0.10)\n    out['p90_count'] = counts_df.quantile(0.90)\n    out['skew_ratio'] = out['p90_count'] \u002F out['p10_count'].replace(0, np.nan)\n    return out\n\ndef stage_specific_thresholds():\n    '''Stage conventions: Joung 2017 (zero-count, skew) + MAGeCK-VISPR (Gini).'''\n    return {\n        'plasmid':  {'pct_zero_max': 0.5, 'skew_max': 2.0, 'gini_max': 0.10},   # skew 2.0 is a stricter modern convention; Joung 2017 states \u003C10\n        'day_0':    {'pct_zero_max': 1.0, 'skew_max': 2.5, 'gini_max': 0.12},\n        'endpoint': {'pct_zero_max': 5.0, 'skew_max': 10.0, 'gini_max': 0.30},\n    }\n```\n\n**Interpretation:** Plasmid pool failing Gini \u003C0.1 indicates synthesis or amplification bias; the screen is unfit for use. Endpoint Gini drifting above 0.30 indicates either heavy biological selection (acceptable for strong-phenotype drug screens) or a bottleneck (must be diagnosed). The Day-0 vs plasmid delta isolates whether the issue arose during infection (cloning is unlikely to lose specific guides between extraction and infection -- the change happens in cells).\n\n## Gini Coefficient\n\n**Goal:** Quantify how unevenly reads are distributed across sgRNAs in a single sample.\n\n**Approach:** Sort non-zero counts ascending, compute Gini via the cumulative-fraction formula. Compare against stage-specific thresholds.\n\n```python\ndef gini(x):\n    '''Gini coefficient: 0 = perfect equality, 1 = maximal inequality.\n    Uses non-zero counts only; zero-count sgRNAs handled separately by % zero.'''\n    x = np.sort(x[x > 0].astype(float))\n    if x.size == 0:\n        return np.nan\n    n = x.size\n    cumx = np.cumsum(x)\n    return (n + 1 - 2 * np.sum(cumx) \u002F cumx[-1]) \u002F n\n```\n\n**Stage-specific thresholds:** only the plasmid Gini \u003C=0.1 is a published cutoff (MAGeCK-VISPR); the remaining grades are operational convention.\n\n| Stage | Excellent | Acceptable | Concerning | Failure |\n|-------|-----------|------------|------------|---------|\n| Plasmid pool | \u003C0.10 | \u003C0.15 | 0.15-0.20 | >0.20 |\n| Day 0 (post-infection) | \u003C0.12 | \u003C0.18 | 0.18-0.25 | >0.25 |\n| Endpoint (post-selection) | \u003C0.30 | \u003C0.40 | 0.40-0.55 | >0.55 |\n\nA Gini that climbs from 0.10 (plasmid) to 0.45 (endpoint) is expected when the screen exerts strong selection (drug, lethal-condition). A Gini that climbs to 0.45 without any biological selection (e.g., a control-vs-control timepoint comparison) indicates technical drift.\n\n## Replicate Concordance\n\n**Goal:** Verify that biological\u002Ftechnical replicates agree before testing for between-condition differences.\n\n**Approach:** Compute pairwise Pearson on log10(counts+1) (MAGeCK-VISPR convention) and Spearman ρ on raw rank, between every replicate pair within a condition. Flag any pair below the MAGeCK-VISPR floor of 0.8 Pearson on log-scale.\n\n```python\ndef replicate_concordance(counts_df, condition_map):\n    '''condition_map: {condition_name: [sample_col1, sample_col2, ...]}.'''\n    log_counts = np.log10(counts_df + 1)\n    rows = []\n    for cond, samples in condition_map.items():\n        if len(samples) \u003C 2:\n            continue\n        for i in range(len(samples)):\n            for j in range(i+1, len(samples)):\n                r_pearson = log_counts[[samples[i], samples[j]]].corr().iloc[0, 1]\n                r_spearman = counts_df[[samples[i], samples[j]]].corr(method='spearman').iloc[0, 1]\n                rows.append({'condition': cond, 'rep1': samples[i], 'rep2': samples[j],\n                             'pearson_log': r_pearson, 'spearman': r_spearman})\n    return pd.DataFrame(rows)\n```\n\n**Thresholds:** 0.8 Pearson is the MAGeCK-VISPR floor; the stricter grades are operational convention.\n\n| Metric | Excellent | Acceptable | Failure |\n|--------|-----------|------------|---------|\n| Pearson on log10(counts+1) | >0.95 | >0.85 | \u003C0.80 |\n| Spearman on raw ranks | >0.85 | >0.70 | \u003C0.60 |\n\n**When Pearson is high but Spearman is low**, a few outlier sgRNAs are driving correlation (one extreme guide dominates). Inspect the scatterplot; typically caused by PCR jackpotting at a single guide. Hit calling should use a method that ranks (RRA, drugZ) rather than one that fits per-sgRNA fold change directly.\n\n## Essentialome Recovery (CEGv2 PR-AUC)\n\n**Goal:** Verify the screen has detectable biological essentiality signal by checking whether known essentials (Hart 2017 CEGv2) drop out faster than known non-essentials (NEGv1).\n\n**Approach:** Compute precision-recall AUC where positives are CEGv2 genes and negatives are NEGv1; the screen \"passes\" if PR-AUC >0.7 (community convention; the CEGv2\u002FNEGv1 sets come from Hart 2017 \u002F Hart 2014).\n\n```python\nfrom sklearn.metrics import precision_recall_curve, auc, roc_auc_score\n\ndef essentialome_recovery(gene_lfc_df, cegv2_set, negv1_set):\n    '''gene_lfc_df: must have [\"gene\", \"lfc\"] columns (gene-level mean LFC, negative = depleted).\n    cegv2_set, negv1_set: sets of gene symbols from Hart 2017.'''\n    labeled = gene_lfc_df[gene_lfc_df['gene'].isin(cegv2_set | negv1_set)].copy()\n    labeled['is_essential'] = labeled['gene'].isin(cegv2_set).astype(int)\n    y_score = -labeled['lfc']  # negative LFC = depleted = more essential -> higher score\n    precision, recall, _ = precision_recall_curve(labeled['is_essential'], y_score)\n    return {\n        'pr_auc': auc(recall, precision),\n        'roc_auc': roc_auc_score(labeled['is_essential'], y_score),\n        'n_essential_detected': labeled['is_essential'].sum(),\n        'n_nonessential_detected': (1 - labeled['is_essential']).sum(),\n    }\n```\n\n**Source \u002F threshold:** Hart 2017 *G3* 7:2719 defines CEGv2 (~684 core essentials); NEGv1 (~927 non-essentials) comes from Hart 2014 *Mol Syst Biol* 10:733. Both lists at https:\u002F\u002Fgithub.com\u002Fhart-lab\u002Fbagel\u002Fblob\u002Fmaster\u002FCEGv2.txt and NEGv1.txt. DepMap convention: PR-AUC >0.7 at FDR 5% is the \"passing\" threshold; \u003C0.5 means the screen has no essentiality signal and is not interpretable.\n\n**When PR-AUC is low despite good Gini and Pearson**: cause is usually one of (a) Cas9 was not selected for before screen start (lots of Cas9-negative cells in the pool diluting signal), (b) puromycin selection truncated too aggressively (over-bottleneck), (c) the timepoint is too early (need 14-21 days for KO + decay + selection to manifest). Each has a different remediation.\n\n## Copy-Number Amplicon Bias Diagnostic\n\n**Goal:** Detect the Aguirre 2016 \u002F Munoz 2016 copy-number artifact where sgRNAs targeting amplified loci appear \"essential\" purely from DNA-damage burden.\n\n**Approach:** Bin genes by copy number (if known from matched WGS\u002FSNP-array) and check whether mean LFC correlates with CN. Alternatively, count off-target cut sites per sgRNA and check correlation with depletion -- amplified loci share many identical cut sites.\n\n```python\ndef cn_bias_diagnostic(gene_lfc_df, cn_df):\n    '''cn_df: per-gene copy number (from WGS\u002FSNP-array\u002Fmatched ASCAT).\n    Tests whether amplified genes show systematically lower LFC.'''\n    merged = gene_lfc_df.merge(cn_df, on='gene')\n    bins = pd.qcut(merged['copy_number'], q=5, duplicates='drop')\n    bin_lfc = merged.groupby(bins, observed=True)['lfc'].agg(['mean', 'median', 'std', 'count'])\n    from scipy.stats import spearmanr\n    rho, p = spearmanr(merged['copy_number'], merged['lfc'])\n    return {'cn_vs_lfc_rho': rho, 'cn_vs_lfc_p': p,\n            'amplified_mean_lfc': merged[merged['copy_number'] > 4]['lfc'].mean(),\n            'diploid_mean_lfc': merged[(merged['copy_number'] >= 1.5) & (merged['copy_number'] \u003C= 2.5)]['lfc'].mean(),\n            'per_bin': bin_lfc}\n```\n\n**Interpretation:** A Spearman ρ \u003C -0.1 between copy number and LFC indicates copy-number artifact. The diagnostic threshold is conservative -- Aguirre 2016 showed the effect scales with copy number and with the number of cut sites per sgRNA. Remediation: use CRISPRcleanR, CERES, or Chronos (see [[copy-number-correction]]) before hit calling.\n\n## Sequencing Depth Audit\n\n**Goal:** Verify that sequencing depth is sufficient to resolve fold changes at the smallest interesting effect size.\n\n**Approach:** Compute reads\u002FsgRNA per sample and the coefficient of variation (CV) of total reads across samples. Compare against Joung 2017's >100 reads\u002FsgRNA for plasmid QC and >500 for screening, or MAGeCK-VISPR's 300x.\n\n```python\ndef depth_audit(counts_df):\n    '''Verify depth: Joung 2017 recommends >100 reads\u002FsgRNA for plasmid QC and\n    >500 for screening; MAGeCK-VISPR uses 300x.'''\n    total = counts_df.sum()\n    n_sgrnas = len(counts_df)\n    depth = total \u002F n_sgrnas\n    cv = total.std() \u002F total.mean()\n    return pd.DataFrame({'total_reads': total, 'reads_per_sgrna': depth,\n                          'depth_grade': np.where(depth \u003C 100, 'FAIL',\n                                          np.where(depth \u003C 300, 'CAUTION',\n                                          np.where(depth \u003C 500, 'OK', 'EXCELLENT')))}).assign(across_sample_cv=cv)\n    # 100 = Joung 2017 plasmid-QC floor; 300 = MAGeCK-VISPR; 500 = Joung 2017 screening\n```\n\n**CV interpretation:** CV >0.5 across samples in total reads indicates demultiplexing imbalance or library-pooling error; even if individual samples pass depth thresholds, the relative count is then biased.\n\n## MOI Verification\n\n**Goal:** Confirm that infection occurred at MOI 0.3-0.5 so that ≤1 sgRNA\u002Fcell predominates.\n\n**Approach:** From titration plate (control wells with serial-diluted virus), compute infection efficiency, then verify by qPCR of integrated proviral copy number in the screen pool.\n\n| MOI | P(≥1 sgRNA\u002Fcell) | P(≥2 sgRNAs\u002Fcell) | Cells with 2+ guides as fraction of infected |\n|-----|------------------|--------------------|-----------------------------------------------|\n| 0.3 | 26% | 4% | 14% |\n| 0.5 | 39% | 9% | 23% |\n| 1.0 | 63% | 26% | 41% |\n\n**Decision rule:** Always titrate to 0.3. At 0.5, 14-23% of \"perturbed\" cells carry combinatorial perturbations that confound single-gene scoring. The Poisson math is non-negotiable -- there is no analytical correction for high-MOI confounding.\n\n## PCA and Batch Effect Detection\n\n**Goal:** Visualize whether samples cluster by biology or by batch.\n\n**Approach:** PCA on log10(counts+1); samples should cluster by condition, not by batch\u002Freplicate-day\u002Flibrary-lot.\n\n```python\nfrom sklearn.decomposition import PCA\n\ndef screen_pca(counts_df, metadata_df, condition_col='condition'):\n    '''metadata_df: rows = samples, columns include condition_col, batch (optional).'''\n    log_counts = np.log10(counts_df + 1).T  # samples as rows for PCA\n    pca = PCA(n_components=3)\n    pcs = pca.fit_transform(log_counts)\n    out = pd.DataFrame(pcs, columns=['PC1', 'PC2', 'PC3'], index=counts_df.columns)\n    out = out.join(metadata_df)\n    return out, pca.explained_variance_ratio_\n```\n\n**Interpretation:** If PC1 separates batches, see [[batch-correction]]. If PC1 separates conditions cleanly, the screen has interpretable biology. If neither separates anything, the screen has no signal (failed) or is dominated by technical noise.\n\n## Composite DepMap-Style Quality Score\n\n**Goal:** Generate a single quality grade combining all metrics for pipeline gating.\n\n**Approach:** Rescale each metric to a comparable 0-1 direction and average them into a single gate score. Screens scoring \u003C-1 SD are typically excluded from DepMap.\n\n```python\ndef composite_qc_score(per_sample_qc):\n    '''per_sample_qc: one row per sample, joining library_representation() output\n    (n_sgrnas_detected, reads_per_sgrna) with gini, pearson_min_replicate, pr_auc\n    and n_sgrnas_total.'''\n    metrics = {\n        'gini_inv': 1 - per_sample_qc['gini'],\n        'pearson': per_sample_qc['pearson_min_replicate'],\n        'pr_auc': per_sample_qc['pr_auc'],\n        'depth_log': np.log10(per_sample_qc['reads_per_sgrna']),\n        'detected_frac': per_sample_qc['n_sgrnas_detected'] \u002F per_sample_qc['n_sgrnas_total'],\n    }\n    return pd.DataFrame(metrics).mean(axis=1)\n```\n\nThis is a pipeline gate, not a publication metric. DepMap reports `gene effect score quality` (Chronos-derived) separately from screen quality; Pacini 2021 scores the latter with NNMD.\n\n## Failure Modes\n\n### High Gini in plasmid pool despite passing all design rules\n\n**Trigger:** Library was cloned and amplified through too many PCR cycles (>20) or used a high-GC-bias polymerase.\n**Mechanism:** Each PCR cycle compounds GC bias by ~5%; high-GC and low-GC guides become non-linear functions of starting abundance.\n**Symptom:** Gini >0.15 in plasmid, GC-content stratification of dropout.\n**Fix:** Cap PCR at 15 cycles for amplification; use Q5 \u002F NEBNext Ultra II \u002F KAPA HiFi (low-bias); re-sequence post-amp; if still bad, re-clone from glycerol stock.\n\n### Falling PR-AUC across timepoints despite stable Gini\n\n**Trigger:** Cas9 was not selected for before screen start; Cas9-negative cells in the pool dilute essentiality signal.\n**Mechanism:** Each Cas9-negative cell carries a sgRNA but no editing; its sgRNA persists despite biological essentiality of the target.\n**Symptom:** PR-AUC declines from 0.7 at week 1 to 0.4 at week 3; Gini and Pearson both pass.\n**Fix:** Always select Cas9-positive cells (FACS or blast) before infection. For a salvage of an already-run screen, model Cas9-expression heterogeneity as a noise floor and accept reduced sensitivity.\n\n### Apparent essentiality of amplified loci\n\n**Trigger:** Cancer cell line with focal amplification (ERBB2 in SK-BR-3, MYC in colorectal, FGFR1 in head and neck).\n**Mechanism:** Aguirre 2016 \u002F Munoz 2016: many simultaneous Cas9 cuts trigger a DNA-damage response and G2 arrest; sgRNAs at amplified loci appear depleted independently of target essentiality.\n**Symptom:** Hits include genes within known amplicons; sgRNAs with more genome-wide cut sites are more depleted.\n**Fix:** Apply CRISPRcleanR pre-hoc or use Chronos\u002FCERES with matched CN profile (see [[copy-number-correction]]). Always required for cancer-cell-line screens, not optional.\n\n### Outlier replicate dragging Pearson down\n\n**Trigger:** One technical replicate had a library-prep failure (low input, PCR jackpot, sequencing-lane swap).\n**Mechanism:** Outlier sample has different total reads or different per-sgRNA distribution but passes individual sample QC.\n**Symptom:** Pearson between replicates 0.85-0.90 with one pair as outlier; condition-level means look fine.\n**Fix:** Drop the outlier replicate; re-derive Pearson on the remaining pair. If only two replicates and one is outlier, the condition lacks replication and must be re-run.\n\n### Low Day-0 coverage from high MOI\n\n**Trigger:** Infection at MOI >0.5.\n**Mechanism:** Poisson: at MOI 0.5, 23% of infected cells carry multiple sgRNAs; the \"single-perturbation\" assumption underlying every analysis method is violated.\n**Symptom:** Apparent gene-gene interactions in single-gene screens; gene-level z-scores noisy; Pearson lower than expected for high-quality counts.\n**Fix:** No analytical correction. Re-titrate, re-infect at MOI 0.3, re-run screen.\n\n### CRISPRi\u002Fa screen with no signal on validated essentials\n\n**Trigger:** Library targets wrong TSS (Ensembl canonical vs FANTOM5 highest-rank).\n**Mechanism:** dCas9-KRAB knockdown is maximal within ±100 bp of the actual Pol II loading site; canonical annotation can be off 1-10 kb.\n**Symptom:** RPS\u002FRPL\u002FEIF families dropping out as expected (these have clean canonical TSSs) but downstream genes failing; PR-AUC on broader CEGv2 panel drops.\n**Fix:** Re-design library against FANTOM5 highest-CAGE-peak TSS (Sanson 2018); for tissue-specific lines, use matched CAGE \u002F GRO-seq.\n\n## Quantitative Thresholds\n\n| Threshold | Value | Source \u002F Rationale |\n|-----------|-------|--------------------|\n| Plasmid Gini | \u003C0.10 | Li W et al 2015 MAGeCK-VISPR *Genome Biol* 16:281 |\n| Plasmid skew ratio (p90\u002Fp10) | \u003C10 (Joung 2017); \u003C2 is a stricter modern convention | Joung 2017 *Nat Protoc* 12:828 |\n| % zero-count sgRNAs (plasmid) | \u003C0.5% | Joung 2017 *Nat Protoc* 12:828 |\n| % zero-count sgRNAs (endpoint) | \u003C1% ideal, \u003C5% tolerated | Li W et al 2015 *Genome Biol* 16:281 |\n| Replicate Pearson on log10(counts+1) | >=0.8 (MAGeCK-VISPR floor); >0.95 ideal | Li W et al 2015 MAGeCK-VISPR *Genome Biol* 16:281 |\n| Replicate Spearman | >0.70 | Operational convention |\n| CEGv2 PR-AUC at FDR 5% | >0.70 passing; >0.85 high quality | Community convention (CEGv2 from Hart 2017 *G3* 7:2719) |\n| Reads per sgRNA per sample | >100 plasmid QC and >500 screening (Joung 2017); 300+ (MAGeCK-VISPR) | Joung 2017; Li W et al 2015 |\n| Library coverage at infection | 500x cells\u002FsgRNA | Joung 2017; DepMap |\n| In-vivo coverage | 50-200x at endpoint | Bottleneck-limited; see [[in-vivo-screens]] |\n| MOI at infection | 0.3 strict | Poisson: P(≥2)=4% at 0.3 vs 9% at 0.5 |\n| CN-bias Spearman ρ (LFC vs copy number) | abs(ρ) \u003C0.10 | Operational convention |\n\n## Common Errors\n\n| Error \u002F symptom | Cause | Solution |\n|-----------------|-------|----------|\n| Plasmid Gini >0.2 | PCR over-amplification | Re-sequence; cap PCR at 15 cycles |\n| Endpoint PR-AUC \u003C0.5 | Cas9 not selected pre-screen | Select Cas9+; redo if mid-screen |\n| Pearson high, Spearman low | A few outlier sgRNAs dominate | Use RRA \u002F rank-based hit calling |\n| Replicate Pearson \u003C0.8 | Library-prep failure on one rep | Drop outlier; re-run if singleton |\n| % zero increases dramatically Day-0 -> endpoint | Selection bottleneck | Reduce selection pressure; or increase coverage |\n| Top hits include amplified-region genes | CN bias | CRISPRcleanR or Chronos |\n| MOI verification shows 0.6+ | Over-infected | Re-run at lower MOI; no rescue |\n| Detected fraction \u003C90% in Day 0 | Coverage too low | Increase cells; expect drift |\n\n## References\n\n- Joung J et al. 2017. *Nat Protoc* 12:828. Genome-wide screen protocol; coverage and depth conventions.\n- Li W et al. 2014. *Genome Biol* 15:554. MAGeCK.\n- Li W et al. 2015. *Genome Biol* 16:281. MAGeCK-VISPR; Gini, zero-count, depth and replicate-correlation QC cutoffs.\n- Wang B et al. 2019. *Nat Protoc* 14:756. MAGeCKFlute; QC dashboard.\n- Hart T et al. 2017. *G3* 7:2719. CEGv2 core-essential reference set; PR-AUC screen-quality benchmarking.\n- Hart T et al. 2014. *Mol Syst Biol* 10:733. Gold-standard essential and non-essential reference sets; source of NEGv1.\n- Aguirre AJ et al. 2016. *Cancer Discov* 6:914. Copy-number amplicon false-essentiality.\n- Munoz DM et al. 2016. *Cancer Discov* 6:900. Copy-number gene-independent toxicity.\n- Pacini C et al. 2021. *Nat Commun* 12:1661. Integrated cross-study dependencies; NNMD screen-quality metric and cross-study batch correction.\n- Meyers RM et al. 2017. *Nat Genet* 49:1779. CERES; mechanism of CN bias.\n- Sanson KR et al. 2018. *Nat Commun* 9:5416. Dolcetto\u002FCalabrese TSS rules.\n- Dempster JM et al. 2021. *Genome Biol* 22:343. Chronos screen-quality model.\n\n## Related Skills\n\n- crispr-screens\u002Flibrary-design - Compose libraries that pass plasmid QC\n- crispr-screens\u002Fmageck-analysis - Run MAGeCK count to generate QC inputs\n- crispr-screens\u002Fcopy-number-correction - Remediate Aguirre \u002F Munoz CN artifact\n- crispr-screens\u002Fbatch-correction - Address inter-batch \u002F cell-line confounding\n- crispr-screens\u002Fhit-calling - Pick method by QC grade\n- crispr-screens\u002Fin-vivo-screens - In-vivo-specific bottleneck QC\n",{"name":5,"source":24,"license":15,"tool_type":25,"description":7,"imported_at":26,"source_path":27,"primary_tool":28,"source_repository":29},"https:\u002F\u002Fgithub.com\u002FGPTomics\u002FbioSkills","python","2026-09-20","crispr-screens\u002Fscreen-qc\u002FSKILL.md","MAGeCK-VISPR","GPTomics\u002FbioSkills","main","2d1750717747097b602acf30bd09a7cbd4b4c6ea","awesome_skills\u002Fbiology\u002Fbio-crispr-screens-screen-qc","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous","2026-11-09 11:45:36",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-crispr-screens-screen-qc",{"tool":42,"command":43},"bunx","bunx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-crispr-screens-screen-qc",{"tool":45,"command":46},"pnpm","pnpm dlx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-crispr-screens-screen-qc","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-crispr-screens-screen-qc\u002FSKILL.md",true,[50,56],{"path":51,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":54,"sourceHtmlUrl":55},"examples\u002Fscreen_qc.py","SCRIPT","脚本",2362,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-crispr-screens-screen-qc\u002Fexamples\u002Fscreen_qc.py",{"path":57,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":60,"sourceHtmlUrl":61},"usage-guide.md","REFERENCE","参考文档",7444,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-crispr-screens-screen-qc\u002Fusage-guide.md",[63,71,78,85,92,99],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":70},"01M7FFFZPC2025JQQHPHDX154J","dei-assessment","Assess diversity, equity, and inclusion with metrics. TRIGGERS - Use when user needs help with dei-assessment related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fdei-assessment\u002FSKILL.md",[],[],"2026-11-16 10:05:34",{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":70},"01M7FFFWN8H4WA7A6Y398QKB6J","dei-action-plan","Create DEI action plans with goals and initiatives. TRIGGERS - Use when user needs help with dei-action-plan related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fdei-action-plan\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":70},"01M7FFFSHTM0QZRVZ2NRJTJ0PY","culture-fit-assessment","Design culture add assessment processes. TRIGGERS - Use when user needs help with culture-fit-assessment related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fculture-fit-assessment\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":70},"01M7FFFMA12RKEQA38KHJSXXPS","cowork-to-code-bridge","Use an already-installed, independently verified cowork-to-code bridge to run narrowly approved actions on the user's own macOS, Linux, or WSL2 machine through a local file queue.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcowork-to-code-bridge\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":70},"01M7FFFH1F6M8YRGW5V487GH1K","counter-offer-response","Draft counter-offer responses for retention. TRIGGERS - Use when user needs help with counter-offer-response related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcounter-offer-response\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":70},"01M7FFFDGEHV8Y7J9N40HZXW52","continuous-feedback-system","Design continuous feedback systems. TRIGGERS - Use when user needs help with continuous-feedback-system related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcontinuous-feedback-system\u002FSKILL.md",[],[]]