Skip to main content

pyrsx

Python bindings for rsx: a high-performance streaming toolkit for RAD-seq sex determination.

Installation

pip install pyrsx

Usage

import pyrsx

# Process FASTQ files into marker depth table
pyrsx.process("reads/", "markers.tsv", threads=4, min_depth=5)

# Compute distribution with Fisher's exact test + FDR
pyrsx.distrib("markers.tsv", "popmap.tsv", "distrib.tsv",
              test="fisher", correction="fdr")

# Extract significant markers with Bayesian output
pyrsx.signif("markers.tsv", "popmap.tsv", "signif.tsv",
             test="fisher", correction="fdr", bayes=True)

# Streaming PCA
pyrsx.pca("markers.tsv", "pca_results/", n_components=10)

# Merge tables (bounded memory, handles 75M+ sequences)
pyrsx.merge(["table1.tsv", "table2.tsv"], "merged.tsv")

Features

  • All rsx commands accessible from Python
  • 3.14x geometric-mean speedup on the tracked Slurm literature comparison panel
  • Bounded-memory streaming for arbitrarily large datasets
  • Multiple statistical tests: chi-squared, Fisher's exact, G-test
  • Multiple corrections: Bonferroni, Benjamini-Hochberg FDR
  • Bayesian sex-linkage classification (Bayes Factor + posterior)
  • Streaming PCA via Tucker mode-2 decomposition
  • K-mer based marker deduplication

The low-level functions above are thin wrappers. For most users the MarkerTable + result objects (in pyrsx.api) are the idiomatic entry point:

import pyrsx as rsx

table = rsx.MarkerTable.from_path("markers.tsv")   # or from_dataframe(...)
result = table.triage(popmap="popmap.tsv", min_depth=10)

# Everything is a narwhals DataFrame under the hood → backend agnostic
print(result.df)                    # stays in whatever backend you prefer
df = result.to_polars()             # or .to_pandas(), to_dataframe(backend=...)

How outputs are read (no forced pandas fallback): Internal TSVs produced by rsx core commands are read with pyarrow.csv (handling the leading #Number of markers comment via skip_rows=1) and then wrapped with to_narwhals(...). The exposed objects are always narwhals DataFrames (concrete backend = pyarrow by default for efficiency). You only pull in pandas/polars if you ask for that backend later. This is the standard narwhals approach used throughout the high-level API (see _adapters.py, _read_core_tsv, and the detailed docs in the Rust extension).

See the docstrings of MarkerTable, the various *Result classes, and _read_core_tsv for the full rationale.

Release files for pyrsx 0.2.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyrsx 0.2.10
File Size Uploaded
pyrsx-0.2.10.tar.gz 168.7 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for pyrsx 0.2.10
File
pyrsx-0.2.10-cp39-abi3-manylinux_2_28_aarch64.whl CPython 3.9 abi3 Linux glibc 2.28+ ARM64 Details
pyrsx-0.2.10-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details
pyrsx-0.2.10-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details
pyrsx-0.2.10-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details

Total release size: 17.3 MB

Release files / pyrsx-0.2.10.tar.gz

Download URL pyrsx-0.2.10.tar.gz
Size 168.7 kB
Tags Source
SHA-256 checksum
How to use checksums
6626c436d0a36884d6c30da93a7780d740a15dacaea848ada98a344486d8a4d1
BLAKE2b-256 checksum
How to use checksums
c072eadf9d78fe77195a11e965f4944b1390eb1b2cb5971bf2d67c563f801419
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.

Transparency log

Release files / pyrsx-0.2.10-cp39-abi3-manylinux_2_28_aarch64.whl

Download URL pyrsx-0.2.10-cp39-abi3-manylinux_2_28_aarch64.whl
Size 4.3 MB
Tags CPython 3.9 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
a8c9c9dbaa98c60e52b6f3ae4366b6567ce76bae72cce5a1d1009f372d9a1c10
BLAKE2b-256 checksum
How to use checksums
fe37045be3e82d7618c058beb722363c6035448fd6bfe0e6a521a6ac3f723302
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.

Transparency log

Release files / pyrsx-0.2.10-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pyrsx-0.2.10-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 4.6 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
0160df85f271bce6c4c74627a08bb959c90f56cdf062ac4150785b30a51387d2
BLAKE2b-256 checksum
How to use checksums
418ec060250f4f9bf5df4c1027b543999ef529418020e13588168fa086c461a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.

Transparency log

Release files / pyrsx-0.2.10-cp39-abi3-macosx_11_0_arm64.whl

Download URL pyrsx-0.2.10-cp39-abi3-macosx_11_0_arm64.whl
Size 3.9 MB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ef6b61c5aaa584ef1783272ead477a5c233e752f805ef60794330cda56f37714
BLAKE2b-256 checksum
How to use checksums
540aa2dc5b3a071a224fc89179c6f9d355e2d2caa1e4357393d8df2086ca8d00
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.

Transparency log

Release files / pyrsx-0.2.10-cp39-abi3-macosx_10_12_x86_64.whl

Download URL pyrsx-0.2.10-cp39-abi3-macosx_10_12_x86_64.whl
Size 4.3 MB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
dfd9191871578f9748b23dc36accb043dbe849b0603e2a1e90400fe04fc7d270
BLAKE2b-256 checksum
How to use checksums
180f10ac6e554e6016679710f33d10d140c393331e54d3e4d51346e39114cec8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.10 This release

5 release files

0.2.6

5 release files

0.2.5

5 release files

0.2.4

5 release files

0.2.3

5 release files

0.1.0

7 release files

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page