G-Nomix on Biowulf

High Resolution Ancestry Deconvolution for High Throughput Sequencing Data

References:

Documentation
Important Notes

Interactive job
Interactive jobs should be used for debugging, graphics, or applications that cannot be run as batch jobs.

Allocate an interactive session and run the program.
Sample session (user input in bold):

[user@biowulf]$ sinteractive --mem 32g
salloc.exe: Pending job allocation 46116226
salloc.exe: job 46116226 queued and waiting for resources
salloc.exe: job 46116226 has been allocated resources
salloc.exe: Granted job allocation 46116226
salloc.exe: Waiting for resource configuration
salloc.exe: Nodes cn3144 are ready for job

[user@cn3144 ~]$ module load gnomix

[user@cn3144 ~]$ cp $GNOMIX_HOME/config.yaml .
[user@cn3144 ~]$ gnomix.py $GNOMIX_HOME/demo/data/small_query_chr22.vcf.gz demo_output 22 True /fdb/gnomix/pretrained_gnomix_models/chr22/model_chm_22.pkl
...
--------------------------------------------------------------------------------
-----------------------------------  Gnomix  -----------------------------------
--------------------------------------------------------------------------------
When using this software, please cite:
Helgi Hilmarsson, Arvind S Kumar, Richa Rastogi, Carlos D Bustamante,
Daniel Mas Montserrat, Alexander G Ioannidis:
"High Resolution Ancestry Deconvolution for Next Generation Genomic Data"
https://www.biorxiv.org/content/10.1101/2021.09.19.460980v1
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Launching in pre-trained mode...
Loading model...
Launching inference...
Loading and processing query file...
- Number of SNPs from model: 317408
- Number of SNPs from file: 317408
- Number of intersecting SNPs: 317404
- Percentage of model SNPs covered by query file: 100.0%
Inferring ancestry on query data...
Phasing individual 9/9
Writing phased SNPs to disk...
Saving results...
[user@cn3144 ~]$ exit
salloc.exe: Relinquishing job allocation 46116226
[user@biowulf ~]$

Batch job
Most jobs should be run as batch jobs.

Create a batch input file (e.g. gnomix.sh). For example:

#!/bin/bash
set -e
module load gnomix
gnomix.py $GNOMIX_HOME/demo/data/small_query_chr22.vcf.gz demo_output 22 True /fdb/gnomix/pretrained_gnomix_models/chr22/model_chm_22.pkl

Submit this job using the Slurm sbatch command.

sbatch [--cpus-per-task=#] [--mem=#] gnomix.sh
Swarm of Jobs
A swarm of jobs is an easy way to submit a set of independent commands requiring identical resources.

Create a swarmfile (e.g. gnomix.swarm). For example:

gnomix.py $GNOMIX_HOME/demo/data/small_query_chr22.vcf.gz demo_output 22 True /fdb/gnomix/pretrained_gnomix_models/chr22/model_chm_22.pkl
...
...

Submit this job using the swarm command.

swarm -f gnomix.swarm [-g #] [-t #] --module gnomix
where
-g # Number of Gigabytes of memory required for each process (1 line in the swarm command file)
-t # Number of threads/CPUs required for each process (1 line in the swarm command file).
--module gnomix Loads the G-Nomix module for each subjob in the swarm