camus

command module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2026 License: MIT Imports: 13 Imported by: 0

README

CAMUS

Go Reference GitHub go.mod Go version Go Report Card build GitHub License

CAMUS (Constrained Algorithm Maximizing qUartetS) is a dynamic programming algorithm for inferring level-1 phylogenetic networks from quartets and a constraint tree.

If you use CAMUS, please cite

Willson, James, and Tandy Warnow. "CAMUS: Scalable Phylogenetic Network Estimation." bioRxiv (2026): 2026-02.

Algorithm

Given a rooted, binary, constraint tree $T$ and a list of input trees $\mathcal{G}$, the CAMUS algorithm finds the level-1 networks inducing the maximum number of quartets from $\mathcal{G}$ that contains the constraint tree $T$

CAMUS finds networks for different values of $k$, where $k$ is the number of edges added to the network. For example, if the best possible network that contains $T$ has $m$ edges, then CAMUS will output $m$ networks $N_1, N_2, \cdots, N_k, \cdots, N_m$, where $N_k$ is optimal under the constraint that it contains exactly $k$ edges.

CAMUS has the following inputs and outputs:

Input

  • Constraint Tree: Rooted, binary, tree in newick format without duplicate labels.
  • Gene Trees: List of trees in newick format, containing only labels from the constraint tree.

Output

  • Output Network: Level-1 networks written in extended newick format.

CAMUS should be invoked with the constraint tree file path and gene trees file path as positional arguments in that order; the output network and logging information is written to files with a prefix that can optionally be set with the -o flag.

Installation

CAMUS should be able to build on any operating system, though it has only been tested on Linux. It is implemented in the Go programming language (which can be installed here).

There are three methods for installing CAMUS.

Using Go's package manager

After installing Go, run:

go install github.com/jsdoublel/camus@latest

This will install the CAMUS executable to $GOPATH/bin. You can check where that is using the command go env GOPATH; if you want to run CAMUS from any directory make sure you add $GOPATH/bin to your PATH environmental variable.

Build from source

Once Go is installed, clone the repository and build the project with the following commands:

git clone https://github.com/jsdoublel/camus.git
cd camus
go build
Download the binaries

The GitHub releases contain binaries compiled for Windows, macOS, and Linux (for both arm64 and amd64).

Usage

camus [ -f <format> | -o <output> | -t <threshold> | -n <threads> | -h | -v | ... ] <const_tree> <gene_trees>

There are two positional arguments indicating the inputs. Additionally, there are the following flags that precedes the positional arguments.

Basic Flags

  • -f format [ newick | nexus ] (default "newick") sets the format of the input gene tree file
  • -t threshold [0, 1] (default 0.5) quartet filtering threshold
  • -n num_procs number of parallel processes
  • -o prefix output prefix
  • -h prints usage information and exits
  • -hh prints extended usage information and exits
  • -v prints software version and exits

Experimental Flags

  • -sm mode [ max | norm | sym ] (default "max") sets the score mode
  • -a alpha parameter that adjusts penalty in ``sym" score mode
  • -asSet quartet count is calculated as a set (counts total unique quartet topologies)
  • -s threshold collapse edges in gene trees with support less than threshold value
  • -q mode [0, 2] (default 0) quartet filtering mode
Quartet Filter Mode

Quartet filtering mode filters out less frequent quartet topologies. Mode -q 0 disables quartet filtering; -q 1 applies a less restrictive quartet filtering, and -q 2 is the most restrictive and recommended quartet filtering.

Score Modes

Score Modes are various modifications to the optimization score beyond simple maximization. These are experimental and maximization is recommended.

Documentation

Overview

CAMUS (Constrained Algorithm Maximizing qUartetS) is a dynamic programming algorithm for inferring level-1 phylogenetic networks from quartets and a constraint tree.

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

usage: camus [flags]... <const_tree_file> <gene_tree_file>

positional arguments:

<tree_file>			constraint newick tree
<gene_tree_file>	gene tree newick file

flags:

-f format
  	gene tree format [newick|nexus] (default "newick")
-h	prints short help and exits
-hh
  	prints help with experimental features and exits
-n int
  	number of parallel processes
-o string
  	output prefix
-s float
  	collapse edges in gene trees with support less than value (default 0)
-t float
  	threshold for quartet filter [0, 1] (default 0.5)
-v	prints version number and exits

examples:

camus -o output-name constraint.nwk gene-trees.nwk

Directories

Path Synopsis
internal
graphs
Package containing all structs and functions related to graph-like data structures used in CAMUS such as quartets, networks, and trees
Package containing all structs and functions related to graph-like data structures used in CAMUS such as quartets, networks, and trees
infer
Package implementing the CAMUS dynamic programming algorithm.
Package implementing the CAMUS dynamic programming algorithm.
prep
Package used for preprocessing necessary data for the CAMUS algorithm
Package used for preprocessing necessary data for the CAMUS algorithm
score
Package implementing scoring for networks
Package implementing scoring for networks

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL