MAGMA is a tool for gene analysis and generalized gene-set analysis of GWAS data. It can be used to analyse both raw genotype data as well as summary SNP p-values from a previous GWAS or meta-analysis.
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 magma [user@cn3144 ~]$ magma --annotate --snp-loc /usr/local/apps/MAGMA/gene_location/example.snp.txt \ --gene-loc /usr/local/apps/MAGMA/gene_location/NCBI37.3/NCBI37.3.gene.loc \ --out temp.test [user@cn3144 ~]$ exit salloc.exe: Relinquishing job allocation 46116226 [user@biowulf ~]$
Create a batch input file (e.g. MAGMA.sh). For example:
#!/bin/bash module load magma magma --annotate --snp-loc /usr/local/apps/MAGMA/gene_location/example.snp.txt \ --gene-loc /usr/local/apps/MAGMA/gene_location/NCBI37.3/NCBI37.3.gene.loc \ --out temp.test
Submit this job using the Slurm sbatch command.
sbatch MAGMA.sh
Create a swarmfile (e.g. MAGMA.swarm). For example:
magma annotate --snp-loc snp1.txt --gene-loc NCBI37.3.gene.loc --out out1 magma annotate --snp-loc snp2.txt --gene-loc NCBI37.3.gene.loc --out out2 magma annotate --snp-loc snp3.txt --gene-loc NCBI37.3.gene.loc --out out3
Submit this job using the swarm command.
swarm -f MAGMA.swarm [-g #] [-t #] --module magmawhere
-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 magma | Loads the magma module for each subjob in the swarm |