Nextflow pipeline for whole-exome analysis of 12 African populations (PGx, population structure, HDV) — underlying the manuscript
# African Exome Analysis Workflow
A comprehensive Nextflow DSL2 pipeline for analysing whole-exome sequencing
data from African populations, with a focus on pharmacogenomic (PGx) variants,
population structure, and highly differentiated variants (HDV).
This repository contains the analysis pipeline and scripts underlying the
manuscript *"Pharmacogenomic diversity across 12 African populations"* (Mbiyavanga
et al.). Whole-exome sequencing data are deposited in the European
Genome-phenome Archive (EGA) under accession **EGAS00001008456** (controlled
access).
## Overview
The workflow processes joint-called VCFs through quality control, annotation,
population-level analysis, and reporting:
- Variant annotation (SnpEff, dbSNP, ClinVar, COSMIC, CADD, AlphaMissense, dbNSFP)
- Population allele frequencies
- Pharmacogenomic (PGx) star-allele and phenotype calling (PyPGx)
- HLA typing (OptiType / arcasHLA)
- Highly differentiated variants (HDV) between populations
- F_ST analysis for population differentiation (Weir & Cockerham)
- Principal Component Analysis (PCA, EIGENSOFT smartpca)
- ADMIXTURE ancestry estimation
- Novel-variant discovery (absent from dbSNP, gnomAD, AGVP)
## Quick Start
### Prerequisites
- Nextflow (≥ 22.10)
- Singularity (or Docker)
- A SLURM HPC cluster (optional) — or a single machine with enough RAM, using
Nextflow's built-in local executor (no cluster required)
### Run
The manuscript results use the DeepVariant WES +2 kb-padded GRCh38 track,
configured by layering the base config with the DeepVariant overlay.
On a **SLURM cluster** (`slurm` profile submits each process as a job):
```bash
nextflow run main.nf \
-profile singularity,slurm \
-c ILIFU/exome_analysis_nextflow.config \
-c ILIFU/dv_wes_padded_2kb.config
```
On a **single machine**, drop the `slurm` profile — Nextflow then runs every
process locally:
```bash
nextflow run main.nf \
-profile singularity \
-c ILIFU/exome_analysis_nextflow.config \
-c ILIFU/dv_wes_padded_2kb.con …