Skip to content

Installation

Pre-built binaries are available from the GitHub Releases page for Linux and macOS.

curl -fsSL https://github.com/seqeralabs/RustQC/releases/latest/download/rustqc-macos-aarch64.tar.gz | tar xz --strip-components=1
chmod +x ./rustqc
sudo mv ./rustqc /usr/local/bin/
rustqc --version

Run RustQC without any local installation using Docker:

# Run all RNA-seq QC analyses in a single pass
docker run -v $(pwd):/data ghcr.io/seqeralabs/rustqc:latest \
rustqc rna /data/sample.bam --gtf /data/genes.gtf -p -o /data/output/

Building from source requires the Rust toolchain, a C++ compiler, and a few system libraries needed by rust-htslib for SAM/BAM/CRAM I/O. The C++ compiler is used both by rust-htslib and by RustQC’s preseq FFI shim (a small C++ wrapper that links against the host’s std::mt19937 and std::binomial_distribution for exact bootstrap compatibility with upstream preseq).

If you already have the Rust toolchain and system dependencies installed, you can install directly from crates.io:

cargo install rustqc

Select your operating system for build instructions:

# Install system dependencies
brew install cmake zlib bzip2 xz curl openssl
# Install Rust (if not already installed)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Build RustQC
git clone https://github.com/seqeralabs/RustQC.git
cd RustQC
cargo build --release
# Binary is at target/release/rustqc
./target/release/rustqc --version

The compiled binary is at target/release/rustqc. You can copy it to a directory on your PATH for convenient access. Release builds use link-time optimization (LTO) and symbol stripping for better performance and a smaller binary.

The system dependencies are: cmake, zlib, bz2, lzma, curl, ssl, and a C++ compiler (clang or g++).

When building from source you can squeeze out additional performance by targeting your specific CPU architecture. This enables use of SIMD instructions (AVX2, etc.) that the pre-built binaries cannot use because they target a generic baseline:

RUSTFLAGS="-C target-cpu=native" cargo build --release

For a further 5–20% speedup on a machine you run RustQC on regularly, you can use Profile-Guided Optimization (PGO). This lets the compiler optimize hot code paths based on a real workload:

# 1. Build an instrumented binary
RUSTFLAGS="-Cprofile-generate=/tmp/pgo-data" cargo build --release
# 2. Run it on a representative BAM file
./target/release/rustqc rna your_sample.bam --gtf genes.gtf -p -o /tmp/pgo-out
# 3. Merge the profile data
llvm-profdata merge -o /tmp/pgo-data/merged.profdata /tmp/pgo-data
# 4. Rebuild using the profile
RUSTFLAGS="-Cprofile-use=/tmp/pgo-data/merged.profdata -C target-cpu=native" \
cargo build --release
rustqc --version
rustqc --help

If the binary is not on your PATH, use the full path to the compiled binary:

./target/release/rustqc --version
./target/release/rustqc --help