Efficiently computes distances between protein sequences
Project description
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
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]])
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pwseqdist-0.6.tar.gz
(24.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
pwseqdist-0.6-py3-none-any.whl
(29.3 kB
view details)
File details
Details for the file pwseqdist-0.6.tar.gz.
File metadata
- Download URL: pwseqdist-0.6.tar.gz
- Upload date:
- Size: 24.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.3.2.post20200812 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f9bf31d49c8a8057aebb23c4d2b41689ef7767a6f70432033fbe37d745bfd6a
|
|
| MD5 |
88290f0cafbdba50faf37f6f35ca5471
|
|
| BLAKE2b-256 |
2d08aa45c7b648aa951dabcae3809a93607334895a053fd042b740b1cc6149ef
|
File details
Details for the file pwseqdist-0.6-py3-none-any.whl.
File metadata
- Download URL: pwseqdist-0.6-py3-none-any.whl
- Upload date:
- Size: 29.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.3.2.post20200812 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
18dff5af254873fbc2f1a2394d194595aca04946ac0aaf389d872266c6160043
|
|
| MD5 |
5370c9cac6b10a328f561094826174ea
|
|
| BLAKE2b-256 |
8c89562baae49ee0cce948b522f86647a605946ea6e3e61382cb669e5a87d1d0
|