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.
Install / Use
npx skills add jaechang-hits/SciAgent-Skills --skill depmap-crispr-essentialityInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Development & EngineeringSupported Platforms
Tags
Our assessment of depmap-crispr-essentiality
depmap-crispr-essentiality scores 87/100 on our quality scale, 2260th of 4,716 Development & Engineering skills we index (top 48%).
Its SKILL.md is 15 KB long, well organised into 12 sections with 1 code example: a thorough specification that gives an agent plenty to work with.
It has 367 GitHub stars, a meaningful sign that others use it.
Maintenance, license and trust
- The repository was last updated about 3 months ago, so depmap-crispr-essentiality is actively maintained.
- Our last check on 2026-11-02 found the source still online.
- No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
- Its trust signals score 88/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit β read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-10-06. Automated pattern scan on 2026-10-05. It catches known dangerous patterns, not every risk β read a skill before letting an agent act on it.
depmap-crispr-essentiality compared with similar skills
All 4 of these similar skills score higher than depmap-crispr-essentiality; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| depmap-crispr-essentiality (this skill)by jaechang-hits | 87 | 367 | 3mo ago | SKILL.md |
| taste-skillby Leonxlnx | 100 | 118.9k | 11d ago | CLAUDE.md |
| hyperframesby heygen-com | 100 | 87.1k | today | CLAUDE.md |
| ai-job-searchby ai-job-search-dev | 100 | 72.6k | today | CLAUDE.md |
| claude-howtoby luongnv89 | 100 | 47.5k | 5d ago | CLAUDE.md |
Frequently asked questions
- How do I install depmap-crispr-essentiality?
- Run
npx skills add jaechang-hits/SciAgent-Skills --skill depmap-crispr-essentiality. The install tabs above show the steps for each supported agent. - Which AI agents does depmap-crispr-essentiality work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is depmap-crispr-essentiality safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It declares no license and scores 88/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is depmap-crispr-essentiality still maintained?
- The repository was last updated about 3 months ago, so depmap-crispr-essentiality is actively maintained.
Skill content
View source on GitHubname: depmap-crispr-essentiality description: "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." license: CC-BY-4.0
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 column) discards far too much data. Instead, for each gene, mask out only the cell lines where either the expression or CRISPR value is NaN.
-
Set a minimum valid-pair threshold: Genes with very few non-NaN cell line pairs produce unreliable correlation estimates. Require at least 10 (preferably 20+) valid pairs before computing a correlation. Skip genes below this threshold.
-
Report NaN summary before analysis: Before computing correlations, print the total NaN count per dataset, the number of common cell lines, and the number of common genes. This provides an audit trail and helps catch data loading errors early.
-
Verify dataset alignment before computation: Always intersect cell line IDs and gene columns between datasets before analysis. Misaligned indices produce silent errors -- correlations computed on mismatched rows are meaningless.
-
State the sign convention explicitly in results: When reporting correlation results, always include a statement like "CRISPR scores were negated so that positive values represent higher essentiality." This prevents downstream misinterpretation.
Common Pitfalls
-
Forgetting to negate CRISPR scores for essentiality analysis: The raw DepMap score convention (negative = essential) is counterintuitive. Omitting the negation reverses every correlation sign, leading to completely inverted conclusions.
- How to avoid: Always check whether the analysis question uses the word "essentiality" or "dependency." If so, negate the CRISPR scores. Add a comment in the code:
# Negate: in DepMap, negative = essential.
- How to avoid: Always check whether the analysis question uses the word "essentiality" or "dependency." If so, negate the CRISPR scores. Add a comment in the code:
-
Using bulk DataFrame correlation methods: Methods like
DataFrame.corrwith(method='spearman')orDataFrame.rank().corrwith()silently mishandle NaN values, potentially shifting correlations enough to push genes above or below significance thresholds.- How to avoid: Always use a per-gene loop with
scipy.stats.spearmanr. See the reference implementation in the Workflow section below.
- How to avoid: Always use a per-gene loop with
-
Dropping rows globally instead of pairwise: Calling
dropna()on the entire DataFrame before correlation removes all cell lines that have any NaN in any gene, drastically reducing sample size.- How to avoid: Apply NaN masking inside the per-gene loop:
mask = ~(np.isnan(x) | np.isnan(y)). This preserves the maximum number of observations per gene.
- How to avoid: Apply NaN masking inside the per-gene loop:
-
Not checking for sufficient valid pairs: Computing Spearman correlation on fewer than 10 observations produces unstable, unreliable estimates that may appear significant by chance.
- How to avoid: Add a guard clause:
if mask.sum() < 10: continue. Adjust the threshold upward (e.g., 20) for more conservative analysis.
- How to avoid: Add a guard clause:
-
Misinterpreting correlation signs without stated convention: Reporting "positive correlation" without stating whether CRISPR scores were negated leaves results ambiguous. Reviewers cannot tell if "positive" means "higher expression associates with more essential" or "less essential."
- How to avoid: Always include a sentence in the results section stating the sign convention used. For example: "CRISPR scores were negated so that positive correlation indicates higher expression is associated with greater essentiality."
-
Failing to align datasets before computation: Expression and CRISPR datasets may have different cell lines or different gene sets. Computing correlations without explicit alignment can silently match wrong rows or produce index errors.
- How to avoid: Always compute
common_lines = expr.index.intersection(crispr.index)andcommon_genes = expr.columns.intersection(crispr.columns), then subset both DataFrames before any computation.
- How to avoid: Always compute
-
Ignoring the gene column format: DepMap gene columns use the format
GENE_NAME (ENTREZ_ID). Attempting to match against plain gene symbols (e.g.,TP53instead ofTP53 (7157)) will produce empty intersections.- How to avoid: Inspect column formats with
df.columns[:5]before attempting any join or intersection. Parse gene names if needed:df.columns.str.extract(r'^(.+?)\s*\(')[0].
- How to avoid: Inspect column formats with
Workflow
-
Step 1: Load DepMap data
import pandas as pd # Load CRISPR gene effect data crispr = pd.read_csv('CRISPRGeneEffect.csv', index_col=0) # Load expression data expr = pd.read_csv( 'OmicsExpressionProteinCodingGenesTPMLogp1BatchCorrected.csv', index_col=0 ) # Column format: "GENE_NAME (ENTREZ_ID)" e.g., "A1BG (1)" # Index: DepMap cell line IDs e.g., "ACH-000001" -
Step 2: Align datasets
# Find common cell lines and genes common_lines = crispr.index.intersection(expr.index) common_genes = crispr.columns.intersection(expr.columns) print(f"Common cell lines: {len(common_lines)}") print(f"Common genes: {len(common_genes)}") # Subset to common crispr_aligned = crispr.loc[common_lines, common_genes] expr_aligned = expr.loc[common_lines, common_genes] -
Step 3: Report NaN summary
expr_nan = expr_aligned.isna().sum().sum() crispr_nan = crispr_aligned.isna().sum().sum() print(f"Expression NaN count: {expr_nan}") print(f"CRISPR NaN count: {crispr_nan}") -
Step 4: Negate CRISPR scores if computing essentiality correlations
# Negate: in DepMap, negative raw score = essential # After negation, positive = essential essentiality = -crispr_aligned -
Step 5: Compute per-gene NaN-safe Spearman correlation
from scipy.stats import spearmanr import numpy as np def compute_per_gene_spearman(expression_df, crispr_df, negate_crispr=True): """Compute Spearman correlation per gene with proper NaN handling. Args: expression_df: DataFrame (cell_lines x genes) crispr_df: DataFrame (cell_lines x genes) negate_crispr: If True, negate CRISPR scores to represent essentiality Returns: Series of Spearman correlations indexed by gene name """ # Align cell lines and genes common_lines = expression_df.index.intersection(crispr_df.index) common_genes = expression_df.columns.intersection(crispr_df.columns) expr = expression_df.loc[common_lines, common_genes] crispr = crispr_df.loc[common_lines, common_genes] if negate_crispr: crispr = -crispr # Print NaN summary BEFORE analysis expr_nan = expr.isna().sum().sum() crispr_nan = crispr.isna().sum().sum() print(f"Expression NaN count: {expr_nan}") print(f"CRISPR NaN count: {crispr_nan}") print(f"Common cell lines
Truncated for display β read the full file on GitHub.
Related Skills
taste-skill
118.9kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
hyperframes
87.1kAI video you can actually edit. HyperFrames is a free, open-source AI video editor. Describe any video and get a real project you can change down to the frame.
ai-job-search
72.6kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
47.5kA visual, example-driven guide to Claude Code β from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit β see the Safety scan above for what the skill file itself contains.
