Skip to main content

Compute tree distance using a method by Lin et al

Project description

tree_matching_distance

An implementation of the tree distance metric suggested by Lin, Rajan, and Moret, at ISBRA 2011.

Description

This package contains a function to import and provides a command-line tool that compares two given trees and return a distance between them.

Usage

Run the program like

  tree_matching_distance t1.tree t2.tree

where the two file parameters contain trees in Newick format on the same taxa.

To use the distance method from within your own code, write

  from ete3 import Tree
  from tree_matching_distance import distance
  t1 = Tree('((a, b), (c, d));')
  t2 = Tree('((a, c), (b, d));')
  d = distance(t1, t2)
  print(d)

for a simple test. Note that this package requires ETE3 trees.

Project details


Download files

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

Files for tree-matching-distance, version 1.0.7
Filename, size File type Python version Upload date Hashes
Filename, size tree_matching_distance-1.0.7-py2.py3-none-any.whl (4.0 kB) File type Wheel Python version py2.py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page