Install the dependencies:
pip install -r requirements.txt
fed_gwas
|
|-- client.py # client local training script
|-- model.py # model definition
|-- job.py # job recipe that defines client and server configurations
|-- requirements.txt # dependenciesThe job.py script orchestrates the federated GWAS analysis across multiple clients. It collects GWAS summary statistics from each client and performs inverse-variance weighted meta-analysis using GWAMA.
python job.py --n_clients <number_of_clients> --num_rounds <number_of_rounds>--n_clients: Number of federated learning clients to participate (default: 10)--num_rounds: Number of federated learning rounds to execute (default: 1)--env: Environment to run in:simfor SimEnv orprodfor ProdEnv (default:prod)- SimEnv: Simulation environment where FL server and clients run on the same machine
- ProdEnv: Production environment for distributed deployment (e.g., server on AWS, clients on NVIDIA instances)
--startup_kit: Startup kit location for ProdEnv (default:/home/ubuntu/hroth@nvidia.com)--username: Username for ProdEnv (default:hroth@nvidia.com)
# Run in simulation environment with 5 clients for 1 round
python job.py --env sim --n_clients 5 --num_rounds 1
# Run in production environment with default settings
python job.py --env prod --n_clients 10 --num_rounds 1
# Run in production environment with custom startup kit and username
python job.py --env prod --startup_kit /path/to/startup_kit --username user@example.com
# Run with default settings (production environment, 10 clients, 1 round)
python job.py- GWAMA executable: The GWAMA meta-analysis tool must be installed at
/home/ubuntu/GWAMA/GWAMAon the server. See here. - NVIDIA FLARE startup kit: Required for production environment deployment (configured in
job.py) - Client data: Each client will compute REGENIE output files if they don't already exists.
- Distributes the
client.pyscript andclient_regenie.shto all federated clients - Each client performs local GWAS analysis using REGENIE (if output files don't exist yet)
- Clients send summary statistics files (including BETA, SE, OR) back to the server
- Server aggregates results using:
- Optional simple inverse-variance weighted meta-analysis (Python-based)
- GWAMA meta-analysis (comprehensive results)
- Final meta-analysis results are saved to
server_results/directory
Results are stored in the job's run directory under server_results/:
- Individual client REGENIE files:
site{id}_{name}_regenie_step2_Phen1.regenie - GWAMA format files:
site{id}_{name}_gwama.txt - GWAMA input list:
gwama.in - GWAMA meta-analysis results:
gwama.*files