High-Performance Computing at the NIH
GitHub YouTube @nih_hpc RSS Feed
Trim Galore on Biowulf and Helix

Trim Galore! is a wrapper script to automate quality and adapter trimming as well as quality control, with some added functionality to remove biased methylation positions for RRBS sequence files (for directional, non-directional (or paired-end) sequencing). It's main features are:

 

Running on Helix

Sample session:

helix$ module load trimgalore
helix$ trim_galore file.fq

Submitting a single batch job

1. Create a script file. The file will contain the lines similar to the lines below. Modify the path of program location before running.

#!/bin/bash 

module load trimgalore
cd /data/$USER/somewhere
trim_galore file.fq
....
....

2. Submit the script on Biowulf.

$ sbatch myscript

see biowulf user guide for more options such as allocate more memory and longer walltime.

Submitting a swarm of jobs

Using the 'swarm' utility, one can submit many jobs to the cluster to run concurrently.

Set up a swarm command file (eg /data/$USER/cmdfile). Here is a sample file:

cd /data/user/run1/; trim_galore file.fq
cd /data/user/run2/; trim_galore file.fq
cd /data/user/run3/; trim_galore file.fq
........

The -f flag is required to specify swarm file name.

Submit the swarm job:

$ swarm -f swarmfile --module trimgalore

- Use -g flag for more memory requirement (default 1.5gb per line in swarmfile)

- Use --time flag for longer walltime (default 4 hours)

For more information regarding running swarm, see swarm.html

 

Running an interactive job

User may need to run jobs interactively sometimes. Such jobs should not be run on the Biowulf login node. Instead allocate an interactive node as described below, and run the interactive job there.

[user@biowulf]$ sinteractive 

[user@pXXXX]$ cd /data/$USER/myruns

[user@pXXXX]$ module load trimgalore

[user@pXXXX]$ trim_galore file.fq
[user@pXXXX] exit
slurm stepepilog here!
                   
[user@biowulf]$ 

Documentation

Trim_galore_User_Guide_v0.4.0.pdf