К основному содержанию
скилл CX Codex

mageck — скилл для Claude Code: анализ CRISPR-скринов

Скилл mageck считает риды из FASTQ и матрицы гайдов, проверяет библиотеки, запускает QC реплик и выдаёт рейтинг генов с FDR для пулированных CRISPR-скринов.

MIT 465 установок ★ 58 036 обновлён 2026-10-19

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add K-Dense-AI/scientific-agent-skills --skill mageck -a claude-code
Открыть на GitHub

Что делает mageck

Скилл оборачивает MAGeCK 0.5.9.5 и Python-хелпер для анализа knockout, CRISPRi и CRISPRa скринов. Он запускает mageck count для картирования FASTQ на библиотеку гайдов, проверяет корреляции реплик, долю нулевых каунтов и коэффициент Джини, затем сравнивает две группы образцов через mageck test с медианной нормализацией или по контрольным гайдам. На выходе — таблицы генов с эффект-сайзами, FDR и рейтингом обогащения или истощения.

Требует Python 3.10+, NumPy 1.26.4, SciPy 1.13.1 и установленный MAGeCK 0.5.9.5 с бинарником RRA. Для сборки из исходников нужен C++ компилятор. MAGeCK2 из отдельного репозитория несовместим с командами этого скилла: хелпер и workflow рассчитаны на версию 0.5.9.5. Библиотека гайдов должна быть TSV без заголовка, колонки: ID гайда, последовательность ДНК, ген. Хелпер отклоняет дубликаты и неоднозначные последовательности.

Какие задачи решает

  • посчитать риды из FASTQ против библиотеки гайдов
  • проверить качество реплик и распределение гайдов в скрине
  • сравнить контрольные и экспериментальные образцы с тестом обогащения или истощения
  • получить рейтинг генов-хитов с эффект-сайзами и FDR
  • запустить нормализацию медианой или по списку контрольных гайдов

Примеры запросов агенту

  • Посчитай риды из c1.fastq.gz и t1.fastq.gz против библиотеки library.tsv, метки образцов c1 и t1, без обрезки с 5' конца
  • Запусти QC для таблицы каунтов counts.count.txt: контроль c1 и c2, обработка t1 и t2, результат в qc.json
  • Сравни контроль c1, c2 и обработку t1, t2 в counts.count.txt с нормализацией медианой, FDR 0.05, результат в папку result

Как установить mageck

1Через Skills CLI (Vercel)

npx skills add K-Dense-AI/scientific-agent-skills --skill mageck -a claude-code

2Вручную: положить файлы

~/.claude/skills/mageck/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/mageck/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о mageck

Как установить mageck в Claude Code?

Выполни npx skills add K-Dense-AI/scientific-agent-skills --skill mageck -a claude-code, затем проверь ~/.claude/skills/mageck/SKILL.md. Перед анализом убедись, что mageck --version и mageck test --help работают.

Что делает mageck?

Скилл анализирует пулированные CRISPR-скрины: считает FASTQ-риды против библиотеки гайдов, проверяет QC реплик, сравнивает контрольные и экспериментальные образцы и выдаёт список генов с FDR и эффект-сайзами.

Какая версия MAGeCK нужна для mageck?

Скилл требует MAGeCK 0.5.9.5 с бинарником RRA. MAGeCK2 из отдельного репозитория несовместим: команды и хелпер рассчитаны на 0.5.9.5. Проверь версию через mageck --version перед запуском.

Исходный текст

SKILL.md · MIT
---
name: mageck
description: Analyzes pooled CRISPR screen FASTQ reads and guide-count matrices with MAGeCK, validates guide libraries and contrasts, measures replicate and library QC, and produces gene hit rankings with effect sizes and FDR. Use for new knockout, CRISPRi, or CRISPRa screen analysis, enrichment or depletion contrasts, and MAGeCK count/test workflows; existing public dependency-score lookup belongs to DepMap.
license: MIT
compatibility: Requires Python 3.10+ for the helper and MAGeCK 0.5.9.5 with its compiled RRA executable for analysis. Tested runtime uses Python 3.11, NumPy 1.26.4 and SciPy 1.13.1. Source installation needs a C++ compiler; network is needed only for installation. No credentials.
metadata:
  version: "1.1"
  skill-author: K-Dense Inc.
  upstream-version: "0.5.9.5"
  last-reviewed: "2026-10-01"
---

# MAGeCK pooled-screen analysis

## When to use

Use this skill to count existing sequencing reads against a supplied guide library or compare
already-counted pooled screens. Deliver the count matrix, QC, guide and gene results, contrast
provenance, and a short interpretation of enrichment/depletion. This workflow analyzes screens;
it does not design guides or infer gene function from a hit alone.

## Runtime

The tested source installation and external-runtime caveat are in
[references/runtime.md](references/runtime.md). Verify both `mageck --version` and
`mageck test --help` before an analysis. The bundled Python helper is standard-library only.
MAGeCK itself also needs NumPy, SciPy, and the `RRA` binary. PDF/R reporting is optional and not
needed by the helper.

