Metadata-Version: 2.1
Name: pwseqdist
Version: 0.1.1
Summary: Efficiently computes distances between protein sequences
Home-page: https://github.com/agartland/pwseqdist
Author: Andrew Fiore-Gartland
Author-email: agartlan@fredhutch.org
Maintainer: Andrew Fiore-Gartland
Maintainer-email: agartlan@fredhutch.org
License: MIT
Platform: UNKNOWN
Description-Content-Type: text/markdown
Requires-Dist: numpy (>=1.16.4)
Requires-Dist: pandas (>=0.24.2)
Requires-Dist: parasail (>=1.1.17)
Requires-Dist: parmap (>=1.5.2)
Requires-Dist: pytest (>=5.0.0)
Requires-Dist: scipy (>=1.2.1)

# pwseqdist

[![Build Status](https://travis-ci.com/kmayerb/pwseqdist.svg?branch=master)](https://travis-ci.com/kmayerb/pwseqdist)

A small package that efficiently computes distances between protein sequences.
Can accommodate similarity matrices, sequences of different lengths and custom
metrics.

## Install

```
pip install pwseqdist
```

## Example

```python
import pwseqdist as pw
import multiprocessing
from scipy.spatial.distance import squareform

peptides = ['CACADLGAYPDKLIF','CACDALLAYTDKLIF',
            'CACDAVGDTLDKLIF','CACDDVTEVEGDKLIF',
            'CACDFISPSNWGIQSGRNTDKLIF','CACDPVLGDTRLTDKLIF']

dvec = pw.apply_pairwise_sq(seqs = peptides, 
			    metric = pw.metrics.nw_hamming_metric, 
			    ncpus  = multiprocessing.cpu_count() )

dmat = squareform(dvec).astype(int)
dmat
```

```
array([[ 0,  4,  6,  7, 15,  8],
       [ 4,  0,  5,  7, 14,  7],
       [ 6,  5,  0,  6, 14,  4],
       [ 7,  7,  6,  0, 14,  8],
       [15, 14, 14, 14,  0, 11],
       [ 8,  7,  4,  8, 11,  0]])
```


