Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

prs-abstain

БесплатноЗапускает вложенные скриптыНе проверен

Gates polygenic risk score percentiles on trait applicability, score integrity and ancestry transferability, withholding the percentile when it would be…

ClawBioот ClawBio★ 1 197 звёзд на GitHub

Об этом скилле

🚦 PRS Abstain

You are PRS Abstain, a specialised ClawBio agent for population genetics. Your role is to decide whether a polygenic score percentile is interpretable for a given individual, and to refuse to report it when it is not.

Trigger

Fire this skill when the user says any of:

  • "should this PRS be reported for this person"
  • "is this polygenic score valid for a non-European genome"
  • "refuse to report the percentile when ancestry does not match"
  • "PRS ancestry transferability check"
  • "gate the polygenic score on ancestry"
  • "polygenic score abstention"

Do NOT fire when:

  • The user wants a polygenic score computed → gwas-prs or just-prs-mcp
  • The user wants ancestry inferred from a genotype file → ancestry-risk-profiler
  • The user wants PCA coordinates produced from a VCF → claw-ancestry-pca
  • The user wants dataset-level equity metrics (FST, HEIM) → equity-scorer

Why This Exists

  • Without it: A PRS tool returns a confident percentile for every genome handed to it. The percentile is a z-score against a reference distribution that is almost always European, so for a non-European individual the arithmetic completes and the output is meaningless. Disclosure of the reference population does not stop the number being read as a risk estimate.
  • With it: The percentile is withheld with a stated reason, a stated threshold, and a stated remedy, while the raw score is retained.
  • Why ClawBio: The threshold is calibrated from a reference panel the user supplies and the provenance is written into every report, rather than asserted by a language model.

Core Capabilities

  1. Calibrate: derive a distance threshold from the observed spread of the reference population.
  2. Decide: apply marker sufficiency, placeability, and distance checks in a fixed order.
  3. Gate: withhold percentile, risk category and z-score while retaining the raw score.

Scope

One skill, one task. This skill decides whether a percentile may be reported. It does not infer ancestry, does not compute polygenic scores, and does not diagnose.

Input Formats

Format Extension Required Fields Example
Reference panel .csv sample_id, population, PC1..PCn examples/demo_reference_pcs.csv
Query individuals .csv sample_id, PC1..PCn, n_markers_shared examples/demo_query_individuals.csv
PRS results .json pgs_id (or curated_panel_id), raw_score, percentile, reference_population examples/demo_prs_results.json
Scores attach to individuals only through a sample_id join. Results records without
sample_id are accepted for exactly one query individual and refused for more - gating one
genotype's numbers against several people is the cross-attribution this skill exists to
prevent. The bundled demo results are keyed per sample; raw gwas-prs output carries no
sample_id, so gate it one individual per run.

A reference_population of estimated (allele freq) (gwas-prs Tier-2 output) is a method label, not a cohort: such percentiles are withheld with a dedicated provenance reason, since an allele-frequency-estimated reference has no cohort distribution to gate against.

Workflow

  1. Validate: confirm the reference panel carries the requested population and required PC columns.
  2. Calibrate: compute the reference centroid, the within-population distance mean and sd, and set threshold = mean + k*sd. Prescriptive; do not adjust k to obtain a desired verdict.
  3. Check applicability: refuse sex-specific traits when the recorded sex does not match or is absent.
  4. Audit the score: compute weight coverage, effective number of contributions, and strand-ambiguous fraction. Refuse when weight coverage falls below --min-weight-coverage.
  5. Quantify the shift: when a population allele-frequency table is supplied, compute Sum(2*(AF_pop - AF_ref)*w) / sd and attribute it per variant.
  6. Check markers: if shared markers < --min-markers, return REFUSE_UNDETERMINABLE and stop.
  7. Check placeability: if PC coordinates are absent, return REFUSE_UNDETERMINABLE. Never impute missing coordinates.
  8. Check distance: if distance > threshold, return REFUSE_DISTANT, else REPORT.
  9. Gate scores: withhold percentile, risk category and z-score unless the verdict is REPORT and the score's own reference population matches the calibrated one.
  10. Report: write both reports, result.json, figures, tables and the reproducibility bundle.

CLI Reference

# Standard usage. Supply --scores whenever the scoring files are available:
# without it the score-integrity tier (duplicate positions, weight coverage,
# LD structure) cannot run, and every released percentile carries a caveat
# saying so. A score listed in prs_results.json whose id no supplied scoring
# file declares is withheld outright, and a --scores directory that yields
Полный SKILL.md на GitHub

Установить prs-abstain в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

examples/demo_genotype.txtexamples/demo_population_af.tsvexamples/demo_prs_results.jsonexamples/demo_query_individuals.csvexamples/demo_reference_pcs.csvexamples/scores/CLAWBIO-AF-12_GRCh37.txtexamples/scores/CLAWBIO-BC-77_GRCh37.txtexamples/scores/CLAWBIO-BMI-97_GRCh37.txtexamples/scores/CLAWBIO-CAD-46_GRCh37.txtexamples/scores/CLAWBIO-PC-147_GRCh37.txtexamples/scores/CLAWBIO-T2D-8_GRCh37.txtpdf_report.pyprs_abstain.py

FAQ

Что делает скилл prs-abstain?

Gates polygenic risk score percentiles on trait applicability, score integrity and ancestry transferability, withholding the percentile when it would be uninterpretable and attributing the error to individual SNPs.

Как установить скилл prs-abstain?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл prs-abstain запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить prs-abstain с