Command Palette

Search for a command to run...

Back to skills
skill № 16768

tooluniverse-polygenic-risk-score

Build and interpret polygenic risk scores (PRS) for complex diseases using GWAS summary statistics. Covers PRS construction (clumping/thresholding, PRS-CS)…

FreeRuns bundled scripts
mims-harvardby mims-harvard★ 1,813 GitHub stars

Install tooluniverse-polygenic-risk-score in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

About this skill

Polygenic Risk Score (PRS) Builder

Build and interpret polygenic risk scores for complex diseases using genome-wide association study (GWAS) data.

Reasoning Strategy

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.

Overview

Use Cases:

  • "Calculate my genetic risk for type 2 diabetes"
  • "Build a polygenic risk score for coronary artery disease"
  • "What's my genetic predisposition to Alzheimer's disease?"
  • "Interpret my PRS percentile for breast cancer risk"

What This Skill Does:

  • Extracts genome-wide significant variants (p < 5e-8) from GWAS Catalog
  • Builds weighted PRS models using effect sizes (beta coefficients)
  • Calculates individual risk scores from genotype data
  • Interprets PRS as population percentiles and risk categories

What This Skill Does NOT Do:

  • Diagnose disease (PRS is probabilistic, not deterministic)
  • Replace clinical assessment or genetic counseling
  • Account for non-genetic factors (lifestyle, environment)
  • Provide treatment recommendations

Methodology

PRS Calculation Formula

A polygenic risk score is calculated as a weighted sum across genetic variants:

PRS = Σ (dosage_i × effect_size_i)

Where:

  • dosage_i: Number of effect alleles at SNP i (0, 1, or 2)
  • effect_size_i: Beta coefficient or log(odds ratio) from GWAS

Standardization

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.

Significance Thresholds

  • Genome-wide significance: p < 5×10⁻⁸ (default threshold)
  • This corrects for ~1 million independent tests across the genome
  • Relaxed thresholds (e.g., p < 1×10⁻⁵) can include more SNPs but may add noise

Effect Size Handling

  • Continuous traits (e.g., height, BMI): Beta coefficient (units of trait per allele)
  • Binary traits (e.g., disease): Odds ratio converted to log-odds (beta = ln(OR))
  • Missing effect sizes or non-significant SNPs are excluded

Data Sources

This skill uses ToolUniverse GWAS tools to query:

  1. GWAS Catalog (EMBL-EBI)

    • Curated GWAS associations, 5000+ studies
    • Tools: 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_rsid
    • Note: disease_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.
  2. Open Targets Genetics

    • Integrated genetics platform with fine-mapped credible sets
    • Tools: OpenTargets_search_gwas_studies_by_disease, EnsemblVEP_annotate_hgvs (for variant consequence/frequency)
  3. 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 call
    • gnomad_get_gene_constraints — gene constraint metrics (pLI, oe_lof) for target prioritization
  4. PGS Catalog (pgscatalog.org, EMBL-EBI) — check this FIRST, before building anything from raw GWAS associations

    • This skill's own Best Practices already say "use validated PRS from PGS Catalog when available" — these are the tools that do it. No API key needed.
    • 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-va
Full SKILL.md on GitHub

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

Bundled files

  • .env.template
  • check_data.py
  • python_implementation.py

FAQ

What does the tooluniverse-polygenic-risk-score skill do?

Build and interpret polygenic risk scores (PRS) for complex diseases using GWAS summary statistics. Covers PRS construction (clumping/thresholding, PRS-CS), validation in independent cohorts, ancestry-aware adjustment, and clinical interpretation (population-relative risk, not absolute prediction). Use for PRS-based risk stratification.

How do I install the tooluniverse-polygenic-risk-score skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the tooluniverse-polygenic-risk-score skill run scripts?

Yes, this skill bundles executable scripts. Review the source before installing.

Related skills

Compare tooluniverse-polygenic-risk-score with