Skills

Bio Causal Genomics Fine Mapping

Identify likely causal variants within GWAS loci using SuSiE for sum of single effects...

Install

npx skills add FreedomIntelligence/OpenClaw-Medical-Skills --skill bio-causal-genomics-fine-mapping -g -a claude-code -y
Category
Engineering
Updated
4mo ago
License
See repository
Context cost
Mediumabout 2,190 tokens
Runs scripts
Yes, review before use

What it does

Identify likely causal variants within GWAS loci using SuSiE for sum of single effects regression and FINEMAP for shotgun stochastic search. Computes posterior inclusion probabilities and credible sets to prioritize variants for functional follow-up. Use when narrowing GWAS association signals to candidate causal variants or building credible sets for functional validation.

Version Compatibility

Reference examples tested with: ggplot2 3.5+

Before using code patterns, verify installed versions match. If versions differ:

  • R: packageVersion('<pkg>') then ?function_name to verify parameters
  • CLI: <tool> --version then <tool> --help to confirm flags

If code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.

Fine-Mapping

"Narrow my GWAS locus to the likely causal variant" → Compute posterior inclusion probabilities (PIPs) for each variant and construct credible sets containing the causal variant at a specified confidence level, accounting for LD and multiple causal signals.

  • R: susieR::susie_rss() for SuSiE fine-mapping from summary statistics
  • CLI: finemap --sss for shotgun stochastic search

Overview

Fine-mapping narrows GWAS association signals to identify likely causal variants. Key outputs:

  • PIP (Posterior Inclusion Probability) - Probability each variant is causal (0-1)
  • Credible set - Minimal set of variants containing the causal variant at a given confidence level (e.g., 95%)
  • L - Number of independent causal signals at the locus

SuSiE (Sum of Single Effects)

Goal: Fine-map a GWAS locus to identify likely causal variants and credible sets from individual-level data.

Approach: Fit SuSiE's sum-of-single-effects model on the genotype matrix, then extract 95% credible sets (each containing the causal variant) and per-variant posterior inclusion probabilities.

library(susieR)

# --- From individual-level data ---
# X: genotype matrix (n x p), standardized
# Y: phenotype vector (n x 1)
# L: max number of causal variants (10 is a reasonable default)
fit <- susie(X, Y, L = 10)
Read the whole SKILL.md on GitHub

More in Engineering