Installable Python package for real-data post-GWAS preprocessing and analysis workflows.
Project description
gwas-pipeline
Python package for packaging the full GWAS tutorial workflow behind a consistent CLI and reusable step modules.
It installs a pure GWAS package with packaged step1 through step9
modules, while keeping the legacy standalone step scripts as thin
compatibility wrappers.
Scope of the first version
This scaffold focuses on the minimum post-GWAS path:
- summary statistics loading
- configurable source-to-standard column mapping
- variant harmonization
- colocalization wrapper boundary
- Mendelian randomization wrapper boundary
- batch workflow orchestration by gene and cell type
The package is designed to keep analysis logic in Python while calling specialized external tools from adapters when needed.
R dependencies
The real colocalization and MR wrappers expect:
Rscriptavailable onPATH- R package
coloc - R package
MendelianRandomization
Install
pip install -e .
GWAS tutorial CLI
After pip install -e ., you can run the packaged step modules through either
entrypoint:
gwas-pipeline step3 --gwas /path/to/results.tsv --gff /path/to/genes.gff --output-dir /tmp/step3
python -m gwas_pipeline step8 --vcf /path/to/region.vcf.gz --region 22:1-100000 --class-file class.csv --output-dir /tmp/step8
gwas-pipeline doctor --profile plink_env
The original gwas_step*_project/*.py files remain available and now forward
to the packaged modules in src/gwas_pipeline/steps/.
Runnable GWAS template
There is also a pure-Python GWAS teaching template that runs without
plink, numpy, or pandas. It is intended for learning the workflow and
for adapting to small tabular datasets before swapping in external tools for
real production-scale GWAS.
Run the bundled demo:
python3 scripts/run_simple_gwas_template.py \
--config examples/simple_gwas_template/config.json
The template writes:
gwas_results.tsvcandidate_hits.tsvsummary.txtmanhattan.svgqq_plot.svg
Real-data preprocessing
For split cell-type eQTL files similar to the Bryois-style layout, first build standardized tables:
python scripts/build_standardized_eqtl.py \
--eqtl-root /home/y413109/project/eqtl \
--snp-map /home/y413109/project/eqtl/snp_pos.txt \
--output /home/y413109/project/eqtl/standardized/brain_eqtl_standardized.tsv.gz
python scripts/build_standardized_gwas.py \
--gwas /home/y413109/project/eqtl/gwas/summary_stats_AD_mapped \
--output /home/y413109/project/eqtl/standardized/ad_gwas_standardized.tsv.gz
Then point examples/run_real_postgwas.yaml at those standardized outputs.
Real input expectations
The package standardizes input columns into this internal schema:
chrompositioneffect_alleleother_allelebetasep_valuegene_idfor eQTL onlycell_typefor eQTL onlymafoptional today, reserved for future coloc improvements
Use inputs.eqtl.columns and inputs.gwas.columns in YAML to map your
real source column names onto those standard names.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gwas_postgwas_tools-0.1.0.tar.gz.
File metadata
- Download URL: gwas_postgwas_tools-0.1.0.tar.gz
- Upload date:
- Size: 18.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af65dd80ad2218730c419fdf2e7e1d68312aa9151177c035c3a0ab9601cc96a2
|
|
| MD5 |
33c5269d68d5f5502671c795953245d6
|
|
| BLAKE2b-256 |
fd64ac9b62902beccb3a133fdedfd918b3368fd3934606f218a6db212be630e8
|
File details
Details for the file gwas_postgwas_tools-0.1.0-py3-none-any.whl.
File metadata
- Download URL: gwas_postgwas_tools-0.1.0-py3-none-any.whl
- Upload date:
- Size: 19.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
503ddb11f8b1aa2c39dd6fce0ff1497e82ce55a91c06f6d1b0e47f67a5d3b901
|
|
| MD5 |
2da11a2ec183752b3a699ad3212abf08
|
|
| BLAKE2b-256 |
411419065549a258d2f05ef737672323246318bad372aae179462a37cf9c8fae
|