FiltpostQC-EU 0.1.3
A CLI tool to apply post-GWAS QC filtering to Regenie merged summary statistics using EU-based variant filters.
License: MIT
Requires Python: >=3.7

# FiltpostQC-EU

**Author**: Etienne Kabongo
**Affiliation**: Audrey Grant Lab – Computational Genomics, McGill University
**Contact**: [etienne.kabongo@mcgill.ca](etienne.kabongo@mcgill.ca)

---

## 🧬 FiltpostQC-EU: Post-GWAS Filtering Tool for Regenie Results

**FiltpostQC-EU** is a robust and lightweight Python CLI tool developed to perform post-GWAS variant-level quality control on summary statistics generated by the [REGENIE](https://rgcgithub.github.io/regenie/) software. It filters variants based on an external European QC filter file and optionally formats the results for [FUMA](https://fuma.ctglab.nl/) downstream annotation.

---

## ✨ Key Features

* ✅ **Input**: Accepts Regenie merged summary statistics.
* 📊 **Filtering**: Retains only variants present in a QC-filter file (e.g., MAF, INFO, HWE).
* 🧪 **Output**: Supports filtered `.txt` output and/or FUMA-compatible files.
* 🧠 **Bioinformatics-Ready**: Designed for UK Biobank and large-scale GWAS datasets.
* ⚙️ **CLI Interface**: Fully command-line operable with detailed help menu.

---

## 📦 Installation

```bash
pip install FiltpostQC-EU
```

Or from source:

```bash
git clone https://github.com/EtienneNtumba/FiltpostQC-EU.git
cd FiltpostQC-EU
pip install .
```

---

## 🚀 Usage

```bash
filtpostqc-eu -i path/to/regenie_merged.txt \
              -f path/to/filter.tsv \
              -o filtered_output.txt \
              --fuma fuma_output.txt \
              --format both
```

### Arguments

| Argument       | Description                                                          |
| -------------- | -------------------------------------------------------------------- |
| `-i, --input`  | Path to merged Regenie file (required)                               |
| `-f, --filter` | QC filter file (e.g., MAF/HWE/INFO based) (required)                 |
| `-o, --output` | Output for filtered Regenie results (default: `filtered_output.txt`) |
| `--fuma`       | Output path for FUMA-formatted file (default: `fuma_output.txt`)     |
| `--format`     | Output format: `filtered`, `fuma`, or `both` (default: `both`)       |
| `--version`    | Print the tool version                                               |

---

## 📂 Input Format

### Merged Regenie File (`P0_GWAS_qc_merged.txt`)

Must contain columns like:

```
Name	Chr	Pos	Ref	Alt	Trait	Effect	Pval	Num_Cases	Num_Controls	Info
```

### QC Filter File (`EUR_QC_filter_regenie.tsv`)

Must contain at least:

```
Name	Chr	Pos	Ref	Alt
```

---

## 🧬 FUMA Output Format

The FUMA-compatible file will include:

* `Chr`, `Pos`, `Name`, `Ref`, `Alt`, `Num_Cases`, `Num_Controls`, `Beta`, `Se`, `Pval`

---

## 👨‍🔬 About the Developer

This tool was created by **Etienne Kabongo**, computational biologist and research assistant in the **Audrey Grant Lab** at **McGill University**.

Our research focuses on large-scale genomic analyses, GWAS pipelines, and post-GWAS interpretation frameworks.

---

## 📄 License

MIT License

---

## 📬 Contact

For feedback, bug reports, or feature requests, feel free to contact:

* ✉️ Etienne Kabongo: `etienne@example.com`

---

## ⭐ Acknowledgements

* Regenie: For efficient GWAS computation
* FUMA: For functional mapping and annotation

---

> "Reliable QC is the foundation of reproducible GWAS."