Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tree-distance

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tree-distance

Wrapper for GTP tree distances in c++

  • 1.0.12
  • PyPI
  • Socket score

Maintainers
1

tree_distance

A package to compute distances between phylogenetic trees.

Supported distances:

  • Robinson-Foulds distance
  • Weighted Robinson-Foulds distance
  • Euclidean distance
  • Geodesic distance

Installation

pip install tree_distance

Example

t1 = PhyloTree(b"(a:3,b:4,(c:5,((d:6,e:7):.2,f:8):.3):.4);", False) # rooted = False
t2 = PhyloTree(b"(a:3,b:4,(d:5,((c:6,e:7):.2,f:8):.3):.4);", False)
getRobinsonFouldsDistance(t1, t2, normalise=False) # 4.0
getRobinsonFouldsDistance(t1, t2, normalise=True) # 0.666...

Tests

To run the tests:

mkdir build
cd build
cmake ..
make
./tests

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc