Skip to main content
Donate to the Python Software Foundation or Purchase a PyCharm License to Benefit the PSF! Donate Now

A simple package for calculating pairwise SNP distances

Project description

# pairsnp-python

[![Travis-CI Build Status](](

## Installation

The python version can be installed using `pip` or by downloading the repository and running ``.

At the moment it is only available in python2 but I'm planning on converting it to python3.

python -m pip install pairsnp

or alternatively download the repository and run

cd ./pairsnp/python/pairsnp
python ./ install

## Quick Start

The python version can be run from the python interpreter as

from pairsnp import calculate_snp_matrix, calculate_distance_matrix

sparse_matrix, consensus, seq_names = calculate_snp_matrix(
d = calculate_distance_matrix(sparse_matrix, consensus, "dist", False)

alternatively if installed using pip it can be used at the command line as

pairsnp -f /path/to/msa.fasta -o /path/to/output.csv

additional options include

Program to calculate pairwise SNP distance and similarity matrices.

optional arguments:
-h, --help show this help message and exit
-t {sim,dist}, --type {sim,dist}
either sim (similarity) or dist (distance) (default).
-n, --inc_n flag to indicate differences to gaps should be
location of a multiple sequence alignment. Currently
only DNA alignments are supported.
location of output file.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
pairsnp-0.0.6-py2-none-any.whl (6.6 kB) Copy SHA256 hash SHA256 Wheel py2
pairsnp-0.0.6.tar.gz (3.9 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page