Skip to main content

Distance-based cluster methods for linguistic phylogenies

Project description

PyloCluster

Build Status codecov PyPI

PyloCluster provides basic functionalities for distance-based clustering procedures in Python, including implementations of the Neighbor-joining and the UPGMA algorithm for phylogenetic reconstruction.

Installation

$ pip install pylocluster

Usage

The following examples requires the python-newick package.

>>> from pylocluster import *
>>> from newick import loads
>>> matrix = squareform([0.5,0.67,0.8,0.2,0.4,0.7,0.6,0.8,0.8,0.3])
>>> nwk = linkage(matrix, taxa=['G', 'S', 'I', 'E', 'D'], method='upgma')
>>> print(loads(nwk).ascii_art())
        ┌─S
    ┌───┤
       └─I
────┤
       ┌─E
    └───┤
           ┌─G
        └───┤
            └─D

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

pylocluster-0.1.0.tar.gz (8.9 kB view hashes)

Uploaded Source

Built Distribution

pylocluster-0.1.0-py2.py3-none-any.whl (9.2 kB view hashes)

Uploaded Python 2 Python 3

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