MANTRA on Biowulf
From the MANTRA documentation
With the increasing availability of genome-wide association data from diverse populations, trans-ethnic meta-analysis may offer an exciting opportunity to increase the power to detect novel complex trait loci and to improve the resolution of fine-mapping of causal variants by leveraging differences in local linkage disequilibrium structure between ethnic groups. However, we might also expect there to be substantial genetic heterogeneity between diverse populations, both in terms of the spectrum of causal variants and their allelic effects, which cannot easily be accommodated through traditional approaches to meta-analysis. In order to address this challenge, MANTRA takes account of the expected similarity in allelic effects between the most closely related populations, whilst allowing for heterogeneity between more diverse ethnic groups.
References:
Documentation
Important Notes
- Module Name: mantra (see the modules page for more information)
- Example files in
$MANTRA_TEST_DATA
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@biowulf]$ sinteractive --gres=lscratch:5 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]$ cd /lscratch/$SLURM_JOB_ID [user@cn3144]$ module load mantra [user@cn3144]$ cp ${MANTRA_TEST_DATA:-none}/* . [user@cn3144]$ ls dmat.out mantra.dat mantra.in [user@cn3144]$ rm dmat.out [user@cn3144]$ # recreate the dmat.out file from mantra.dat [user@cn3144]$ dmatcal [user@cn3144]$ ls dmat.out mantra.dat mantra.in [user@cn3144]$ # run mantra with the files using the same names as above [user@cn3144]$ # to run in batch mode create a file with the output file name, [user@cn3144]$ # parameter output file name and a random seed [user@cn3144]$ cat <<EOF > fname.in mantra.bet.out mantra.para.out 153289 EOF [user@cn3144]$ mantra.v1 < fname.in [user@cn3144]$ ls dmat.out fname.in mantra.bet.out mantra.dat mantra.in mantra.para.out [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. mantra.sh), which uses the input file 'mantra.in'. For example:
#!/bin/bash module load mantra || exit 1 mantra.v1 < mantra_run_config
Submit this job using the Slurm sbatch command.
sbatch [--cpus-per-task=#] [--mem=#] mantra.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. mantra.swarm). This can be used to run MANTRA on chunks of SNPs for parallelization. For example:
cd chunk1 && mantra.v1 < chunk1_config cd chunk2 && mantra.v1 < chunk2_config cd chunk3 && mantra.v1 < chunk3_config
Submit this job using the swarm command.
swarm -f mantra.swarm -g 4 -t 1 -p 2 --module mantrawhere
-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 mantra | Loads the mantra module for each subjob in the swarm |