Metadata-Version: 2.1
Name: pyopa
Version: 0.8.6
Summary: PyOPA - optimal pairwise sequence alignments
Home-page: http://omabrowser.org/
Author: OMA Browser
Author-email: contact@omabrowser.org
License: MPL 2.0
Keywords: sequence alignments Smith-Waterman Needleman-Wunsch dynamic programming bioinformatics
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
License-File: LICENSE
Requires-Dist: numpy

PyOPA - Optimal Pairwise Alignments
===================================

This python package provides a fast implementation to compute 

  - optimal pairwise alignments of molecular sequences

  - ML distance estimates of pairwise alignments.

The implementation uses `Farrar's algorithm <http://bioinformatics.oxfordjournals.org/content/23/2/156.abstract>_`
to compute the optimal pairwise alignment using SSE vectorization operations.
This package implements the Smith-Waterman and Needleman-Wunsch algorithm to
compute the local and global sequence alignments.

Installation
------------

You can install the package using pip:

.. code-block:: bash

   pip install pyopa

We provide wheels for Linux, MacOS (x86_64) and (arm64) for cpython.


Example
-------

.. code-block:: python

   import pyopa
   log_pam1_env = pyopa.read_env_json(os.path.join(pyopa.matrix_dir(), 'logPAM1.json'))
   s1 = pyopa.Sequence('GCANLVSRLENNSRLLNRDLIAVKINADVYKDPNAGALRL')
   s2 = pyopa.Sequence('GCANPSTLETNSQLVNRELIAVKINPRVYKGPNLGAFRL')

   # super fast check whether the alignment reaches a given min-score
   min_score = 100
   pam250_env = pyopa.generate_env(log_pam1_env, 250, min_score)
   pyopa.align_short(s1, s2, pam250_env)

   
