Python bindings for spoars — partial order alignment consensus and MSA
Project description
spoars (Python)
Python bindings for spoars — a faithful, SIMD-accelerated native-Rust reimplementation of the spoa partial order alignment (POA) library, for consensus generation and multiple sequence alignment.
Install
pip install spoars
Usage
import spoars
# One-call convenience:
g = spoars.poa(["ACGTACGT", "ACGTTCGT", "ACGTACGT"])
print(g.consensus()) # "ACGTACGT"
print(g.msa()) # ['ACGTACGT', 'ACGTTCGT', 'ACGTACGT']
# Or build incrementally, with an alignment type and scoring:
g = spoars.Poa(alignment_type="global", scoring=spoars.Scoring.default())
for read in ["ACGTACGT", "ACGTTCGT", "ACGTACGT"]:
g.add(read)
print(g.consensus(min_coverage=2))
print(g.gfa()) # GFA v1
print(g.dot()) # Graphviz DOT
alignment_type is one of "global", "local", or "overlap". Scoring takes
(match, mismatch, gap_open, gap_extend, gap_open2, gap_extend2); the gap model
(linear/affine/convex) is inferred, and Scoring.default() is spoa's convex
default (5, -4, -8, -6, -10, -4).
Development
This package is built with maturin and developed with pixi:
pixi run develop # build & install the extension into the dev env
pixi run test # rebuild + pytest
pixi run format-check
pixi run lint
pixi run typecheck
License
MIT — see the repository.
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 Distributions
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 spoars-0.1.0-cp310-abi3-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: spoars-0.1.0-cp310-abi3-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 335.4 kB
- Tags: CPython 3.10+, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2a42fe99d40ad511e02638e198f684aac991a40b7b5ea033a6be44cfe592528
|
|
| MD5 |
c41d383e416a2f71338d7a0e690343be
|
|
| BLAKE2b-256 |
3704224551e519ce1cbcffc02045add651d53ec5605e24d3519e85c40e9b7ca2
|
Provenance
The following attestation bundles were made for spoars-0.1.0-cp310-abi3-manylinux_2_28_x86_64.whl:
Publisher:
pypi.yml on fg-labs/spoars
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
spoars-0.1.0-cp310-abi3-manylinux_2_28_x86_64.whl -
Subject digest:
c2a42fe99d40ad511e02638e198f684aac991a40b7b5ea033a6be44cfe592528 - Sigstore transparency entry: 2087379305
- Sigstore integration time:
-
Permalink:
fg-labs/spoars@10859e291078576fcd9c1ef957a324686f9812b1 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/fg-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@10859e291078576fcd9c1ef957a324686f9812b1 -
Trigger Event:
release
-
Statement type:
File details
Details for the file spoars-0.1.0-cp310-abi3-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: spoars-0.1.0-cp310-abi3-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 292.0 kB
- Tags: CPython 3.10+, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aea7f74049fb585ebab9ee4b544aca2aac9193ddd9e8667a9ca2ddcbdd728e88
|
|
| MD5 |
401fdd693c2abeaa4500af4500fc5247
|
|
| BLAKE2b-256 |
291d72cc42d37787fba3bfecc5e1bb89a7dc7f6f69aaabd645998dc1682b72f6
|
Provenance
The following attestation bundles were made for spoars-0.1.0-cp310-abi3-manylinux_2_28_aarch64.whl:
Publisher:
pypi.yml on fg-labs/spoars
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
spoars-0.1.0-cp310-abi3-manylinux_2_28_aarch64.whl -
Subject digest:
aea7f74049fb585ebab9ee4b544aca2aac9193ddd9e8667a9ca2ddcbdd728e88 - Sigstore transparency entry: 2087379404
- Sigstore integration time:
-
Permalink:
fg-labs/spoars@10859e291078576fcd9c1ef957a324686f9812b1 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/fg-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@10859e291078576fcd9c1ef957a324686f9812b1 -
Trigger Event:
release
-
Statement type:
File details
Details for the file spoars-0.1.0-cp310-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: spoars-0.1.0-cp310-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 275.6 kB
- Tags: CPython 3.10+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd4c2173729b65bd4308b6673ec173c346e6d43e3c391e8365e4972147ae91a5
|
|
| MD5 |
719381316811b197beda78afe100f133
|
|
| BLAKE2b-256 |
c354c6760c33b2a6c034cc9cec3d77cd79ec29f6eb3647dc0f00fe34ee374d79
|
Provenance
The following attestation bundles were made for spoars-0.1.0-cp310-abi3-macosx_11_0_arm64.whl:
Publisher:
pypi.yml on fg-labs/spoars
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
spoars-0.1.0-cp310-abi3-macosx_11_0_arm64.whl -
Subject digest:
dd4c2173729b65bd4308b6673ec173c346e6d43e3c391e8365e4972147ae91a5 - Sigstore transparency entry: 2087379172
- Sigstore integration time:
-
Permalink:
fg-labs/spoars@10859e291078576fcd9c1ef957a324686f9812b1 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/fg-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@10859e291078576fcd9c1ef957a324686f9812b1 -
Trigger Event:
release
-
Statement type: