Installation
spearfish is written in Rust and installs with Cargo, from crates.io or from a checkout.
Requirements
Section titled “Requirements”- Rust 1.89 or newer, installed with rustup.
- Linux or macOS, on x86-64 or arm64 (Apple Silicon). The alignment and parsing kernels pick AVX-512, AVX2 or scalar code at run time on x86-64, and NEON or scalar code on arm64, and every choice gives exactly the same output.
Install
Section titled “Install”cargo install --locked spearfish-cliThis puts the spearfish binary in ~/.cargo/bin. From a checkout instead:
git clone https://github.com/COMBINE-lab/spearfish.gitcd spearfishcargo install --locked --path crates/spearfish-cliTo build without installing:
cargo build --release./target/release/spearfish --helpCheck the build
Section titled “Check the build”spearfish doctordoctor prints the version and git revision, the target, the CPUs available and the SIMD
kernels in use, then maps reads from a built-in toy transcriptome with every preset and checks
the result against a reference. SPEARFISH_SIMD=scalar|avx2|avx512|neon makes spearfish use at
most that level, for example to compare speeds. With --index transcripts.sfi it also checks that an index
loads and suits this build. --json prints the same report as JSON, to attach to a bug report.
The full test suite is cargo test --workspace --release.
Shell completions and man pages
Section titled “Shell completions and man pages”spearfish completions bash > ~/.local/share/bash-completion/completions/spearfishspearfish completions zsh > ~/.zfunc/_spearfish # also fish, elvish, powershellspearfish man -o ~/.local/share/man/man1 # spearfish.1, spearfish-map.1, ...For quantification
Section titled “For quantification”Abundances come from oarfish, installed separately: a
build with spearfish support (its --help lists spearfish as a --mapper). See
Quantification.