/tooluniverse:tooluniverse-polygenic-risk-scorefrom tooluniverse
Builds and interprets polygenic risk scores (PRS) for complex diseases using GWAS summary statistics. Covers clumping/thresholding, PRS-CS, validation, ancestry-aware adjustment, and clinical interpretation.
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.
Build and interpret polygenic risk scores for complex diseases using genome-wide association study (GWAS) data.
A polygenic risk score predicts genetic risk, not disease. A high PRS means elevated risk relative to the population — it does not mean the person will develop the condition, and a low PRS does not confer immunity. PRS performance varies dramatically across ancestries: a European-derived PRS applied to a West African population can lose 50–70% of its predictive power because the underlying GWAS was trained on European allele frequencies and LD patterns. Effect sizes from discovery GWAS are subject to winner's curse (overestimation in single studies); always prefer weights from large meta-analyses or validated PGS Catalog models. PRS should always be interpreted in the context of non-genetic risk factors — for most complex diseases, environmental factors contribute as much or more than genetics.
LOOK UP DON'T GUESS: Do not assume effect sizes, allele frequencies, or which SNPs are genome-wide significant for a trait — always query GWAS Catalog (gwas_get_associations_for_trait) for actual data. Do not assume a validated PRS model exists for a trait; check PGS Catalog via PubMed search.
Use Cases:
What This Skill Does:
What This Skill Does NOT Do:
A polygenic risk score is calculated as a weighted sum across genetic variants:
PRS = Σ (dosage_i × effect_size_i)
Where:
Raw PRS is standardized to z-scores for interpretation:
z-score = (PRS - population_mean) / population_std
This allows comparison to population distribution and percentile calculation.
This skill uses ToolUniverse GWAS tools to query:
GWAS Catalog (EMBL-EBI)
gwas_search_associations (param: disease_trait, size; also gwas_get_associations_for_trait), gwas_get_snps_for_gene (param: gene_symbol), dbsnp_get_variant_by_rsiddisease_trait search returns associations where the trait is one of potentially several linked EFO traits. For precise filtering, use EFO IDs via efo_trait param.Open Targets Genetics
OpenTargets_search_gwas_studies_by_disease, EnsemblVEP_annotate_hgvs (for variant consequence/frequency)Variant Annotation
gnomad_search_variants + gnomad_get_variant — population allele frequencies (ancestry-specific via VEP colocated_variants)MyVariant_query_variants — CADD, SIFT, PolyPhen, ClinVar, gnomAD in one callgnomad_get_gene_constraints — gene constraint metrics (pLI, oe_lof) for target prioritizationPGS Catalog (pgscatalog.org, EMBL-EBI) — check this FIRST, before building anything from raw GWAS associations
PGSCatalog_search_traits(query=...) — resolve a free-text trait name to its real EFO/MONDO trait_id (e.g. "type 2 diabetes" -> MONDO_0005148) and see how many published scores exist. Always use the trait_id the tool returns — don't guess or reuse a remembered EFO/MONDO id, since the search can resolve to a different (but correct) ontology term than expected.PGSCatalog_get_scores_by_trait(trait_id=...) — list every published PGS for that trait: PGS id, variant count, development method (LDpred, P+T, genome-wide-significant-variants, etc.), genome build, and source publication. A trait can have 50+ scores of wildly different size and quality (e.g. type 2 diabetes: from a 62-variant 2014-era score to a 6.9-million-variant LDpred model) — don't assume the first result is the best one.PGSCatalog_get_score(pgs_id=...) — full metadata for one score, including its ancestry_distribution for both the development (GWAS) and evaluation cohorts. Read this before trusting a score: a score developed on 100% European samples (ancestry_distribution.dev.dist: {"EUR": 100}) is exactly the transferability risk this skill warns about above, even if it was later evaluated in more diverse cohorts.PGSCatalog_get_performance_metrics(pgs_id=...) — the actual published validation numbers per evaluation cohort: AUROC/C-index, hazard/odds ratios (including "top 10% vs. rest" comparisons), R², each tied to the specific ancestry and sample size it was measured in. This is how you judge whether a score is trustworthy for a given population — a high AUROC measured only in a European cohort tells you nothing about performance in other ancestries; look for an evaluation row matching your population of interest, or note its absence.Polygenic risk scores aggregate the effects of many genetic variants to estimate an individual's genetic predisposition to a trait or disease. Unlike Mendelian diseases caused by single mutations, complex diseases involve hundreds to thousands of variants, each with small effects.
Key Properties:
GWAS compare allele frequencies between cases and controls (or correlate with trait values) across millions of SNPs to identify disease-associated variants.
Study Design:
Nearby variants are often inherited together (LD). To avoid double-counting:
GWAS and PRS are most accurate when ancestries match:
PRS can stratify individuals for:
Example: Khera et al. (2018) showed PRS identifies 3× more individuals at >3-fold coronary artery disease risk than monogenic mutations.
run_ldsc_genetic_correlation (LD Score regression), which needs only summary stats (no individual genotypes) and corrects for sample overlap. Far more principled than correlating PRS values.Before or alongside building a PRS, quantify how much of the trait is captured by common SNPs and how traits relate — directly from GWAS summary statistics:
run_ldsc_heritability — SNP-based heritability (h²_SNP) from one GWAS's summary stats; the intercept also flags confounding/inflation vs. true polygenicity. This sets the ceiling a PRS can reach (the "heritability gap" below is exactly h²_SNP minus PRS R²).run_ldsc_genetic_correlation — genetic correlation (rg) between two GWAS, for shared-aetiology and cross-trait PRS questions.Both are remote tools (LD Score regression engine + reference LD-score panels). Use them to ground heritability/rg claims in data rather than citing literature point estimates.
Consumer genetic testing (23andMe, Ancestry DNA) provides raw genotypes. Users can:
Caution: Personal PRS should not replace medical advice. Results may cause anxiety if not properly contextualized.
Before extracting associations and building a PRS from scratch (steps 1-5 below), check whether a validated score already exists:
PGSCatalog_search_traits(query="<trait>") # resolve to a real trait_id
PGSCatalog_get_scores_by_trait(trait_id="<from above>") # list candidate scores
PGSCatalog_get_score(pgs_id="<candidate>") # check dev-cohort ancestry
PGSCatalog_get_performance_metrics(pgs_id="<candidate>") # check validated AUROC/OR/R2 by ancestry
If a well-validated score exists for the target population's ancestry, use its published weights (scoring_file URL) directly rather than re-deriving a cruder PRS from raw GWAS Catalog associations — this is exactly the "winner's curse" and LD-clumping problem the raw-GWAS path (steps 1-5) has to work around manually. Only fall back to building from raw associations when PGS Catalog has no score for the trait, or when every existing score was developed and evaluated in an ancestry that doesn't match the population you're scoring.
Identify the disease or trait of interest:
Query GWAS databases for genome-wide significant associations:
prs = build_polygenic_risk_score(
trait="coronary artery disease",
p_threshold=5e-8, # Genome-wide significance
max_snps=1000
)
Considerations:
Extract beta coefficients or odds ratios:
Quality control filters:
Calculate weighted sum of genotype dosages:
result = calculate_personal_prs(
prs_weights=prs,
genotypes=my_genotypes,
population_mean=0.0,
population_std=1.0
)
Genotype Sources:
Convert to percentiles and risk categories:
result = interpret_prs_percentile(result)
print(f"Percentile: {result.percentile:.1f}%")
print(f"Risk: {result.risk_category}")
Risk Categories:
Clinical Interpretation:
This skill is for educational and research purposes only.
For clinical genetic testing, consult:
PRS is a rapidly evolving field. Guidelines and best practices will continue to change as research progresses.
Regulatory Status:
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub mims-harvard/tooluniverse --plugin tooluniverse163 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./tooluniverse-acmg-variant-classificationSystematic ACMG/AMP germline variant classification with all 28 criteria (PVS1, PS1-4, PM1-6, PP1-5, BA1, BS1-4, BP1-7) for clinical significance. Produces 5-tier verdict (Pathogenic / Likely Pathogenic / VUS / Likely Benign / Benign) with cited evidence per criterion. Use for variant interpretation, VUS resolution, and pathogenicity assessment. Combines ClinVar, gnomAD, computational predictors, and gene-mechanism context./tooluniverse-admet-predictionComprehensive ADMET (Absorption, Distribution, Metabolism, Excretion, Toxicity) profiling for drug candidates. Integrates ADMET-AI predictions, SwissADME drug-likeness, PubChemTox experimental toxicity, ChEMBL clinical data, Lipinski rule-of-five, and CYP interaction data. Use for drug-likeness assessment, BBB penetration, bioavailability, hepatotoxicity prediction, ADME/PK profiling, or screening compound libraries before lab testing./tooluniverse-adverse-event-detectionDetect and analyze adverse drug event signals using FDA FAERS reports, drug labels, and disproportionality statistics (PRR, ROR, IC). Generates quantitative safety signal scores (0-100) with evidence grading. Use for post-market surveillance, pharmacovigilance, drug safety assessment, regulatory submissions, and detecting rare AE signals not visible in clinical trials./tooluniverse-adverse-outcome-pathwayMap environmental and industrial chemicals to adverse outcome pathways (AOPs) — molecular initiating event to organ-level toxicity. Uses AOPWiki, GHS classification, IARC carcinogen status, and LD50 data. Use for environmental/industrial chemical risk assessment, regulatory-grade hazard characterization, and AOP stressor mapping. Distinct from drug-safety analysis (use tooluniverse-pharmacovigilance for drugs).Other plugins' skills for the same job