sample-qc-triage

Flags sequencing samples with identity, contamination, and batch-shift QC issues from CSV metrics.

1.1k|257|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/ClawBio/ClawBio --skill sample-qc-triage
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sample-qc-triage
Source: https://github.com/ClawBio/ClawBio/tree/main/skills/sample-qc-triage
Command: npx skills add https://github.com/ClawBio/ClawBio --skill sample-qc-triage

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manually scanning disconnected QC columns across many sequencing samples makes it easy to miss sample swaps, sex mismatches, contamination, and batch effects. This Skill converts a sample-level QC metrics CSV into a deterministic triage report with per-sample flags, so problematic samples are identified before downstream analysis.

Core Features & Use Cases

  • Schema validation and scoring: Validates required columns (read depth, mapping, duplication, mitochondrial, contamination, complexity) and applies documented deterministic thresholds.
  • Identity checks: Optionally flags expected/observed sex mismatches and fingerprint concordance below 95%.
  • Reproducible report pack: Writes report.md, result.json, tables/sample_flags.csv, and reproducibility/commands.sh, all locally with no external calls.
  • Use Case: A sequencing core receives a MultiQC-style metrics table for a new batch and needs to know which samples to rerun; the Skill flags three of five samples with contamination, low complexity, and a sex mismatch.

Quick Start

Run sample QC triage on my metrics CSV and tell me which samples are flagged and why.

Frequently Asked Questions about sample-qc-triage

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I triage sequencing QC metrics across multiple samples?

Provide a CSV with sample_id, batch, total_reads, mapped_pct, duplicate_pct, mitochondrial_pct, contamination_pct, and complexity_score columns. The Skill validates the schema, applies deterministic thresholds, and writes a markdown report, JSON flags, and a per-sample CSV table.

How to detect sample swaps and sex mismatches in sequencing data?

Include optional expected_sex, observed_sex, and fingerprint_match_pct columns in the metrics CSV. The Skill flags sex mismatches after normalisation and identity mismatches when fingerprint concordance falls below 95 percent.

What thresholds are used to flag contamination and batch effects?

Contamination is flagged above 5 percent, low complexity below a 0.60 score or above 35 percent duplicates, and batch shift via read-depth median absolute deviation outliers, mapped reads under 80 percent, or mitochondrial reads over 15 percent. All thresholds are documented in SKILL.md.

Does sample QC triage require external tools or internet access?

No. It runs on the Python 3.10+ standard library only, with no external APIs, uploads, or package dependencies. All parsing and scoring happen locally, and commands are logged to reproducibility/commands.sh.

What are the limitations of threshold-based QC triage?

It works only on supplied summary columns and does not realign reads, infer kinship, or replace canonical tools like VerifyBamID, Conpair, Somalier, or PLINK IBD. Flags are operational QC signals, not clinical or forensic conclusions.