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.
Metadata
Release files for gwas-postgwas-tools 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gwas_postgwas_tools-0.1.1.tar.gz | 18.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gwas_postgwas_tools-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.5 kB
Release files / gwas_postgwas_tools-0.1.1.tar.gz
| Download URL | gwas_postgwas_tools-0.1.1.tar.gz |
|---|---|
| Size | 18.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7b36432a80061e7a9fd588bb1f52ad0bafdf30659c62d6a77256032a8cef84b9
|
|
BLAKE2b-256 checksum How to use checksums |
79e22f475ab0391eb50fdf0e8d393947b136ee4fc5b455dc9d99c4a4ca089b1f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.20
|
Release files / gwas_postgwas_tools-0.1.1-py3-none-any.whl
| Download URL | gwas_postgwas_tools-0.1.1-py3-none-any.whl |
|---|---|
| Size | 19.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b1a6ae1b8080e8e601b30365969e1d82d0dccd756a449efceddbff6cab3d122a
|
|
BLAKE2b-256 checksum How to use checksums |
b9c7673a3f09afeae20a2345be13ffc7132358e55ff2ce97759021147c78ca23
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.20
|