nwalign 0.3.1
Needleman-Wunsch global sequence alignment
This module provides a python module and a command-line interface to do global- sequence alignment using the Needleman-Wunsch algorithm. It uses cython and numpy for speed.
Command-Line Usage
the nwalign executable is installed to the PATH by setuptools
$ nwalign alphabet alpet alphabet alp---et
specify an alignment scoring matrix
$ nwalign --matrix /usr/share/ncbi/data/BLOSUM62 EEAEE EEEEG EEAEE- EE-EEG
with specified penalties
$ nwalign --gap_open -10 --gap_extend -4 --match 12 ASDFF ASFF ASDFF AS-FF
Python Usage
Alignment
>>> import nwalign as nw
>>> nw.global_align("CEELECANTH", "PELICAN", matrix='PAM250')
('CEELE-CANTH', '-PEL-ICAN--')
# with a specified penalty for open and extend.
>>> nw.global_align("CEELECANTH", "PELICAN", gap_open=-10, gap_extend=-4, matrix='PAM250')
('CEELECANTH', '-PELICAN--')
the matrix is specified as the full path to an scoring matrix as is distributed with the NCBI toolset.
Scoring
get the score of an alignment. (the first 2 args are from an alignment and must have the same length.
>>> nw.score_alignment('CEELECANTH', '-PELICAN--', gap_open=-5,
... gap_extend=-2, matrix='PAM250')
11
>>> nw.score_alignment('CEELE-CANTH', '-PEL-ICAN--', gap_open=-5,
... gap_extend=-2, matrix='PAM250')
6
| File | Type | Py Version | Uploaded on | Size | # downloads |
|---|---|---|---|---|---|
| nwalign-0.3.1.tar.gz (md5) | Source | 2010-01-08 | 49KB | 789 | |
- Author: brentp
- Home Page: http://bitbucket.org/brentp/biostuff/
- Keywords: sequence bioinformatics alignment needleman-wunsch
- License: BSD
-
Categories
- Development Status :: 3 - Alpha
- Intended Audience :: Developers
- Intended Audience :: Science/Research
- License :: OSI Approved :: BSD License
- Operating System :: OS Independent
- Programming Language :: Python
- Topic :: Scientific/Engineering
- Topic :: Scientific/Engineering :: Bio-Informatics
- Topic :: Text Processing
- Package Index Owner: brentp
- DOAP record: nwalign-0.3.1.xml
