anicksaha / neighbor_joining

Nei-Saitou neighbor-joining algorithm for phylogeny construction/inference. Neighbor joining is a bottom-up (agglomerative) clustering method for the creation of phylogenetic/evolutionary trees.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Neighbor joining

Nei-Saitou neighbor-joining algorithm for phylogeny construction.

Prereq:

  • Python 2.7
  • R, Packages - “ape” and “RColorBrewer”
  • install.packages(c('ape','RColorBrewer'))

How to Run?

  • python main.py hw3.fna

This generates the following files:

  1. genetic_distances.txt
  2. edges.txt
  3. tree.txt
  4. bootstrap.txt

All the above files are in the folder submission.

Visualize

For visualization:

  • Rscript scripts/hw3-plot-newick.r tree.txt hw3-tip-labels.txt
  • Rscript scripts/hw3-plot-edges.r edges.txt hw3-tip-labels.txt

For bonus visualization:

  • Rscript scripts/hw3-plot-edges.r edges.txt hw3-tip-labels.txt bootstrap.txt

About

Nei-Saitou neighbor-joining algorithm for phylogeny construction/inference. Neighbor joining is a bottom-up (agglomerative) clustering method for the creation of phylogenetic/evolutionary trees.


Languages

Language:Python 59.6%Language:R 40.4%