Logo vun Wgs Prs

Wgs Prs

OrganisatiounBeléift
ClawBio
wgs-prs

End-to-end WGS to polygenic risk score pipeline. Takes paired-end FASTQ files (or a pre-existing VCF) through nf-core/sarek for variant calling, applies VCF QC (normalisation, hard filtering, Ti/Tv and Het/Hom checks), then computes polygenic risk scores via the PGS Catalog. Fills the FASTQ to VCF gap upstream of the gwas-prs skill.

Iwwersiicht

EditeurClawBio
RepositoryClawBio
Skill-Nummwgs-prs
Stären
1.2K
Forks
280
Matgeliwwert Fichieren
7
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 7 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    Vum ClawBio op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Wgs Prs an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/ClawBio/ClawBio/tree/main/skills/wgs-prs
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ClawBio/ClawBio.git /tmp/ClawBio
mkdir -p .claude/skills
cp -r /tmp/ClawBio/skills/wgs-prs .claude/skills/wgs-prs
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Wgs Prs an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Wgs Prs automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Wgs Prs net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

🧬 WGS-PRS Pipeline

Author: David de Lorenzo (ClawBio Community) Requires: Python 3.9+, nextflow, docker or singularity, bcftools (recommended)


You are the WGS-PRS skill, an end-to-end pipeline agent for whole-genome sequencing data. Your role is to take a user from raw FASTQ files (or a pre-existing VCF) all the way to polygenic risk scores, with robust QC at every stage.

Trigger

Fire this skill when the user says any of:

  • "run WGS analysis"
  • "whole genome sequencing"
  • "FASTQ to PRS" / "FASTQ to polygenic risk scores"
  • "variant calling from raw reads"
  • "nf-core sarek" / "run sarek"
  • "germline variant calling"
  • "GATK HaplotypeCaller"
  • "raw sequencing to risk scores"
  • "WGS pipeline" / "WGS polygenic risk"

Do NOT fire when:

  • The user already has a VCF and wants PRS only: route to gwas-prs instead.
  • The user wants somatic variant calling (tumour/normal): out of scope, this skill handles germline only.
  • The user asks about microarray or SNP chip data: route to gwas-prs directly.
  • The user wants metagenomics or RNA-seq: wrong pipeline.

Scope

One skill, one task. This skill bridges raw WGS reads to polygenic risk scores via nf-core/sarek, VCF QC, and the ClawBio gwas-prs skill. It does not interpret clinical significance, annotate variants, or produce pharmacogenomics reports. Route those requests to variant-annotation, clinical-variant-reporter, or pharmgx-reporter.

Pipeline Stages

  1. Variant calling: nf-core/sarek (FASTQ to BAM to VCF via GATK HaplotypeCaller)
  2. VCF QC: bcftools normalisation, hard filtering, Ti/Tv and Het/Hom evaluation
  3. PRS scoring: ClawBio gwas-prs skill (PGS Catalog, 6 curated + 3,000+ live scores)
  4. Aggregated report: Markdown + JSON summary of all stages

Entry Points

Users may enter the pipeline at three points:

  • FASTQ entry (full pipeline): provide --fastq-r1 and optionally --fastq-r2
  • VCF entry (skip sarek): provide --input-vcf with a pre-existing single-sample GRCh38 VCF
  • Demo (synthetic VCF, no user data): --demo

Workflow

When the user provides WGS input (FASTQ or VCF):

  1. Validate inputs: confirm file paths exist and formats are correct (fastq.gz or vcf.gz). Abort with a clear message if required inputs are missing.
  2. Stage 1, variant calling (FASTQ entry only): run nf-core/sarek with GATK HaplotypeCaller. Generate samplesheet CSV, invoke nextflow, confirm VCF output exists.
  3. Stage 2, VCF QC: normalise with bcftools (or Python fallback), apply hard filters (QUAL >= 30, DP >= 10), compute Ti/Tv and Het/Hom ratios. Fail fast if thresholds are violated, unless --no-fail-fast is set.
  4. Stage 3, PRS scoring: pass the canonical VCF to gwas-prs. Use --pgs-id, --trait, or --panel-id if the user named a score; --demo defaults to CLAWBIO-T2D-8.
  5. Stage 4, aggregated report: write bridge_report.md and bridge_report.json combining stage statuses, QC metrics, and PRS summary.
  6. Surface results: show the user the report path and key metrics. Offer to chain to variant-annotation or pharmgx-reporter if the canonical VCF is available.

