<commit_before>align
=====

Performs global and local sequence alignment.

Introduction
------------

align is a Python module that provides a general (read: not restricted to bioinformatics)
implementation of both global and local sequence alignment. It is implemented in C for
speed and wrapped with Cython to provide the ease of use of Python. The algorithms used
are Needleman-Wunsch for global alignment and Smith-Waterman for local alignment.

align uses a quadratic ```numpy.ndarray``` as scoring matrix.

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

Install align with ```python setup.py install```

Usage
-----
```
python
>>> import numpy
>>> import align
>>> S = -numpy.ones((256, 256)) + 2 * numpy.identity(256)
>>> S = S.astype(numpy.int32)
>>> (s, a1, a2) = align.align('AATGT', 'ATGAC', -2, S, local=True)
>>> print('%s\n%s\nScore: %d' % (align.alignment_to_string(a1), align.alignment_to_string(a2), s))
ATG
ATG
Score: 3
```

License
-------

Distributed under the MIT license. See the ```LICENSE``` file.<commit_msg>Clarified the restriction on the scoring matrix README<commit_after>align
=====

Performs global and local sequence alignment.

Introduction
------------

align is a Python module that provides a general (read: not restricted to bioinformatics)
implementation of both global and local sequence alignment. It is implemented in C for
speed and wrapped with Cython to provide the ease of use of Python. The algorithms used
are Needleman-Wunsch for global alignment and Smith-Waterman for local alignment.

align uses a quadratic ```numpy.ndarray``` as scoring matrix which needs to be of dtype ```numpy.int32```.

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

Install align with ```python setup.py install```

Usage
-----
```
python
>>> import numpy
>>> import align
>>> S = -numpy.ones((256, 256)) + 2 * numpy.identity(256)
>>> S = S.astype(numpy.int32)
>>> (s, a1, a2) = align.align('AATGT', 'ATGAC', -2, S, local=True)
>>> print('%s\n%s\nScore: %d' % (align.alignment_to_string(a1), align.alignment_to_string(a2), s))
ATG
ATG
Score: 3
```

License
-------

Distributed under the MIT license. See the ```LICENSE``` file.
{'fraction_non_alphanumeric': 0.15279091769157993, 'fraction_numerical': 0.017975402081362345, 'mean_word_length': 4.035714285714286, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 39, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3413095', 'n_tokens_mistral': 672, 'n_tokens_neox': 629, 'n_words': 247}