Installation
Pre-compiled binaries
Section titled “Pre-compiled binaries”Pre-built binaries are available from the GitHub Releases page for Linux and macOS. This is the fastest way to get started.
curl -fsSL https://github.com/ewels/RustQC/releases/latest/download/rustqc-macos-aarch64.tar.gz | tar xzchmod +x ./rustqcsudo mv ./rustqc /usr/local/bin/rustqc --versioncurl -fsSL https://github.com/ewels/RustQC/releases/latest/download/rustqc-macos-x86_64.tar.gz | tar xzchmod +x ./rustqcsudo mv ./rustqc /usr/local/bin/rustqc --versioncurl -fsSL https://github.com/ewels/RustQC/releases/latest/download/rustqc-linux-x86_64.tar.gz | tar xzchmod +x ./rustqcsudo mv ./rustqc /usr/local/bin/rustqc --versioncurl -fsSL https://github.com/ewels/RustQC/releases/latest/download/rustqc-linux-aarch64.tar.gz | tar xzchmod +x ./rustqcsudo mv ./rustqc /usr/local/bin/rustqc --versionDocker
Section titled “Docker”Run RustQC without any local installation using Docker:
# Run all RNA-seq QC (dupRadar + featureCounts + RSeQC) in a single passdocker run -v $(pwd):/data ghcr.io/ewels/rustqc:latest \ rna /data/sample.bam --gtf /data/genes.gtf --bed /data/genes.bed -p -o /data/output/Build from source
Section titled “Build from source”Building from source requires the Rust toolchain and a few system libraries needed by rust-htslib for SAM/BAM/CRAM I/O.
Select your operating system for the complete build instructions:
# Install system dependenciesbrew 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 RustQCgit clone https://github.com/ewels/RustQC.gitcd RustQCcargo build --release
# Binary is at target/release/rustqc./target/release/rustqc --version# Install system dependenciessudo apt install cmake zlib1g-dev libbz2-dev liblzma-dev \ libcurl4-openssl-dev libssl-dev clang
# Install Rust (if not already installed)curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Build RustQCgit clone https://github.com/ewels/RustQC.gitcd RustQCcargo build --release./target/release/rustqc --version# Install system dependenciessudo dnf install cmake zlib-devel bzip2-devel xz-devel \ libcurl-devel openssl-devel clang
# Install Rust (if not already installed)curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Build RustQCgit clone https://github.com/ewels/RustQC.gitcd RustQCcargo build --release./target/release/rustqc --versionThe 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 maximum performance and a small binary size.
In summary, the system dependencies you need are: cmake, zlib, bz2, lzma, curl, ssl, and clang.
Extra performance
Section titled “Extra performance”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 --releaseFor 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 binaryRUSTFLAGS="-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 datallvm-profdata merge -o /tmp/pgo-data/merged.profdata /tmp/pgo-data
# 4. Rebuild using the profileRUSTFLAGS="-Cprofile-use=/tmp/pgo-data/merged.profdata -C target-cpu=native" \ cargo build --releaseInput requirements
Section titled “Input requirements”rustqc rna (dupRadar + featureCounts + RSeQC)
Section titled “rustqc rna (dupRadar + featureCounts + RSeQC)”The rustqc rna command runs all analyses in a single pass. Input requirements:
- BAM file(s) — must have PCR duplicates marked (SAM flag
0x400) but not removed. RustQC needs both duplicate and non-duplicate reads to calculate duplication rates. - GTF annotation file (
--gtf) — required for gene-level counting and dupRadar analysis. - BED12 gene model file (
--bed, optional) — required for 5 of the 7 RSeQC tools (infer_experiment, read_distribution, junction_annotation, junction_saturation, inner_distance). If omitted, these tools are skipped with a warning. The bam_stat and read_duplication tools run without a BED file.
Compatible duplicate-marking tools:
RustQC automatically checks the BAM header for duplicate-marking tool signatures and exits with an error if none are found. Use --skip-dup-check to bypass this validation if your duplicate-marking tool is not recognized.
Note that the RSeQC tools themselves do not require duplicate marking — the duplicate-marking requirement applies to the dupRadar analysis.
Verify installation
Section titled “Verify installation”rustqc --versionrustqc --helpIf the binary is not on your PATH, use the full path to the compiled binary:
./target/release/rustqc --version./target/release/rustqc --help