Skip to main content

prs-pipeline

Dagster pipeline for computing PRS reference distributions from the 1000 Genomes reference panel.

Overview

This pipeline downloads the PGS Catalog 1000G reference panel (~7 GB), computes polygenic risk scores for all 2,504 reference individuals across all PGS Catalog scores, aggregates per-superpopulation distribution statistics, and pushes reference_distributions.parquet to HuggingFace (just-dna-seq/prs-percentiles).

End users of just-prs automatically pull this tiny parquet via PRSCatalog.reference_distributions().

Running

cd prs-pipeline
uv run dagster dev -m prs_pipeline.definitions

Then open http://localhost:3000 in your browser.

Assets

Scoring & Distribution Pipeline

Asset Group Description
ebi_reference_panel_fingerprint download HTTP fingerprint for freshness tracking of the remote reference panel
ebi_scoring_files_fingerprint download HTTP fingerprint for the remote scoring file manifest
scoring_files download Bulk-download all harmonized PGS scoring .txt.gz files from EBI FTP
scoring_files_parquet compute Convert all .txt.gz scoring files to spec-driven parquet caches (zstd-9, embedded headers). Deletes .txt.gz after verified conversion to save ~5.5 GB disk space. Tracks per-file failures in conversion_failures.parquet
reference_panel download Download + extract reference panel binary files (.pgen/.pvar/.psam)
reference_scores compute Score all PGS IDs against the reference panel via compute_reference_prs_batch()
reference_percentile_audit compute Audit cached or HuggingFace reference percentile parquets, log pass/warn/fail counts, and write/upload quality sidecars without recomputing scores
canary_collapse_audit compute Score caller-supplied --vcf canaries across the catalog (or flag cached results); push catalog flags + audit sidecar without recomputing 1000G scores
hf_prs_percentiles upload Enrich distributions with metadata and absolute risk, push to HuggingFace

Metadata & Prevalence Pipeline

Asset Group Description
raw_pgs_metadata download Download PGS Catalog bulk metadata sheets (scores, performance, evaluation, publications)
cleaned_pgs_metadata compute Clean and normalize metadata, produce parquets including publications.parquet
gwas_studies download Download GWAS Catalog bulk studies + trait mappings, parse case/control from free-text
trait_prevalence compute Merge 3-tier prevalence data (seed CSV → GWAS cohorts → PGS eval cohorts) into trait_prevalence.parquet
hf_pgs_catalog upload Push cleaned metadata + prevalence to HuggingFace

For details on how absolute risk estimation works, see the methodology document.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

prs_pipeline-0.2.10.tar.gz (57.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

prs_pipeline-0.2.10-py3-none-any.whl (60.7 kB view details)

Uploaded Python 3

File details

Details for the file prs_pipeline-0.2.10.tar.gz.

File metadata

  • Download URL: prs_pipeline-0.2.10.tar.gz
  • Upload date:
  • Size: 57.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for prs_pipeline-0.2.10.tar.gz
Algorithm Hash digest
SHA256 d395eede16fcc2f66cbc7b4ee92177cccd6eaf0cafd50cd49913bc0002e2bd93
MD5 bd957afab99bc2780660686c04b57909
BLAKE2b-256 a51d21d10d181bffe3cb9f08974865ff6cc127f0bc65c8d03848999dd5b69955

See more details on using hashes here.

File details

Details for the file prs_pipeline-0.2.10-py3-none-any.whl.

File metadata

  • Download URL: prs_pipeline-0.2.10-py3-none-any.whl
  • Upload date:
  • Size: 60.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for prs_pipeline-0.2.10-py3-none-any.whl
Algorithm Hash digest
SHA256 2274f535796823fa9d0476383ad594010d1ecd70afe30abab19487594bbcbed3
MD5 d52db4437f60dd9c1527cfa46b9557f8
BLAKE2b-256 991811e28e14deeafe67d3fbf5a4fd78134fb871dbf251da8ec51ec67ce55732

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.12

2 files

0.2.11

2 files

This release

0.2.10 This release

2 files

0.2.9

2 files

0.2.3

2 files

0.2.2

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page