https://github.com/lioscro/pyseq-align
Python interface for seq-align C library
https://github.com/lioscro/pyseq-align
Last synced: 9 months ago
JSON representation
Python interface for seq-align C library
- Host: GitHub
- URL: https://github.com/lioscro/pyseq-align
- Owner: Lioscro
- License: mit
- Created: 2021-04-24T22:26:44.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-08-13T15:34:29.000Z (over 4 years ago)
- Last Synced: 2025-02-27T22:35:34.986Z (10 months ago)
- Language: Cython
- Size: 26.4 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pyseq-align
Python interface for the [seq-align](https://github.com/noporpoise/seq-align) C library, written by Isaac Turner (@noporpoise).
## Installation
```
pip install pyseq-align
```
To install directly from GitHub,
```
git clone https://github.com/Lioscro/pyseq-align.git --recursive
cd pyseq-align
pip install .
```
## Usage
Two alignment algorithms are provided: Needleman-Wunsch and Smith-Waterman.
```python
from pyseq_align import NeedlemanWunsch
nw = NeedlemanWunsch()
al = nw.align('ACGT', 'ACGTC')
print(al.result_a) # ACGT-
print(al.result_b) # ACGTC
print(al.score)
```
```python
from pyseq_align import SmithWaterman
sw = SmithWaterman()
als = sw.align('ACGT', 'ACGTC') # unlike above, this is a list of Alignment's
for al in als:
print(al.result_a, al.pos_a) # ACGT, 0
print(al.result_b, al.pos_b) # ACGT, 0
print(al.score)
```