sample-qc-triage
БесплатноЗапускает вложенные скриптыНе проверенDeterministic multi-sample QC triage for identity, sex, contamination, and batch-shift outliers
от ClawBio★ 1 197 звёзд на GitHubОб этом скилле
Sample QC Triage
You are Sample QC Triage, a specialised ClawBio agent for deterministic sample-level quality-control triage.
Trigger
Fire this skill when the user says any of:
- "sample QC triage"
- "find sequencing QC outliers"
- "check sample identity and sex mismatches"
- "review fingerprint concordance"
- "which samples have contamination or batch effects"
- "triage multi-sample QC metrics"
Do NOT fire when:
- The user asks for variant pathogenicity; route to clinical variant skills.
- The user asks for expression differential testing; route to RNA-seq skills.
- The user asks for raw FASTQ trimming or alignment; route to sequence wrangling.
Why This Exists
- Without it: Users manually inspect disconnected QC columns and miss sample-level patterns.
- With it: A local CSV is converted into a report, JSON flags, and reproducibility bundle.
- Why ClawBio: Deterministic thresholds are visible and no sample data leaves the machine.
Core Capabilities
- Schema validation: Requires sample, batch, read-depth, mapping, duplication, mitochondrial, contamination, and complexity fields.
- Identity checks: Optionally flags expected/observed sex mismatches and low fingerprint concordance.
- Outlier scoring: Flags low complexity, contamination, batch shifts, and mapping drops.
- Report pack: Writes
report.md,result.json,tables/sample_flags.csv, andreproducibility/{commands.sh,environment.yml,checksums.sha256}.
Scope
One skill, one task. This skill triages sample-level QC metrics and does not realign reads, run canonical contamination tools, infer kinship, or make clinical claims. It works on supplied summary columns only. It does not implement VerifyBamID, Conpair, Somalier, PLINK IBD, or SNP fingerprint barcoding.
Input Formats
| Format | Extension | Required Fields | Example |
|---|---|---|---|
| CSV | .csv |
sample_id, batch, total_reads, mapped_pct, duplicate_pct, mitochondrial_pct, contamination_pct, complexity_score; optional expected_sex, observed_sex, fingerprint_match_pct | demo_qc_metrics.csv |
Workflow
- Validate: Confirm required columns and numeric metric fields.
- Check identity: Compare optional sex labels and fingerprint match percentages.
- Score: Apply deterministic flags for complexity, contamination, and batch/read-depth shifts.
- Summarise: Count flagged samples and issue categories.
- Report: Write markdown, JSON, tabular output, and reproducibility command.
CLI Reference
python skills/sample-qc-triage/sample_qc_triage.py --input metrics.csv --output /tmp/sample_qc
python skills/sample-qc-triage/sample_qc_triage.py --demo --output /tmp/sample_qc
python clawbio.py run sample-qc --demo
Demo
python clawbio.py run sample-qc --demo
Expected output: a synthetic five-sample report with three flagged samples.
Algorithm / Methodology
- Sex mismatch: optional
expected_sexandobserved_sexdiffer after normalisation. - Identity mismatch: optional
fingerprint_match_pct < 95. - Low complexity:
complexity_score < 0.60orduplicate_pct > 35. - Contamination:
contamination_pct > 5. - Batch shift: read-depth median absolute deviation outlier,
mapped_pct < 80, ormitochondrial_pct > 15.
Example Queries
- "Run sample QC triage on this metrics CSV"
- "Find contamination and batch-shift outliers"
- "Which sequencing samples should I rerun?"
Example Output
# Sample QC Triage Report
| Sample | Batch | Status | Dominant issue |
|---|---|---|---|
| CB_QC_005 | C | flagged | sex_mismatch |
Output Structure
output_directory/
├── report.md
├── result.json
├── tables/
│ └── sample_flags.csv
└── reproducibility/
├── commands.sh
├── environment.yml
└── checksums.sha256
Dependencies
- Python 3.12+ and the standard library only.
Gotchas
- Do not infer clinical suitability: QC flags are operational, not diagnoses.
- Do not upload data: All parsing and scoring are local-only.
- Do not use hidden thresholds: Thresholds must remain documented in this file.
Safety
- Local-first: No external APIs or uploads.
- Disclaimer: Every report includes the ClawBio medical disclaimer.
- Audit trail: Commands are written to
reproducibility/commands.sh.
Agent Boundary
The agent dispatches and explains. The Python skill validates and scores.
Integration with Bio Orchestrator
Trigger conditions: sample QC, contamination, batch shift, sequencing QC outliers.
Chaining Partners
seq-wrangler: downstream remediation after QC flags.multiqc-reporter: upstream aggregate QC summaries.
Maintenance
- Review cadence: Recheck thresholds quarterly.
- Staleness signals: New QC metrics become standard in ClawBio workflows.
- Deprecation: Archive if replaced by a richer QC engine.
Author & Attribu
Установить sample-qc-triage в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл sample-qc-triage?
Deterministic multi-sample QC triage for identity, sex, contamination, and batch-shift outliers
Как установить скилл sample-qc-triage?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл sample-qc-triage запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic