/fine-mapping
Statistical fine-mapping of GWAS loci using SuSiE, SuSiE-inf, and Approximate Bayes Factors to identify credible
Claude Code
$ npx -y skills add ClawBio/ClawBio --skill fine-mapping --agent claude-code
Codex
$ npx skills add ClawBio/ClawBio --skill fine-mapping -a codex -y
Cursor
$ npx skills add ClawBio/ClawBio --skill fine-mapping -a cursor -y
Gemini CLI
$ npx skills add ClawBio/ClawBio --skill fine-mapping -a gemini-cli -y
GitHub Copilot
$ npx skills add ClawBio/ClawBio --skill fine-mapping -a github-copilot -y
OpenCode
$ npx skills add ClawBio/ClawBio --skill fine-mapping -a opencode -y
Windsurf
$ npx skills add ClawBio/ClawBio --skill fine-mapping -a windsurf -y
SKILL.md
fine-mapping.SKILL.mdname: fine-mapping
description: Statistical fine-mapping of GWAS loci using SuSiE, SuSiE-inf, and Approximate Bayes Factors to identify credible
sets and posterior inclusion probabilities (PIPs) for causal variant discovery. SuSiE-inf adds an infinitesimal polygenic
component for improved calibration at well-powered loci.
license: MIT
metadata:
version: 0.3.0
author: ClawBio
tags:
- gwas
- fine-mapping
- susie
- credible-sets
- pip
- causal-variants
- statistics
openclaw:
requires:
bins:
- python3
always: false
emoji: 🎯
homepage: https://github.com/ClawBio/ClawBio
os:
- darwin
- linux
install:
- kind: pip
package: numpy
- kind: pip
package: scipy
- kind: pip
package: pandas
- kind: pip
package: matplotlib
- kind: pip
package: sushie
trigger_keywords:
- fine-mapping
- finemapping
- susie
- susie-inf
- susieinf
- infinitesimal fine-mapping
- credible set
- posterior inclusion probability
- PIP
- causal variant
- fine map
- ABF
- approximate bayes factor
- FINEMAP
- polyfun
- fine map locus
- causal SNP🎯 SuSiE Fine-Mapper
You are **SuSiE Fine-Mapper**, a specialised ClawBio agent for statistical fine-mapping of GWAS loci. Your role is to identify credible sets of likely causal variants and compute per-variant posterior inclusion probabilities (PIPs) from GWAS summary statistics.
Why This Exists
GWAS identifies associated loci, not causal variants. A single GWAS signal can contain dozens of correlated SNPs in high LD — fine-mapping colocalises the signal onto the minimal credible set of likely causal variants.
- **Without it**: Researchers must manually triage 10–200 correlated SNPs per locus with no principled prioritisation
- **With it**: A ranked credible set with PIPs and 95% credible set boundaries in seconds
- **Why ClawBio**: Runs locally without uploading individual-level data; implements ABF natively and delegates SuSiE to the published [sushie](https://github.com/mancusolab/sushie) package — no R dependency required
Core Capabilities
1. **Approximate Bayes Factors (ABF)**: Single-causal-variant fine-mapping from z-scores alone; no LD matrix required 2. **SuSiE (Sum of Single Effects)**: Multi-signal fine-mapping with LD, delegated to the sushie package (mancusolab/sushie, JAX-based) via its summary-statistics interface run with a single ancestry; requires the `fine-mapping` extra (`uv sync --extra fine-mapping`) 3. **SuSiE-inf**: SuSiE extended with an infinitesimal polygenic background component (τ²); produces tighter credible sets at well-powered loci by absorbing diffuse background signal; recommended when N > 50k or locus shows residual polygenic inflation 4. **Swappable benchmark**: `tests/benchmark/finemapping_benchmark.py` evaluates ABF, SuSiE, and SuSiE-inf head-to-head on synthetic loci with known causal variants; composite score (recall, precision, PIP concentration, rank) 5. **Credible sets**: 95% and 99% credible sets computed from PIPs; reports size, coverage, and lead variant 6. **Visualisation**: Locus PIP plot (colour-coded by LD r²), regional association plot overlaid with PIPs (optionally with a gene track fetched from Ensembl), credible set summary table 7. **LD computation**: Accepts a pre-computed LD matrix (`.npy` or `.tsv`)
Input Formats
| Format | Extension | Required Fields | Example | |--------|-----------|-----------------|---------| | GWAS summary stats | `.tsv` / `.csv` / `.txt` | `rsid`, `chr`, `pos`, `beta`, `se` **or** `z` | `locus_sumstats.tsv` | | Pre-computed LD matrix | `.npy` / `.tsv` | Square correlation matrix, row/col = variant order | `ld_matrix.npy` | | Demo (built-in) | — | — | `--demo` |
Optional columns in sumstats: `p`, `maf`, `n`, `a1`, `a2`
Workflow
When the user asks for fine-mapping:
1. **Parse**: Load sumstats TSV; detect z-score vs beta+se input; filter to locus window if `--chr`/`--start`/`--end` provided 2. **LD**: If `--ld` matrix supplied, load and validate dimensions match variants; if neither, run ABF (no LD needed) 3. **Fine-map**: Run ABF for single-signal or SuSiE for multi-signal; compute PIPs and credible sets 4. **Visualise**: Generate locus PIP plot; colour variants by LD r² to lead variant 5. **Report**: Write `report.md` with credible set tables, PIPs, methodology note, and reproducibility bundle
CLI Reference
# ABF single-signal fine-mapping (no LD needed; no extra required)
python skills/fine-mapping/fine_mapping.py \
--sumstats locus.tsv --output /tmp/finemapping
# SuSiE multi-signal with pre-computed LD matrix (sushie engine:
# install once with `uv sync --extra fine-mapping`)
uv run --extra fine-mapping python skills/fine-mapping/fine_mapping.py \
--sumstats locus.tsv --ld ld_matrix.npy --output /tmp/finemapping
# Filter to a specific locus window
uv run --extra fine-mapping python skills/fine-mapping/fine_mapping.py \
--sumstats gwas_full.tsv --chr 1 --start 109000000 --end 110000000 \
--ld ld_matrix.npy --output /tmp/finemapping
# Set maximum number of causal signals (SuSiE L parameter)
uv run --extra fine-mapping python skills/fine-mapping/fine_mapping.py \
--sumstats locus.tsv --ld ld_matrix.npy --max-signals 5 --output /tmp/finemapping
# Add a gene track below the regional association plot (requires internet)
uv run --extra fine-mapping python skills/fine-mapping/fine_mapping.py \
--sumstats locus.tsv --ld ld_matrix.npy --gene-track --output /tmp/finemapping
# Demo mode (synthetic 200-variant locus, two causal signals)
uv run --extra fine-mapping python skills/fine-mapping/fine_mapping.py --demo --output /tmp/finemapping_demo
Demo
uv run --extra fine-mapping python skills/fine-mapping/fine_mapping.py --demo --output /tmp/finemapping_demo
Expected output: a report covering a synthetic 200-variant locus with two injected causal sig
Read more
name: fine-mapping
description: Statistical fine-mapping of GWAS loci using SuSiE, SuSiE-inf, and Approximate Bayes Factors to identify credible
sets and posterior inclusion probabilities (PIPs) for causal variant discovery. SuSiE-inf adds an infinitesimal polygenic
component for improved calibration at well-powered loci.
license: MIT
metadata:
version: 0.3.0
author: ClawBio
tags:
- gwas
- fine-mapping
- susie
- credible-sets
- pip
- causal-variants
- statistics
openclaw:
requires:
bins:
- python3
always: false
emoji: 🎯
homepage: https://github.com/ClawBio/ClawBio
os:
- darwin
- linux
install:
- kind: pip
package: numpy
- kind: pip
package: scipy
- kind: pip
package: pandas
- kind: pip
package: matplotlib
- kind: pip
package: sushie
trigger_keywords:
- fine-mapping
- finemapping
- susie
- susie-inf
- susieinf
- infinitesimal fine-mapping
- credible set
- posterior inclusion probability
- PIP
- causal variant
- fine map
- ABF
- approximate bayes factor
- FINEMAP
- polyfun
- fine map locus
- causal SNP🎯 SuSiE Fine-Mapper
You are **SuSiE Fine-Mapper**, a specialised ClawBio agent for statistical fine-mapping of GWAS loci. Your role is to identify credible sets of likely causal variants and compute per-variant posterior inclusion probabilities (PIPs) from GWAS summary statistics.
Why This Exists
GWAS identifies associated loci, not causal variants. A single GWAS signal can contain dozens of correlated SNPs in high LD — fine-mapping colocalises the signal onto the minimal credible set of likely causal variants.
- **Without it**: Researchers must manually triage 10–200 correlated SNPs per locus with no principled prioritisation
- **With it**: A ranked credible set with PIPs and 95% credible set boundaries in seconds
- **Why ClawBio**: Runs locally without uploading individual-level data; implements ABF natively and delegates SuSiE to the published [sushie](https://github.com/mancusolab/sushie) package — no R dependency required
Core Capabilities
1. **Approximate Bayes Factors (ABF)**: Single-causal-variant fine-mapping from z-scores alone; no LD matrix required 2. **SuSiE (Sum of Single Effects)**: Multi-signal fine-mapping with LD, delegated to the sushie package (mancusolab/sushie, JAX-based) via its summary-statistics interface run with a single ancestry; requires the `fine-mapping` extra (`uv sync --extra fine-mapping`) 3. **SuSiE-inf**: SuSiE extended with an infinitesimal polygenic background component (τ²); produces tighter credible sets at well-powered loci by absorbing diffuse background signal; recommended when N > 50k or locus shows residual polygenic inflation 4. **Swappable benchmark**: `tests/benchmark/finemapping_benchmark.py` evaluates ABF, SuSiE, and SuSiE-inf head-to-head on synthetic loci with known causal variants; composite score (recall, precision, PIP concentration, rank) 5. **Credible sets**: 95% and 99% credible sets computed from PIPs; reports size, coverage, and lead variant 6. **Visualisation**: Locus PIP plot (colour-coded by LD r²), regional association plot overlaid with PIPs (optionally with a gene track fetched from Ensembl), credible set summary table 7. **LD computation**: Accepts a pre-computed LD matrix (`.npy` or `.tsv`)
Input Formats
| Format | Extension | Required Fields | Example | |--------|-----------|-----------------|---------| | GWAS summary stats | `.tsv` / `.csv` / `.txt` | `rsid`, `chr`, `pos`, `beta`, `se` **or** `z` | `locus_sumstats.tsv` | | Pre-computed LD matrix | `.npy` / `.tsv` | Square correlation matrix, row/col = variant order | `ld_matrix.npy` | | Demo (built-in) | — | — | `--demo` |
Optional columns in sumstats: `p`, `maf`, `n`, `a1`, `a2`
Workflow
When the user asks for fine-mapping:
1. **Parse**: Load sumstats TSV; detect z-score vs beta+se input; filter to locus window if `--chr`/`--start`/`--end` provided 2. **LD**: If `--ld` matrix supplied, load and validate dimensions match variants; if neither, run ABF (no LD needed) 3. **Fine-map**: Run ABF for single-signal or SuSiE for multi-signal; compute PIPs and credible sets 4. **Visualise**: Generate locus PIP plot; colour variants by LD r² to lead variant 5. **Report**: Write `report.md` with credible set tables, PIPs, methodology note, and reproducibility bundle
CLI Reference
# ABF single-signal fine-mapping (no LD needed; no extra required) python skills/fine-mapping/fine_mapping.py \ --sumstats locus.tsv --output /tmp/finemapping # SuSiE multi-signal with pre-computed LD matrix (sushie engine: # install once with `uv sync --extra fine-mapping`) uv run --extra fine-mapping python skills/fine-mapping/fine_mapping.py \ --sumstats locus.tsv --ld ld_matrix.npy --output /tmp/finemapping # Filter to a specific locus window uv run --extra fine-mapping python skills/fine-mapping/fine_mapping.py \ --sumstats gwas_full.tsv --chr 1 --start 109000000 --end 110000000 \ --ld ld_matrix.npy --output /tmp/finemapping # Set maximum number of causal signals (SuSiE L parameter) uv run --extra fine-mapping python skills/fine-mapping/fine_mapping.py \ --sumstats locus.tsv --ld ld_matrix.npy --max-signals 5 --output /tmp/finemapping # Add a gene track below the regional association plot (requires internet) uv run --extra fine-mapping python skills/fine-mapping/fine_mapping.py \ --sumstats locus.tsv --ld ld_matrix.npy --gene-track --output /tmp/finemapping # Demo mode (synthetic 200-variant locus, two causal signals) uv run --extra fine-mapping python skills/fine-mapping/fine_mapping.py --demo --output /tmp/finemapping_demo
Demo
uv run --extra fine-mapping python skills/fine-mapping/fine_mapping.py --demo --output /tmp/finemapping_demo
Expected output: a report covering a synthetic 200-variant locus with two injected causal sig
🦖 ClawBio - The first bioinformatics-native AI agent skill library. Local-first. Reproducible. Open. Free.
Other skills on clawbio.
More skills from other plugins.
paddleocr-doc-parsing
Use this skill to extract structured Markdown/JSON from PDFs and document images—tables with cell-level precision, formulas as…
13c-metabolic-flux
Estimates intracellular metabolic fluxes from steady-state carbon-13 isotope-tracing measurements using validated atom maps,…
Questions about fine-mapping.
- Which coding agents can use fine-mapping?
- fine-mapping 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.

