fit_tree
piqtree.fit_tree(aln, tree, model, num_threads=None, other_options='', *, bl_fixed=False)
Fit branch lengths and likelihood for a tree.
Given a sequence alignment and a fixed topology, uses IQ-TREE to fit branch lengths to the tree.
| PARAMETER | DESCRIPTION |
|---|---|
aln
|
The sequence alignment.
TYPE:
|
tree
|
The topology to fit branch lengths to.
TYPE:
|
model
|
The substitution model with base frequencies and rate heterogeneity.
TYPE:
|
num_threads
|
Number of threads for IQ-TREE to use, by default None (single-threaded). If 0 is specified, IQ-TREE attempts to find the optimal number of threads.
TYPE:
|
bl_fixed
|
If True, evaluates likelihood using the provided branch lengths on the tree. Branch lengths will be treated as constant in this case, with any unspecified branch lengths still being optimised. Otherwise if False, branch lengths are fitted to the tree whether provided or not. By default False.
TYPE:
|
other_options
|
Additional command line options for IQ-TREE.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
PhyloNode
|
A phylogenetic tree with the same given topology fitted with branch lengths. |
Source code in src/piqtree/iqtree/_tree.py
Usage
For usage, see "Fit branch lengths to a tree topology from an alignment".