Skip to content

rustar-aligner

rustar-aligner

A faithful Rust reimplementation of STAR, the canonical RNA-seq aligner originally written in C++ by Alexander Dobin.

Same --camelCase CLI. Same SAM/BAM output formats. 99.883% mate-pair faithfulness on a 10,000-pair yeast benchmark, with zero MAPQ inflations.

rustar-aligner mascot: a red crab cradling a golden starfish

Where rustar agrees with the original.

10,000 yeast RNA-seq read pairs, ERR12389696, 150 bp paired-end. Same genome index, same CLI parameters as STAR 2.7.x. Compared mate by mate.

99.883%
PE Faithfulness
tie-adjusted; 16,284 of 16,306 mate alignments byte-for-byte identical to STAR.
0
MAPQ Inflations
zero deflations, zero NH-tag diffs, zero proper-pair classification differences.

What it does.

01

Drop-in CLI

Same --camelCase parameter names as STAR. Existing wrapper scripts work without modification.

02

Same output formats

SAM, unsorted BAM, coordinate-sorted BAM, SJ.out.tab, ReadsPerGene.out.tab, Chimeric.out.junction.

03

Splice + chimeric + two-pass

Full splice-junction detection, two-pass mode, multi-junction chimeric (Tier 3) detection.

04

Deterministic tie-breaking

--runRNGseed mirrors STAR. Identical seed produces identical primary tie-break within rustar runs.

05

Single-binary install

~14 MB stripped binary. No dynamic-library deps beyond libc. Builds with stable Rust 1.80+.

06

Multi-threaded

Rayon-based parallelism. Scales linearly across logical CPUs for the alignment phase.

Two commands, one alignment.

Install & run

Cargo will fetch the source, resolve dependencies, compile in release mode, and place the binary on your $PATH. About 90 to 180 seconds on recent hardware.

Then run a paired-end alignment against a pre-built genome index.

# Step 1 · install
$ cargo install --git https://github.com/scverse/rustar-aligner

# Step 2 · align
$ rustar-aligner \
    --genomeDir ./yeast_index \
    --readFilesIn r1.fq r2.fq \
    --outSAMtype BAM SortedByCoordinate \
    --runThreadN 8 \
    --outFileNamePrefix ./out_

Side by side with the original.

Selected metrics from the standard 10k-pair yeast benchmark. See the full compatibility scoreboard for the rest.

MetricrustarSTARΔ
Both mates mapped8,3908,390match
Half-mapped pairs00match
Position agreement (SE)99.815%tie-adj.
PE faithfulness99.883%tie-adj.
MAPQ inflations0none
NH-tag diffs0none
Proper-pair diffs0none
Tests passing396all green