No project description provided
Project description
SigAlign for python
Requirements
- python >=3.7
Install
pip install sigalign
Usage Example
from sigalign import SequenceStorage, Reference, Aligner
# 1. Define `SequenceStorage`
ss = SequenceStorage()
ss.add_record("record_1", "ACACAGATCGCAAACTCACAATTGTATTTCTTTGCCACCTGGGCATATACTTTTTGCGCCCCCTCATTTA")
ss.add_record("record_2", "TCTGGGGCCATTGTATTTCTTTGCCAGCTGGGGCATATACTTTTTCCGCCCCCTCATTTACGCTCATCAC")
# 2. Build `Reference`
reference = Reference(
ss,
klt_size = 2,
sas_ratio = 2,
comp_block = True,
)
# 3. Make `Aligner`
aligner = Aligner(
4,
6,
2,
50,
0.2,
is_local_mode = True,
)
# 4. Perform alignment
query = "CAAACTCACAATTGTATTTCTTTGCCAGCTGGGCATATACTTTTTCCGCCCCCTCATTTAACTTCTTGGA"
result = aligner.align_query(reference, query)
# 5. Print result
import json
json.loads(result.to_json())
import pandas as pd
df = pd.DataFrame(
result.to_2d_array(),
columns = [
'index', 'label', 'penalty', 'length',
'qstart', 'qend', 'rstart', 'rend', 'operations',
]
)
Build manually
- Use
maturin
as backendpip install maturin maturin develop
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
sigalign-0.1.0.tar.gz
(45.9 kB
view hashes)
Built Distribution
Close
Hashes for sigalign-0.1.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 296cb0ab8cfc9c83d3faf6cae1aee003cd2f420bb6569a65549b7f2fa80b226a |
|
MD5 | f45b063a43d7d128978c5158b7751c0c |
|
BLAKE2b-256 | 7acf8fda4e99e8f8e63514a4526456a5cceab382686566a17908b71a7da2d62a |