CoolFace
Apppublic

jdelgadoluis/PRS-Prostate-Cancer

sourceHugging Faceupdated 3mo agoView on Hugging Face
0likes
App README

Prostate-Cancer-Prs-Pipeline

A bioinformatics pipeline for calculating, normalizing, and analyzing Polygenic Risk Scores (PRS) for prostate cancer predisposition, developed as a final degree project (TFG) using publicly available genomic data.

Overview

This pipeline processes VCF files from the Personal Genome Project UK (PGP-UK) and scoring files from the PGS Catalog to compute PRS across multiple GWAS studies. It supports both GRCh37 and GRCh38 genome builds and includes tools for variant annotation, allele frequency filtering, normalization, and statistical visualization.

Pipeline Structure

00pgsscores/ Raw PGS Catalog scoring files 01normalizedpgs/ Normalized PGS scores 02withfrequencies/ Variants annotated with allele frequencies 03prsready/ Filtered and ready-to-score variants 04af0.01/ Variants filtered by AF > 0.01 05final/ Final annotated TSV files (GRCh37 & GRCh38) src/ All Python scripts results_prs/ PRS results and visualizations

Features

  • —VCF Processing — Parsing and preprocessing of compressed VCF files
  • —Allele Frequency Annotation — Population-level AF annotation using 1000 Genomes reference data
  • —PGS Catalog Integration — Automatic download and parsing of scoring files (Schumacher, Conti, Benafif, Graff, and others)
  • —PRS Normalization — Score normalization across studies and individuals
  • —Variant Matching — Matching VCF variants against PGS scoring files for GRCh37 and GRCh38 builds
  • —Percentile Calculation — Per-individual PRS percentile estimation
  • —Visualization — Heatmaps and comparative charts for cross-study analysis

Requirements

pip install -r requirements.txt

Dependencies: pandas, numpy, matplotlib, seaborn, scipy, requests, pysam, tqdm, cyvcf2

Usage

Configure paths in config.py if needed (all paths are relative to the project root by default), then run scripts sequentially from codigos/:

python3 codigos/1-init.py python3 codigos/2.3-AnotacionVCF.py python3 codigos/4.0-CalcPRSypercentil.py

Simple web app (upload .vcf.gz and run pipeline)

An MVP web interface is included using Streamlit:

  1. 1.Install dependencies:

pip install -r requirements.txt

  1. 1.Launch the app from the repository root:

streamlit run app.py

  1. 1.In the browser:
  2. 2.Upload a *.vcf.gz file.
  3. 3.Click Ejecutar pipeline.
  4. 4.Review logs and output folders shown by the app.

Each execution runs in an isolated jobs/job-.../ workspace to avoid collisions between runs.

Data Sources

Academic Context

This project was developed as a Trabajo de Fin de Grado (TFG) at the University of Salamanca, focused on evaluating the predictive performance of multiple PGS Catalog studies for prostate cancer risk in a cohort of 6 individuals from PGP-UK.

Acknowledgements

I gratefully acknowledge the Personal Genome Project UK (PGP-UK) for making whole-genome sequencing data publicly available. The genomic data used in this project was obtained from PGP-UK participants who consented to open data sharing for research purposes.

Genomic data provided by the Personal Genome Project UK (https://www.personalgenomes.org.uk/). I thank all PGP-UK participants for their contribution to open science.

We also thank the PGS Catalog team for maintaining a publicly accessible repository of polygenic score resources, and the 1000 Genomes Project for providing population-level allele frequency reference data.

License

MIT License — open for academic and research use.