bali-phy -- Bayesian Alignment and Phylogeny estimation using MCMC


bali-phy sequence-file1 [sequence-file2 ...] [OPTIONS]

bali-phy help topic


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.

BAli-Phy can also estimate phylogenies from a fixed alignment (like MrBayes and BEAST) using substitution models like GTR+gamma. BAli-Phy automatically estimates relative rates for each gene.


For each option below, more information is available by specifying the long form of the option as a help topic. For example: bali-phy help alphabet

-h, --help, --help=topic
Display a friendly help message. Specify --help=advanced or --help=expert to display more advanced options.
-v, --version
Print version information.
-t, --test
Analyze the initial values and exit.
-V, --verbose, --verbose NUM
Print extra output to aid in trouble-shooting. If NUM is not specified the default is 1. Values from 2 to 4 increase the amount of information displayed.
-c filename, --config filename
Read commands from filename before command line.


-i NUM, --iterations NUM
The number of iterations to run.
-n STRING, --name STRING
Name for the output directory to create.
-x NUM, --subsample NUM
Factor by which to subsample. This option should usually not be used.
-s NUM, --seed NUM
Random seed. Useful for replaying specific runs when trouble-shooting.


-T filename, --tree filename
File with initial tree in Newick format or NEXUS format.
-U, --unalign
Unalign all variable-alignment partitions before starting MCMC instead using the supplied alignment as a starting value.


-A alphabet, --alphabet alphabet
The alphabet.
-S model, --smodel model
The substitution model.
-I model, --imodel model
The insertion-deletion model.
-B prior, --branch-lengths prior
Prior on branch lengths.
-R prior, --scale prior
Prior on the scale.
-L NUMS, --link NUMS
Link partitions. Takes a comma-separated list of numbers indicating partitions. For example --link 1,2,3.


bali-phy dna.fasta --smodel GTR
Analyze sequences in dna.fasta under the GTR model.
bali-phy dna.fasta --smodel GTR -I none
Perform a traditional fixed-alignment analysis with gaps treated as missing data.
bali-phy dna.fasta amino.fasta codons.fasta -S 1:GTR -S 2:LG -S 3:M0
Perform an analysis of 3 genes where each gene has a different substitution mode. The sequence names in all three files must be the same.


BAli-Phy online help:

Please send bug reports to