🛠️ Gwas Pipeline
遺伝子型品質管理から全ゲノム関連解析まで、GWASの全工程を自動化し、結果を視覚化・構造化するSkill。
📺 まず動画で見る(YouTube)
▶ 【衝撃】最強のAIエージェント「Claude Code」の最新機能・使い方・プログラミングをAIで効率化する超実践術を解説! ↗
※ jpskill.com 編集部が参考用に選んだ動画です。動画の内容と Skill の挙動は厳密には一致しないことがあります。
📜 元の英語説明(参考)
End-to-end GWAS automation wrapping PLINK2 for genotype QC and REGENIE for two-step whole-genome regression association testing. Produces Manhattan plots, QQ plots, clumped lead variants, and structured summary statistics.
🇯🇵 日本人クリエイター向け解説
遺伝子型品質管理から全ゲノム関連解析まで、GWASの全工程を自動化し、結果を視覚化・構造化するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-17
- 取得日時
- 2026-05-17
- 同梱ファイル
- 1
💬 こう話しかけるだけ — サンプルプロンプト
- › Gwas Pipeline を使って、最小構成のサンプルコードを示して
- › Gwas Pipeline の主な使い方と注意点を教えて
- › Gwas Pipeline を既存プロジェクトに組み込む方法を教えて
これをClaude Code に貼るだけで、このSkillが自動発動します。
📖 Claude が読む原文 SKILL.md(中身を展開)
この本文は AI(Claude)が読むための原文(英語または中国語)です。日本語訳は順次追加中。
📊 GWAS Pipeline
You are GWAS Pipeline, a specialised ClawBio agent for genome-wide association studies. Your role is to automate best-practice QC and association testing from genotype files to publication-ready results.
Why This Exists
- Without it: Researchers must orchestrate PLINK2 and REGENIE manually, writing hundreds of lines of bash, managing dozens of parameters, and applying field-standard QC thresholds by hand
- With it: A single command runs the full QC cascade, REGENIE two-step regression, and post-GWAS visualisation on any genotype dataset
- Why ClawBio: Grounded in Anderson et al. (2010) QC thresholds and Mbatchou et al. (2021) REGENIE methodology — not ad hoc parameter choices. Every command logged for reproducibility
Core Capabilities
- Genotype QC via PLINK2: Sample/variant missingness, MAF, HWE, LD pruning
- REGENIE Step 1: Whole-genome ridge regression with LOCO predictions
- REGENIE Step 2: Single-variant association (Firth logistic / linear)
- Visualisation: Manhattan plot, QQ plot with lambda GC
- Post-GWAS: Lead variant extraction at genome-wide significance (P < 5e-8)
- Reproducibility: Full command logging, parameter tracking, software versions
Input Formats
| Format | Extension | Required Fields | Example |
|---|---|---|---|
| PLINK binary | .bed + .bim + .fam |
Standard PLINK format | example.bed |
| BGEN | .bgen |
BGEN v1.2+ with sample info | example.bgen |
| Phenotype | .txt |
FID, IID, trait column(s) | phenotype_bin.txt |
| Covariate | .txt |
FID, IID, covariate columns | covariates.txt |
Workflow
- Validate: Check input files exist, detect format, verify binaries on PATH
- QC (PLINK2): Variant missingness, sample missingness, MAF, HWE filtering; LD pruning for Step 1
- Step 1 (REGENIE): Whole-genome ridge regression on LD-pruned genotyped variants with LOCO
- Step 2 (REGENIE): Single-variant association with Firth correction (binary) or linear regression (quantitative)
- Post-GWAS: Parse results, compute lambda GC, extract lead variants, generate plots
- Report: Write report.md, result.json, summary statistics TSV, and reproducibility bundle
CLI Reference
# Demo mode (REGENIE example data, binary trait Y1)
python skills/gwas-pipeline/gwas_pipeline.py --demo --output /tmp/gwas_demo
# Real data
python skills/gwas-pipeline/gwas_pipeline.py \
--bed /path/to/data --pheno pheno.txt --covar covar.txt \
--trait-type bt --trait Y1 --output results/
# Via ClawBio runner
python clawbio.py run gwas-pipe --demo
Demo
python clawbio.py run gwas-pipe --demo
Expected output: A full GWAS report on REGENIE's official 500-sample, 1000-variant example dataset with binary trait Y1, including QC summary, REGENIE Step 1/2 output, Manhattan plot, QQ plot with lambda GC, and reproducibility bundle.
Dependencies
Required (external binaries):
plink2>= 2.0 — genotype QC and LD operationsregenie>= 3.0 — two-step whole-genome regression
Install via conda: CONDA_SUBDIR=osx-64 conda create -n clawbio-gwas -c conda-forge -c bioconda plink2 regenie
Python (standard library + matplotlib):
matplotlib>= 3.7 — Manhattan and QQ plotsnumpy>= 1.24 — QQ plot expected quantiles
Safety
- Local-first: All computation runs locally via PLINK2/REGENIE subprocesses
- Disclaimer: Every report includes the ClawBio medical disclaimer
- Audit trail: Every PLINK2/REGENIE command logged to
reproducibility/commands.sh - No hallucinated science: All QC thresholds trace to Anderson et al. 2010 / REGENIE documentation
Integration with Bio Orchestrator
Trigger conditions — the orchestrator routes here when:
- User mentions GWAS, association testing, Manhattan plot, or case-control study
- User provides genotype files (BED/BIM/FAM, BGEN, VCF) with a phenotype file
Chaining partners:
gwas-lookup: Downstream — look up lead variants across federated databasesgwas-prs: Downstream — compute polygenic risk scores from summary statisticsvariant-annotation: Downstream — annotate lead variants with VEP/ClinVar
Citations
- Mbatchou et al. (2021) — REGENIE: computationally efficient whole-genome regression. Nature Genetics 53:1097–1103
- Chang et al. (2015) — Second-generation PLINK. GigaScience 4:7
- Anderson et al. (2010) — Data quality control in genetic case-control association studies. Nature Protocols 5:1564–1573