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.
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.
What it does.
Drop-in CLI
Same --camelCase parameter names as STAR. Existing wrapper scripts work without modification.
Same output formats
SAM, unsorted BAM, coordinate-sorted BAM, SJ.out.tab, ReadsPerGene.out.tab, Chimeric.out.junction.
Splice + chimeric + two-pass
Full splice-junction detection, two-pass mode, multi-junction chimeric (Tier 3) detection.
Deterministic tie-breaking
--runRNGseed mirrors STAR. Identical seed produces identical primary tie-break within rustar runs.
Single-binary install
~14 MB stripped binary. No dynamic-library deps beyond libc. Builds with stable Rust 1.80+.
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.
| Metric | rustar | STAR | Δ |
|---|---|---|---|
| Both mates mapped | 8,390 | 8,390 | match |
| Half-mapped pairs | 0 | 0 | match |
| Position agreement (SE) | 99.815% | — | tie-adj. |
| PE faithfulness | 99.883% | — | tie-adj. |
| MAPQ inflations | 0 | — | none |
| NH-tag diffs | 0 | — | none |
| Proper-pair diffs | 0 | — | none |
| Tests passing | 396 | — | all green |