rsx-rs Documentation

Author:

Rohit Goswami

1 rsx-rs

Rust rewrite of RADSex, a computational pipeline for analyzing sex-determination using RAD-Sequencing data. Drop-in CLI replacement with C FFI for language bindings.

1.1 Features

  • All 7 original commands: process, distrib, signif, depth, freq, map, subset

  • merge command: external sort-merge for 75M+ sequence tables

  • pca command: streaming Tucker/PCA in O(nindividuals2) memory

  • Byte-identical output to C++ RADSex (when groups specified explicitly)

  • Bounded-memory streaming: all commands work on 50GB+ tables

  • Parallel file processing via rayon

  • minimap2 alignment (replaces BWA-MEM)

  • Optional Parquet output for merge (--features parquet-io)

  • C API with cbindgen for R/Python/C++ integration

  • Cross-platform: Linux, macOS (Intel + Apple Silicon), Windows (without map)

  • SymPy/Sollya mathematical proofs for all optimizations

1.2 Quick start

# Install from source
git clone https://github.com/HaoZeke/rsx-rs.git
cd rsx-rs
cargo build --release
cp target/release/rsx ~/.local/bin/

# Or via pixi
pixi run build

# Run the pipeline
rsx process -i reads/ -o markers.tsv -T 8
rsx distrib -t markers.tsv -p popmap.tsv -o distrib.tsv -G M,F
rsx signif -t markers.tsv -p popmap.tsv -o signif.tsv -G M,F
rsx map -t markers.tsv -p popmap.tsv -g genome.fa -o aligned.tsv -G M,F