Git Product home page Git Product logo

near-linear-cophenetic-distance's Introduction

Near Linear Cophenetic Distance

This repository contains a rust crate to compute the cophenetic distance between two rooted phylogenetic trees in near-linear time.

Installation

To install you must first have cargo and rustup installed:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

After installing the above command you can run the following to install nlcd:

cargo install --git=https://github.com/sriram98v/near-linear-cophenetic-distance

Alternatively, you can install seq_class by cloning this repository and building it locally:

git clone https://github.com/sriram98v/near-linear-cophenetic-distance
cd near-linear-cophenetic-distance
cargo install --path=./

Usage

Finding the Cophenetic distance between a pair of trees

To compute the cophenetic distance between a pair of trees, please create a single file with the extension .tre containing the two trees in Newick format (line-separated). The run the following command to compute the cophenetic distance with depth as the path function:

nlcd dist -i <PATH TO .TRE FILE> -p <NORM>

Please refer the help page for details on how to use other path functions using:

nlcd -h

Reproduce empirical results

In order to reproduce the results as seen in the article, run the following command

nlcd repr-emp -n 1000 -x 100 -p 10 -t 1 -o ./emp-study

In order to plot the results, create a local python virtual environment and install the dependencies using the following commands:

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

The command above will create a file containing the distributions as seen in the Results section of the article. In order to reproduce the plots, please run the python script provided in the scripts directory as follows (run from the base of the repository):

./scripts/plot-distribs.py

Reproduce scalability analysis

Note: Reproduction of these results may not looked identical to that in the aritcle In order to reproduce the scalability analysis as seen in the article, run the following command

nlcd repr-sca -s 200 -e 10000 -x 200 -i 20 -p 5 -o ./sca-study

In order to plot the results, create a local python virtual environment and install the dependencies using the following commands:

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

The command above will create a file containing the distributions as seen in the Results section of the article. In order to reproduce the plots, please run the python script provided in the scripts directory as follows (run from the base of the repository):

./scripts/plot-sca.py

near-linear-cophenetic-distance's People

Contributors

sriram98v avatar

Stargazers

Zebulun Arendsee avatar

Watchers

Lucian avatar Alexey Markin avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.