Trimmomatic

Overview

Trimmomatic is a program to perform a variety of useful trimming tasks for Illumina paired-end and single ended data.

Versions 0.32, 0.35, 0.36 and 0.39 are installed.

Restrictions on use

Trimmomatic is licensed under the GNU General Public License version 3; there are no restrictions on its use.

All users may access and use Trimmomatic. The software is open source using the GPL3 license. Users should consult the following file for further information:

$TRIMMOMATIC_HOME/doc/LICENSE

For citation information see the Trimmomatic website.

Set up procedure

The Trimmomatic adapter files can be found under the directory $TRIMMOMATICSHARE/adapters/

Environment variables

The modulefile defines a number of environment variables that can be used to access data files and modify the behaviour of the program:

$TRIMMOMATIC_JAVA_TMPDIR
$TRIMMOMATICSHARE
$TRIMMOMATIC_JAVA_MEM_MX

Running the application

Please do not run trimmomatic commands on the login node. Computationally intense work should be done via the batch system.

It can be run in single or paired end mode. A wrapper has been included you you don’t need to run the java command.

single
java -jar $TRIMMOMATIC_JAVA/trimmomatic.jar SE [-threads <threads>] [-phred33 | -phred64] [-trimlog <logFile>] <input> <output> <step 1> ...​
paired
java -jar <$TRIMMOMATIC_JAVA/trimmomatic.jar> PE [-threads <threads] [-phred33 | -phred64] [-trimlog <logFile>] <input 1> <input 2> <paired output 1> <unpaired output 1> <paired output 2> <unpaired output 2> <step 1> ...

Examples

Serial batch submission

#!/bin/bash  --login
#$ -S /bin/bash
#$ -cwd # Job will run from the current directory
module load apps/binapps/trimmomatic/0.39

trimmomatic --threads $NSLOTS SE in.fq out.fq OPERATION [OPERATION...] > out.log

Note that the $NSLOTS variable will be set automatically to 1 by the batch system. This ensure trimmomatic uses only a single core, matching the single core you’ve reserved by using a serial jobscript.

Submit the jobscript using:

qsub scriptname

where scriptname is the name of your jobscript.

Parallel batch submission

#!/bin/bash  --login
#$ -S /bin/bash
#$ -cwd # Job will run from the current directory
#$ -pe smp.pe 8 # Example: 8 cores. Can specify 2-32. Do NOT use 1
module load apps/binapps/trimmomatic/0.39

trimmomatic --threads $NSLOTS SE in.fq out.fq OPERATION [OPERATION...] > out.log

Note that $NSLOTS will be set automatically to the number of cores requested on the #$ -pe line. This ensures the trimmomatic uses only the cores you have reserved in the batch system.

Submit the jobscript using:

qsub scriptname

where scriptname is the name of your jobscript.

Further info

Last modified on January 10, 2020 at 4:24 pm by Daniel Nisbet