Python bindings for rsx: high-performance RAD-seq sex determination toolkit
Project description
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
High-level API & backend agnosticism (recommended)
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyrsx-0.2.3.tar.gz.
File metadata
- Download URL: pyrsx-0.2.3.tar.gz
- Upload date:
- Size: 111.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7bced5cbd18e1e11012701fa776871b28035df2c328cc67f318ca7ff22e89e44
|
|
| MD5 |
710cb2b9559f7be6abb3b36a52cf896e
|
|
| BLAKE2b-256 |
7f9a9a5985789c2d1746187eecdbf5398aabd8a753bbaeb109668debc9554de4
|
Provenance
The following attestation bundles were made for pyrsx-0.2.3.tar.gz:
Publisher:
pypi.yml on HaoZeke/rsx-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyrsx-0.2.3.tar.gz -
Subject digest:
7bced5cbd18e1e11012701fa776871b28035df2c328cc67f318ca7ff22e89e44 - Sigstore transparency entry: 1723939061
- Sigstore integration time:
-
Permalink:
HaoZeke/rsx-rs@2875e4b56bad13bc27f894a5999810ee3e04ccf6 -
Branch / Tag:
refs/tags/v0.2.3 - Owner: https://github.com/HaoZeke
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@2875e4b56bad13bc27f894a5999810ee3e04ccf6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyrsx-0.2.3-cp39-abi3-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: pyrsx-0.2.3-cp39-abi3-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 4.4 MB
- Tags: CPython 3.9+, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cab850f86ef2747c0e41b36b342cf363da32afdae5f44a621395f10b63b19366
|
|
| MD5 |
242fd624166decdfaaf803a80760fd65
|
|
| BLAKE2b-256 |
9579fc249d11064f5aeba5abaab15a5a81459952a484188dd22e8328b7cfe57f
|
Provenance
The following attestation bundles were made for pyrsx-0.2.3-cp39-abi3-manylinux_2_28_aarch64.whl:
Publisher:
pypi.yml on HaoZeke/rsx-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyrsx-0.2.3-cp39-abi3-manylinux_2_28_aarch64.whl -
Subject digest:
cab850f86ef2747c0e41b36b342cf363da32afdae5f44a621395f10b63b19366 - Sigstore transparency entry: 1723939527
- Sigstore integration time:
-
Permalink:
HaoZeke/rsx-rs@2875e4b56bad13bc27f894a5999810ee3e04ccf6 -
Branch / Tag:
refs/tags/v0.2.3 - Owner: https://github.com/HaoZeke
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@2875e4b56bad13bc27f894a5999810ee3e04ccf6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyrsx-0.2.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: pyrsx-0.2.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 4.6 MB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4fb2644222d057a72be77f7bcb4ce0edfe88f484ca546339ca231c7987bb106
|
|
| MD5 |
2f2768607147d5a52b6d38d6cd654d72
|
|
| BLAKE2b-256 |
c646444d093eebc87df318dc169af67dfe62759cdf20c0fc7da66cb2ccadf0ae
|
Provenance
The following attestation bundles were made for pyrsx-0.2.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
pypi.yml on HaoZeke/rsx-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyrsx-0.2.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
f4fb2644222d057a72be77f7bcb4ce0edfe88f484ca546339ca231c7987bb106 - Sigstore transparency entry: 1723939273
- Sigstore integration time:
-
Permalink:
HaoZeke/rsx-rs@2875e4b56bad13bc27f894a5999810ee3e04ccf6 -
Branch / Tag:
refs/tags/v0.2.3 - Owner: https://github.com/HaoZeke
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@2875e4b56bad13bc27f894a5999810ee3e04ccf6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyrsx-0.2.3-cp39-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: pyrsx-0.2.3-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 4.0 MB
- Tags: CPython 3.9+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab677a3a17d00b6574750c5131bdb2541493b8b59eb80a6b1a6a0af3848d0047
|
|
| MD5 |
211681653ad425eb66c4e9b6ba0c7de6
|
|
| BLAKE2b-256 |
376b528b545fd676973ee9951c87ff5cd8647c87c756de0b69ff016c67a09296
|
Provenance
The following attestation bundles were made for pyrsx-0.2.3-cp39-abi3-macosx_11_0_arm64.whl:
Publisher:
pypi.yml on HaoZeke/rsx-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyrsx-0.2.3-cp39-abi3-macosx_11_0_arm64.whl -
Subject digest:
ab677a3a17d00b6574750c5131bdb2541493b8b59eb80a6b1a6a0af3848d0047 - Sigstore transparency entry: 1723939753
- Sigstore integration time:
-
Permalink:
HaoZeke/rsx-rs@2875e4b56bad13bc27f894a5999810ee3e04ccf6 -
Branch / Tag:
refs/tags/v0.2.3 - Owner: https://github.com/HaoZeke
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@2875e4b56bad13bc27f894a5999810ee3e04ccf6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyrsx-0.2.3-cp39-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: pyrsx-0.2.3-cp39-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 4.4 MB
- Tags: CPython 3.9+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db2d672470755db46ed6363037c73ebe4c1b5533e3317e303f646638a9196ca5
|
|
| MD5 |
e00bef6feeaab4f1c34851fa7ffec6d3
|
|
| BLAKE2b-256 |
be9283649cc4faa538d3579b5de105f22a74a4922f8afe0d437b01cfd51e125c
|
Provenance
The following attestation bundles were made for pyrsx-0.2.3-cp39-abi3-macosx_10_12_x86_64.whl:
Publisher:
pypi.yml on HaoZeke/rsx-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyrsx-0.2.3-cp39-abi3-macosx_10_12_x86_64.whl -
Subject digest:
db2d672470755db46ed6363037c73ebe4c1b5533e3317e303f646638a9196ca5 - Sigstore transparency entry: 1723939922
- Sigstore integration time:
-
Permalink:
HaoZeke/rsx-rs@2875e4b56bad13bc27f894a5999810ee3e04ccf6 -
Branch / Tag:
refs/tags/v0.2.3 - Owner: https://github.com/HaoZeke
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@2875e4b56bad13bc27f894a5999810ee3e04ccf6 -
Trigger Event:
push
-
Statement type: