Skip to content
Data
Skill

/sample-qc-triage

Synthetic five-sample QC metrics table

From plugin
clawbio
1.2k112 skills4 commands

Claude Code

$ npx -y skills add ClawBio/ClawBio --skill sample-qc-triage --agent claude-code

SKILL.md

sample-qc-triage.SKILL.md
name: sample-qc-triage
description: Deterministic multi-sample QC triage for identity, sex, contamination, and batch-shift outliers
license: MIT
metadata:
  version: "0.1.0"
  author: ClawBio
  domain: genomics
  tags:
    - quality-control
    - sequencing-qc
    - triage
  inputs:
    - name: input_file
      type: file
      format:
        - csv
      description: Sample-level QC metrics table with optional identity checks
      required: true
  outputs:
    - name: report
      type: file
      format:
        - md
      description: QC triage report
    - name: result
      type: file
      format:
        - json
      description: Machine-readable sample flags
  dependencies:
    python: ">=3.10"
    packages:
  demo_data:
    - path: demo_qc_metrics.csv
      description: Synthetic five-sample QC metrics table
  endpoints:
    cli: python skills/sample-qc-triage/sample_qc_triage.py --input {input_file} --output {output_dir}
  openclaw:
    requires:
      bins:
        - python3
    always: false
    emoji: "🔬"
    homepage: https://github.com/ClawBio/ClawBio
    os:
      - darwin
      - linux
    install:
    trigger_keywords:
      - sample QC triage
      - sequencing QC outliers
      - sex mismatch
      - fingerprint concordance
      - contamination batch shift

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

1. **Schema validation**: Requires sample, batch, read-depth, mapping, duplication, mitochondrial, contamination, and complexity fields. 2. **Identity checks**: Optionally flags expected/observed sex mismatches and low fingerprint concordance. 3. **Outlier scoring**: Flags low complexity, contamination, batch shifts, and mapping drops. 4. **Report pack**: Writes `report.md`, `result.json`, `tables/sample_flags.csv`, and `reproducibility/{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

1. **Validate**: Confirm required columns and numeric metric fields. 2. **Check identity**: Compare optional sex labels and fingerprint match percentages. 3. **Score**: Apply deterministic flags for complexity, contamination, and batch/read-depth shifts. 4. **Summarise**: Count flagged samples and issue categories. 5. **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

1. **Sex mismatch**: optional `expected_sex` and `observed_sex` differ after normalisation. 2. **Identity mismatch**: optional `fingerprint_match_pct < 95`. 3. **Low complexity**: `complexity_score < 0.60` or `duplicate_pct > 35`. 4. **Contamination**: `contamination_pct > 5`. 5. **Batch shift**: read-depth median absolute deviation outlier, `mapped_pct < 80`, or `mitochondrial_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.11+ 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 rem
Read more
@clawbio
Ships withclawbio

🦖 ClawBio - The first bioinformatics-native AI agent skill library. Local-first. Reproducible. Open. Free.

1.2k112 skills
Get the whole plugin

Stars on GitHub

Momentum

stars in total
1.2k
Star history of ClawBio/ClawBio on GitHub, a chart by star-history.com

Other skills on clawbio.

affinity-proteomics

affinity-proteomics

Unified analysis pipeline for affinity-based proteomics platforms — Olink (PEA, NPX) and SomaLogic SomaScan (SOMAmer,

@clawbio@clawbioInstall Skill
arrayexpress-fetch

arrayexpress-fetch

The study's MAGE-TAB SDRF, 6 samples, recorded verbatim. Drives the sdrf, metadata-table and samplesheet demo paths.

@clawbio@clawbioInstall Skill

More skills from other plugins.

context-loader
Auto-invoked

context-loader

Search memories from earlier Pi sessions in this repository. Use it when earlier work may already explain the code, error,…

mem06d69k
@mem0ai@mem0aiInstall Skill
analyzing-ai-citations

analyzing-ai-citations

Answer AI citation and answer engine optimization (AEO) questions in PostHog: whether AI answer engines (ChatGPT, Claude, and an…

posthog13d41k
@posthog@posthogInstall Skill

Questions about sample-qc-triage.

Which coding agents can use sample-qc-triage?
sample-qc-triage installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.