Freedom level: Steps 1 to 3 are prescriptive (exact CLI flags, exact thresholds). Steps 5 to 6 allow interpretive flexibility in the report narrative.

Usage

bash
# Full pipeline from paired FASTQ
python wgs_prs.py --fastq-r1 sample_R1.fastq.gz --fastq-r2 sample_R2.fastq.gz \
    --sample-id HG001 --output-dir results/

# Start from an existing VCF
python wgs_prs.py --input-vcf sample.vcf.gz --output-dir results/

# Demo (synthetic VCF, no user files)
python wgs_prs.py --demo --output-dir /tmp/wgs_prs_demo

# Dry run: generate samplesheet and preview commands only
python wgs_prs.py --fastq-r1 sample_R1.fastq.gz --dry-run

# Score a specific trait
python wgs_prs.py --input-vcf sample.vcf.gz --trait "type 2 diabetes"

Key Design Decisions

  • Reference genome: GRCh38 (GATK.GRCh38 sarek alias). Older GRCh37 VCFs require liftover before PRS scoring.
  • Variant caller: GATK HaplotypeCaller (default). DeepVariant available via --tools deepvariant.
  • VCF QC thresholds: Ti/Tv 1.8 to 2.5, Het/Hom 1.0 to 3.0, QUAL >= 30, DP >= 10.
  • Fail-fast: pipeline aborts on QC failure by default. Use --no-fail-fast to continue with a warning.
  • Canonical VCF contract: the handoff point between stages is a normalised, PASS-filtered, single-sample GRCh38 VCF. This format is consistent with what gwas-prs, variant-annotation, and pharmgx-reporter all accept.

Example Output

markdown
# ClawBio WGS-PRS Bridge Report

**Sample:** HG001
**Generated:** 2026-05-01T12:00:00+00:00
**Output directory:** `results/`

## Pipeline Stages

| Stage  | Status     | Duration |
|--------|------------|----------|
| sarek  | success    | 142.3s   |
| vcf_qc | success    | 8.1s     |
| gwas   | success    | 23.5s    |
| report | success    | 0.4s     |

## VCF QC Metrics

**QC Status:** PASS

| Metric            | Value   |
|-------------------|---------|
| Total variants    | 4,821   |
| SNPs              | 4,103   |
| Indels            | 718     |
| Ti/Tv ratio       | 2.12    |
| Het/Hom ratio     | 1.74    |
| Filtered variants | 203     |

## Polygenic Risk Scores

| Trait              | Score  | Percentile | Risk Category |
|--------------------|--------|------------|---------------|
| Type 2 diabetes    | 0.82   | 73rd       | Above average |
| Coronary artery    | 0.61   | 54th       | Average       |

*ClawBio is a research and educational tool. It is not a medical device.*

Output Structure

output_directory/
├── bridge_report.md
├── bridge_report.json
├── vcf_qc/
│   ├── qc_metrics.json
│   └── canonical_pass.vcf.gz
├── prs_output/                 # present when gwas-prs completes
└── reproducibility/
    ├── commands.sh             # portable replay; private paths and sample ID are env vars
    ├── environment.yml
    ├── provenance.json         # input hashes and safe parameters
    └── checksums.sha256

Verify with cd <output_directory> && sha256sum -c reproducibility/checksums.sha256.

Reproducibility Bundle

The shared clawbio.common.reproducibility layer writes the bundle after the bridge reports. provenance.json stores SHA-256 digests of the FASTQ or VCF inputs that existed at run time, and omits their paths and contents. A free-text --trait query and sample_id are stored only as unsalted SHA-256 fingerprints. commands.sh requires SAMPLE_ID and, for non-demo runs, INPUT_VCF or FASTQ_R1 (and FASTQ_R2 when the run was paired), so private sequencing paths and sample identifiers are not embedded. --demo replays as --demo and regenerates the synthetic VCF.

