phybin: Utility for clustering phylogenetic trees in Newick format based on Robinson-Foulds distance.

[ bioinformatics, bsd3, library, program ] [ Propose Tags ]

This package provides a libary and executable for dealing with Newick tree files.

It can do simple binning of identical trees or more complex clustering based on an all-to-all Robinson-Foulds distance matrix.

phybin produces output files that characterize the size and contents of each bin or cluster (including generating GraphViz-based visual representations of the tree topologies).

[Skip to Readme]
Versions [faq] 0.1, 0.1.1, 0.1.2,,,, 0.2.2, 0.2.11, 0.3
Dependencies async, base (>=3 && <5), bitvec (>=0.1), bytestring, containers, directory, fgl, filepath, graphviz (>=2999.16), hierarchical-clustering (>=0.4), HUnit, parsec (>=3.1.0), phybin, prettyclass, process, split (>=0.2), text (==0.11.*), time, vector (>=0.10) [details]
License BSD-3-Clause
Copyright Copyright (c) 2010 Ryan Newton
Author Ryan Newton <>
Maintainer Ryan Newton <>
Category Bioinformatics
Home page
Source repo head: git clone git://
Uploaded by RyanNewton at Sun Jul 28 09:00:57 UTC 2013
Distributions Debian:0.3, NixOS:0.3
Executables phybin
Downloads 3927 total (103 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs not available [build log]
All reported builds failed as of 2016-12-20 [all 7 reports]


  • Bio
    • Phylogeny
      • Bio.Phylogeny.PhyBin
        • Bio.Phylogeny.PhyBin.Binning
        • Bio.Phylogeny.PhyBin.CoreTypes
        • Bio.Phylogeny.PhyBin.Parser
        • Bio.Phylogeny.PhyBin.RFDistance
        • Bio.Phylogeny.PhyBin.Util
        • Bio.Phylogeny.PhyBin.Visualize



Use the HashRF algorithm by default instead of the naive one.


Use bitvectors rather than IntSets for bipartitions.


Don't use any parallelism at all.


Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info


Maintainer's Corner

For package maintainers and hackage trustees

Readme for phybin-0.2.11

[back to package description]

% PhyBin: Binning Trees by Topology

PhyBin is a simple command line tool that classifies (bins) a set of Newick tree files by their topology. The purpose of it is to take a large set of tree files and browse through the most common tree topologies.

(Above figure) Trees corresponding to the three largest bins resulting from a
phybin run. The file <code>binXX_YYY</code>, where <code>XX</code> is the rank of the bin and
<code>YYY</code> is the number of trees having that topology.

Invoking PhyBin

PhyBin is a command-line program that produces output in the form of text files and pdfs, but to produce pdfs (to visualize trees) the GraphViz program, including the dot command, must be installed on the machine.

The following is a typical invocation of PhyBin:

phybin *.tree -o output_dir/

The input trees can be specified directly on the command-line, or, if the name of a directory is provided instead, all contained files are assumed to be trees in Newick format.

PhyBin, at minimum, produces files of the form output_dir/, one for each bin. If requested, it will also produce visual representations of each bin in the form output_dir/binXX_YY.pdf.

Downloading and Installing PhyBin

The source code to PhyBin can be downloaded here:

PhyBin is written in Haskell and if you have Haskell Platform. installed you can install phybin with this one-liner:

cabal install phybin

PhyBin is also available for download as a statically-linked executable for Mac-OS and Linux:

It should be possible to build it for Windows, but I haven't done so yet.

Command-line Options

In addition to input files and directories, phybin supports a number of command-line options. Run "phybin --help" to see these options.

Authors: Irene and Ryan Newton

Contact email: irnewton indiana edu (with "at" and "dot" inserted).