Roxy
Classical protein sequence descriptors for machine learning.
Roxy computes classical numerical descriptors from amino-acid sequences and
returns tabular features as polars.DataFrame objects.
Install
pip install roxylib
# or with uv:
uv add roxylib
Quickstart
from roxy import read_fasta, DESCRIPTOR_REGISTRY
# Load sequences from FASTA
records = read_fasta("sequences.fasta") # [(id, seq), ...]
sequences = [seq for _, seq in records]
ids = [seq_id for seq_id, _ in records]
descriptor = DESCRIPTOR_REGISTRY["aac"]()
features = descriptor.compute(sequences, ids=ids) # polars.DataFrame
For direct Python use, descriptors are importable by family:
from roxy.descriptors.aaindex import AAIndexDescriptor
from roxy.descriptors.composition import KmerFullAlphabetDescriptor
from roxy.descriptors.physicochemical import ChargeDescriptor
kmer = KmerFullAlphabetDescriptor(k=2)
aaindex = AAIndexDescriptor()
charge = ChargeDescriptor()
kmer_features = kmer.compute(["ACDEFGHIK"])
aaindex_features = aaindex.compute(["ACDEFGHIK"])
charge_features = charge.compute(["ACDEFGHIK"])
CLI
roxy --help
roxy --version
# List and inspect descriptors
roxy list
roxy list --family composition
roxy describe aac
# Compute descriptors from FASTA, CSV, or Parquet input
roxy compute sequences.fasta -d aac -d charge -o features.csv
roxy compute sequences.fasta -f composition -o composition.parquet
roxy compute sequences.csv -d aac --seq-col sequence --id-col id -o features.csv
roxy compute sequences.fasta --all -o all_features.parquet
# Generate and use a YAML config with descriptor parameters
roxy init-config -d aac -d charge -o roxy.yaml
roxy init-config -f composition -o composition.yaml
roxy init-config --all -o all_descriptors.yaml
roxy compute sequences.fasta --config roxy.yaml -o configured_features.csv
roxy compute requires exactly one descriptor selector: --config, --all,
--descriptor/-d, or --family/-f. CSV and Parquet inputs use sequence as
the default sequence column; pass --seq-col and --id-col when needed.
Examples
The repository ships a few plain Python scripts under examples/:
examples/basic_api.pyfor direct descriptor use from Pythonexamples/configured_descriptors.pyfor parameterized descriptor instancesexamples/cli_roundtrip.pyfor an end-to-end CLI config and compute flow
Run them with:
bash examples/run_ci_examples.sh
Descriptor Families
Registry keys are the names used by roxy compute -d, config files, and output
column prefixes.
| Family | Descriptor keys |
|---|---|
| aaindex | aaindex |
| autocorrelation | autocorrelation |
| complexity | entropy_complexity, local_repetition, run_blockiness |
| composition | aac, compositional_bias, dpc, grouped, kmer_full_alphabet |
| ctd | ctd_classic, distribution |
| hybrid | family_summary |
| motif | functional_residue_content, pattern, spacing, user_regex |
| physicochemical | charge, global_basic, hydrophobicity, order_disorder, structural_propensity |
| positional | normalized, sliding_window, terminal |
| pseudo | pseaac, qso, sequence_order |
Development
uv sync
uv run pytest -q
uv run task lint
uv run roxy --help
Related Projects
- Sylphy — sequence encoders and pretrained model embeddings
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 roxylib-0.2.0.tar.gz.
File metadata
- Download URL: roxylib-0.2.0.tar.gz
- Upload date:
- Size: 139.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8313c3c65684ba7eacb260d6b6568ea33b0f4ec61e2194ec3a9e338d6551805f
|
|
| MD5 |
d8618a2bd911380f02b0a2ea62c84c0e
|
|
| BLAKE2b-256 |
d0654fbe065d46f691dd55898ce0a246d4eb000d82e3af447d273ca67da44f22
|
Provenance
The following attestation bundles were made for roxylib-0.2.0.tar.gz:
Publisher:
publish-pypi.yml on kren-ai-lab/roxy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
roxylib-0.2.0.tar.gz -
Subject digest:
8313c3c65684ba7eacb260d6b6568ea33b0f4ec61e2194ec3a9e338d6551805f - Sigstore transparency entry: 2450515894
- Sigstore integration time:
-
Permalink:
kren-ai-lab/roxy@913ddc650d4470f128b25d5ad0465d21d01cfff0 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/kren-ai-lab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@913ddc650d4470f128b25d5ad0465d21d01cfff0 -
Trigger Event:
push
-
Statement type:
File details
Details for the file roxylib-0.2.0-py3-none-any.whl.
File metadata
- Download URL: roxylib-0.2.0-py3-none-any.whl
- Upload date:
- Size: 99.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b059ea2397a9c429c86b9e2bdf63fc7033d82e316c2dad7b70b57b6316e8fced
|
|
| MD5 |
51338229304bc89769b9f11e01f72a3f
|
|
| BLAKE2b-256 |
849bb7d88c9ac791e37438d01f83c6952263d032921bf871d5610caf53b958ed
|
Provenance
The following attestation bundles were made for roxylib-0.2.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on kren-ai-lab/roxy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
roxylib-0.2.0-py3-none-any.whl -
Subject digest:
b059ea2397a9c429c86b9e2bdf63fc7033d82e316c2dad7b70b57b6316e8fced - Sigstore transparency entry: 2450516635
- Sigstore integration time:
-
Permalink:
kren-ai-lab/roxy@913ddc650d4470f128b25d5ad0465d21d01cfff0 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/kren-ai-lab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@913ddc650d4470f128b25d5ad0465d21d01cfff0 -
Trigger Event:
push
-
Statement type: