Skip to main content

Efficiently computes distances between protein sequences

Project description

pwseqdist

Build Status PyPI version Coverage Status

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)

Uploaded Source

Built Distribution

pwseqdist-0.6-py3-none-any.whl (29.3 kB view details)

Uploaded Python 3

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

Hashes for pwseqdist-0.6.tar.gz
Algorithm Hash digest
SHA256 6f9bf31d49c8a8057aebb23c4d2b41689ef7767a6f70432033fbe37d745bfd6a
MD5 88290f0cafbdba50faf37f6f35ca5471
BLAKE2b-256 2d08aa45c7b648aa951dabcae3809a93607334895a053fd042b740b1cc6149ef

See more details on using hashes here.

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

Hashes for pwseqdist-0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 18dff5af254873fbc2f1a2394d194595aca04946ac0aaf389d872266c6160043
MD5 5370c9cac6b10a328f561094826174ea
BLAKE2b-256 8c89562baae49ee0cce948b522f86647a605946ea6e3e61382cb669e5a87d1d0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page