Scroll to navigation

bali-phy(1) General Commands Manual bali-phy(1)

NAME

bali-phy - Bayesian Inference of Alignment and Phylogeny

SYNOPSIS

bali-phy [OPTIONS] [INFER-OPTIONS] DATA ...

bali-phy [OPTIONS] run [COMPILER-OPTIONS] PROGRAM [PROGRAM-ARGUMENTS ...]

bali-phy [OPTIONS] print [PRINT-OPTIONS] EXPRESSION

bali-phy [OPTIONS] type NAME

bali-phy [OPTIONS] test-module [COMPILER-OPTIONS] MODULE

bali-phy help [TOPIC]

DESCRIPTION

bali-phy estimates multiple sequence alignments and evolutionary trees from DNA, amino acid, or codon sequences. BAli-Phy uses MCMC and Bayesian methods to estimate evolutionary trees, positive selection, and branch lengths while averaging over alternative alignments. It can also estimate phylogenies from a fixed alignment using substitution models such as GTR+gamma.

A named command is optional. Without one, BAli-Phy analyzes the supplied sequence data. Use run for a standalone Haskell program. In a run command, the first non-option is the program. Every later argument belongs to that program, including arguments beginning with - or /; no -- separator is needed.

Long option names must be exact. For example, use –iterations, not –iter.

COMMANDS

Load a standalone Haskell program and evaluate its main function. BAli-Phy compiler options must occur before PROGRAM. Later arguments are passed to the program unchanged.
Evaluate and print a model-language expression.
Print the type of a qualified Haskell name.
Parse, typecheck, and optimize a Haskell module without running it.
Show basic cumulative help or help for a command, option, model, distribution, or other semantic topic. help advanced, help expert, and help developer reveal successive cumulative levels. The older –help=advanced form is not accepted.

GLOBAL OPTIONS

Display help for the current command.
Print version information.
Print diagnostic output. If NUM is omitted, use level 1. Values from 2 to 4 increase the amount of information displayed.
Set the random seed.
Add directories to the Haskell package search path. Repeated command-line and configuration-file values are combined in that order.
–set KEY=VALUE
Set a process configuration value.

INFER OPTIONS

Analyze the initial values and exit.
Read inference options and model-language definitions from FILE. A scalar option on the command line overrides its configuration-file value. Repeated options from both sources are combined, with command-line values first.
Set the number of MCMC iterations.
Set the base name for the output directory.
Set the subsampling factor. This option should usually not be used.
Select tsv, json, or tsv,json scalar logs.
Set the tree prior or initial tree.
Unalign variable-alignment partitions before starting MCMC.
Set the alphabet for one or more partitions.
Set the substitution model for one or more partitions.
Set the insertion-deletion model for one or more partitions.
Set the prior on the scale for one or more partitions.
Fix a topology, tree, or alignment.
Link attributes across a comma-separated list of partitions.
–variables SOURCE
Add model-language definitions.

CONFIGURATION FILES

Configuration files are inputs to the default inference mode. An option is written on its own line as :option value. Blank lines and lines whose first non-whitespace character is # are ignored. Every other line is model-language source; these source lines may appear before, between, or after option lines and retain their relative order. Sequence data can be supplied with :align FILE.

BAli-Phy does not load an implicit ~/.bali-phy file. Pass a configuration file explicitly with –config.

HASKELL COMPILER OPTIONS

Compiler options are global. With run, place them before PROGRAM; with test-module, place them before MODULE.

–cpp
Conditionally preprocess every Haskell source module. Without this option, preprocessing is enabled only by a leading {-# LANGUAGE CPP #-} pragma.
Define a CPP macro. An omitted replacement defaults to 1. This option does not itself enable CPP.
–cpp-undefine MACRO
Remove an initial CPP macro definition.
–dump-cpp
Print Haskell source after conditional preprocessing.
–dump-ffi
Show grouped foreign-import ABI information. This diagnostic requires the test-module command.

WINDOWS OPTIONS

Native Windows accepts both the portable Unix spellings above and slash forms such as /V, /iterations:1000, and /test. Slash forms are not enabled on Linux, macOS, or WSL2.

EXAMPLES

Analyze sequences in dna.fasta under the GTR model.
Perform a fixed-alignment analysis with gaps treated as missing data.
Run a standalone model with a BAli-Phy seed and program-specific arguments.
Show basic and advanced commands and options.

REPORTING BUGS

BAli-Phy online help: http://www.bali-phy.org/docs.php.

Please send bug reports to bali-phy-users@googlegroups.com.

SEE ALSO

bpy-summarize

AUTHORS

Benjamin Redelings.

Aug 2026