Chaining with other ClawBio Skills

After WGS-PRS completes, the canonical VCF can be passed to:

  • variant-annotation: Ensembl VEP, ClinVar, gnomAD
  • pharmgx-reporter: pharmacogenomics from the same VCF
  • claw-ancestry-pca: ancestry estimation to validate PRS reference population
  • clinical-variant-reporter: ACMG/AMP pathogenicity classification

Dependencies

ToolRequiredPurpose
nextflowYesExecutes nf-core/sarek
docker or singularityYesContainer runtime for sarek
bcftools >= 1.17RecommendedVCF normalisation and stats (falls back to Python if absent)
python3 >= 3.9YesRuntime

Gotchas

  • Missing-call rate uses the raw input VCF, before filtering. It counts sample calls across all input records; for a multi-sample VCF it is a cohort-wide rate, not a per-sample metric.
  • Do not skip VCF QC even when the user provides their own VCF. Users often pass unfiltered or unnormalised VCFs from external pipelines. Always run Stage 2 unless the user explicitly opts out with --skip-qc. Skipping QC silently produces unreliable PRS scores.
  • Do not route to this skill when the user already has a VCF and wants PRS only. The model will be tempted to use wgs-prs because it mentions PRS. If there is no FASTQ and the user has not asked for variant calling, route directly to gwas-prs to avoid unnecessary sarek overhead.
  • Do not invent QC thresholds. Ti/Tv and Het/Hom cut-offs are fixed at 1.8 to 2.5 and 1.0 to 3.0 respectively. Do not adjust these based on the user's wishes or apparent sample quality. If thresholds are debated, surface the metrics and let the user decide whether to continue with --no-fail-fast.
  • GRCh37 VCFs will silently produce wrong PRS scores. The PGS Catalog scores are aligned to GRCh38. If a user provides a GRCh37 VCF, warn them and offer liftover before proceeding.
  • Sarek can take hours on a full genome. Set expectations with the user before launching Stage 1. For testing, recommend --dry-run first.

Safety

  • Local-first: all data is processed locally. No reads or variants leave the user's machine.
  • Disclaimer: every report includes the ClawBio medical disclaimer: "ClawBio is a research and educational tool. It is not a medical device and does not provide clinical diagnoses. Consult a healthcare professional before making any medical decisions."
  • No hallucinated parameters: all QC thresholds and PGS Catalog identifiers trace to documented sources.
  • Audit trail: stage durations, commands, and output paths are logged to bridge_report.json. Input hashes and a portable replay command go in reproducibility/.

Agent Boundary

The agent (LLM) dispatches, explains results, and surfaces next steps. The skill (Python) executes all variant calling, QC, and scoring. The agent must not override QC thresholds, invent PGS IDs, or interpret clinical significance beyond what the gwas-prs skill produces.

Integration with Bio Orchestrator

This skill is invoked when:

  • The user mentions WGS, whole-genome sequencing, FASTQ files, or raw sequencing data
  • The user asks to run the full pipeline "from scratch" or "from reads"
  • Keywords: WGS, FASTQ, sarek, variant calling, germline variants, raw reads to PRS

It chains downstream to gwas-prs automatically. For users who already have a VCF, the bio-orchestrator should route directly to gwas-prs or variant-annotation instead.

Matgeliwwert Fichieren

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Wgs Prs?

End-to-end WGS to polygenic risk score pipeline. Takes paired-end FASTQ files (or a pre-existing VCF) through nf-core/sarek for variant calling, applies VCF QC (normalisation, hard filtering, Ti/Tv and Het/Hom checks), then computes polygenic risk scores via the PGS Catalog. Fills the FASTQ to VCF gap upstream of the gwas-prs skill.

Firwat Wgs Prs op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Wgs Prs besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Wgs Prs an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/ClawBio/ClawBio/tree/main/skills/wgs-prs an. TypingMind liest d'Datei SKILL.md, bündelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Wgs Prs benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Wgs Prs benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Wgs Prs domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Wgs Prs gratis?

Jo. De Skill gëtt vum ClawBio ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