Papers
arxiv:2606.06434

rsx: A high-performance streaming toolkit for RAD-seq sex determination

Published on Aug 3
Authors:
,

Abstract

rsx is a memory-efficient Rust reimplementation of RADSex that adds Bayesian grading, GPU acceleration, and Python/C interfaces while preserving backward compatibility.

Background Restriction site-associated DNA sequencing (RAD-seq) is widely used to discover sex-linked markers in non-model organisms, and RADSex provides the reference workflow for building marker-by-individual depth tables and testing sex-biased marker distributions. Its table-building commands grow memory-hungry as panels reach millions of RAD tags, it reports frequentist calls with no posterior evidence, and it offers no Python or C interface. Results rsx is a Rust implementation of the complete RADSex command set that preserves marker-table semantics and command-line compatibility. It combines 2-bit DNA keys, parallel ingestion, memory-mapped tables, external sorting, bitset group counts and a streamed Gram matrix so that writable allocations stay bounded by the number of individuals or by an explicit buffer, with false-discovery-rate ranking the one deliberate exception. Conjugate Beta-Binomial Bayes factors and directional posteriors grade each marker as a strict call, a posterior-supported hypothesis or a Bayes-factor-only row, and an optional CUDA backend batches the per-marker arithmetic on the GPU. On four published RAD-seq panels comprising 41.9 billion sequenced bases, rsx reproduced the RADSex v1.2.0 calls, recovered every Bonferroni-significant positive-control marker, and was 8.38-fold faster in geometric mean across 56 paired timings; the CUDA backend adds up to 29.86-fold on the p-value batch. Python and C bindings drive the same core from notebooks and pipelines. Conclusions rsx is an allocation-bounded, statistically extended replacement for RADSex that stays backward-compatible and reports its evidence in explicit grades. It is released under the GPL-3.0-or-later licence, with a reproducibility archive covering every reported number.

Community

RADSex is the reference RAD-seq sex-marker workflow: build a marker-by-individual depth table, test which tags track phenotypic sex. The C++ table-building commands grow with the number of tags, the output is a frequentist call with no posterior, and there is no Python or C interface.

rsx is a Rust implementation of the complete command set. Marker-table semantics and the CLI stay compatible. After FASTQ ingestion, writable allocations are bounded by the number of individuals or by an explicit buffer (FDR ranking is the one deliberate exception). Conjugate Beta-Binomial Bayes factors and directional posteriors grade each marker as a strict call, a posterior-supported hypothesis, or a Bayes-factor-only row. An optional CUDA backend batches the per-marker arithmetic.

Benchmarks: four published RAD-seq panels, 41.9 billion sequenced bases, tables up to 29 million markers.

Results: reproduced RADSex v1.2.0 calls; recovered every Bonferroni-significant positive-control marker; 8.38-fold geometric-mean speedup across 56 paired timings; 2.77-fold on primary FASTQ processing. CUDA p-value batch: 29.86-fold at 1e6 markers on an A100, 14.43-fold on an RTX 5070.

The graded layer is the statistical difference. Ayu and tench positive controls keep the strict calls and add seven posterior-supported candidates. Zebra danio, a frequentist-null panel in the source paper, surfaces 30 W-linked hypotheses. The Antarctic notothenioid panel withholds 400 Bayes-factor-only rows from the sex-system call.

Paper: https://doi.org/10.1186/s12859-026-06628-4
Code: https://github.com/HaoZeke/rsx-rs
Docs: https://rsx.rgoswami.me

Sign up or log in to comment

Get this paper in your agent:

hf papers read 2606.06434
Don't have the latest CLI?
curl -LsSf https://hf.co/cli/install.sh | bash

Models citing this paper 0

No model linking this paper

Cite arxiv.org/abs/2606.06434 in a model README.md to link it from this page.

Datasets citing this paper 0

No dataset linking this paper

Cite arxiv.org/abs/2606.06434 in a dataset README.md to link it from this page.

Spaces citing this paper 0

No Space linking this paper

Cite arxiv.org/abs/2606.06434 in a Space README.md to link it from this page.

Collections including this paper 0

No Collection including this paper

Add this paper to a collection to link it from this page.