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.11.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.11-py3-none-any.whl (60.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: prs_pipeline-0.2.11.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.11.tar.gz
Algorithm Hash digest
SHA256 106ef308e91574dc83068ef3d50570bfe4e14ff499aee8737c7722f1c62d1fb8
MD5 a1b2f4b67893b035d396bc2d6b5bcba7
BLAKE2b-256 b90be7bc0e67319e2a98f6a0d784027d1774f9984f1c5528d233dd4e2ef93ead

See more details on using hashes here.

File details

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

File metadata

  • Download URL: prs_pipeline-0.2.11-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.11-py3-none-any.whl
Algorithm Hash digest
SHA256 fdea5089750ff4851488cbadb7873cefc39de03bbbf8a83dffa79a4f2dfe8453
MD5 57e9c1778727b580d3dc94364ad42015
BLAKE2b-256 fcc632d6e766b7a3db8b35a67836e760e46b9fead9e9579acf94babf8663f497

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.12

2 files

This release

0.2.11 This release

2 files

0.2.10

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