/tooluniverse:tooluniverse-gwas-finemappingfrom tooluniverse
Performs statistical fine-mapping of GWAS loci using credible sets (SuSiE, FINEMAP) and locus-to-gene scoring (Open Targets L2G) to identify likely causal variants and target genes.
Ships in tooluniverse. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
When analysis requires computation (statistics, data processing, scoring, enrichment), write and run Python code via Bash. Don't describe what you would do — execute it and report actual results. Use ToolUniverse tools to retrieve data, then Python (pandas, scipy, statsmodels, matplotlib) to analyze it.
Identify and prioritize causal variants at GWAS loci using statistical fine-mapping and locus-to-gene predictions.
Genome-wide association studies (GWAS) identify genomic regions associated with traits, but linkage disequilibrium (LD) makes it difficult to pinpoint the causal variant. Fine-mapping uses Bayesian statistical methods to compute the posterior probability that each variant is causal, given the GWAS summary statistics.
REASONING STRATEGY — Start Here: Fine-mapping asks: which variant at this locus is CAUSAL? Work through this chain:
This skill provides tools to:
A credible set is a minimal set of variants that contains the causal variant with high confidence (typically 95% or 99%). Each variant in the set has a posterior probability of being causal, computed using methods like:
The probability that a specific variant is causal, given the GWAS data and LD structure. Higher posterior probability = more likely to be causal.
L2G scores integrate multiple data types to predict which gene is affected by a variant:
L2G scores range from 0 to 1, with higher scores indicating stronger gene-variant links.
LOOK UP DON'T GUESS -- never assume a lead SNP is the causal variant. Always check LD structure, credible sets, and functional annotations via the tools below.
The lead SNP (most significant p-value) is often NOT the causal variant. It is simply the best-tagged variant on the genotyping array. The causal variant may be:
Action: Always call OpenTargets_get_variant_credible_sets for the lead SNP. If the posterior probability is < 0.5, the lead SNP is likely NOT causal -- examine other variants in the credible set.
LD blocks define the resolution limit of fine-mapping:
When interpreting a credible set:
Colocalization asks: do two association signals (e.g., GWAS + eQTL) share the SAME causal variant?
When multiple variants have similar posterior probabilities:
OpenTargets_get_variant_credible_sets or gwas_search_snps with gene=TCF7L2OpenTargets_get_variant_info then OpenTargets_get_variant_credible_setsOpenTargets_get_study_credible_setsOpenTargets_search_gwas_studies_by_disease or gwas_search_studiesOpenTargets_get_variant_info: Variant details and allele frequenciesOpenTargets_get_variant_credible_sets: Credible sets containing a variantOpenTargets_get_credible_set_detail: Detailed credible set informationOpenTargets_get_study_credible_sets: All loci from a GWAS studyOpenTargets_search_gwas_studies_by_disease: Find studies by diseasegwas_search_snps: Find SNPs by gene or rsIDgwas_get_snp_by_id: Detailed SNP informationgwas_get_associations_for_snp: All trait associations for a variantgwas_search_studies: Find studies by disease/traitThis skill's "Limitations" section above already notes that Open Targets hasn't fine-mapped every published GWAS locus. When a locus has no precomputed OpenTargets_get_variant_credible_sets/OpenTargets_get_study_credible_sets result, three local calculator tools let you run the actual statistics yourself from raw per-SNP summary statistics (beta, standard error, SNP IDs) that you already have or pull from elsewhere:
Finemap_credible_set(beta=[...], se=[...], snp=[...], coverage=0.95, sd_prior=...) — single-causal-variant fine-mapping via Wakefield's approximate Bayes factor. Returns each SNP's posterior inclusion probability (PIP), the top_snp/top_pip, and the credible set at the requested coverage. Verified live: {"n_snps": 6, "top_snp": "rs3", "top_pip": 1.0, "credible_set": [...]}.Coloc_abf_test(beta1=[...], se1=[...], beta2=[...], se2=[...], snp=[...], p1=..., p2=..., p12=...) — Bayesian colocalization (coloc.abf, Giambartolomei 2014) testing whether two signals over the same SNP set (e.g. a GWAS hit and an eQTL) share one causal variant. Returns the five posterior probabilities PP0-PP4 (PP4 = shared causal variant — the number to check first). Verified live: real posteriors returned for a 6-SNP toy region.SPrediXcan_associate(weight=[...], gwas_z=[...], snp_sd=[...], covariance=..., snp=[...]) — summary-based transcriptome-wide association (S-PrediXcan, Barbeira 2018): combines eQTL prediction weights for a gene with GWAS per-SNP z-scores to test whether the gene's predicted expression (not just nearby variants) associates with the trait. Returns a TWAS z-score/p-value and direction. Verified live: {"twas_zscore": 4.73, "p_value": 2.2e-06, ...}.Where to get the raw inputs: these three tools compute on arrays you supply — they do not fetch summary statistics themselves. src/tooluniverse/data/gwas_sumstats_tools.json's 3 tools (GWASSumStats_list_studies, GWASSumStats_get_trait_studies, GWASSumStats_get_region_associations) were meant to supply exactly this, but as of this writing all three are dead: EBI deprecated its GWAS Summary Statistics REST API entirely — every call returns a clean 410 Gone ("This API has been deprecated. For ways to access summary statistics see: https://www.ebi.ac.uk/gwas/docs/methods/summary-statistics"), confirmed both via tu test and an independent direct curl to the same endpoint. Do not route a workflow through GWASSumStats_* expecting it to work; get region-level summary statistics via the GWAS Catalog's current bulk-download/FTP method (linked from that docs page) or another source, then feed the resulting beta/SE/SNP arrays into the three calculator tools above.
Q: Why don't all variants have credible sets? A: Fine-mapping requires:
Q: Can a variant be in multiple credible sets? A: Yes! A variant can be causal for multiple traits (pleiotropy) or appear in different studies for the same trait.
Q: What if the top L2G gene is far from the variant? A: This suggests regulatory effects (enhancers, promoters). Check:
Q: How do I choose between variants in a credible set? A: Prioritize by:
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
163 skills in this plugin
/setup-tooluniverseInstall and configure ToolUniverse for any use case — MCP server (chat-based), CLI (command line with 14 subcommands), or Python SDK (Coding API with 3 calling patterns). Covers uv/uvx setup, MCP configuration for 12+ AI clients (Cursor, Claude Desktop, Windsurf, VS Code, Codex, Gemini CLI, Trae, Cline, etc.), full CLI reference (tu list/grep/info/find/run/test/status/build/remote/doctor/serve/connect/connections/disconnect), Coding API quickstart, agentic tools, code executor, API key walkthrough, skill installation, and upgrading. Use when user asks how to set up ToolUniverse, which access mode to use (MCP vs CLI vs SDK), configuring MCP servers, using the CLI, troubleshooting installation, upgrading, or mentions installing ToolUniverse or setting up scientific tools. Also triggers for "how do I use ToolUniverse", "what's the best way to access tools", "command line", "tu command", "coding API", "tu build"./tooluniverseToolUniverse plugin router. STEP 1 BEFORE ANY ANALYSIS: if the data folder contains `*_executed.ipynb`, run `tu run read_executed_notebook '{"data_folder":"<path>","search":"<keyword>"}'` to extract its cell outputs and apply EVERY filter/sample-exclusion the notebook used — even when the question says 'Using DESeq2/Run X/Compute Y' (this describes the METHOD the notebook used, not a request to rerun). The notebook's cell outputs are the only published authoritative answers; reimplementing or reading stale pre-computed CSVs in the data folder produces different numbers because of outlier-sample removal, library version, and filter steps you don't see by skimming. STEP 2 routing — pick a sub-skill name from this exact list (never invent): tooluniverse-rnaseq-deseq2 (RNA/miRNA-seq DE, correlation, PCA, clustering, dispersion), tooluniverse-gene-enrichment (GO/KEGG/Reactome/GSEA/pathway enrichment), tooluniverse-statistical-modeling (regression, ANOVA, ordinal/logistic, chi-square, correlation, power), tooluniverse-image-analysis (microscopy, colony, fluorescence, dose-response, .tif — including ANOVA / Dunnett / power-analysis on image-derived measurements), tooluniverse-epigenomics (DNA methylation, CpG, m6A, MeRIP-seq, bisulfite, ChIP-seq, chromatin), tooluniverse-sequence-analysis (FASTQ, Trimmomatic, BWA, samtools, coverage), tooluniverse-variant-analysis (VCF, VAF, SNP, mutation), tooluniverse-phylogenetics (treeness, PhyKIT, parsimony), tooluniverse-single-cell (scRNA, h5ad, scanpy), tooluniverse-crispr-screen-analysis (MAGeCK, sgRNA), tooluniverse-proteomics-analysis (mass spec, TMT). Use for CSV/Excel/VCF/FASTA/h5ad and any biology/chemistry/medicine analysis question.npx claudepluginhub mims-harvard/tooluniverse --plugin tooluniverseOther plugins' skills for the same job