depmap-crispr-essentiality
БесплатноБез исполняемых скриптовНе проверенDepMap CRISPR gene effect (Chronos) analysis: sign convention for essentiality, per-gene NaN-safe Spearman correlation, data loading/alignment. For general…
от FridrichMethod★ 17 звёзд на GitHubОб этом скилле
DepMap CRISPR Gene Effect Analysis Guide
Overview
This guide covers the correct interpretation and analysis of DepMap CRISPR gene effect (Chronos) data. The most critical and common error in DepMap analyses is failing to negate the CRISPR scores when computing correlations with "essentiality." A secondary but equally damaging mistake is using bulk correlation shortcuts that mishandle per-gene NaN patterns. This guide provides the mandatory sign convention, the correct per-gene NaN-safe Spearman correlation implementation, and data loading/alignment procedures.
Key Concepts
DepMap CRISPR Score Convention
The CRISPR gene effect score (produced by the Chronos algorithm) quantifies how gene knockout affects cell viability:
- Negative score: gene knockout reduces cell viability -- the gene is essential for that cell line
- Zero score: no measurable effect on viability
- Positive score: gene knockout increases viability (rare, may indicate tumor-suppressive behavior)
The DepMap portal distributes these scores in the file CRISPRGeneEffect.csv. Each row is a cell line (DepMap ID, e.g., ACH-000001) and each column is a gene in the format GENE_NAME (ENTREZ_ID), e.g., A1BG (1).
Essentiality Sign Interpretation
Because negative raw scores indicate essentiality, any analysis that asks about "essentiality" or "dependency" requires negating the raw CRISPR scores:
- "Correlation with essentiality" = correlation with
-CRISPRGeneEffect(negated) - "Higher essentiality" = more negative raw score = more positive negated score
- "Most essential gene" = gene with the most negative raw score
If you correlate expression with raw CRISPR scores and find 3 genes with correlation <= -0.6 and 0 genes with correlation >= 0.6, then the correct answer for "genes with strong positive correlation with essentiality" is 3, not 0. The negative correlations with raw scores ARE the positive correlations with essentiality.
Data Structure: CRISPRGeneEffect Format
The standard DepMap data files use a consistent structure:
- Index: DepMap cell line identifiers (
ACH-XXXXXX) - Columns: Gene identifiers in
GENE_NAME (ENTREZ_ID)format - Values: Floating-point scores (may contain NaN for genes not screened in a given cell line)
- Companion files: Expression data (
OmicsExpressionProteinCodingGenesTPMLogp1BatchCorrected.csv) uses the same index/column format, enabling direct alignment
Different genes have different patterns of missing data across cell lines. This is because not all genes are screened in all cell lines, and quality control may remove specific gene-cell line combinations.
Decision Framework
Question: How should I compute correlations with DepMap CRISPR data?
├── Does the question mention "essentiality" or "dependency"?
│ ├── Yes → Negate CRISPR scores before correlating (see Best Practices #1)
│ └── No (raw gene effect) → Use raw scores directly
├── How should I compute correlations?
│ ├── Per-gene correlation → scipy.stats.spearmanr in a loop (see Best Practices #2)
│ └── Matrix-wide correlation → AVOID; use per-gene loop instead
└── How should I handle missing data?
├── Pairwise NaN removal → CORRECT (see Best Practices #3)
└── Global row/column dropping → INCORRECT; loses too much data
| Scenario | Recommended Approach | Rationale |
|---|---|---|
| Correlating expression with "essentiality" | Negate CRISPR scores, then per-gene Spearman | Sign convention requires negation; per-gene handles NaN correctly |
| Correlating expression with raw gene effect | Per-gene Spearman on raw scores | No negation needed, but NaN-safe per-gene loop still required |
| Ranking genes by essentiality across cell lines | Rank by most negative mean raw score | More negative = more essential across the panel |
| Identifying selectively essential genes | Compare score distributions across subgroups | Use per-subgroup mean/median of raw scores, then compare |
| Filtering genes before correlation | Require minimum 10 valid cell line pairs | Genes with too few observations yield unreliable correlations |
Best Practices
Always negate CRISPR scores when the analysis asks about "essentiality": The raw DepMap convention is that negative = essential. When a question or hypothesis refers to "essentiality," "dependency," or "gene importance," negate the scores so that higher values mean more essential. Explicitly state the sign convention in your results.
Use scipy.stats.spearmanr per gene in a loop: Bulk matrix shortcuts (
DataFrame.corrwith,DataFrame.rank().corrwith()) handle NaN inconsistently across columns. The only reliable method is to compute Spearman correlation gene by gene usingscipy.stats.spearmanrwith pairwise-complete observations.Apply pairwise NaN removal, not global dropping: Different genes have different missing-data patterns. Dropping rows globally (any NaN in any
Установить depmap-crispr-essentiality в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл depmap-crispr-essentiality?
DepMap CRISPR gene effect (Chronos) analysis: sign convention for essentiality, per-gene NaN-safe Spearman correlation, data loading/alignment. For general NaN-safe correlation see nan-safe-correlation; for quality filtering see degenerate-input-filtering.
Как установить скилл depmap-crispr-essentiality?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл depmap-crispr-essentiality запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic