Reference genome Selection Tool
Project description
ReSeT — Reference genome Selection Tool
ReSeT selects a minimal, representative subset of sequences from a pre-clustered collection. Given a pairwise distance matrix and cluster labels, it minimises an objective that penalises (1) the cost of selecting each sequence, (2) within-cluster coverage gaps, and (3) cross-cluster similarity between selected sequences. The result is a compact reference set that covers every taxon while avoiding redundancy.
Installation
pip install reset-bio
Quick start
import numpy as np
from reset import Solution
# Distance matrix (n × n) and cluster assignments (integer, length n)
D = np.array([[0.0, 0.2, 0.8], [0.2, 0.0, 0.7], [0.8, 0.7, 0.0]])
clusters = np.array([0, 0, 1])
sol = Solution(D, clusters, selection_cost=0.1)
sol.local_search(max_runtime=10)
print(np.flatnonzero(sol.selection)) # indices of selected sequences
Command-line interface
reset \
--clusters clusters.csv \
--distances distances.tsv \
--distance_format mash \
--selection_cost 1e-1 \
--scale 1e-5 \
--output selected.txt
Supported distance formats: mash, sourmash_cosine, sourmash_jaccard, generic.
Distance formats
| Format | Description |
|---|---|
mash |
Mash lower-triangular output (mash triangle) |
sourmash_cosine |
Sourmash CSV (column 12 = cosine distance) |
sourmash_jaccard |
Sourmash CSV (column 6 = Jaccard distance) |
generic |
Any delimited (i, j, distance) file |
Multiprocessing
Use Solution_shm for parallel local search:
from reset import Solution_shm
sol = Solution_shm(D, clusters, selection_cost=0.1)
sol.local_search(num_processes=4, max_runtime=60)
Dashboard
An interactive Streamlit dashboard is included. Install with dashboard extras and launch:
pip install "reset-bio[dashboard]"
streamlit run $(python -c "import reset.dashboard.app as a; import os; print(os.path.abspath(a.__file__))")
The dashboard defaults to the bundled toy example — no configuration needed.
License
MIT — see LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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 reset_bio-1.3.0.tar.gz.
File metadata
- Download URL: reset_bio-1.3.0.tar.gz
- Upload date:
- Size: 46.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e88af6d68864d7b8abb8c3dd79cf36bb54ce30812e838559a14e5727260264c
|
|
| MD5 |
d5eeb9fb04c8ba02dcef34aef4801ccf
|
|
| BLAKE2b-256 |
63be964d684fd1f02fbf61dd39bdb7afa9f4e7b6dc0207a35d517bfc7a46617c
|
Provenance
The following attestation bundles were made for reset_bio-1.3.0.tar.gz:
Publisher:
publish.yml on JaspervB-tud/ReSeT
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
reset_bio-1.3.0.tar.gz -
Subject digest:
5e88af6d68864d7b8abb8c3dd79cf36bb54ce30812e838559a14e5727260264c - Sigstore transparency entry: 1824109980
- Sigstore integration time:
-
Permalink:
JaspervB-tud/ReSeT@69a6938a62d7e2948fb2bcecae9ab6b639ad837f -
Branch / Tag:
refs/tags/v1.3.0 - Owner: https://github.com/JaspervB-tud
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@69a6938a62d7e2948fb2bcecae9ab6b639ad837f -
Trigger Event:
push
-
Statement type:
File details
Details for the file reset_bio-1.3.0-py3-none-any.whl.
File metadata
- Download URL: reset_bio-1.3.0-py3-none-any.whl
- Upload date:
- Size: 44.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
edbffc716a1e3daac987d8e66997d80654bd4982523203db8b2171c55365e69f
|
|
| MD5 |
73725a66962e91ed66e42ba873ed1c0d
|
|
| BLAKE2b-256 |
1d83a832390ed89312fd1e54715aff5bd08978584dca1a141c6be0da08f7abc5
|
Provenance
The following attestation bundles were made for reset_bio-1.3.0-py3-none-any.whl:
Publisher:
publish.yml on JaspervB-tud/ReSeT
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
reset_bio-1.3.0-py3-none-any.whl -
Subject digest:
edbffc716a1e3daac987d8e66997d80654bd4982523203db8b2171c55365e69f - Sigstore transparency entry: 1824110094
- Sigstore integration time:
-
Permalink:
JaspervB-tud/ReSeT@69a6938a62d7e2948fb2bcecae9ab6b639ad837f -
Branch / Tag:
refs/tags/v1.3.0 - Owner: https://github.com/JaspervB-tud
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@69a6938a62d7e2948fb2bcecae9ab6b639ad837f -
Trigger Event:
push
-
Statement type: