seq_alignment : A python tool for sequence alignment and edit distances
Module to determine distances between two strings (or two lists of strings). The primary use case of this package is to allow users to both compute distance measures using different distance algorithms. Additionally, we provide additional functionality to both visualize the alignment of the two strings. This allows users to determine how one string is transformed into another.
For reference on differences between global and local alignment, see Chapter 11 and 12 of Algorithms on Strings, Trees, and Sequences.
Installation
Project is available on pypi, installation via pip:
pip install seq_alignment
Algorithms Available
Global Alignment (Wagner Fischer)
To run the matching, you import global_similarity class, initialize with the strings you want to compare (accepts strings or list of strings), and then run your algorithm.
The main options available are whether to compute back-trace, to not compute backtrace and return on edit distance (or string similarity) values set backtrace = False when initalizing the class.
## Run algo getting ONLY edit distance
##
## This runs fast due to not having to store
## backtrace values
from seq_alignment import global_similarity
# Test values
str1=['v','i','n','e']
str2=['v','i','n']
# Initalize matching class function
sim_init = global_similarity(str1,str2,False)
# Run matching
sim_init.run()
# Get edit distance
print("EDIT DISTANCE")
print(sim_init.match_distance)
Local Alignment (Smith Waterman)
Same syntax to running global alignment, but now you import the local_similarity class.
## Run algo getting ONLY edit distance
##
## This runs fast due to not having to store
## backtrace values
from seq_alignment import local_similarity
# Test values
str1=['v','i','n','e']
str2=['v','i','n']
# Initalize matching class function
sim_init = local_similarity(str1,str2,False)
# Run matching
sim_init.run()
# Get edit distance
print("EDIT DISTANCE")
print(sim_init.match_distance)
Metadata
Release files for seq-alignment 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| seq_alignment-1.0.0.tar.gz | 11.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| seq_alignment-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.1 kB
Release files / seq_alignment-1.0.0.tar.gz
| Download URL | seq_alignment-1.0.0.tar.gz |
|---|---|
| Size | 11.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1c50fb85f01e3846180e830e4dcf37b412ab1e73a2e21e5633c239545aef61db
|
|
BLAKE2b-256 checksum How to use checksums |
479d7c6b315ee8921bc2155fceea5dcd541e5c642cb2c5d6933f6ea24f755e60
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.0
|
Release files / seq_alignment-1.0.0-py3-none-any.whl
| Download URL | seq_alignment-1.0.0-py3-none-any.whl |
|---|---|
| Size | 15.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5c0bfc487d17786d6326bf451c6b655302d26295408816ec9f594ad208f83fa9
|
|
BLAKE2b-256 checksum How to use checksums |
6c65dd3431e563d9bb1eb3d62e20bd331ff6410b58d322b271e6f6d39bc5363c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.0
|
Security for seq-alignment 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.