Biowulf High Performance Computing at the NIH
MR-MEGA on Biowulf

From the documentation:

MR-MEGA (Meta-Regression of Multi-Ethnic Genetic Association) is a tool to detect and fine-map complex trait association signals via trans-ethnic meta-regression. This approach uses genome-wide metrics of diversity between populations to derive axes of genetic variation via multi-dimensional scaling [Purcell 2007]. Allelic effects of a variant across GWAS, weighted by their corresponding standard errors, can then be modelled in a linear regression framework, including the axes of genetic variation as covariates. The flexibility of this model enables partitioning of the heterogeneity into components due to ancestry and residual variation, which would be expected to improve fine-mapping resolution.

References:

  • R. M├Ągi, M. Horikoshi, T. Sofer, A. Mahajan, H. Kitajima, N. Franceschini, M. I. McCarthy, COGENT-Kidney Consortium, T2D-GENES Consortium, and A. P. Morris. Trans-ethnic meta-regression of genome-wide association studies accounting for ancestry increases power for discovery and improves fine-mapping resolution. Hum Mol Genet. 2017, 26:3639-3650 PubMed |  PMC |  Journal
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@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 mr-mega
[user@cn3144]$ MR-MEGA
USAGE:

   MR-MEGA  [--name_pos <string>] ...  [--name_chr <string>] ...  [--name_n
            <string>] ...  [--name_strand <string>] ...  [--name_or_95u
            <string>] ...  [--name_or_95l <string>] ...  [--name_or
            <string>] ...  [--name_se <string>] ...  [--name_beta <string>]
            ...  [--name_eaf <string>] ...  [--name_nea <string>] ...
            [--name_ea <string>] ...  [--name_marker <string>] ...  [-f
            <string>] ...  [--pc <int>] [-t <double>] [--no_std_names]
            [--print_pcs_and_die] [--debug] [--qt] [--gco] [--gc]
            [--no_alleles] [-m <string>] [-o <string>] [-i <string>] [--]
            [--version] [-h]


Where:

   --name_pos <string>  (accepted multiple times)
     Alternative header to position column. Default POSITION
...

[user@cn3144]$ MR-MEGA -i mrmega.in
...
[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. mr-mega.sh), which uses the input file 'mr-mega.in'. For example:

#!/bin/bash
module load mr-mega/0.1.5 || exit 1
MR-MEGA -i mrmega.in --pc 2

Submit this job using the Slurm sbatch command.

sbatch [--cpus-per-task=#] [--mem=#] mr-mega.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. mr-mega.swarm). For example:

MR-MEGA -i mrmega.in1 --pc 2 -o mrmega1
MR-MEGA -i mrmega.in2 --pc 2 -o mrmega2

Submit this job using the swarm command.

swarm -f mr-mega.swarm [-g #] [-t #] --module mr-mega
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 mr-mega Loads the mr-mega module for each subjob in the swarm