The [official release directory](https://sourceforge.net/projects/mageck/files/0.5/) still lists
0.5.9.5 as its latest MAGeCK release. Upstream now links the separate
[MAGeCK2 project](https://github.com/davidliwei/mageck2); these commands and the helper target
MAGeCK 0.5.9.5, not an interchangeable MAGeCK2 installation. This is a local CLI workflow with
no service API or authentication.

## Workflow

1. Establish the library version, perturbation modality, sample names, selection direction,
   biological replicates, baseline material, time point, and batch. Separate sequencing lanes
   from independent biological replicates. A plasmid baseline and a cell day-zero baseline
   answer different questions. Require an explicit treatment/control contrast; the helper
   never silently assigns all unused samples to the control group.
2. Validate a **headerless TSV library** containing guide ID, DNA sequence, gene. IDs and
   sequences must be unique. The helper requires a count-table header beginning `sgRNA`, `Gene`,
   followed by unique nonnumeric sample names such as `c1`. MAGeCK can interpret numeric names
   as column indices or count values; rename them before analysis. Guide/gene IDs must have no
   whitespace. The helper rejects ambiguous sequences and any count/library ID or gene mismatch;
   resolve intentional multi-target guides explicitly upstream. These are deliberate helper
   restrictions; native MAGeCK also accepts other input variants.
3. For FASTQ, inspect read structure and known guide sequences to establish trimming and
   orientation. Use MAGeCK `count`, with one space-separated argument per biological sample;
   comma-join lanes only when they are technical replicates of that same sample. Preserve
   unmapped-read and count-summary evidence when mapping is poor. A zero-count guide remains
   in the library; do not drop it to improve QC.
4. Run QC before statistical testing. Review library representation, median reads per guide,
   zero fractions, Gini coefficients, and within-condition replicate correlations. The
   helper's 10% zero and 0.8 correlation flags are review prompts, not universal acceptance
   thresholds. High correlation can coexist with systematic artifacts. Read depth is not
   experimental cell coverage. The helper uses a raw-count population Gini; MAGeCK's native
   count-summary Gini uses log(count + 1) with a finite-sample correction. Do not compare their
   values or thresholds as the same statistic.
5. Choose normalization based on the screen. Median normalization assumes most guides are
   stable. For a strong global shift, supplied validated negative-control guides may support
   `--normalization control`. These must be **guide IDs**, one per line; a gene list is not
   interchangeable. Biological control samples and negative-control guides serve different
   roles. At least two controls must be present, and every guide assigned to a control gene
   must be designated a control. Supplying `--control-guides` also changes the RRA null distribution,
   even with median normalization. Record their origin and check their count distribution.
   MAGeCK 0.5.9.5 switches median normalization to total-count scaling for a zero median or
   more than 45% zero guides in any selected sample; for control normalization it evaluates
   the control-guide subset. Check the report's applied method, size factors, and warnings.
6. Use `test` for a two-group comparison. `--paired` requires both lists in corresponding
   biological order and equal length; matching lengths alone do not establish pairing.
   The helper reports genes at the requested FDR in both directions and retains full rankings.
   For a multi-factor design, see [references/design.md](references/design.md); do not collapse
   batches or time courses into an unjustified two-group test.
7. Inspect guide concordance for leading genes, essential-gene recovery where appropriate,
   negative controls, replicate consistency, and copy-number artifacts in nuclease knockout
   screens. Report effect sizes alongside FDR. An enriched guide can indicate resistance,
   growth advantage, or a sampling artifact depending on the selection; depletion need not
   imply universal essentiality. Lack of replication or low-count guides weakens inference.

## Commands

Run paths relative to the installed skill directory. Input and output paths refer to the user's
analysis directory. The helper refuses to reuse an existing results directory.

```bash
# Single-end guide reads; trim and orientation must match the user's library preparation.
mageck count -l library.tsv --fastq c1.fastq.gz c2.fastq.gz t1.fastq.gz t2.fastq.gz \
  --sample-label c1,c2,t1,t2 --trim-5 0 --norm-method none -n counts

python scripts/screen_analysis.py qc --counts counts.count.txt --library library.tsv \
  --control c1 c2 --treatment t1 t2 --output qc.json

python scripts/screen_analysis.py test --counts counts.count.txt --library library.tsv \
  --control c1 c2 --treatment t1 t2 --normalization median --fdr 0.05 --output result
```

The FASTQ command structure was exercised with a synthetic two-guide library: counts of 30 and
12 were recovered exactly. A separate trimmed, reverse-complemented, two-lane fixture recovered
15, 7, and 0 reads. The two-group helper was exercised with 500 guides and two replicates per
condition in unpaired and paired modes; known depleted and enriched genes ranked first in their
respective directions and passed FDR 0.05. Sparse fixtures verified the total-normalization fallback.
These tests establish execution and signal direction, not real-screen statistical calibration.
Real-file paths above are illustrative.

`result/report.json` records count/library/control-guide SHA-256, control-guide IDs, MAGeCK version,
actual arguments, QC, applied normalization, warnings, hit direction, FDR, log2 fold change and rank.
The helper explicitly selects median guide LFC aggregation and `--remove-zero both`: all-zero
guides remain in the input/QC but are excluded from ranking. Native MAGeCK also skips `NA`/`na`
gene labels by default. The helper's `--fdr` filters completed gene results; it does not set MAGeCK's
`--gene-test-fdr-threshold`, which controls the RRA guide-selection cutoff. Negative and positive
FDRs are separate families; their union does not establish joint FDR control across directions or
across multiple contrasts. `screen.gene_summary.txt`, `screen.sgrna_summary.txt`, normalized
counts and the execution log retain the complete evidence. Include the original library, sample
sheet and negative-control list in the analysis handoff; the count checksum cannot reconstruct them.

## Primary references

- [MAGeCK usage and command semantics](https://sourceforge.net/p/mageck/wiki/usage/)
- [Official installation guidance](https://sourceforge.net/p/mageck/wiki/install/)
- [Input formats](https://sourceforge.net/p/mageck/wiki/input/)
- [Output field meanings](https://sourceforge.net/p/mageck/wiki/output/)

© K-Dense-AI · MIT · K-Dense-AI/scientific-agent-skills

Похожие скиллы

Все скиллы по теме «Наука и исследования» →
tooluniverse-crispr-screen-analysis mims-harvard Скилл tooluniverse-crispr-screen-analysis для Claude Code анализирует CRISPR-Cas9-скрининги: оценивает качество sgRNA-счётов, ранжирует гены и ищет обогащённые пути. Используется для поиска существенных генов и синтетической летальности. CX Codex +1 379установок tooluniverse-cell-line-profiling mims-harvard Скилл tooluniverse-cell-line-profiling помогает выбрать подходящую раковую клеточную линию для исследований на основе генов, типа опухоли и чувствительности к препаратам. Сопоставляет данные из DepMap, Cellosaurus, COSMIC и PharmacoDB. CX Codex +1 230установок scvi-tools официальный anthropics Скилл помогает запускать вероятностные модели scvi-tools для анализа единичных клеток. Направляет выбор архитектуры и автоматизирует пайплайн обработки AnnData. CX Codex +1 2 500установок reactome-database google-deepmind Скилл reactome-database для Claude Code подключает базы Reactome для анализа генных списков, поиска реакций и экспорта схем путей. Запускает биоинформатические расчёты в терминале агента. CX Codex +1 2 400установок opentargets-database google-deepmind Скилл opentargets-database даёт агенту доступ к Open Targets Platform через GraphQL: связи ген-болезнь, данные о лекарствах и оценка перспективности мишени. CX Codex +1 2 400установок ukb-topmed-phewas-skill официальный OpenAI Скилл ukb-topmed-phewas-skill для Codex и ChatGPT запрашивает сводки PheWAS-ассоциаций из базы UKB-TOPMed по одному варианту — принимает rsID, GRCh37 или GRCh38 и преобразует в нужный формат запроса. CX Codex GP ChatGPT +1 13установок

Из того же набора176

Весь набор →
pybamm Скилл запускает модели литий-ионных батарей в PyBaMM, сравнивает расчёт с измерениями и проверяет численную погрешность. CX Codex +1 467установок cantera Рассчитывает гомогенные реакторы в Cantera и определяет задержку воспламенения с проверкой баланса энергии. Моделирует кинетику горения идеального газа. CX Codex +1 465установок nmrglue Скилл nmrglue для Claude Code обрабатывает одномерные NMR-сигналы в фазированные спектры, пики и интегралы регионов. Калибрует и воспроизводимо обрабатывает сырые FID на Python 3.12+, NumPy и SciPy. CX Codex +1 465установок tellurium Скилл запускает симуляцию кинетических моделей биохимических реакций из SBML или Antimony через Tellurium и экспортирует COMBINE-архивы. CX Codex +1 465установок qiime2-amplicon Скилл qiime2-amplicon для Claude Code обрабатывает парные 16S-риды в QIIME 2, создавая ASV-таблицы и таксономию с историей преобразований. CX Codex +1 465установок cellprofiler Запускает CellProfiler для подсчёта ядер и измерения флуоресценции. Анализирует 2D TIFF-снимки. CX Codex +1 464установок pycalphad Скилл pycalphad рассчитывает термодинамические фазовые равновесия сплавов по TDB-базам данных. Помогает моделировать составы и доли фаз при заданных температурах и давлении. CX Codex +1 463установок relion Запускает валидацию STAR-файлов, gold-standard рефайнмент частиц и постобработку независимых half-map в RELION 5.0.1. Подходит для single-particle крио-ЭМ проектов. CX Codex +1 463установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой