PRS percentile
percentileEstimates the population percentile for a PRS value using reference panels or fallback methods, returning percentile, reliability, z-score, and reference mean/std for further risk calculation.
Instructions
Estimate the population percentile (0-100) for a computed PRS value.
Uses the 3-tier fallback: precomputed reference-panel distributions
(best), then a theoretical distribution, then an AUROC approximation.
superpopulation is a 1000G code (AFR/AMR/EAS/EUR/SAS) and should
match that genome's ancestry — when comparing people, call this
once per score×genome (or rely on compute_prs_by_trait(interpret=True)).
Pass weight_mass_coverage (C_wt) from compute_prs so a deflated
low-coverage percentile is flagged reliable=False with a caveat
instead of presented as authoritative. Also returns the true z-score and
reference mean/std used, so absolute risk can be computed without
inverting the percentile.
Important next step: for disease traits, feed the returned
z_score directly into absolute_risk to get the concrete
lifetime probability and risk ratio vs the population average. This is
more informative than the percentile alone.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| panel | No | ||
| pgs_id | Yes | ||
| prs_score | Yes | ||
| superpopulation | No | EUR | |
| weight_mass_coverage | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| caveat | No | Human-readable warning explaining why the percentile is caveated. | |
| method | Yes | 'reference_panel', 'theoretical', 'auroc_approx', or 'unavailable'. | |
| pgs_id | Yes | PGS Catalog Score ID. | |
| z_score | No | True z-score ((score − reference_mean)/reference_std) used for this percentile — feed directly to absolute_risk instead of inverting the percentile. | |
| ancestry | Yes | Requested 1000G superpopulation (AFR/AMR/EAS/EUR/SAS). | |
| reliable | No | False when the percentile should be treated as caveated or unreliable. | |
| prs_score | Yes | The PRS value that was scored. | |
| percentile | No | Estimated percentile (0-100), or null if unavailable. | |
| reference_std | No | Reference-distribution SD used, when known. | |
| reference_mean | No | Reference-distribution mean used, when known. | |
| reference_panel | No | Reference panel identifier used (reference_panel method only). | |
| reference_panel_ancestry | No | Superpopulation of the reference panel actually used (reference_panel method only) — check it matches the sample's ancestry before trusting the percentile. |