hap-ibd on Biowulf
The hap-ibd program detects identity-by-descent (IBD) segments and homozygosity-by-descent (HBD) segments in phased genotype data.
References:
- Y Zhou, S R Browning, B L Browning. A fast and simple method for detecting identity by descent segments in large-scale data. The American Journal of Human Genetics 106(4):426-437. PubMed | PMC | Journal
Documentation
- hap-ibd Github:Github
Important Notes
- Module Name: hap-ibd (see the modules page for more information)
- Current hap-ibd command lines could be run as:
hap-ibd
- Or:
java -jar $HAPIBDPATH/hap-ibd.jar
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 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 hap-ibd [user@cn3144 ~]$ mkdir /data/$USER/hap-ibd_test/ [user@cn3144 ~]$ cd /data/$USER/hap-ibd_test/ [user@cn3144 ~]$ cp $HAPIBD_TEST_DATA/* . [user@cn3144 ~]$ hap-ibd hap-ibd.jar [ version 1.0, 23Apr20.f1a ] Syntax: java -jar hap-ibd.jar [arguments in format: parameter=value] Data Parameters: gt=(required) map= (required) out=
Batch job
Most jobs should be run as batch jobs.
Create a batch input file (e.g. hap-ibd.sh). For example:
#!/bin/bash
set -e
module load hap-ibd
hap-ibd gt=target.truth.vcf.gz map=target.map out=test_out threads=$SLURM_CPUS_PER_TASK
Submit this job using the Slurm sbatch command.
sbatch --cpus-per-task=4 --mem=2g hap-ibd.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. hap-ibd.swarm). For example:
cd dir1;hap-ibd gt=target1.truth.vcf.gz map=target1.map out=test1_out threads=$SLURM_CPUS_PER_TASK cd dir2;hap-ibd gt=target2.truth.vcf.gz map=target2.map out=test2_out threads=$SLURM_CPUS_PER_TASK
Submit this job using the swarm command.
swarm -f hap-ibd.swarm -t 4 [-g #] --module hap-ibdwhere
-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 hap-ibd | Loads the hap-ibd module for each subjob in the swarm |