The available piqtree apps
To see the apps that piqtree makes available, use the cogent3 function available_apps() as follows.
In [1]:
Copied!
from cogent3 import available_apps
available_apps("piqtree")
from cogent3 import available_apps
available_apps("piqtree")
Out[1]:
0 rows x 7 columns; unset columns=unset columns: 'package', 'name', 'composable', 'doc', 'input type', 'output type', 'licenses'
For a particular app, use the cogent3 function app_help() to find out what the options are.
In [2]:
Copied!
from cogent3 import app_help
app_help("piq_build_tree")
from cogent3 import app_help
app_help("piq_build_tree")
Options for making the app
--------------------------
piq_build_tree_app = get_app(
'piq_build_tree',
model: piqtree.model._model.Model | str,
rand_seed=None,
bootstrap_reps=None,
num_threads=None,
other_options='',
)
Reconstruct a phylogenetic tree.
Given a sequence alignment, uses IQ-TREE to reconstruct a phylogenetic tree.
Parameters
----------
aln : Alignment
The sequence alignment.
model : Model | str
The substitution model with base frequencies and rate heterogeneity.
rand_seed : int | None, optional
The random seed - None means no seed is used, by default None.
bootstrap_replicates : int | None, optional
The number of bootstrap replicates to perform, by default None.
If 0 is provided, then no bootstrapping is performed.
At least 1000 is required to perform bootstrapping.
num_threads: int | None, optional
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.
other_options: str, optional
Additional command line options for IQ-TREE.
Returns
-------
PhyloNode
The IQ-TREE maximum likelihood tree from the given alignment.
Input type
----------
Alignment
Output type
-----------
PhyloNode
In [3]:
Copied!
from cogent3 import app_help
app_help("piq_fit_tree")
from cogent3 import app_help
app_help("piq_fit_tree")
Options for making the app
--------------------------
piq_fit_tree_app = get_app(
'piq_fit_tree',
tree: cogent3.core.tree.PhyloNode,
model: piqtree.model._model.Model | str,
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.
Parameters
----------
aln : Alignment
The sequence alignment.
tree : PhyloNode
The topology to fit branch lengths to.
model : Model | str
The substitution model with base frequencies and rate heterogeneity.
num_threads: int | None, optional
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.
bl_fixed: bool, optional
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.
other_options: str, optional
Additional command line options for IQ-TREE.
Returns
-------
PhyloNode
A phylogenetic tree with the same given topology fitted with branch lengths.
Input type
----------
Alignment
Output type
-----------
PhyloNode