Skip to main content

Calculate distances between DNA sequences

Project description

Calculate Distances

PyPI - Version PyPI - Python Version PyPI - License GitHub - Tests

Calculate distances between DNA sequences. Leverages Rust for faster computation.

Originally part of TaxI2.

Installation

calculate_distances is available on PyPI. You can install it through pip:

pip install itaxotools-calculate-distances

Usage

Import the distance calculation functions, each of which take two string arguments:

from itaxotools import calculate_distances as calc

x = "ACGT"
y = "AN-A"

calc.seq_distances_p(x, y)  # 0.5
calc.seq_distances_p_gaps(x, y)  # 0.66
calc.seq_distances_jukes_cantor(x, y)  # 0.82
calc.seq_distances_kimura2p(x, y)  # inf

Unit tests

Only basic tests included. More extensive unit testing is currently done as part of TaxI2.

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

itaxotools_calculate_distances-0.1.1.tar.gz (26.6 kB view hashes)

Uploaded Source

Built Distributions

itaxotools_calculate_distances-0.1.1-cp37-abi3-win_amd64.whl (196.1 kB view hashes)

Uploaded CPython 3.7+ Windows x86-64

itaxotools_calculate_distances-0.1.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ x86-64

itaxotools_calculate_distances-0.1.1-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (668.0 kB view hashes)

Uploaded CPython 3.7+ macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64

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