Skip to content

A new version of SD Connect and SD Desktop will be available from Monday, September 28. The major upgrade will introduce significant improvements, but also includes changes that are not compatible with the current version of the service. Click here to review the available support materials.

Warning!

Puhti and Mahti computing services have been decommissioned and no new jobs are accepted or executed on its compute nodes. Puhti and Mahti login nodes and storage services are planned to remain available until 15 October 2026. Clean up unnecessary files and move any data you need to keep by 31 August 2026. See the Roihu data migration guide for instructions on transferring your data to Roihu.

minibwa

minibwa is a short-read aligner by Heng Li, billed as the successor of BWA-MEM. It indexes a reference genome with an FM-index and aligns single- or paired-end reads using a banded, SIMD-accelerated Smith-Waterman extension, adapting its parameters to the read length. Like BWA-MEM it indexes the genome before alignment.

License

The minibwa source is released under the MIT license. Note that the default build (as installed here) compiles the GPL-2.0+ BWT-construction code inherited from BWA, so the installed minibwa binary is effectively GPL.

Available

  • Roihu-CPU: 0.7, via the bio-apps module.

Usage

minibwa is part of the bio-apps collection on Roihu. Load the bio-apps module tree and then the minibwa module:

module load bio-apps/v202603
module load minibwa/0.7

minibwa has two subcommands, index and map.

Indexing a reference

Index the reference genome before aligning. Work in your project's /scratch directory rather than $HOME, which is often too small for complete genomes:

minibwa index -t 8 ref.fa

This writes the index files ref.fa.l2b and ref.fa.mbw next to the reference.

Aligning reads

Paired-end reads are aligned with two read files, producing SAM on standard output:

minibwa map -t 8 ref.fa read1.fq read2.fq > aln.sam

A single read file aligns single-end:

minibwa map -t 8 ref.fa reads.fq > aln.sam

Add -f to emit PAF instead of SAM:

minibwa map -f -t 8 ref.fa reads.fq > aln.paf

Example batch script

#!/bin/bash
#SBATCH --job-name=minibwa
#SBATCH --account=<project>
#SBATCH --output=output_%j.txt
#SBATCH --error=errors_%j.txt
#SBATCH --partition=small
#SBATCH --time=12:00:00
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=8
#SBATCH --mem-per-cpu=8G

module load bio-apps/v202603
module load minibwa/0.7

# Index the reference genome (once)
minibwa index -t $SLURM_CPUS_PER_TASK ref.fa

# Align paired-end reads
minibwa map -t $SLURM_CPUS_PER_TASK ref.fa read1.fq read2.fq > aln.sam

Replace <project> with your CSC project (for example project_2001234).

See creating a batch job script for Roihu for more information about running batch jobs.

Support

CSC Service Desk

More information