Biowulf High Performance Computing at the NIH
IMOD on Biowulf

IMOD is a set of image processing, modeling and display programs used for tomographic reconstruction and for 3D reconstruction of EM serial sections and optical sections. The package contains tools for assembling and aligning data within multiple types and sizes of image stacks, viewing 3-D data from any orientation, and modeling and display of the image files. IMOD was developed primarily by David Mastronarde, Rick Gaudette, Sue Held, Jim Kremer, Quanren Xiong, and John Heumann at the University of Colorado.

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@biowulf]$ module load IMOD

[user@biowulf]$ tar xvzf /usr/local/apps/IMOD/imod_data.tar.gz

[user@biowulf]$ mrc2tif imod_data/golgi.mrc imod_data/golgi.tif
Writing TIFF images. ................................

[user@biowulf]$ newstack golgi.mrc golgi.st

 RO image file on unit   1 : golgi.mrc     Size=       2049 K

                    This is a byte-swapped file.

                    This file has an old-style MRC header.

 Number of columns, rows, sections .....     256     256      32
 Map mode ..............................    0   (byte)
 Start cols, rows, sects, grid x,y,z ...    0     0     0     256    256     32
 Pixel spacing (Angstroms)..............   1.000      1.000      1.000
 Cell angles ...........................   90.000   90.000   90.000
 Fast, medium, slow axes ...............    X    Y    Z
 Origin on x,y,z .......................    0.000       0.000       0.000
 Minimum density .......................   17.000
 Maximum density .......................   195.00
 Mean density ..........................   83.733
 tilt angles (original,current) ........   0.0   0.0   0.0   0.0   0.0   0.0
 Space group,# extra bytes,idtype,lens .        0        0        0        0
[...]      
[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. IMOD.sh). For example:

#!/bin/bash
set -e
module load IMOD

cd /data/$USER/myimagedir
tif2mrc cell*.tif cell.mrc
newstack cell*.mrc cell.st 

Submit this job using the Slurm sbatch command.

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

newstack cell*.mrc
newstack cell2*.mrc
newstack cell3*.mrc

Submit this job using the swarm command.

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