Biowulf High Performance Computing at the NIH
Circlator on Biowulf

Circlator: a tool to circularize genome assemblies

The input is a genome assembly in FASTA format and corrected PacBio or nanopore reads in FASTA or FASTQ format. Circlator will attempt to identify each circular sequence and output a linearised version of it. It does this by assembling all reads that map to contig ends and comparing the resulting contigs with the input assembly.

The input assembly must not be too fragmented. Although Circlator will join contigs together, whenever it can identify contigs that can be unambiguously joined, its main aim is to circularize the core genome and plasmids.

Any contigs that were identified as circular then have their start position changed. If a dnaA gene is found, then that is used as the starting position (or the user can provide a FASTA file of sequences to search for within the contigs). If no dnaA gene is found then prodigal is used to identify the gene nearest the centre of the contig, which is then used as the start position of the contig.

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 input in bold):

[user@biowulf]$ sinteractive --mem=10g --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 circlator

[user@cn3144 ~]$ circlator mapreads --threads $SLURM_CPUS_PER_TASK /fdb/igenomes/Homo_sapiens/UCSC/hg38/Sequence/BWAIndex/genome.fa /data/$USER/input.fastq.gz /data/$USER/out.bam 

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

#!/bin/bash
set -e
module load circlator
circlator mapreads \
--threads $SLURM_CPUS_PER_TASK \
/fdb/igenomes/Homo_sapiens/UCSC/hg38/Sequence/BWAIndex/genome.fa \
/data/$USER/input.fastq.gz \
/data/$USER/out.bam

Submit this job using the Slurm sbatch command.

sbatch --cpus-per-task=4 --mem=10g circlator.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. circlator.swarm). For example:

cd dir1; circlator mapreads --threads $SLURM_CPUS_PER_TASK genome.fa input.fa
cd dir2; circlator mapreads --threads $SLURM_CPUS_PER_TASK genome.fa input.fa
cd dir3; circlator mapreads --threads $SLURM_CPUS_PER_TASK genome.fa input.fa
cd dir4; circlator mapreads --threads $SLURM_CPUS_PER_TASK genome.fa input.fa

Submit this job using the swarm command.

swarm -f circlator.swarm -g 10 -t 4 --module circlator
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 circlator Loads the circlator module for each subjob in the swarm