High-Performance Computing at the NIH
GitHub YouTube @nih_hpc RSS Feed
Adapterremoval on Biowulf

This program searches for and removes remnant adapter sequences from High-Throughput Sequencing (HTS) data and (optionally) trims low quality bases from the 3' end of reads following adapter removal. AdapterRemoval can analyze both single end and paired end data, and can be used to merge overlapping paired-ended reads into (longer) consensus sequences. Additionally, the AdapterRemoval may be used to recover a consensus adapter sequence for paired-ended data, for which this information is not available.

References:

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 --cpus-per-task=4
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 adapterremoval
[user@cn3144 ~]$ AdapterRemoval --file1 reads_1.fq  --threads $SLURM_CPUS_PER_TASK \
--basename output_single --trimns --trimqualities --gzip

[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. adapterremoval.sh). For example:

#!/bin/bash
module load adapterremoval
AdapterRemoval --file1 reads_1.fq --threads $SLURM_CPUS_PER_TASK --basename output_single --trimns --trimqualities --gzip

Submit this job using the Slurm sbatch command.

sbatch --cpus-per-task=4 adapterremoval.sh
Swarm of Jobs
A swarm of jobs is an easy way to submit set of independent commands requiring identical resources.

Create a swarmfile (e.g. adapterremoval.swarm). For example:

cd /data/$USER1/dir1; AdapterRemoval --threads $SLURM_CPUS_PER_TASK --file1 reads_1.fq  ....
cd /data/$USER1/dir2; AdapterRemoval --threads $SLURM_CPUS_PER_TASK --file1 reads_1.fq  ....
cd /data/$USER1/dir3; AdapterRemoval --threads $SLURM_CPUS_PER_TASK --file1 reads_1.fq  ....
cd /data/$USER1/dir4; AdapterRemoval --threads $SLURM_CPUS_PER_TASK --file1 reads_1.fq  ....

Submit this job using the swarm command.

swarm -f adapterremoval.swarm -t 4 --module adapterremoval
where
-t # Number of threads/CPUs required for each process (1 line in the swarm command file).
--module adapterremoval Loads the adapterremoval module for each subjob in the swarm