Skip to content

kirilledition/g

Repository files navigation

g - GPU-oriented REGENIE Step 2 GWAS engine

PR CI Science Monthly

g is a pre-release GWAS engine for BGEN-backed REGENIE Step 2 association scans. It exposes a REGENIE-style CLI and TOML configuration, uses Rust for native file handling, and uses JAX for quantitative and binary association kernels. Python embedding is not a supported API.

g does not implement REGENIE Step 1. Use upstream regenie to produce Step 1 prediction lists, then use g for Step 2 scans.

Current Scope

Area Status
Quantitative REGENIE Step 2 (--qt) Primary supported workflow
Binary score-test Step 2 (--bt) Supported, evolving
Binary approximate Firth fallback (--bt --binary-fallback firth_approximate) Implemented, parity and performance sensitive
REGENIE Step 1 Not implemented
BGEN 1.2 input Supported
BED/PGEN input Unsupported; absent from the CLI and rejected as unknown
Output Chunked Parquet datasets only
GPU execution Supported through JAX when the environment is configured

Install

g is installed from a Git checkout because it is not published on PyPI.

git clone https://github.com/kirilledition/g.git
cd g
uv python install 3.14
uv sync --python 3.14 --no-dev
uv run g --help

For GPU installs, cluster installs, and development setup, use Installation.

Minimal Run Shape

uv run g regenie \
  --qt \
  --bgen /path/to/genotypes.bgen \
  --sample /path/to/genotypes.sample \
  --phenoFile /path/to/phenotypes.tsv \
  --phenoCol phenotype_name \
  --covarFile /path/to/covariates.tsv \
  --covarCol age --covarCol sex \
  --pred /path/to/regenie_step1_pred.list \
  --out /path/to/output/g_regenie2

See Quickstart for quantitative, binary, approximate-Firth, multi-phenotype, GPU, and Parquet-output examples.

Documentation Map

User-facing behavior lives under documentation/public/:

Implementation and contributor guidance lives under documentation/development/:

Internal scratchpad notes live under documentation/scratchpad/. They are not part of the primary published navigation and may be stale.

Documentation Build

just docs-serve
just docs-build

The published documentation site is expected at:

https://kirilledition.github.io/g/

Code Size

Generated from Git-tracked files under crates/ and src/ using cloc.

Language Files Blank Comment Code
Rust 120 5,622 971 53,056
Python 106 3,126 2,308 23,302
TOML 9 30 8 217
Total 235 8,778 3,287 76,575

cloc version: 2.09.

About

GWAS engine with GPU acceleration via JAX

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors