Tooluniverse crispr screen analysis

From mims-harvard/ToolUniverse · View interactive version

Tooluniverse crispr screen analysis is an AI agent skill from the GitHub repository mims-harvard/ToolUniverse. Analyze CRISPR-Cas9 genetic screens — MAGeCK gene-level scores, sgRNA count QC, replicate correlation, hit prioritization, and pathway GSEA on screen output. Use for genome-wide essentiality screens, synthetic-lethality discovery, dropout vs positive-selection screen analysis, target identification,

How to use this skill

Skill file

ToolUniverse CRISPR Screen Analysis

Compute the answer from the data

Do the analysis yourself, from the data files, with the recipe below. Do not

take the answer from a notebook that has already been run, a result table, or

the output of a script that ships with the data: those are not inputs to the

analysis, and copying their numbers is not doing it.


Comprehensive skill for analyzing CRISPR-Cas9 genetic screens to identify essential genes, synthetic lethal interactions, and therapeutic targets through robust statistical analysis and pathway enrichment.

Overview

CRISPR screens enable genome-wide functional genomics by systematically perturbing genes and measuring fitness effects. This skill provides an 8-phase workflow for:


Core Workflow

Phase 1: Data Import & sgRNA Count Processing

Load sgRNA count matrix (MAGeCK format or generic TSV). Expected columns: sgRNA, Gene, plus sample columns. Create experimental design table linking samples to conditions (baseline/treatment) with replicate assignments.

Phase 2: Quality Control & Filtering

Assess sgRNA distribution quality:

Phase 3: Normalization

Normalize sgRNA counts to account for library size differences:

Calculate log2 fold changes (LFC) between treatment and control conditions with pseudocount.

Phase 4: Gene-Level Scoring

Two scoring approaches:

Phase 5: Synthetic Lethality Detection

Compare essentiality scores between wildtype and mutant cell lines:

Query DepMap/literature for known dependencies using PubMed search.

Phase 6: Pathway Enrichment Analysis

Submit top essential genes to Enrichr for pathway enrichment:

Phase 7: Drug Target Prioritization

Composite scoring combining:

Query DGIdb for each candidate gene to find existing drugs, interaction types, and sources.

Phase 8: Report Generation

Generate markdown report with:


ToolUniverse Tool Integration

Key Tools Used:

Cancer Context (essential for drug resistance screens):

Expression & Variant Integration:


Quick Start

import pandas as pd
from tooluniverse import ToolUniverse

# 1. Load data
counts, meta = load_sgrna_counts("sgrna_counts.txt")
design = create_design_matrix(['T0_1', 'T0_2', 'T14_1', 'T14_2'],
                               ['baseline', 'baseline', 'treatment', 'treatment'])

# 2. Process
filtered_counts, filtered_mapping = filter_low_count_sgrnas(counts, meta['sgrna_to_gene'])
norm_counts, _ = normalize_counts(filtered_counts)
lfc, _, _ = calculate_lfc(norm_counts, design)

# 3. Score genes
gene_scores = mageck_gene_scoring(lfc, filtered_mapping)

# 4. Enrich pathways
enrichment = enrich_essential_genes(gene_scores, top_n=100)

# 5. Find drug targets
drug_targets = prioritize_drug_targets(gene_scores)

# 6. Generate report
report = generate_crispr_report(gene_scores, enrichment, drug_targets)

Domain Reasoning: Hits Are Statistical, Not Biological

Screen hits are statistical findings, not direct readouts of biological relevance. A gene scoring as essential might be essential for cell growth in general (housekeeping) or essential specifically for the phenotype you are screening for (interesting). Always compare your screen hits to public essentiality data — use DepMap pan-cancer dependency scores to filter genes that are broadly essential across all cell lines. A gene essential only in your specific context, but not pan-essential in DepMap, is a better candidate for follow-up than one that scores in every screen.

LOOK UP DON'T GUESS: DepMap dependency scores, known core essential gene sets (Hart et al., Blomen et al.), and DGIdb druggability data for your top hits. Do not assume a hit is context-specific without checking public essentiality databases.

Interpretation Framework

| Evidence Grade | Criteria | Validation Priority |

|----------------|----------|---------------------|

| A -- Strong hit | MAGeCK RRA p < 0.001, BAGEL BF > 5, >=3 sgRNAs with concordant LFC | Immediate validation (individual KO, growth assay) |

| B -- Moderate hit | MAGeCK RRA p < 0.01, BAGEL BF 2-5, >=2 concordant sgRNAs | Secondary validation pool |

| C -- Weak/ambiguous | p > 0.01, BF < 2, or discordant sgRNA effects | Deprioritize; check for copy-number bias or seed effects |

Interpreting screen results:

Synthesis questions to address in the report:

  1. Do the top hits cluster in known pathways (Reactome/KEGG), or are they scattered -- suggesting technical noise?
  2. Are known essential genes (Hart et al. reference set) correctly identified, confirming screen quality? The full CEGv2 core-essential (~684) and NEGv1 non-essential (~928) reference sets are bundled in scripts/ — load them with from reference_gene_sets import core_essential, nonessential, recovery_rate. recovery_rate(top_depleted_genes) gives the fraction of core-essential genes recovered (a good genome-wide screen recovers >~0.8).
  3. For drug target candidates: does DGIdb show existing compounds, and does DepMap confirm the dependency across multiple cell lines?

References


Analysis conventions

Replicate Spearman correlation — match the paper's aggregation level

Papers differ on how replicate reproducibility is reported: sgRNA-level CPM vs gene-level summed CPM vs gene-level mean CPM. The expected GT is almost always the sgRNA-level Spearman (noisier, lower ρ), not the gene-level aggregate. If you get ρ ≈ 0.6+ you are probably at gene level; drop to per-sgRNA CPM pairs.

Reactome GSEA ranking column

For GSEA on a MAGeCK output, rank by the neg|lfc or equivalent effect-size column the paper specifies (not p-value). Check the MAGeCK xlsx for a beta / sgRNA_effect / neg|score column and rank descending.

Pathway naming

Reactome pathway names in the .gmt bundle are literal (e.g., "cGMP effects", "Signaling by Hippo"). Answers that should match a Reactome term must reproduce the exact label — do not paraphrase the pathway.

See Also

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.