Skip to content

About

Julia package for the neighbor joining algorithm

Resources

Stars

3 stars

Watchers

1 watching

Forks

Latest commit

 

History

38 Commits

Folders and files

Repository files navigation

NeighborJoining

Stable Dev Build Status Coverage

NeighborJoining

This package contains algorithms for neighbor joining

What is currently implemented?

  • regular Neighborjoining regNJ(): Saitou, N. & Nei, M. The neighbor-joining method: a new method for reconstructing phylogenetic trees. Molecular Biology and Evolution 4, 406-425 (1987).
  • fast NeighborJoining fastNJ(): Li, J. F. A fast neighbor joining method. Genet Mol Res 14, 8733–8743 (2015).
    • uses heuristics, will not always find the additive tree
  • dynamic NeighborJoining dynamicNJ(): Clausen, P. T. L. C. Scaling neighbor joining to one million taxa with dynamic and heuristic neighbor joining. Bioinformatics 39, btac774 (2023).
    • exact (same tree as regNJ) but much faster on large inputs; multithreaded with julia -t auto

Installation

add NeighborJoining

Examples

# make distance matrix
d = rand(10, 10)^2
for i in 1:size(d,1) d[i,i]=0 end;

# regular neighbor joining
njclusts = regNJ(d)

# or fast neighbor joining
njclusts = fastNJ(d)

# or dynamic neighbor joining (exact, faster on large inputs, multithreaded)
njclusts = dynamicNJ(d)

# convert to newicktree string for export to other packages
nwstring = newickstring(njclusts)

# adding labels to the leaves
labels = ["leaf $i" for i in 1:10]
nwstring = newickstring(njclusts, labels)

# adding labels to the internal nodes
nwstring = newickstring(njclusts, labels; labelinternalnodes=true)

About

Julia package for the neighbor joining algorithm

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages