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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pwseqdist-0.5.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.5.tar.gz
Algorithm Hash digest
SHA256 dcfbf370436e2733039408c3132fbc1b819b21085649d69627d55a5677f925a0
MD5 e0d9c224b68a7dc1142eb818b80e7c34
BLAKE2b-256 3000f91ce028669156408308711855f2bf1d087fb75aaee226bb2e7a36904e88

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pwseqdist-0.5-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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 773c9254d360c81ca1082a5667cb3a32e677ce2311a79f8e70a335b8c0d1df16
MD5 a129ecb5468432e9e43c8e4cfd080165
BLAKE2b-256 7c0adfcbd7cb9dd06656c28618ca86fbf04e6e2c42d0b9841ead696c3c656ff1

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