| 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¶
- run PROGRAM [ARGUMENT ...]
- 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.
- print EXPRESSION
- Evaluate and print a model-language expression.
- type NAME
- Print the type of a qualified Haskell name.
- test-module MODULE
- Parse, typecheck, and optimize a Haskell module without running it.
- help [TOPIC]
- 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¶
- -h, –help
- Display help for the current command.
- -v, –version
- Print version information.
- -V, –verbose, –verbose NUM
- Print diagnostic output. If NUM is omitted, use level 1. Values from 2 to 4 increase the amount of information displayed.
- -s NUM, –seed NUM
- Set the random seed.
- -P PATHS, –package-path PATHS
- 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¶
- -t, –test
- Analyze the initial values and exit.
- -c FILE, –config FILE
- 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.
- -i NUM, –iterations NUM
- Set the number of MCMC iterations.
- -n STRING, –name STRING
- Set the base name for the output directory.
- -x NUM, –subsample NUM
- Set the subsampling factor. This option should usually not be used.
- -l FORMAT, –log-format FORMAT
- Select tsv, json, or tsv,json scalar logs.
- -T PRIOR, –tree PRIOR
- Set the tree prior or initial tree.
- -U, –unalign
- Unalign variable-alignment partitions before starting MCMC.
- -A ALPHABET, –alphabet ALPHABET
- Set the alphabet for one or more partitions.
- -S MODEL, –smodel MODEL
- Set the substitution model for one or more partitions.
- -I MODEL, –imodel MODEL
- Set the insertion-deletion model for one or more partitions.
- -R PRIOR, –scale PRIOR
- Set the prior on the scale for one or more partitions.
- -F SPECIFICATION, –fix SPECIFICATION
- Fix a topology, tree, or alignment.
- -L PARTITIONS, –link PARTITIONS
- 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.
- -D MACRO, –cpp-define MACRO[=TEXT]
- 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¶
- bali-phy dna.fasta --smodel GTR
- Analyze sequences in dna.fasta under the GTR model.
- bali-phy dna.fasta -S GTR -I none
- Perform a fixed-alignment analysis with gaps treated as missing data.
- bali-phy --seed 1 run Model.hs --iterations=1000 data.fasta
- Run a standalone model with a BAli-Phy seed and program-specific arguments.
- bali-phy help advanced
- 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 |