GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Neclow/phylo2vec_cpp: Phylo2Vec: a vector representation for binary trees (stripped-down version in C++)

This repository was archived by the owner on Apr 22, 2025. It is now read-only.
BranchesTags
Open more actions menu

Latest commit

 

History

5 Commits
5 Commits

Folders and files

NameName
Last commit message
Last commit date
src
src
 
 
test
test
 
 
.gitignore
.gitignore
 
 
CMakeLists.txt
CMakeLists.txt
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
phylo2vec
phylo2vec
 
 

Repository files navigation

Phylo2Vec: a vector representation for binary trees

Installation

Prerequisites:

  • C++14
  • GoogleTest 1.11.0: sudo apt-get install libgtest-dev
  • clang-format: sudo apt install clang-format
  • cmake 3.22.1: sudo apt-get install cmake
  • cxxopts 3.1.1:
    git clone https://github.com/jarro2783/cxxopts.git
    cd cxxopts
    mkdir build
    cd build
    cmake ..
    make
    sudo make install
    

Compile and build from scratch:

mkdir build
cd build
cmake ..
make

Or use the executable. To get information about all arguments:

./phylo2vec -h

Arguments:

  -h, --help            Show help
      --toNewick arg    Convert to Newick format. Example input: 0 1 4
      --toVector arg    Convert to integer vector. Example input:
                        "(((2,1)4,0)5,3)6;"
      --with_mapping    For Newicks that do not only contain digits, to use with toVector. Example input: "(((((((tip_0:1.44,tip_1:1.44)8042:0.46,(tip_2:1.5,tip_3:1.5)8043:0.4)8044:0.3,(tip_4:1.51,tip_5:1.51)8045:0.69)8046:0.4,tip_6:2.6)8047:1.05,tip_7:3.65)8048:0.5,(((tip_8:0.72,tip_9:0.72)8049:0.28,tip_10:1)8050:1.56,tip_11:2.56)8051:1.59)8052:1.96,tip_12:6.11)8053:0;"
      --num_leaves arg  Number of leaves (optional, but recommended when
                        using toVector)

Example usage of toNewick:

phylo2vec --toNewick 0 1 4

Example usage of toVector:

phylo2vec --toVector "(((2,1)4,0)5,3)6;" --num_leaves 4

Example usage of toVector:

./phylo2vec --with_mapping --toVector "(((((((tip_0:1.44,tip_1:1.44)8042:0.46,(tip_2:1.5,tip_3:1.5)8043:0.4)8044:0.3,(tip_4:1.51,tip_5:1.51)8045:0.69)8046:0.4,tip_6:2.6)8047:1.05,tip_7:3.65)8048:0.5,(((tip_8:0.72,tip_9:0.72)8049:0.28,tip_10:1)8050:1.56,tip_11:2.56)8051:1.59)8052:1.96,tip_12:6.11)8053:0;"

Python version:

  • https://github.com/Neclow/phylo2vec written with Matthew Penn and Samir Bhatt
  • A minimalistic demo is available on Colab: Open In Colab

Citation and other work

  • Link to the preprint: https://arxiv.org/abs/2304.12693
  • Related work: https://github.com/Neclow/GradME = phylo2vec + minimum evolution + gradient descent
  • The file 100trees.txt is an anonmyised subset of TimeTree trees adapted from: https://datadryad.org/stash/dataset/doi:10.5061/dryad.2fqz612vg. Kudos to Mark Khurana for the dataset

Note

  • At least half of this repo was coded on a Samsung A40 using JDoodle, that should probably deserve a star :)

About

Phylo2Vec: a vector representation for binary trees (stripped-down version in C++)

Resources

Readme
AGPL-3.0 license
Activity

Stars

2 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.