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.2.1.tar.gz (23.7 kB view details)

Uploaded Source

Built Distribution

pwseqdist-0.2.1-py3-none-any.whl (28.9 kB view details)

Uploaded Python 3

File details

Details for the file pwseqdist-0.2.1.tar.gz.

File metadata

  • Download URL: pwseqdist-0.2.1.tar.gz
  • Upload date:
  • Size: 23.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0.post20200518 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.10

File hashes

Hashes for pwseqdist-0.2.1.tar.gz
Algorithm Hash digest
SHA256 c85d86ad49efdc5ce77235debccaec8af0947ff57aae6271741d977679805246
MD5 b1482b966c1eb0406740eea8818da9f9
BLAKE2b-256 64a64131af882c3748862e16539ba2a4c8493cfb2e6d9d7e8f006d6ad6235330

See more details on using hashes here.

File details

Details for the file pwseqdist-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: pwseqdist-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 28.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0.post20200518 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.10

File hashes

Hashes for pwseqdist-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 89d5780437343367c625f00f3865edcb6a8b3b5ab06cc0f21e64b94ec896c505
MD5 ec29b78916b1a4ead082d77ad5d9751f
BLAKE2b-256 11d975c3313c07625bd028dcbe2e24663547cae992468de449194ef6975bec2b

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