---
name: "maketree"
section: "1"
platform: "linux"
package: "qsearch-tools"
version: "1.0.8-3"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/maketree"
---

# maketree(1)

perform Quartet Tree Reconstruction on a distance matrix to produce a binary tree

## NAME

maketree - perform Quartet Tree Reconstruction on a distance matrix to produce a binary tree

## SYNOPSIS

**maketree \[-n\] \[-o filename\]** *distmatrix.clb*

## DESCRIPTION

**maketree** tries to find an optimal tree to represent an input distance matrix **matrix.txt**. It uses the Minimum Cost Quartet Tree Reconstruction method.  The program starts with a random tree, and continues to try small modifications to improve the tree score.  Eventually, the tree will stop easily improving.  The algorithm will write the best tree it found to **treefile.dot**.  It will also write all "better" trees that it finds along the way to the final tree at the end so that it is safe to stop early with an interrupt.  The output format can be Nexus or .dot (Graphviz) format.  The default is graphviz.

To start maketree you must have a distance matrix file.  Three input formats are supported for distance matrixes: text format, complearn binary format (.clb), or Nexus format (.nex).  The filename for the distance matrix must be given as an argument.

The following configuration variables are relevant to this command:

- **self\_agreement\_termination**: bool

  Whether or not to insist *k* number of trees must reach an agreed score before the program exits. Default yes.

- **max\_fail\_count**: int

  An integer specifying how many failed batches of trees must occur in succession before the program exits.  Only used when self\_agreement\_termination is off. Default 100000.

Input files for this program can be created using the **ncd (1)** command.

For more information on the details of this algorithm, please see *Algorithmic Clustering of Music* by **Cilibrasi, Vitanyi,** and **de Wolf** at **http://www.arxiv.org/abs/cs.SD/0303025**

## OPTIONS

- **-o** filename, **--output=FILE**

  change the default output filename to something other than treefile.dot

- **-n**, **--nexus**

  Nexus output format for tree

- *$HOME/.complearn/complearn.conf*

  ## FILES

per-user configuration file, overrides systemwide default; see **complearn**(5) for further details.

## ENVIRONMENT

none

## DIAGNOSTICS

If any of the files cannot be read, an error will be printed and the program exits with a nonzero exit code.

## SEE ALSO

**complearn**(5), [**ncd**(1)](/ncd/1.md)
