This QIIME 2 plugin supports generating and manipulating phylogenetic trees.
- version:
2024.10.0
- website: https://
github .com /qiime2 /q2 -phylogeny - user support:
- Please post to the QIIME 2 forum for help with this plugin: https://
forum .qiime2 .org
Actions¶
Name | Type | Short Description |
---|---|---|
midpoint-root | method | Midpoint root an unrooted phylogenetic tree. |
fasttree | method | Construct a phylogenetic tree with FastTree. |
raxml | method | Construct a phylogenetic tree with RAxML. |
raxml-rapid-bootstrap | method | Construct a phylogenetic tree with bootstrap supports using RAxML. |
iqtree | method | Construct a phylogenetic tree with IQ-TREE. |
iqtree-ultrafast-bootstrap | method | Construct a phylogenetic tree with IQ-TREE with bootstrap supports. |
filter-table | method | Remove features from table if they're not present in tree. |
filter-tree | method | Remove features from tree based on metadata |
robinson-foulds | method | Calculate Robinson-Foulds distance between phylogenetic trees. |
align-to-tree-mafft-fasttree | pipeline | Build a phylogenetic tree using fasttree and mafft alignment |
align-to-tree-mafft-iqtree | pipeline | Build a phylogenetic tree using iqtree and mafft alignment. |
align-to-tree-mafft-raxml | pipeline | Build a phylogenetic tree using raxml and mafft alignment. |
phylogeny midpoint-root¶
Midpoint root an unrooted phylogenetic tree.
Inputs¶
- tree:
Phylogeny[Unrooted]
The phylogenetic tree to be rooted.[required]
Outputs¶
- rooted_tree:
Phylogeny[Rooted]
The rooted phylogenetic tree.[required]
phylogeny fasttree¶
Construct a phylogenetic tree with FastTree.
Citations¶
Inputs¶
- alignment:
FeatureData[AlignedSequence]
Aligned sequences to be used for phylogenetic reconstruction.[required]
Parameters¶
- n_threads:
Threads
The number of threads. Using more than one thread runs the non-deterministic variant of
FastTree
(FastTreeMP
), and may result in a different tree than single-threading. See http://www .microbesonline .org /fasttree / #OpenMP for details. (Use auto
to automatically use all available cores)[default:1
]
Outputs¶
- tree:
Phylogeny[Unrooted]
The resulting phylogenetic tree.[required]
phylogeny raxml¶
Construct a phylogenetic tree with RAxML. See: https://
Citations¶
Inputs¶
- alignment:
FeatureData[AlignedSequence]
Aligned sequences to be used for phylogenetic reconstruction.[required]
Parameters¶
- seed:
Int
Random number seed for the parsimony starting tree. This allows you to reproduce tree results. If not supplied then one will be randomly chosen.[optional]
- n_searches:
Int
%
Range
(1, None)
The number of independent maximum likelihood searches to perform. The single best scoring tree is returned.[default:
1
]- n_threads:
Threads
The number of threads to use for multithreaded processing. Using more than one thread will enable the PTHREADS version of RAxML.[default:
1
]- raxml_version:
Str
%
Choices
('Standard', 'SSE3', 'AVX2')
Select a specific CPU optimization of RAxML to use. The SSE3 versions will run approximately 40% faster than the standard version. The AVX2 version will run 10-30% faster than the SSE3 version.[default:
'Standard'
]- substitution_model:
Str
%
Choices
('GTRGAMMA', 'GTRGAMMAI', 'GTRCAT', 'GTRCATI')
Model of Nucleotide Substitution.[default:
'GTRGAMMA'
]
Outputs¶
- tree:
Phylogeny[Unrooted]
The resulting phylogenetic tree.[required]
phylogeny raxml-rapid-bootstrap¶
Construct a phylogenetic tree with RAxML with the addition of rapid bootstrapping support values. See: https://
Citations¶
Stamatakis, 2014; Stamatakis et al., 2008
Inputs¶
- alignment:
FeatureData[AlignedSequence]
Aligned sequences to be used for phylogenetic reconstruction.[required]
Parameters¶
- seed:
Int
Random number seed for the parsimony starting tree. This allows you to reproduce tree results. If not supplied then one will be randomly chosen.[optional]
- rapid_bootstrap_seed:
Int
Specify a random seed for rapid bootstrapping. This allows you to reproduce rapid bootstrap results. If not supplied then one will be randomly chosen.[optional]
- bootstrap_replicates:
Int
%
Range
(10, None)
The number of bootstrap searches to perform.[default:
100
]- n_threads:
Threads
The number of threads to use for multithreaded processing. Using more than one thread will enable the PTHREADS version of RAxML.[default:
1
]- raxml_version:
Str
%
Choices
('Standard', 'SSE3', 'AVX2')
Select a specific CPU optimization of RAxML to use. The SSE3 versions will run approximately 40% faster than the standard version. The AVX2 version will run 10-30% faster than the SSE3 version.[default:
'Standard'
]- substitution_model:
Str
%
Choices
('GTRGAMMA', 'GTRGAMMAI', 'GTRCAT', 'GTRCATI')
Model of Nucleotide Substitution[default:
'GTRGAMMA'
]
Outputs¶
- tree:
Phylogeny[Unrooted]
The resulting phylogenetic tree.[required]
phylogeny iqtree¶
Construct a phylogenetic tree using IQ-TREE (http://
Citations¶
Minh et al., 2020; Kalyaanamoorthy et al., 2017
Inputs¶
- alignment:
FeatureData[AlignedSequence]
Aligned sequences to be used for phylogenetic reconstruction.[required]
Parameters¶
- seed:
Int
Random number seed. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_cores:
Threads
The number of cores to use for parallel processing. Use
auto
to let IQ-TREE automatically determine the optimal number of cores to use.[default:1
]- n_cores_max:
Threads
Limits the maximum number of cores to be used when 'n_cores' is set to 'auto'.[optional]
- n_runs:
Int
%
Range
(1, None)
Number of indepedent runs. Multiple independent runs (e.g. 10) can outperform a single run in terms of likelihood maximisation.[default:
1
]- substitution_model:
Str
%
Choices
('JC', 'JC+I', 'JC+G', 'JC+I+G', 'JC+R2', 'JC+R3', 'JC+R4', 'JC+R5', 'JC+R6', 'JC+R7', 'JC+R8', 'JC+R9', 'JC+R10', 'F81', 'F81+I', 'F81+G', 'F81+I+G', 'F81+R2', 'F81+R3', 'F81+R4', 'F81+R5', 'F81+R6', 'F81+R7', 'F81+R8', 'F81+R9', 'F81+R10', 'K80', 'K80+I', 'K80+G', 'K80+I+G', 'K80+R2', 'K80+R3', 'K80+R4', 'K80+R5', 'K80+R6', 'K80+R7', 'K80+R8', 'K80+R9', 'K80+R10', 'HKY', 'HKY+I', 'HKY+G', 'HKY+I+G', 'HKY+R2', 'HKY+R3', 'HKY+R4', 'HKY+R5', 'HKY+R6', 'HKY+R7', 'HKY+R8', 'HKY+R9', 'HKY+R10', 'TNe', 'TNe+I', 'TNe+G', 'TNe+I+G', 'TNe+R2', 'TNe+R3', 'TNe+R4', 'TNe+R5', 'TNe+R6', 'TNe+R7', 'TNe+R8', 'TNe+R9', 'TNe+R10', 'TN', 'TN+I', 'TN+G', 'TN+I+G', 'TN+R2', 'TN+R3', 'TN+R4', 'TN+R5', 'TN+R6', 'TN+R7', 'TN+R8', 'TN+R9', 'TN+R10', 'K81', 'K81+I', 'K81+G', 'K81+I+G', 'K81+R2', 'K81+R3', 'K81+R4', 'K81+R5', 'K81+R6', 'K81+R7', 'K81+R8', 'K81+R9', 'K81+R10', 'K81u', 'K81u+I', 'K81u+G', 'K81u+I+G', 'K81u+R2', 'K81u+R3', 'K81u+R4', 'K81u+R5', 'K81u+R6', 'K81u+R7', 'K81u+R8', 'K81u+R9', 'K81u+R10', 'TPM2', 'TPM2+I', 'TPM2+G', 'TPM2+I+G', 'TPM2+R2', 'TPM2+R3', 'TPM2+R4', 'TPM2+R5', 'TPM2+R6', 'TPM2+R7', 'TPM2+R8', 'TPM2+R9', 'TPM2+R10', 'TPM2u', 'TPM2u+I', 'TPM2u+G', 'TPM2u+I+G', 'TPM2u+R2', 'TPM2u+R3', 'TPM2u+R4', 'TPM2u+R5', 'TPM2u+R6', 'TPM2u+R7', 'TPM2u+R8', 'TPM2u+R9', 'TPM2u+R10', 'TPM3', 'TPM3+I', 'TPM3+G', 'TPM3+I+G', 'TPM3+R2', 'TPM3+R3', 'TPM3+R4', 'TPM3+R5', 'TPM3+R6', 'TPM3+R7', 'TPM3+R8', 'TPM3+R9', 'TPM3+R10', 'TPM3u', 'TPM3u+I', 'TPM3u+G', 'TPM3u+I+G', 'TPM3u+R2', 'TPM3u+R3', 'TPM3u+R4', 'TPM3u+R5', 'TPM3u+R6', 'TPM3u+R7', 'TPM3u+R8', 'TPM3u+R9', 'TPM3u+R10', 'TIMe', 'TIMe+I', 'TIMe+G', 'TIMe+I+G', 'TIMe+R2', 'TIMe+R3', 'TIMe+R4', 'TIMe+R5', 'TIMe+R6', 'TIMe+R7', 'TIMe+R8', 'TIMe+R9', 'TIMe+R10', 'TIM', 'TIM+I', 'TIM+G', 'TIM+I+G', 'TIM+R2', 'TIM+R3', 'TIM+R4', 'TIM+R5', 'TIM+R6', 'TIM+R7', 'TIM+R8', 'TIM+R9', 'TIM+R10', 'TIM2e', 'TIM2e+I', 'TIM2e+G', 'TIM2e+I+G', 'TIM2e+R2', 'TIM2e+R3', 'TIM2e+R4', 'TIM2e+R5', 'TIM2e+R6', 'TIM2e+R7', 'TIM2e+R8', 'TIM2e+R9', 'TIM2e+R10', 'TIM2', 'TIM2+I', 'TIM2+G', 'TIM2+I+G', 'TIM2+R2', 'TIM2+R3', 'TIM2+R4', 'TIM2+R5', 'TIM2+R6', 'TIM2+R7', 'TIM2+R8', 'TIM2+R9', 'TIM2+R10', 'TIM3e', 'TIM3e+I', 'TIM3e+G', 'TIM3e+I+G', 'TIM3e+R2', 'TIM3e+R3', 'TIM3e+R4', 'TIM3e+R5', 'TIM3e+R6', 'TIM3e+R7', 'TIM3e+R8', 'TIM3e+R9', 'TIM3e+R10', 'TIM3', 'TIM3+I', 'TIM3+G', 'TIM3+I+G', 'TIM3+R2', 'TIM3+R3', 'TIM3+R4', 'TIM3+R5', 'TIM3+R6', 'TIM3+R7', 'TIM3+R8', 'TIM3+R9', 'TIM3+R10', 'TVMe', 'TVMe+I', 'TVMe+G', 'TVMe+I+G', 'TVMe+R2', 'TVMe+R3', 'TVMe+R4', 'TVMe+R5', 'TVMe+R6', 'TVMe+R7', 'TVMe+R8', 'TVMe+R9', 'TVMe+R10', 'TVM', 'TVM+I', 'TVM+G', 'TVM+I+G', 'TVM+R2', 'TVM+R3', 'TVM+R4', 'TVM+R5', 'TVM+R6', 'TVM+R7', 'TVM+R8', 'TVM+R9', 'TVM+R10', 'SYM', 'SYM+I', 'SYM+G', 'SYM+I+G', 'SYM+R2', 'SYM+R3', 'SYM+R4', 'SYM+R5', 'SYM+R6', 'SYM+R7', 'SYM+R8', 'SYM+R9', 'SYM+R10', 'GTR', 'GTR+I', 'GTR+G', 'GTR+I+G', 'GTR+R2', 'GTR+R3', 'GTR+R4', 'GTR+R5', 'GTR+R6', 'GTR+R7', 'GTR+R8', 'GTR+R9', 'GTR+R10', 'MFP', 'TEST')
Model of Nucleotide Substitution. If not provided, IQ-TREE will determine the best fit substitution model automatically.[default:
'MFP'
]- n_init_pars_trees:
Int
%
Range
(1, None)
Number of initial parsimony trees. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_top_init_trees:
Int
%
Range
(1, None)
Number of top initial trees. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_best_retain_trees:
Int
%
Range
(1, None)
Number of best trees retained during search. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_iter:
Int
%
Range
(1, None)
Fix number of iterations to stop. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- stop_iter:
Int
%
Range
(1, None)
Number of unsuccessful iterations to stop. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- perturb_nni_strength:
Float
%
Range
(0.01, 1.0)
Perturbation strength for randomized NNI. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- spr_radius:
Int
%
Range
(1, None)
Radius for parsimony SPR search. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- allnni:
Bool
Perform more thorough NNI search.[default:
False
]- fast:
Bool
Fast search to resemble FastTree.[default:
False
]- alrt:
Int
%
Range
(1000, None)
Single branch test method. Number of bootstrap replicates to perform an SH-like approximate likelihood ratio test (SH-aLRT). Minimum of 1000 replicates is required. Can be used with other 'single branch test methods'. Values reported in the order of: alrt, lbp, abayes.[optional]
- abayes:
Bool
Single branch test method. Approximate Bayes test. Can be used with other 'single branch test methods'. Values reported in the order of: alrt, lbp, abayes.[default:
False
]- lbp:
Int
%
Range
(1000, None)
Single branch test method. Number of bootstrap replicates to perform a fast local bootstrap probability method. Minimum of 1000 replicates is required. Can be used with other 'single branch test methods'. Values reported in the order of: alrt, lbp, abayes.[optional]
- safe:
Bool
Safe likelihood kernel to avoid numerical underflow.[default:
False
]
Outputs¶
- tree:
Phylogeny[Unrooted]
The resulting phylogenetic tree.[required]
phylogeny iqtree-ultrafast-bootstrap¶
Construct a phylogenetic tree using IQ-TREE (http://
Citations¶
Minh et al., 2020; Kalyaanamoorthy et al., 2017; Minh et al., 2013; Hoang et al., 2017
Inputs¶
- alignment:
FeatureData[AlignedSequence]
Aligned sequences to be used for phylogenetic reconstruction.[required]
Parameters¶
- seed:
Int
Random number seed. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_cores:
Threads
The number of cores to use for parallel processing. Use
auto
to let IQ-TREE automatically determine the optimal number of cores to use.[default:1
]- n_cores_max:
Threads
Limits the maximum number of cores to be used when 'n_cores' is set to 'auto'.[optional]
- n_runs:
Int
%
Range
(1, None)
Number of indepedent runs. Multiple independent runs (e.g. 10) can outperform a single run in terms of likelihood maximisation.[default:
1
]- substitution_model:
Str
%
Choices
('JC', 'JC+I', 'JC+G', 'JC+I+G', 'JC+R2', 'JC+R3', 'JC+R4', 'JC+R5', 'JC+R6', 'JC+R7', 'JC+R8', 'JC+R9', 'JC+R10', 'F81', 'F81+I', 'F81+G', 'F81+I+G', 'F81+R2', 'F81+R3', 'F81+R4', 'F81+R5', 'F81+R6', 'F81+R7', 'F81+R8', 'F81+R9', 'F81+R10', 'K80', 'K80+I', 'K80+G', 'K80+I+G', 'K80+R2', 'K80+R3', 'K80+R4', 'K80+R5', 'K80+R6', 'K80+R7', 'K80+R8', 'K80+R9', 'K80+R10', 'HKY', 'HKY+I', 'HKY+G', 'HKY+I+G', 'HKY+R2', 'HKY+R3', 'HKY+R4', 'HKY+R5', 'HKY+R6', 'HKY+R7', 'HKY+R8', 'HKY+R9', 'HKY+R10', 'TNe', 'TNe+I', 'TNe+G', 'TNe+I+G', 'TNe+R2', 'TNe+R3', 'TNe+R4', 'TNe+R5', 'TNe+R6', 'TNe+R7', 'TNe+R8', 'TNe+R9', 'TNe+R10', 'TN', 'TN+I', 'TN+G', 'TN+I+G', 'TN+R2', 'TN+R3', 'TN+R4', 'TN+R5', 'TN+R6', 'TN+R7', 'TN+R8', 'TN+R9', 'TN+R10', 'K81', 'K81+I', 'K81+G', 'K81+I+G', 'K81+R2', 'K81+R3', 'K81+R4', 'K81+R5', 'K81+R6', 'K81+R7', 'K81+R8', 'K81+R9', 'K81+R10', 'K81u', 'K81u+I', 'K81u+G', 'K81u+I+G', 'K81u+R2', 'K81u+R3', 'K81u+R4', 'K81u+R5', 'K81u+R6', 'K81u+R7', 'K81u+R8', 'K81u+R9', 'K81u+R10', 'TPM2', 'TPM2+I', 'TPM2+G', 'TPM2+I+G', 'TPM2+R2', 'TPM2+R3', 'TPM2+R4', 'TPM2+R5', 'TPM2+R6', 'TPM2+R7', 'TPM2+R8', 'TPM2+R9', 'TPM2+R10', 'TPM2u', 'TPM2u+I', 'TPM2u+G', 'TPM2u+I+G', 'TPM2u+R2', 'TPM2u+R3', 'TPM2u+R4', 'TPM2u+R5', 'TPM2u+R6', 'TPM2u+R7', 'TPM2u+R8', 'TPM2u+R9', 'TPM2u+R10', 'TPM3', 'TPM3+I', 'TPM3+G', 'TPM3+I+G', 'TPM3+R2', 'TPM3+R3', 'TPM3+R4', 'TPM3+R5', 'TPM3+R6', 'TPM3+R7', 'TPM3+R8', 'TPM3+R9', 'TPM3+R10', 'TPM3u', 'TPM3u+I', 'TPM3u+G', 'TPM3u+I+G', 'TPM3u+R2', 'TPM3u+R3', 'TPM3u+R4', 'TPM3u+R5', 'TPM3u+R6', 'TPM3u+R7', 'TPM3u+R8', 'TPM3u+R9', 'TPM3u+R10', 'TIMe', 'TIMe+I', 'TIMe+G', 'TIMe+I+G', 'TIMe+R2', 'TIMe+R3', 'TIMe+R4', 'TIMe+R5', 'TIMe+R6', 'TIMe+R7', 'TIMe+R8', 'TIMe+R9', 'TIMe+R10', 'TIM', 'TIM+I', 'TIM+G', 'TIM+I+G', 'TIM+R2', 'TIM+R3', 'TIM+R4', 'TIM+R5', 'TIM+R6', 'TIM+R7', 'TIM+R8', 'TIM+R9', 'TIM+R10', 'TIM2e', 'TIM2e+I', 'TIM2e+G', 'TIM2e+I+G', 'TIM2e+R2', 'TIM2e+R3', 'TIM2e+R4', 'TIM2e+R5', 'TIM2e+R6', 'TIM2e+R7', 'TIM2e+R8', 'TIM2e+R9', 'TIM2e+R10', 'TIM2', 'TIM2+I', 'TIM2+G', 'TIM2+I+G', 'TIM2+R2', 'TIM2+R3', 'TIM2+R4', 'TIM2+R5', 'TIM2+R6', 'TIM2+R7', 'TIM2+R8', 'TIM2+R9', 'TIM2+R10', 'TIM3e', 'TIM3e+I', 'TIM3e+G', 'TIM3e+I+G', 'TIM3e+R2', 'TIM3e+R3', 'TIM3e+R4', 'TIM3e+R5', 'TIM3e+R6', 'TIM3e+R7', 'TIM3e+R8', 'TIM3e+R9', 'TIM3e+R10', 'TIM3', 'TIM3+I', 'TIM3+G', 'TIM3+I+G', 'TIM3+R2', 'TIM3+R3', 'TIM3+R4', 'TIM3+R5', 'TIM3+R6', 'TIM3+R7', 'TIM3+R8', 'TIM3+R9', 'TIM3+R10', 'TVMe', 'TVMe+I', 'TVMe+G', 'TVMe+I+G', 'TVMe+R2', 'TVMe+R3', 'TVMe+R4', 'TVMe+R5', 'TVMe+R6', 'TVMe+R7', 'TVMe+R8', 'TVMe+R9', 'TVMe+R10', 'TVM', 'TVM+I', 'TVM+G', 'TVM+I+G', 'TVM+R2', 'TVM+R3', 'TVM+R4', 'TVM+R5', 'TVM+R6', 'TVM+R7', 'TVM+R8', 'TVM+R9', 'TVM+R10', 'SYM', 'SYM+I', 'SYM+G', 'SYM+I+G', 'SYM+R2', 'SYM+R3', 'SYM+R4', 'SYM+R5', 'SYM+R6', 'SYM+R7', 'SYM+R8', 'SYM+R9', 'SYM+R10', 'GTR', 'GTR+I', 'GTR+G', 'GTR+I+G', 'GTR+R2', 'GTR+R3', 'GTR+R4', 'GTR+R5', 'GTR+R6', 'GTR+R7', 'GTR+R8', 'GTR+R9', 'GTR+R10', 'MFP', 'TEST')
Model of Nucleotide Substitution.If not provided, IQ-TREE will determine the best fit substitution model automatically. [default:
'MFP'
]- bootstrap_replicates:
Int
%
Range
(1000, None)
The number of bootstrap searches to perform. Minimum of 1000 recomended. [default:
1000
]- n_init_pars_trees:
Int
%
Range
(1, None)
Number of initial parsimony trees. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_top_init_trees:
Int
%
Range
(1, None)
Number of top initial trees. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_best_retain_trees:
Int
%
Range
(1, None)
Number of best trees retained during search. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- stop_iter:
Int
%
Range
(1, None)
Number of unsuccessful iterations to stop. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- perturb_nni_strength:
Float
%
Range
(0.01, 1.0)
Perturbation strength for randomized NNI. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- spr_radius:
Int
%
Range
(1, None)
Radius for parsimony SPR search. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_max_ufboot_iter:
Int
%
Range
(1, None)
Maximum number of iterations. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_ufboot_steps:
Int
%
Range
(1, None)
Number of iterations for UFBoot stopping rule. If not set, program defaults will be used.See IQ-TREE manual for details.[optional]
- min_cor_ufboot:
Float
%
Range
(0.51, 0.99)
Minimum correlation coefficient. If not set, program defaults will be used.See IQ-TREE manual for details.[optional]
- ep_break_ufboot:
Float
%
Range
(0.01, 0.99)
Epsilon value to break tie. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- allnni:
Bool
Perform more thorough NNI search.[default:
False
]- alrt:
Int
%
Range
(1000, None)
Single branch test method. Number of bootstrap replicates to perform an SH-like approximate likelihood ratio test (SH-aLRT). Minimum of 1000 replicates is required. Can be used with other 'single branch test methods'. Values reported in the order of: alrt, lbp, abayes.[optional]
- abayes:
Bool
Single branch test method. Performs an approximate Bayes test. Can be used with other 'single branch test methods' and ultrafast bootstrap. Values reported in the order of: alrt, lbp, abayes, ufboot.[default:
False
]- lbp:
Int
%
Range
(1000, None)
Single branch test method. Number of bootstrap replicates to perform a fast local bootstrap probability method. Minimum of 1000 replicates is required. Can be used with other 'single branch test methods'. Values reported in the order of: alrt, lbp, abayes, ufboot.[optional]
- bnni:
Bool
Optimize UFBoot trees by NNI on bootstrap alignment. This option reduces the risk of overestimating branch supports with UFBoot due to severe model violations.[default:
False
]- safe:
Bool
Safe likelihood kernel to avoid numerical underflow.[default:
False
]
Outputs¶
- tree:
Phylogeny[Unrooted]
The resulting phylogenetic tree.[required]
phylogeny filter-table¶
Remove features from a feature table if their identifiers are not tip identifiers in tree.
Inputs¶
- table:
FeatureTable[Frequency¹ | RelativeFrequency² | PresenceAbsence³]
Feature table that features should be filtered from.[required]
- tree:
Phylogeny[Rooted | Unrooted]
Tree where tip identifiers are the feature identifiers that should be retained in the table.[required]
Outputs¶
- filtered_table:
FeatureTable[Frequency¹ | RelativeFrequency² | PresenceAbsence³]
The resulting feature table.[required]
phylogeny filter-tree¶
Remove tips from a tree if their identifiers based on a set of provided identifiers.
Inputs¶
- tree:
Phylogeny[Rooted¹ | Unrooted²]
Tree that should be filtered[required]
- table:
FeatureTable[Frequency | RelativeFrequency | PresenceAbsence | Composition]
Feature table which contains the identifier that should be retained in the tree[optional]
Parameters¶
- metadata:
Metadata
Feature metadata to use with the 'where' statement or to select tips to be retained. Metadata objects could also include FeatureData[Sequence] data types, if, forinstance, you want to filter to match represenative sequencces.[optional]
- where:
Str
SQLite WHERE clause specifying sample metadata criteria that must be met to be included in the filtered feature table. If not provided, all samples in
metadata
that are also in the feature table will be retained.[optional]
Outputs¶
- filtered_tree:
Phylogeny[Rooted¹ | Unrooted²]
The resulting phylogenetic tree.[required]
phylogeny robinson-foulds¶
Calculate the Robinson-Foulds symmetric difference metric between two or more phylogenetic trees.
Citations¶
Robinson & Foulds, 1981
Inputs¶
- trees:
List
[
Phylogeny[Rooted | Unrooted]
]
Phylogenetic trees to compare with Robinson-Foulds. Rooting information and branch lengths are ignored by this metric.[required]
Parameters¶
- labels:
List
[
Str
]
Labels to use for the tree names in the distance matrix. If ommited, labels will be "tree_n" where "n" ranges from 1..N. The number of labels must match the number of trees.[optional]
- missing_tips:
Str
%
Choices
('error', 'intersect-all')
How to handle tips that are not shared between trees. "error" will raise an error if the set of tips is not identical between all input trees. "intersect-all" will remove tips that are not shared between all trees before computing distances beteen trees.[default:
'error'
]
Outputs¶
- distance_matrix:
DistanceMatrix
The distances between trees as a symmetric matrix.[required]
phylogeny align-to-tree-mafft-fasttree¶
This pipeline will start by creating a sequence alignment using MAFFT, after which any alignment columns that are phylogenetically uninformative or ambiguously aligned will be removed (masked). The resulting masked alignment will be used to infer a phylogenetic tree and then subsequently rooted at its midpoint. Output files from each step of the pipeline will be saved. This includes both the unmasked and masked MAFFT alignment from q2-alignment methods, and both the rooted and unrooted phylogenies from q2-phylogeny methods.
Inputs¶
- sequences:
FeatureData[Sequence]
The sequences to be used for creating a fasttree based rooted phylogenetic tree.[required]
Parameters¶
- n_threads:
Threads
The number of threads. (Use
auto
to automatically use all available cores) This value is used when aligning the sequences and creating the tree with fasttree.[default:1
]- mask_max_gap_frequency:
Float
%
Range
(0, 1, inclusive_end=True)
The maximum relative frequency of gap characters in a column for the column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive), where 0.0 retains only those columns without gap characters, and 1.0 retains all columns regardless of gap character frequency. This value is used when masking the aligned sequences.[default:
1.0
]- mask_min_conservation:
Float
%
Range
(0, 1, inclusive_end=True)
The minimum relative frequency of at least one non-gap character in a column for that column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive). For example, if a value of 0.4 is provided, a column will only be retained if it contains at least one character that is present in at least 40% of the sequences. This value is used when masking the aligned sequences.[default:
0.4
]- parttree:
Bool
This flag is required if the number of sequences being aligned are larger than 1000000. Disabled by default.[default:
False
]
Outputs¶
- alignment:
FeatureData[AlignedSequence]
The aligned sequences.[required]
- masked_alignment:
FeatureData[AlignedSequence]
The masked alignment.[required]
- tree:
Phylogeny[Unrooted]
The unrooted phylogenetic tree.[required]
- rooted_tree:
Phylogeny[Rooted]
The rooted phylogenetic tree.[required]
Examples¶
align_to_tree_mafft_fasttree¶
wget -O 'rep-seqs.qza' \
'https://amplicon-docs.qiime2.org/en/latest/data/examples/phylogeny/align-to-tree-mafft-fasttree/1/rep-seqs.qza'
qiime phylogeny align-to-tree-mafft-fasttree \
--i-sequences rep-seqs.qza \
--o-alignment aligned-rep-seqs.qza \
--o-masked-alignment masked-aligned-rep-seqs.qza \
--o-tree unrooted-tree.qza \
--o-rooted-tree rooted-tree.qza
from qiime2 import Artifact
from urllib import request
import qiime2.plugins.phylogeny.actions as phylogeny_actions
url = 'https://amplicon-docs.qiime2.org/en/latest/data/examples/phylogeny/align-to-tree-mafft-fasttree/1/rep-seqs.qza'
fn = 'rep-seqs.qza'
request.urlretrieve(url, fn)
rep_seqs = Artifact.load(fn)
aligned_rep_seqs, masked_aligned_rep_seqs, unrooted_tree, rooted_tree = phylogeny_actions.align_to_tree_mafft_fasttree(
sequences=rep_seqs,
)
- Using the
Upload Data
tool: - On the first tab (Regular), press the
Paste/Fetch
data button at the bottom.- Set "Name" (first text-field) to:
rep-seqs.qza
- In the larger text-area, copy-and-paste: https://
amplicon -docs .qiime2 .org /en /latest /data /examples /phylogeny /align -to -tree -mafft -fasttree /1 /rep -seqs .qza - ("Type", "Genome", and "Settings" can be ignored)
- Set "Name" (first text-field) to:
- Press the
Start
button at the bottom.
- On the first tab (Regular), press the
- Using the
qiime2 phylogeny align-to-tree-mafft-fasttree
tool: - Set "sequences" to
#: rep-seqs.qza
- Press the
Execute
button.
- Set "sequences" to
- Once completed, for each new entry in your history, use the
Edit
button to set the name as follows: - (Renaming is optional, but it will make any subsequent steps easier to complete.)
History Name "Name" to set (be sure to press [Save]) #: qiime2 phylogeny align-to-tree-mafft-fasttree [...] : alignment.qza
aligned-rep-seqs.qza
#: qiime2 phylogeny align-to-tree-mafft-fasttree [...] : masked_alignment.qza
masked-aligned-rep-seqs.qza
#: qiime2 phylogeny align-to-tree-mafft-fasttree [...] : tree.qza
unrooted-tree.qza
#: qiime2 phylogeny align-to-tree-mafft-fasttree [...] : rooted_tree.qza
rooted-tree.qza
library(reticulate)
Artifact <- import("qiime2")$Artifact
phylogeny_actions <- import("qiime2.plugins.phylogeny.actions")
request <- import("urllib")$request
url <- 'https://amplicon-docs.qiime2.org/en/latest/data/examples/phylogeny/align-to-tree-mafft-fasttree/1/rep-seqs.qza'
fn <- 'rep-seqs.qza'
request$urlretrieve(url, fn)
rep_seqs <- Artifact$load(fn)
action_results <- phylogeny_actions$align_to_tree_mafft_fasttree(
sequences=rep_seqs,
)
aligned_rep_seqs <- action_results$alignment
masked_aligned_rep_seqs <- action_results$masked_alignment
unrooted_tree <- action_results$tree
rooted_tree <- action_results$rooted_tree
from q2_phylogeny._examples import phylogeny_align_to_tree_mafft_fasttree
phylogeny_align_to_tree_mafft_fasttree(use)
phylogeny align-to-tree-mafft-iqtree¶
This pipeline will start by creating a sequence alignment using MAFFT, after which any alignment columns that are phylogenetically uninformative or ambiguously aligned will be removed (masked). The resulting masked alignment will be used to infer a phylogenetic tree using IQ-TREE. By default the best fit substitution model will be determined by ModelFinder prior to phylogenetic inference. The resulting tree will be subsequently rooted at its midpoint. Output files from each step of the pipeline will be saved. This includes both the unmasked and masked MAFFT alignment from q2-alignment methods, and both the rooted and unrooted phylogenies from q2-phylogeny methods.
Inputs¶
- sequences:
FeatureData[Sequence]
The sequences to be used for creating a iqtree based rooted phylogenetic tree.[required]
Parameters¶
- n_threads:
Threads
The number of threads. (Use 0 to automatically use all available cores This value is used when aligning the sequences and creating the tree with iqtree.[default:
1
]- mask_max_gap_frequency:
Float
%
Range
(0, 1, inclusive_end=True)
The maximum relative frequency of gap characters in a column for the column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive), where 0.0 retains only those columns without gap characters, and 1.0 retains all columns regardless of gap character frequency. This value is used when masking the aligned sequences.[default:
1.0
]- mask_min_conservation:
Float
%
Range
(0, 1, inclusive_end=True)
The minimum relative frequency of at least one non-gap character in a column for that column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive). For example, if a value of 0.4 is provided, a column will only be retained if it contains at least one character that is present in at least 40% of the sequences. This value is used when masking the aligned sequences.[default:
0.4
]- substitution_model:
Str
%
Choices
('JC', 'JC+I', 'JC+G', 'JC+I+G', 'JC+R2', 'JC+R3', 'JC+R4', 'JC+R5', 'JC+R6', 'JC+R7', 'JC+R8', 'JC+R9', 'JC+R10', 'F81', 'F81+I', 'F81+G', 'F81+I+G', 'F81+R2', 'F81+R3', 'F81+R4', 'F81+R5', 'F81+R6', 'F81+R7', 'F81+R8', 'F81+R9', 'F81+R10', 'K80', 'K80+I', 'K80+G', 'K80+I+G', 'K80+R2', 'K80+R3', 'K80+R4', 'K80+R5', 'K80+R6', 'K80+R7', 'K80+R8', 'K80+R9', 'K80+R10', 'HKY', 'HKY+I', 'HKY+G', 'HKY+I+G', 'HKY+R2', 'HKY+R3', 'HKY+R4', 'HKY+R5', 'HKY+R6', 'HKY+R7', 'HKY+R8', 'HKY+R9', 'HKY+R10', 'TNe', 'TNe+I', 'TNe+G', 'TNe+I+G', 'TNe+R2', 'TNe+R3', 'TNe+R4', 'TNe+R5', 'TNe+R6', 'TNe+R7', 'TNe+R8', 'TNe+R9', 'TNe+R10', 'TN', 'TN+I', 'TN+G', 'TN+I+G', 'TN+R2', 'TN+R3', 'TN+R4', 'TN+R5', 'TN+R6', 'TN+R7', 'TN+R8', 'TN+R9', 'TN+R10', 'K81', 'K81+I', 'K81+G', 'K81+I+G', 'K81+R2', 'K81+R3', 'K81+R4', 'K81+R5', 'K81+R6', 'K81+R7', 'K81+R8', 'K81+R9', 'K81+R10', 'K81u', 'K81u+I', 'K81u+G', 'K81u+I+G', 'K81u+R2', 'K81u+R3', 'K81u+R4', 'K81u+R5', 'K81u+R6', 'K81u+R7', 'K81u+R8', 'K81u+R9', 'K81u+R10', 'TPM2', 'TPM2+I', 'TPM2+G', 'TPM2+I+G', 'TPM2+R2', 'TPM2+R3', 'TPM2+R4', 'TPM2+R5', 'TPM2+R6', 'TPM2+R7', 'TPM2+R8', 'TPM2+R9', 'TPM2+R10', 'TPM2u', 'TPM2u+I', 'TPM2u+G', 'TPM2u+I+G', 'TPM2u+R2', 'TPM2u+R3', 'TPM2u+R4', 'TPM2u+R5', 'TPM2u+R6', 'TPM2u+R7', 'TPM2u+R8', 'TPM2u+R9', 'TPM2u+R10', 'TPM3', 'TPM3+I', 'TPM3+G', 'TPM3+I+G', 'TPM3+R2', 'TPM3+R3', 'TPM3+R4', 'TPM3+R5', 'TPM3+R6', 'TPM3+R7', 'TPM3+R8', 'TPM3+R9', 'TPM3+R10', 'TPM3u', 'TPM3u+I', 'TPM3u+G', 'TPM3u+I+G', 'TPM3u+R2', 'TPM3u+R3', 'TPM3u+R4', 'TPM3u+R5', 'TPM3u+R6', 'TPM3u+R7', 'TPM3u+R8', 'TPM3u+R9', 'TPM3u+R10', 'TIMe', 'TIMe+I', 'TIMe+G', 'TIMe+I+G', 'TIMe+R2', 'TIMe+R3', 'TIMe+R4', 'TIMe+R5', 'TIMe+R6', 'TIMe+R7', 'TIMe+R8', 'TIMe+R9', 'TIMe+R10', 'TIM', 'TIM+I', 'TIM+G', 'TIM+I+G', 'TIM+R2', 'TIM+R3', 'TIM+R4', 'TIM+R5', 'TIM+R6', 'TIM+R7', 'TIM+R8', 'TIM+R9', 'TIM+R10', 'TIM2e', 'TIM2e+I', 'TIM2e+G', 'TIM2e+I+G', 'TIM2e+R2', 'TIM2e+R3', 'TIM2e+R4', 'TIM2e+R5', 'TIM2e+R6', 'TIM2e+R7', 'TIM2e+R8', 'TIM2e+R9', 'TIM2e+R10', 'TIM2', 'TIM2+I', 'TIM2+G', 'TIM2+I+G', 'TIM2+R2', 'TIM2+R3', 'TIM2+R4', 'TIM2+R5', 'TIM2+R6', 'TIM2+R7', 'TIM2+R8', 'TIM2+R9', 'TIM2+R10', 'TIM3e', 'TIM3e+I', 'TIM3e+G', 'TIM3e+I+G', 'TIM3e+R2', 'TIM3e+R3', 'TIM3e+R4', 'TIM3e+R5', 'TIM3e+R6', 'TIM3e+R7', 'TIM3e+R8', 'TIM3e+R9', 'TIM3e+R10', 'TIM3', 'TIM3+I', 'TIM3+G', 'TIM3+I+G', 'TIM3+R2', 'TIM3+R3', 'TIM3+R4', 'TIM3+R5', 'TIM3+R6', 'TIM3+R7', 'TIM3+R8', 'TIM3+R9', 'TIM3+R10', 'TVMe', 'TVMe+I', 'TVMe+G', 'TVMe+I+G', 'TVMe+R2', 'TVMe+R3', 'TVMe+R4', 'TVMe+R5', 'TVMe+R6', 'TVMe+R7', 'TVMe+R8', 'TVMe+R9', 'TVMe+R10', 'TVM', 'TVM+I', 'TVM+G', 'TVM+I+G', 'TVM+R2', 'TVM+R3', 'TVM+R4', 'TVM+R5', 'TVM+R6', 'TVM+R7', 'TVM+R8', 'TVM+R9', 'TVM+R10', 'SYM', 'SYM+I', 'SYM+G', 'SYM+I+G', 'SYM+R2', 'SYM+R3', 'SYM+R4', 'SYM+R5', 'SYM+R6', 'SYM+R7', 'SYM+R8', 'SYM+R9', 'SYM+R10', 'GTR', 'GTR+I', 'GTR+G', 'GTR+I+G', 'GTR+R2', 'GTR+R3', 'GTR+R4', 'GTR+R5', 'GTR+R6', 'GTR+R7', 'GTR+R8', 'GTR+R9', 'GTR+R10', 'MFP', 'TEST')
Model of Nucleotide Substitution. If not provided, IQ-TREE will determine the best fit substitution model automatically.[default:
'MFP'
]- fast:
Bool
Fast search to resemble FastTree.[default:
False
]- alrt:
Int
%
Range
(1000, None)
Single branch test method. Number of bootstrap replicates to perform an SH-like approximate likelihood ratio test (SH-aLRT). Minimum of 1000 replicates is required.[optional]
- seed:
Int
Random number seed for the iqtree parsimony starting tree. This allows you to reproduce tree results. If not supplied then one will be randomly chosen.[optional]
- stop_iter:
Int
%
Range
(1, None)
Number of unsuccessful iterations to stop. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- perturb_nni_strength:
Float
%
Range
(0.01, 1.0)
Perturbation strength for randomized NNI. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
Outputs¶
- alignment:
FeatureData[AlignedSequence]
The aligned sequences.[required]
- masked_alignment:
FeatureData[AlignedSequence]
The masked alignment.[required]
- tree:
Phylogeny[Unrooted]
The unrooted phylogenetic tree.[required]
- rooted_tree:
Phylogeny[Rooted]
The rooted phylogenetic tree.[required]
phylogeny align-to-tree-mafft-raxml¶
This pipeline will start by creating a sequence alignment using MAFFT, after which any alignment columns that are phylogenetically uninformative or ambiguously aligned will be removed (masked). The resulting masked alignment will be used to infer a phylogenetic tree using RAxML, under the specified substitution model, and then subsequently rooted at its midpoint. Output files from each step of the pipeline will be saved. This includes both the unmasked and masked MAFFT alignment from q2-alignment methods, and both the rooted and unrooted phylogenies from q2-phylogeny methods.
Inputs¶
- sequences:
FeatureData[Sequence]
The sequences to be used for creating a iqtree based rooted phylogenetic tree.[required]
Parameters¶
- n_threads:
Threads
The number of threads. (Use
all
to automatically use all available cores. This value is used when aligning the sequences and creating the tree with iqtree.[default:1
]- mask_max_gap_frequency:
Float
%
Range
(0, 1, inclusive_end=True)
The maximum relative frequency of gap characters in a column for the column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive), where 0.0 retains only those columns without gap characters, and 1.0 retains all columns regardless of gap character frequency. This value is used when masking the aligned sequences.[default:
1.0
]- mask_min_conservation:
Float
%
Range
(0, 1, inclusive_end=True)
The minimum relative frequency of at least one non-gap character in a column for that column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive). For example, if a value of 0.4 is provided, a column will only be retained if it contains at least one character that is present in at least 40% of the sequences. This value is used when masking the aligned sequences.[default:
0.4
]- parttree:
Bool
This flag is required if the number of sequences being aligned are larger than 1000000. Disabled by default. NOTE: if using this option, it is recomended that only the CAT-based substitution models of RAxML be considered for this pipeline.[default:
False
]- substitution_model:
Str
%
Choices
('GTRGAMMA', 'GTRGAMMAI', 'GTRCAT', 'GTRCATI')
Model of Nucleotide Substitution.[default:
'GTRGAMMA'
]- seed:
Int
Random number seed for the parsimony starting tree. This allows you to reproduce tree results. If not supplied then one will be randomly chosen.[optional]
- raxml_version:
Str
%
Choices
('Standard', 'SSE3', 'AVX2')
Select a specific CPU optimization of RAxML to use. The SSE3 versions will run approximately 40% faster than the standard version. The AVX2 version will run 10-30% faster than the SSE3 version.[default:
'Standard'
]
Outputs¶
- alignment:
FeatureData[AlignedSequence]
The aligned sequences.[required]
- masked_alignment:
FeatureData[AlignedSequence]
The masked alignment.[required]
- tree:
Phylogeny[Unrooted]
The unrooted phylogenetic tree.[required]
- rooted_tree:
Phylogeny[Rooted]
The rooted phylogenetic tree.[required]
This QIIME 2 plugin supports generating and manipulating phylogenetic trees.
- version:
2024.10.0
- website: https://
github .com /qiime2 /q2 -phylogeny - user support:
- Please post to the QIIME 2 forum for help with this plugin: https://
forum .qiime2 .org
Actions¶
Name | Type | Short Description |
---|---|---|
midpoint-root | method | Midpoint root an unrooted phylogenetic tree. |
fasttree | method | Construct a phylogenetic tree with FastTree. |
raxml | method | Construct a phylogenetic tree with RAxML. |
raxml-rapid-bootstrap | method | Construct a phylogenetic tree with bootstrap supports using RAxML. |
iqtree | method | Construct a phylogenetic tree with IQ-TREE. |
iqtree-ultrafast-bootstrap | method | Construct a phylogenetic tree with IQ-TREE with bootstrap supports. |
filter-table | method | Remove features from table if they're not present in tree. |
filter-tree | method | Remove features from tree based on metadata |
robinson-foulds | method | Calculate Robinson-Foulds distance between phylogenetic trees. |
align-to-tree-mafft-fasttree | pipeline | Build a phylogenetic tree using fasttree and mafft alignment |
align-to-tree-mafft-iqtree | pipeline | Build a phylogenetic tree using iqtree and mafft alignment. |
align-to-tree-mafft-raxml | pipeline | Build a phylogenetic tree using raxml and mafft alignment. |
phylogeny midpoint-root¶
Midpoint root an unrooted phylogenetic tree.
Inputs¶
- tree:
Phylogeny[Unrooted]
The phylogenetic tree to be rooted.[required]
Outputs¶
- rooted_tree:
Phylogeny[Rooted]
The rooted phylogenetic tree.[required]
phylogeny fasttree¶
Construct a phylogenetic tree with FastTree.
Citations¶
Inputs¶
- alignment:
FeatureData[AlignedSequence]
Aligned sequences to be used for phylogenetic reconstruction.[required]
Parameters¶
- n_threads:
Threads
The number of threads. Using more than one thread runs the non-deterministic variant of
FastTree
(FastTreeMP
), and may result in a different tree than single-threading. See http://www .microbesonline .org /fasttree / #OpenMP for details. (Use auto
to automatically use all available cores)[default:1
]
Outputs¶
- tree:
Phylogeny[Unrooted]
The resulting phylogenetic tree.[required]
phylogeny raxml¶
Construct a phylogenetic tree with RAxML. See: https://
Citations¶
Inputs¶
- alignment:
FeatureData[AlignedSequence]
Aligned sequences to be used for phylogenetic reconstruction.[required]
Parameters¶
- seed:
Int
Random number seed for the parsimony starting tree. This allows you to reproduce tree results. If not supplied then one will be randomly chosen.[optional]
- n_searches:
Int
%
Range
(1, None)
The number of independent maximum likelihood searches to perform. The single best scoring tree is returned.[default:
1
]- n_threads:
Threads
The number of threads to use for multithreaded processing. Using more than one thread will enable the PTHREADS version of RAxML.[default:
1
]- raxml_version:
Str
%
Choices
('Standard', 'SSE3', 'AVX2')
Select a specific CPU optimization of RAxML to use. The SSE3 versions will run approximately 40% faster than the standard version. The AVX2 version will run 10-30% faster than the SSE3 version.[default:
'Standard'
]- substitution_model:
Str
%
Choices
('GTRGAMMA', 'GTRGAMMAI', 'GTRCAT', 'GTRCATI')
Model of Nucleotide Substitution.[default:
'GTRGAMMA'
]
Outputs¶
- tree:
Phylogeny[Unrooted]
The resulting phylogenetic tree.[required]
phylogeny raxml-rapid-bootstrap¶
Construct a phylogenetic tree with RAxML with the addition of rapid bootstrapping support values. See: https://
Citations¶
Stamatakis, 2014; Stamatakis et al., 2008
Inputs¶
- alignment:
FeatureData[AlignedSequence]
Aligned sequences to be used for phylogenetic reconstruction.[required]
Parameters¶
- seed:
Int
Random number seed for the parsimony starting tree. This allows you to reproduce tree results. If not supplied then one will be randomly chosen.[optional]
- rapid_bootstrap_seed:
Int
Specify a random seed for rapid bootstrapping. This allows you to reproduce rapid bootstrap results. If not supplied then one will be randomly chosen.[optional]
- bootstrap_replicates:
Int
%
Range
(10, None)
The number of bootstrap searches to perform.[default:
100
]- n_threads:
Threads
The number of threads to use for multithreaded processing. Using more than one thread will enable the PTHREADS version of RAxML.[default:
1
]- raxml_version:
Str
%
Choices
('Standard', 'SSE3', 'AVX2')
Select a specific CPU optimization of RAxML to use. The SSE3 versions will run approximately 40% faster than the standard version. The AVX2 version will run 10-30% faster than the SSE3 version.[default:
'Standard'
]- substitution_model:
Str
%
Choices
('GTRGAMMA', 'GTRGAMMAI', 'GTRCAT', 'GTRCATI')
Model of Nucleotide Substitution[default:
'GTRGAMMA'
]
Outputs¶
- tree:
Phylogeny[Unrooted]
The resulting phylogenetic tree.[required]
phylogeny iqtree¶
Construct a phylogenetic tree using IQ-TREE (http://
Citations¶
Minh et al., 2020; Kalyaanamoorthy et al., 2017
Inputs¶
- alignment:
FeatureData[AlignedSequence]
Aligned sequences to be used for phylogenetic reconstruction.[required]
Parameters¶
- seed:
Int
Random number seed. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_cores:
Threads
The number of cores to use for parallel processing. Use
auto
to let IQ-TREE automatically determine the optimal number of cores to use.[default:1
]- n_cores_max:
Threads
Limits the maximum number of cores to be used when 'n_cores' is set to 'auto'.[optional]
- n_runs:
Int
%
Range
(1, None)
Number of indepedent runs. Multiple independent runs (e.g. 10) can outperform a single run in terms of likelihood maximisation.[default:
1
]- substitution_model:
Str
%
Choices
('JC', 'JC+I', 'JC+G', 'JC+I+G', 'JC+R2', 'JC+R3', 'JC+R4', 'JC+R5', 'JC+R6', 'JC+R7', 'JC+R8', 'JC+R9', 'JC+R10', 'F81', 'F81+I', 'F81+G', 'F81+I+G', 'F81+R2', 'F81+R3', 'F81+R4', 'F81+R5', 'F81+R6', 'F81+R7', 'F81+R8', 'F81+R9', 'F81+R10', 'K80', 'K80+I', 'K80+G', 'K80+I+G', 'K80+R2', 'K80+R3', 'K80+R4', 'K80+R5', 'K80+R6', 'K80+R7', 'K80+R8', 'K80+R9', 'K80+R10', 'HKY', 'HKY+I', 'HKY+G', 'HKY+I+G', 'HKY+R2', 'HKY+R3', 'HKY+R4', 'HKY+R5', 'HKY+R6', 'HKY+R7', 'HKY+R8', 'HKY+R9', 'HKY+R10', 'TNe', 'TNe+I', 'TNe+G', 'TNe+I+G', 'TNe+R2', 'TNe+R3', 'TNe+R4', 'TNe+R5', 'TNe+R6', 'TNe+R7', 'TNe+R8', 'TNe+R9', 'TNe+R10', 'TN', 'TN+I', 'TN+G', 'TN+I+G', 'TN+R2', 'TN+R3', 'TN+R4', 'TN+R5', 'TN+R6', 'TN+R7', 'TN+R8', 'TN+R9', 'TN+R10', 'K81', 'K81+I', 'K81+G', 'K81+I+G', 'K81+R2', 'K81+R3', 'K81+R4', 'K81+R5', 'K81+R6', 'K81+R7', 'K81+R8', 'K81+R9', 'K81+R10', 'K81u', 'K81u+I', 'K81u+G', 'K81u+I+G', 'K81u+R2', 'K81u+R3', 'K81u+R4', 'K81u+R5', 'K81u+R6', 'K81u+R7', 'K81u+R8', 'K81u+R9', 'K81u+R10', 'TPM2', 'TPM2+I', 'TPM2+G', 'TPM2+I+G', 'TPM2+R2', 'TPM2+R3', 'TPM2+R4', 'TPM2+R5', 'TPM2+R6', 'TPM2+R7', 'TPM2+R8', 'TPM2+R9', 'TPM2+R10', 'TPM2u', 'TPM2u+I', 'TPM2u+G', 'TPM2u+I+G', 'TPM2u+R2', 'TPM2u+R3', 'TPM2u+R4', 'TPM2u+R5', 'TPM2u+R6', 'TPM2u+R7', 'TPM2u+R8', 'TPM2u+R9', 'TPM2u+R10', 'TPM3', 'TPM3+I', 'TPM3+G', 'TPM3+I+G', 'TPM3+R2', 'TPM3+R3', 'TPM3+R4', 'TPM3+R5', 'TPM3+R6', 'TPM3+R7', 'TPM3+R8', 'TPM3+R9', 'TPM3+R10', 'TPM3u', 'TPM3u+I', 'TPM3u+G', 'TPM3u+I+G', 'TPM3u+R2', 'TPM3u+R3', 'TPM3u+R4', 'TPM3u+R5', 'TPM3u+R6', 'TPM3u+R7', 'TPM3u+R8', 'TPM3u+R9', 'TPM3u+R10', 'TIMe', 'TIMe+I', 'TIMe+G', 'TIMe+I+G', 'TIMe+R2', 'TIMe+R3', 'TIMe+R4', 'TIMe+R5', 'TIMe+R6', 'TIMe+R7', 'TIMe+R8', 'TIMe+R9', 'TIMe+R10', 'TIM', 'TIM+I', 'TIM+G', 'TIM+I+G', 'TIM+R2', 'TIM+R3', 'TIM+R4', 'TIM+R5', 'TIM+R6', 'TIM+R7', 'TIM+R8', 'TIM+R9', 'TIM+R10', 'TIM2e', 'TIM2e+I', 'TIM2e+G', 'TIM2e+I+G', 'TIM2e+R2', 'TIM2e+R3', 'TIM2e+R4', 'TIM2e+R5', 'TIM2e+R6', 'TIM2e+R7', 'TIM2e+R8', 'TIM2e+R9', 'TIM2e+R10', 'TIM2', 'TIM2+I', 'TIM2+G', 'TIM2+I+G', 'TIM2+R2', 'TIM2+R3', 'TIM2+R4', 'TIM2+R5', 'TIM2+R6', 'TIM2+R7', 'TIM2+R8', 'TIM2+R9', 'TIM2+R10', 'TIM3e', 'TIM3e+I', 'TIM3e+G', 'TIM3e+I+G', 'TIM3e+R2', 'TIM3e+R3', 'TIM3e+R4', 'TIM3e+R5', 'TIM3e+R6', 'TIM3e+R7', 'TIM3e+R8', 'TIM3e+R9', 'TIM3e+R10', 'TIM3', 'TIM3+I', 'TIM3+G', 'TIM3+I+G', 'TIM3+R2', 'TIM3+R3', 'TIM3+R4', 'TIM3+R5', 'TIM3+R6', 'TIM3+R7', 'TIM3+R8', 'TIM3+R9', 'TIM3+R10', 'TVMe', 'TVMe+I', 'TVMe+G', 'TVMe+I+G', 'TVMe+R2', 'TVMe+R3', 'TVMe+R4', 'TVMe+R5', 'TVMe+R6', 'TVMe+R7', 'TVMe+R8', 'TVMe+R9', 'TVMe+R10', 'TVM', 'TVM+I', 'TVM+G', 'TVM+I+G', 'TVM+R2', 'TVM+R3', 'TVM+R4', 'TVM+R5', 'TVM+R6', 'TVM+R7', 'TVM+R8', 'TVM+R9', 'TVM+R10', 'SYM', 'SYM+I', 'SYM+G', 'SYM+I+G', 'SYM+R2', 'SYM+R3', 'SYM+R4', 'SYM+R5', 'SYM+R6', 'SYM+R7', 'SYM+R8', 'SYM+R9', 'SYM+R10', 'GTR', 'GTR+I', 'GTR+G', 'GTR+I+G', 'GTR+R2', 'GTR+R3', 'GTR+R4', 'GTR+R5', 'GTR+R6', 'GTR+R7', 'GTR+R8', 'GTR+R9', 'GTR+R10', 'MFP', 'TEST')
Model of Nucleotide Substitution. If not provided, IQ-TREE will determine the best fit substitution model automatically.[default:
'MFP'
]- n_init_pars_trees:
Int
%
Range
(1, None)
Number of initial parsimony trees. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_top_init_trees:
Int
%
Range
(1, None)
Number of top initial trees. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_best_retain_trees:
Int
%
Range
(1, None)
Number of best trees retained during search. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_iter:
Int
%
Range
(1, None)
Fix number of iterations to stop. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- stop_iter:
Int
%
Range
(1, None)
Number of unsuccessful iterations to stop. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- perturb_nni_strength:
Float
%
Range
(0.01, 1.0)
Perturbation strength for randomized NNI. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- spr_radius:
Int
%
Range
(1, None)
Radius for parsimony SPR search. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- allnni:
Bool
Perform more thorough NNI search.[default:
False
]- fast:
Bool
Fast search to resemble FastTree.[default:
False
]- alrt:
Int
%
Range
(1000, None)
Single branch test method. Number of bootstrap replicates to perform an SH-like approximate likelihood ratio test (SH-aLRT). Minimum of 1000 replicates is required. Can be used with other 'single branch test methods'. Values reported in the order of: alrt, lbp, abayes.[optional]
- abayes:
Bool
Single branch test method. Approximate Bayes test. Can be used with other 'single branch test methods'. Values reported in the order of: alrt, lbp, abayes.[default:
False
]- lbp:
Int
%
Range
(1000, None)
Single branch test method. Number of bootstrap replicates to perform a fast local bootstrap probability method. Minimum of 1000 replicates is required. Can be used with other 'single branch test methods'. Values reported in the order of: alrt, lbp, abayes.[optional]
- safe:
Bool
Safe likelihood kernel to avoid numerical underflow.[default:
False
]
Outputs¶
- tree:
Phylogeny[Unrooted]
The resulting phylogenetic tree.[required]
phylogeny iqtree-ultrafast-bootstrap¶
Construct a phylogenetic tree using IQ-TREE (http://
Citations¶
Minh et al., 2020; Kalyaanamoorthy et al., 2017; Minh et al., 2013; Hoang et al., 2017
Inputs¶
- alignment:
FeatureData[AlignedSequence]
Aligned sequences to be used for phylogenetic reconstruction.[required]
Parameters¶
- seed:
Int
Random number seed. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_cores:
Threads
The number of cores to use for parallel processing. Use
auto
to let IQ-TREE automatically determine the optimal number of cores to use.[default:1
]- n_cores_max:
Threads
Limits the maximum number of cores to be used when 'n_cores' is set to 'auto'.[optional]
- n_runs:
Int
%
Range
(1, None)
Number of indepedent runs. Multiple independent runs (e.g. 10) can outperform a single run in terms of likelihood maximisation.[default:
1
]- substitution_model:
Str
%
Choices
('JC', 'JC+I', 'JC+G', 'JC+I+G', 'JC+R2', 'JC+R3', 'JC+R4', 'JC+R5', 'JC+R6', 'JC+R7', 'JC+R8', 'JC+R9', 'JC+R10', 'F81', 'F81+I', 'F81+G', 'F81+I+G', 'F81+R2', 'F81+R3', 'F81+R4', 'F81+R5', 'F81+R6', 'F81+R7', 'F81+R8', 'F81+R9', 'F81+R10', 'K80', 'K80+I', 'K80+G', 'K80+I+G', 'K80+R2', 'K80+R3', 'K80+R4', 'K80+R5', 'K80+R6', 'K80+R7', 'K80+R8', 'K80+R9', 'K80+R10', 'HKY', 'HKY+I', 'HKY+G', 'HKY+I+G', 'HKY+R2', 'HKY+R3', 'HKY+R4', 'HKY+R5', 'HKY+R6', 'HKY+R7', 'HKY+R8', 'HKY+R9', 'HKY+R10', 'TNe', 'TNe+I', 'TNe+G', 'TNe+I+G', 'TNe+R2', 'TNe+R3', 'TNe+R4', 'TNe+R5', 'TNe+R6', 'TNe+R7', 'TNe+R8', 'TNe+R9', 'TNe+R10', 'TN', 'TN+I', 'TN+G', 'TN+I+G', 'TN+R2', 'TN+R3', 'TN+R4', 'TN+R5', 'TN+R6', 'TN+R7', 'TN+R8', 'TN+R9', 'TN+R10', 'K81', 'K81+I', 'K81+G', 'K81+I+G', 'K81+R2', 'K81+R3', 'K81+R4', 'K81+R5', 'K81+R6', 'K81+R7', 'K81+R8', 'K81+R9', 'K81+R10', 'K81u', 'K81u+I', 'K81u+G', 'K81u+I+G', 'K81u+R2', 'K81u+R3', 'K81u+R4', 'K81u+R5', 'K81u+R6', 'K81u+R7', 'K81u+R8', 'K81u+R9', 'K81u+R10', 'TPM2', 'TPM2+I', 'TPM2+G', 'TPM2+I+G', 'TPM2+R2', 'TPM2+R3', 'TPM2+R4', 'TPM2+R5', 'TPM2+R6', 'TPM2+R7', 'TPM2+R8', 'TPM2+R9', 'TPM2+R10', 'TPM2u', 'TPM2u+I', 'TPM2u+G', 'TPM2u+I+G', 'TPM2u+R2', 'TPM2u+R3', 'TPM2u+R4', 'TPM2u+R5', 'TPM2u+R6', 'TPM2u+R7', 'TPM2u+R8', 'TPM2u+R9', 'TPM2u+R10', 'TPM3', 'TPM3+I', 'TPM3+G', 'TPM3+I+G', 'TPM3+R2', 'TPM3+R3', 'TPM3+R4', 'TPM3+R5', 'TPM3+R6', 'TPM3+R7', 'TPM3+R8', 'TPM3+R9', 'TPM3+R10', 'TPM3u', 'TPM3u+I', 'TPM3u+G', 'TPM3u+I+G', 'TPM3u+R2', 'TPM3u+R3', 'TPM3u+R4', 'TPM3u+R5', 'TPM3u+R6', 'TPM3u+R7', 'TPM3u+R8', 'TPM3u+R9', 'TPM3u+R10', 'TIMe', 'TIMe+I', 'TIMe+G', 'TIMe+I+G', 'TIMe+R2', 'TIMe+R3', 'TIMe+R4', 'TIMe+R5', 'TIMe+R6', 'TIMe+R7', 'TIMe+R8', 'TIMe+R9', 'TIMe+R10', 'TIM', 'TIM+I', 'TIM+G', 'TIM+I+G', 'TIM+R2', 'TIM+R3', 'TIM+R4', 'TIM+R5', 'TIM+R6', 'TIM+R7', 'TIM+R8', 'TIM+R9', 'TIM+R10', 'TIM2e', 'TIM2e+I', 'TIM2e+G', 'TIM2e+I+G', 'TIM2e+R2', 'TIM2e+R3', 'TIM2e+R4', 'TIM2e+R5', 'TIM2e+R6', 'TIM2e+R7', 'TIM2e+R8', 'TIM2e+R9', 'TIM2e+R10', 'TIM2', 'TIM2+I', 'TIM2+G', 'TIM2+I+G', 'TIM2+R2', 'TIM2+R3', 'TIM2+R4', 'TIM2+R5', 'TIM2+R6', 'TIM2+R7', 'TIM2+R8', 'TIM2+R9', 'TIM2+R10', 'TIM3e', 'TIM3e+I', 'TIM3e+G', 'TIM3e+I+G', 'TIM3e+R2', 'TIM3e+R3', 'TIM3e+R4', 'TIM3e+R5', 'TIM3e+R6', 'TIM3e+R7', 'TIM3e+R8', 'TIM3e+R9', 'TIM3e+R10', 'TIM3', 'TIM3+I', 'TIM3+G', 'TIM3+I+G', 'TIM3+R2', 'TIM3+R3', 'TIM3+R4', 'TIM3+R5', 'TIM3+R6', 'TIM3+R7', 'TIM3+R8', 'TIM3+R9', 'TIM3+R10', 'TVMe', 'TVMe+I', 'TVMe+G', 'TVMe+I+G', 'TVMe+R2', 'TVMe+R3', 'TVMe+R4', 'TVMe+R5', 'TVMe+R6', 'TVMe+R7', 'TVMe+R8', 'TVMe+R9', 'TVMe+R10', 'TVM', 'TVM+I', 'TVM+G', 'TVM+I+G', 'TVM+R2', 'TVM+R3', 'TVM+R4', 'TVM+R5', 'TVM+R6', 'TVM+R7', 'TVM+R8', 'TVM+R9', 'TVM+R10', 'SYM', 'SYM+I', 'SYM+G', 'SYM+I+G', 'SYM+R2', 'SYM+R3', 'SYM+R4', 'SYM+R5', 'SYM+R6', 'SYM+R7', 'SYM+R8', 'SYM+R9', 'SYM+R10', 'GTR', 'GTR+I', 'GTR+G', 'GTR+I+G', 'GTR+R2', 'GTR+R3', 'GTR+R4', 'GTR+R5', 'GTR+R6', 'GTR+R7', 'GTR+R8', 'GTR+R9', 'GTR+R10', 'MFP', 'TEST')
Model of Nucleotide Substitution.If not provided, IQ-TREE will determine the best fit substitution model automatically. [default:
'MFP'
]- bootstrap_replicates:
Int
%
Range
(1000, None)
The number of bootstrap searches to perform. Minimum of 1000 recomended. [default:
1000
]- n_init_pars_trees:
Int
%
Range
(1, None)
Number of initial parsimony trees. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_top_init_trees:
Int
%
Range
(1, None)
Number of top initial trees. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_best_retain_trees:
Int
%
Range
(1, None)
Number of best trees retained during search. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- stop_iter:
Int
%
Range
(1, None)
Number of unsuccessful iterations to stop. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- perturb_nni_strength:
Float
%
Range
(0.01, 1.0)
Perturbation strength for randomized NNI. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- spr_radius:
Int
%
Range
(1, None)
Radius for parsimony SPR search. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_max_ufboot_iter:
Int
%
Range
(1, None)
Maximum number of iterations. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_ufboot_steps:
Int
%
Range
(1, None)
Number of iterations for UFBoot stopping rule. If not set, program defaults will be used.See IQ-TREE manual for details.[optional]
- min_cor_ufboot:
Float
%
Range
(0.51, 0.99)
Minimum correlation coefficient. If not set, program defaults will be used.See IQ-TREE manual for details.[optional]
- ep_break_ufboot:
Float
%
Range
(0.01, 0.99)
Epsilon value to break tie. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- allnni:
Bool
Perform more thorough NNI search.[default:
False
]- alrt:
Int
%
Range
(1000, None)
Single branch test method. Number of bootstrap replicates to perform an SH-like approximate likelihood ratio test (SH-aLRT). Minimum of 1000 replicates is required. Can be used with other 'single branch test methods'. Values reported in the order of: alrt, lbp, abayes.[optional]
- abayes:
Bool
Single branch test method. Performs an approximate Bayes test. Can be used with other 'single branch test methods' and ultrafast bootstrap. Values reported in the order of: alrt, lbp, abayes, ufboot.[default:
False
]- lbp:
Int
%
Range
(1000, None)
Single branch test method. Number of bootstrap replicates to perform a fast local bootstrap probability method. Minimum of 1000 replicates is required. Can be used with other 'single branch test methods'. Values reported in the order of: alrt, lbp, abayes, ufboot.[optional]
- bnni:
Bool
Optimize UFBoot trees by NNI on bootstrap alignment. This option reduces the risk of overestimating branch supports with UFBoot due to severe model violations.[default:
False
]- safe:
Bool
Safe likelihood kernel to avoid numerical underflow.[default:
False
]
Outputs¶
- tree:
Phylogeny[Unrooted]
The resulting phylogenetic tree.[required]
phylogeny filter-table¶
Remove features from a feature table if their identifiers are not tip identifiers in tree.
Inputs¶
- table:
FeatureTable[Frequency¹ | RelativeFrequency² | PresenceAbsence³]
Feature table that features should be filtered from.[required]
- tree:
Phylogeny[Rooted | Unrooted]
Tree where tip identifiers are the feature identifiers that should be retained in the table.[required]
Outputs¶
- filtered_table:
FeatureTable[Frequency¹ | RelativeFrequency² | PresenceAbsence³]
The resulting feature table.[required]
phylogeny filter-tree¶
Remove tips from a tree if their identifiers based on a set of provided identifiers.
Inputs¶
- tree:
Phylogeny[Rooted¹ | Unrooted²]
Tree that should be filtered[required]
- table:
FeatureTable[Frequency | RelativeFrequency | PresenceAbsence | Composition]
Feature table which contains the identifier that should be retained in the tree[optional]
Parameters¶
- metadata:
Metadata
Feature metadata to use with the 'where' statement or to select tips to be retained. Metadata objects could also include FeatureData[Sequence] data types, if, forinstance, you want to filter to match represenative sequencces.[optional]
- where:
Str
SQLite WHERE clause specifying sample metadata criteria that must be met to be included in the filtered feature table. If not provided, all samples in
metadata
that are also in the feature table will be retained.[optional]
Outputs¶
- filtered_tree:
Phylogeny[Rooted¹ | Unrooted²]
The resulting phylogenetic tree.[required]
phylogeny robinson-foulds¶
Calculate the Robinson-Foulds symmetric difference metric between two or more phylogenetic trees.
Citations¶
Robinson & Foulds, 1981
Inputs¶
- trees:
List
[
Phylogeny[Rooted | Unrooted]
]
Phylogenetic trees to compare with Robinson-Foulds. Rooting information and branch lengths are ignored by this metric.[required]
Parameters¶
- labels:
List
[
Str
]
Labels to use for the tree names in the distance matrix. If ommited, labels will be "tree_n" where "n" ranges from 1..N. The number of labels must match the number of trees.[optional]
- missing_tips:
Str
%
Choices
('error', 'intersect-all')
How to handle tips that are not shared between trees. "error" will raise an error if the set of tips is not identical between all input trees. "intersect-all" will remove tips that are not shared between all trees before computing distances beteen trees.[default:
'error'
]
Outputs¶
- distance_matrix:
DistanceMatrix
The distances between trees as a symmetric matrix.[required]
phylogeny align-to-tree-mafft-fasttree¶
This pipeline will start by creating a sequence alignment using MAFFT, after which any alignment columns that are phylogenetically uninformative or ambiguously aligned will be removed (masked). The resulting masked alignment will be used to infer a phylogenetic tree and then subsequently rooted at its midpoint. Output files from each step of the pipeline will be saved. This includes both the unmasked and masked MAFFT alignment from q2-alignment methods, and both the rooted and unrooted phylogenies from q2-phylogeny methods.
Inputs¶
- sequences:
FeatureData[Sequence]
The sequences to be used for creating a fasttree based rooted phylogenetic tree.[required]
Parameters¶
- n_threads:
Threads
The number of threads. (Use
auto
to automatically use all available cores) This value is used when aligning the sequences and creating the tree with fasttree.[default:1
]- mask_max_gap_frequency:
Float
%
Range
(0, 1, inclusive_end=True)
The maximum relative frequency of gap characters in a column for the column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive), where 0.0 retains only those columns without gap characters, and 1.0 retains all columns regardless of gap character frequency. This value is used when masking the aligned sequences.[default:
1.0
]- mask_min_conservation:
Float
%
Range
(0, 1, inclusive_end=True)
The minimum relative frequency of at least one non-gap character in a column for that column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive). For example, if a value of 0.4 is provided, a column will only be retained if it contains at least one character that is present in at least 40% of the sequences. This value is used when masking the aligned sequences.[default:
0.4
]- parttree:
Bool
This flag is required if the number of sequences being aligned are larger than 1000000. Disabled by default.[default:
False
]
Outputs¶
- alignment:
FeatureData[AlignedSequence]
The aligned sequences.[required]
- masked_alignment:
FeatureData[AlignedSequence]
The masked alignment.[required]
- tree:
Phylogeny[Unrooted]
The unrooted phylogenetic tree.[required]
- rooted_tree:
Phylogeny[Rooted]
The rooted phylogenetic tree.[required]
Examples¶
align_to_tree_mafft_fasttree¶
wget -O 'rep-seqs.qza' \
'https://amplicon-docs.qiime2.org/en/latest/data/examples/phylogeny/align-to-tree-mafft-fasttree/1/rep-seqs.qza'
qiime phylogeny align-to-tree-mafft-fasttree \
--i-sequences rep-seqs.qza \
--o-alignment aligned-rep-seqs.qza \
--o-masked-alignment masked-aligned-rep-seqs.qza \
--o-tree unrooted-tree.qza \
--o-rooted-tree rooted-tree.qza
from qiime2 import Artifact
from urllib import request
import qiime2.plugins.phylogeny.actions as phylogeny_actions
url = 'https://amplicon-docs.qiime2.org/en/latest/data/examples/phylogeny/align-to-tree-mafft-fasttree/1/rep-seqs.qza'
fn = 'rep-seqs.qza'
request.urlretrieve(url, fn)
rep_seqs = Artifact.load(fn)
aligned_rep_seqs, masked_aligned_rep_seqs, unrooted_tree, rooted_tree = phylogeny_actions.align_to_tree_mafft_fasttree(
sequences=rep_seqs,
)
- Using the
Upload Data
tool: - On the first tab (Regular), press the
Paste/Fetch
data button at the bottom.- Set "Name" (first text-field) to:
rep-seqs.qza
- In the larger text-area, copy-and-paste: https://
amplicon -docs .qiime2 .org /en /latest /data /examples /phylogeny /align -to -tree -mafft -fasttree /1 /rep -seqs .qza - ("Type", "Genome", and "Settings" can be ignored)
- Set "Name" (first text-field) to:
- Press the
Start
button at the bottom.
- On the first tab (Regular), press the
- Using the
qiime2 phylogeny align-to-tree-mafft-fasttree
tool: - Set "sequences" to
#: rep-seqs.qza
- Press the
Execute
button.
- Set "sequences" to
- Once completed, for each new entry in your history, use the
Edit
button to set the name as follows: - (Renaming is optional, but it will make any subsequent steps easier to complete.)
History Name "Name" to set (be sure to press [Save]) #: qiime2 phylogeny align-to-tree-mafft-fasttree [...] : alignment.qza
aligned-rep-seqs.qza
#: qiime2 phylogeny align-to-tree-mafft-fasttree [...] : masked_alignment.qza
masked-aligned-rep-seqs.qza
#: qiime2 phylogeny align-to-tree-mafft-fasttree [...] : tree.qza
unrooted-tree.qza
#: qiime2 phylogeny align-to-tree-mafft-fasttree [...] : rooted_tree.qza
rooted-tree.qza
library(reticulate)
Artifact <- import("qiime2")$Artifact
phylogeny_actions <- import("qiime2.plugins.phylogeny.actions")
request <- import("urllib")$request
url <- 'https://amplicon-docs.qiime2.org/en/latest/data/examples/phylogeny/align-to-tree-mafft-fasttree/1/rep-seqs.qza'
fn <- 'rep-seqs.qza'
request$urlretrieve(url, fn)
rep_seqs <- Artifact$load(fn)
action_results <- phylogeny_actions$align_to_tree_mafft_fasttree(
sequences=rep_seqs,
)
aligned_rep_seqs <- action_results$alignment
masked_aligned_rep_seqs <- action_results$masked_alignment
unrooted_tree <- action_results$tree
rooted_tree <- action_results$rooted_tree
from q2_phylogeny._examples import phylogeny_align_to_tree_mafft_fasttree
phylogeny_align_to_tree_mafft_fasttree(use)
phylogeny align-to-tree-mafft-iqtree¶
This pipeline will start by creating a sequence alignment using MAFFT, after which any alignment columns that are phylogenetically uninformative or ambiguously aligned will be removed (masked). The resulting masked alignment will be used to infer a phylogenetic tree using IQ-TREE. By default the best fit substitution model will be determined by ModelFinder prior to phylogenetic inference. The resulting tree will be subsequently rooted at its midpoint. Output files from each step of the pipeline will be saved. This includes both the unmasked and masked MAFFT alignment from q2-alignment methods, and both the rooted and unrooted phylogenies from q2-phylogeny methods.
Inputs¶
- sequences:
FeatureData[Sequence]
The sequences to be used for creating a iqtree based rooted phylogenetic tree.[required]
Parameters¶
- n_threads:
Threads
The number of threads. (Use 0 to automatically use all available cores This value is used when aligning the sequences and creating the tree with iqtree.[default:
1
]- mask_max_gap_frequency:
Float
%
Range
(0, 1, inclusive_end=True)
The maximum relative frequency of gap characters in a column for the column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive), where 0.0 retains only those columns without gap characters, and 1.0 retains all columns regardless of gap character frequency. This value is used when masking the aligned sequences.[default:
1.0
]- mask_min_conservation:
Float
%
Range
(0, 1, inclusive_end=True)
The minimum relative frequency of at least one non-gap character in a column for that column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive). For example, if a value of 0.4 is provided, a column will only be retained if it contains at least one character that is present in at least 40% of the sequences. This value is used when masking the aligned sequences.[default:
0.4
]- substitution_model:
Str
%
Choices
('JC', 'JC+I', 'JC+G', 'JC+I+G', 'JC+R2', 'JC+R3', 'JC+R4', 'JC+R5', 'JC+R6', 'JC+R7', 'JC+R8', 'JC+R9', 'JC+R10', 'F81', 'F81+I', 'F81+G', 'F81+I+G', 'F81+R2', 'F81+R3', 'F81+R4', 'F81+R5', 'F81+R6', 'F81+R7', 'F81+R8', 'F81+R9', 'F81+R10', 'K80', 'K80+I', 'K80+G', 'K80+I+G', 'K80+R2', 'K80+R3', 'K80+R4', 'K80+R5', 'K80+R6', 'K80+R7', 'K80+R8', 'K80+R9', 'K80+R10', 'HKY', 'HKY+I', 'HKY+G', 'HKY+I+G', 'HKY+R2', 'HKY+R3', 'HKY+R4', 'HKY+R5', 'HKY+R6', 'HKY+R7', 'HKY+R8', 'HKY+R9', 'HKY+R10', 'TNe', 'TNe+I', 'TNe+G', 'TNe+I+G', 'TNe+R2', 'TNe+R3', 'TNe+R4', 'TNe+R5', 'TNe+R6', 'TNe+R7', 'TNe+R8', 'TNe+R9', 'TNe+R10', 'TN', 'TN+I', 'TN+G', 'TN+I+G', 'TN+R2', 'TN+R3', 'TN+R4', 'TN+R5', 'TN+R6', 'TN+R7', 'TN+R8', 'TN+R9', 'TN+R10', 'K81', 'K81+I', 'K81+G', 'K81+I+G', 'K81+R2', 'K81+R3', 'K81+R4', 'K81+R5', 'K81+R6', 'K81+R7', 'K81+R8', 'K81+R9', 'K81+R10', 'K81u', 'K81u+I', 'K81u+G', 'K81u+I+G', 'K81u+R2', 'K81u+R3', 'K81u+R4', 'K81u+R5', 'K81u+R6', 'K81u+R7', 'K81u+R8', 'K81u+R9', 'K81u+R10', 'TPM2', 'TPM2+I', 'TPM2+G', 'TPM2+I+G', 'TPM2+R2', 'TPM2+R3', 'TPM2+R4', 'TPM2+R5', 'TPM2+R6', 'TPM2+R7', 'TPM2+R8', 'TPM2+R9', 'TPM2+R10', 'TPM2u', 'TPM2u+I', 'TPM2u+G', 'TPM2u+I+G', 'TPM2u+R2', 'TPM2u+R3', 'TPM2u+R4', 'TPM2u+R5', 'TPM2u+R6', 'TPM2u+R7', 'TPM2u+R8', 'TPM2u+R9', 'TPM2u+R10', 'TPM3', 'TPM3+I', 'TPM3+G', 'TPM3+I+G', 'TPM3+R2', 'TPM3+R3', 'TPM3+R4', 'TPM3+R5', 'TPM3+R6', 'TPM3+R7', 'TPM3+R8', 'TPM3+R9', 'TPM3+R10', 'TPM3u', 'TPM3u+I', 'TPM3u+G', 'TPM3u+I+G', 'TPM3u+R2', 'TPM3u+R3', 'TPM3u+R4', 'TPM3u+R5', 'TPM3u+R6', 'TPM3u+R7', 'TPM3u+R8', 'TPM3u+R9', 'TPM3u+R10', 'TIMe', 'TIMe+I', 'TIMe+G', 'TIMe+I+G', 'TIMe+R2', 'TIMe+R3', 'TIMe+R4', 'TIMe+R5', 'TIMe+R6', 'TIMe+R7', 'TIMe+R8', 'TIMe+R9', 'TIMe+R10', 'TIM', 'TIM+I', 'TIM+G', 'TIM+I+G', 'TIM+R2', 'TIM+R3', 'TIM+R4', 'TIM+R5', 'TIM+R6', 'TIM+R7', 'TIM+R8', 'TIM+R9', 'TIM+R10', 'TIM2e', 'TIM2e+I', 'TIM2e+G', 'TIM2e+I+G', 'TIM2e+R2', 'TIM2e+R3', 'TIM2e+R4', 'TIM2e+R5', 'TIM2e+R6', 'TIM2e+R7', 'TIM2e+R8', 'TIM2e+R9', 'TIM2e+R10', 'TIM2', 'TIM2+I', 'TIM2+G', 'TIM2+I+G', 'TIM2+R2', 'TIM2+R3', 'TIM2+R4', 'TIM2+R5', 'TIM2+R6', 'TIM2+R7', 'TIM2+R8', 'TIM2+R9', 'TIM2+R10', 'TIM3e', 'TIM3e+I', 'TIM3e+G', 'TIM3e+I+G', 'TIM3e+R2', 'TIM3e+R3', 'TIM3e+R4', 'TIM3e+R5', 'TIM3e+R6', 'TIM3e+R7', 'TIM3e+R8', 'TIM3e+R9', 'TIM3e+R10', 'TIM3', 'TIM3+I', 'TIM3+G', 'TIM3+I+G', 'TIM3+R2', 'TIM3+R3', 'TIM3+R4', 'TIM3+R5', 'TIM3+R6', 'TIM3+R7', 'TIM3+R8', 'TIM3+R9', 'TIM3+R10', 'TVMe', 'TVMe+I', 'TVMe+G', 'TVMe+I+G', 'TVMe+R2', 'TVMe+R3', 'TVMe+R4', 'TVMe+R5', 'TVMe+R6', 'TVMe+R7', 'TVMe+R8', 'TVMe+R9', 'TVMe+R10', 'TVM', 'TVM+I', 'TVM+G', 'TVM+I+G', 'TVM+R2', 'TVM+R3', 'TVM+R4', 'TVM+R5', 'TVM+R6', 'TVM+R7', 'TVM+R8', 'TVM+R9', 'TVM+R10', 'SYM', 'SYM+I', 'SYM+G', 'SYM+I+G', 'SYM+R2', 'SYM+R3', 'SYM+R4', 'SYM+R5', 'SYM+R6', 'SYM+R7', 'SYM+R8', 'SYM+R9', 'SYM+R10', 'GTR', 'GTR+I', 'GTR+G', 'GTR+I+G', 'GTR+R2', 'GTR+R3', 'GTR+R4', 'GTR+R5', 'GTR+R6', 'GTR+R7', 'GTR+R8', 'GTR+R9', 'GTR+R10', 'MFP', 'TEST')
Model of Nucleotide Substitution. If not provided, IQ-TREE will determine the best fit substitution model automatically.[default:
'MFP'
]- fast:
Bool
Fast search to resemble FastTree.[default:
False
]- alrt:
Int
%
Range
(1000, None)
Single branch test method. Number of bootstrap replicates to perform an SH-like approximate likelihood ratio test (SH-aLRT). Minimum of 1000 replicates is required.[optional]
- seed:
Int
Random number seed for the iqtree parsimony starting tree. This allows you to reproduce tree results. If not supplied then one will be randomly chosen.[optional]
- stop_iter:
Int
%
Range
(1, None)
Number of unsuccessful iterations to stop. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- perturb_nni_strength:
Float
%
Range
(0.01, 1.0)
Perturbation strength for randomized NNI. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
Outputs¶
- alignment:
FeatureData[AlignedSequence]
The aligned sequences.[required]
- masked_alignment:
FeatureData[AlignedSequence]
The masked alignment.[required]
- tree:
Phylogeny[Unrooted]
The unrooted phylogenetic tree.[required]
- rooted_tree:
Phylogeny[Rooted]
The rooted phylogenetic tree.[required]
phylogeny align-to-tree-mafft-raxml¶
This pipeline will start by creating a sequence alignment using MAFFT, after which any alignment columns that are phylogenetically uninformative or ambiguously aligned will be removed (masked). The resulting masked alignment will be used to infer a phylogenetic tree using RAxML, under the specified substitution model, and then subsequently rooted at its midpoint. Output files from each step of the pipeline will be saved. This includes both the unmasked and masked MAFFT alignment from q2-alignment methods, and both the rooted and unrooted phylogenies from q2-phylogeny methods.
Inputs¶
- sequences:
FeatureData[Sequence]
The sequences to be used for creating a iqtree based rooted phylogenetic tree.[required]
Parameters¶
- n_threads:
Threads
The number of threads. (Use
all
to automatically use all available cores. This value is used when aligning the sequences and creating the tree with iqtree.[default:1
]- mask_max_gap_frequency:
Float
%
Range
(0, 1, inclusive_end=True)
The maximum relative frequency of gap characters in a column for the column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive), where 0.0 retains only those columns without gap characters, and 1.0 retains all columns regardless of gap character frequency. This value is used when masking the aligned sequences.[default:
1.0
]- mask_min_conservation:
Float
%
Range
(0, 1, inclusive_end=True)
The minimum relative frequency of at least one non-gap character in a column for that column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive). For example, if a value of 0.4 is provided, a column will only be retained if it contains at least one character that is present in at least 40% of the sequences. This value is used when masking the aligned sequences.[default:
0.4
]- parttree:
Bool
This flag is required if the number of sequences being aligned are larger than 1000000. Disabled by default. NOTE: if using this option, it is recomended that only the CAT-based substitution models of RAxML be considered for this pipeline.[default:
False
]- substitution_model:
Str
%
Choices
('GTRGAMMA', 'GTRGAMMAI', 'GTRCAT', 'GTRCATI')
Model of Nucleotide Substitution.[default:
'GTRGAMMA'
]- seed:
Int
Random number seed for the parsimony starting tree. This allows you to reproduce tree results. If not supplied then one will be randomly chosen.[optional]
- raxml_version:
Str
%
Choices
('Standard', 'SSE3', 'AVX2')
Select a specific CPU optimization of RAxML to use. The SSE3 versions will run approximately 40% faster than the standard version. The AVX2 version will run 10-30% faster than the SSE3 version.[default:
'Standard'
]
Outputs¶
- alignment:
FeatureData[AlignedSequence]
The aligned sequences.[required]
- masked_alignment:
FeatureData[AlignedSequence]
The masked alignment.[required]
- tree:
Phylogeny[Unrooted]
The unrooted phylogenetic tree.[required]
- rooted_tree:
Phylogeny[Rooted]
The rooted phylogenetic tree.[required]
This QIIME 2 plugin supports generating and manipulating phylogenetic trees.
- version:
2024.10.0
- website: https://
github .com /qiime2 /q2 -phylogeny - user support:
- Please post to the QIIME 2 forum for help with this plugin: https://
forum .qiime2 .org
Actions¶
Name | Type | Short Description |
---|---|---|
midpoint-root | method | Midpoint root an unrooted phylogenetic tree. |
fasttree | method | Construct a phylogenetic tree with FastTree. |
raxml | method | Construct a phylogenetic tree with RAxML. |
raxml-rapid-bootstrap | method | Construct a phylogenetic tree with bootstrap supports using RAxML. |
iqtree | method | Construct a phylogenetic tree with IQ-TREE. |
iqtree-ultrafast-bootstrap | method | Construct a phylogenetic tree with IQ-TREE with bootstrap supports. |
filter-table | method | Remove features from table if they're not present in tree. |
filter-tree | method | Remove features from tree based on metadata |
robinson-foulds | method | Calculate Robinson-Foulds distance between phylogenetic trees. |
align-to-tree-mafft-fasttree | pipeline | Build a phylogenetic tree using fasttree and mafft alignment |
align-to-tree-mafft-iqtree | pipeline | Build a phylogenetic tree using iqtree and mafft alignment. |
align-to-tree-mafft-raxml | pipeline | Build a phylogenetic tree using raxml and mafft alignment. |
phylogeny midpoint-root¶
Midpoint root an unrooted phylogenetic tree.
Inputs¶
- tree:
Phylogeny[Unrooted]
The phylogenetic tree to be rooted.[required]
Outputs¶
- rooted_tree:
Phylogeny[Rooted]
The rooted phylogenetic tree.[required]
phylogeny fasttree¶
Construct a phylogenetic tree with FastTree.
Citations¶
Inputs¶
- alignment:
FeatureData[AlignedSequence]
Aligned sequences to be used for phylogenetic reconstruction.[required]
Parameters¶
- n_threads:
Threads
The number of threads. Using more than one thread runs the non-deterministic variant of
FastTree
(FastTreeMP
), and may result in a different tree than single-threading. See http://www .microbesonline .org /fasttree / #OpenMP for details. (Use auto
to automatically use all available cores)[default:1
]
Outputs¶
- tree:
Phylogeny[Unrooted]
The resulting phylogenetic tree.[required]
phylogeny raxml¶
Construct a phylogenetic tree with RAxML. See: https://
Citations¶
Inputs¶
- alignment:
FeatureData[AlignedSequence]
Aligned sequences to be used for phylogenetic reconstruction.[required]
Parameters¶
- seed:
Int
Random number seed for the parsimony starting tree. This allows you to reproduce tree results. If not supplied then one will be randomly chosen.[optional]
- n_searches:
Int
%
Range
(1, None)
The number of independent maximum likelihood searches to perform. The single best scoring tree is returned.[default:
1
]- n_threads:
Threads
The number of threads to use for multithreaded processing. Using more than one thread will enable the PTHREADS version of RAxML.[default:
1
]- raxml_version:
Str
%
Choices
('Standard', 'SSE3', 'AVX2')
Select a specific CPU optimization of RAxML to use. The SSE3 versions will run approximately 40% faster than the standard version. The AVX2 version will run 10-30% faster than the SSE3 version.[default:
'Standard'
]- substitution_model:
Str
%
Choices
('GTRGAMMA', 'GTRGAMMAI', 'GTRCAT', 'GTRCATI')
Model of Nucleotide Substitution.[default:
'GTRGAMMA'
]
Outputs¶
- tree:
Phylogeny[Unrooted]
The resulting phylogenetic tree.[required]
phylogeny raxml-rapid-bootstrap¶
Construct a phylogenetic tree with RAxML with the addition of rapid bootstrapping support values. See: https://
Citations¶
Stamatakis, 2014; Stamatakis et al., 2008
Inputs¶
- alignment:
FeatureData[AlignedSequence]
Aligned sequences to be used for phylogenetic reconstruction.[required]
Parameters¶
- seed:
Int
Random number seed for the parsimony starting tree. This allows you to reproduce tree results. If not supplied then one will be randomly chosen.[optional]
- rapid_bootstrap_seed:
Int
Specify a random seed for rapid bootstrapping. This allows you to reproduce rapid bootstrap results. If not supplied then one will be randomly chosen.[optional]
- bootstrap_replicates:
Int
%
Range
(10, None)
The number of bootstrap searches to perform.[default:
100
]- n_threads:
Threads
The number of threads to use for multithreaded processing. Using more than one thread will enable the PTHREADS version of RAxML.[default:
1
]- raxml_version:
Str
%
Choices
('Standard', 'SSE3', 'AVX2')
Select a specific CPU optimization of RAxML to use. The SSE3 versions will run approximately 40% faster than the standard version. The AVX2 version will run 10-30% faster than the SSE3 version.[default:
'Standard'
]- substitution_model:
Str
%
Choices
('GTRGAMMA', 'GTRGAMMAI', 'GTRCAT', 'GTRCATI')
Model of Nucleotide Substitution[default:
'GTRGAMMA'
]
Outputs¶
- tree:
Phylogeny[Unrooted]
The resulting phylogenetic tree.[required]
phylogeny iqtree¶
Construct a phylogenetic tree using IQ-TREE (http://
Citations¶
Minh et al., 2020; Kalyaanamoorthy et al., 2017
Inputs¶
- alignment:
FeatureData[AlignedSequence]
Aligned sequences to be used for phylogenetic reconstruction.[required]
Parameters¶
- seed:
Int
Random number seed. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_cores:
Threads
The number of cores to use for parallel processing. Use
auto
to let IQ-TREE automatically determine the optimal number of cores to use.[default:1
]- n_cores_max:
Threads
Limits the maximum number of cores to be used when 'n_cores' is set to 'auto'.[optional]
- n_runs:
Int
%
Range
(1, None)
Number of indepedent runs. Multiple independent runs (e.g. 10) can outperform a single run in terms of likelihood maximisation.[default:
1
]- substitution_model:
Str
%
Choices
('JC', 'JC+I', 'JC+G', 'JC+I+G', 'JC+R2', 'JC+R3', 'JC+R4', 'JC+R5', 'JC+R6', 'JC+R7', 'JC+R8', 'JC+R9', 'JC+R10', 'F81', 'F81+I', 'F81+G', 'F81+I+G', 'F81+R2', 'F81+R3', 'F81+R4', 'F81+R5', 'F81+R6', 'F81+R7', 'F81+R8', 'F81+R9', 'F81+R10', 'K80', 'K80+I', 'K80+G', 'K80+I+G', 'K80+R2', 'K80+R3', 'K80+R4', 'K80+R5', 'K80+R6', 'K80+R7', 'K80+R8', 'K80+R9', 'K80+R10', 'HKY', 'HKY+I', 'HKY+G', 'HKY+I+G', 'HKY+R2', 'HKY+R3', 'HKY+R4', 'HKY+R5', 'HKY+R6', 'HKY+R7', 'HKY+R8', 'HKY+R9', 'HKY+R10', 'TNe', 'TNe+I', 'TNe+G', 'TNe+I+G', 'TNe+R2', 'TNe+R3', 'TNe+R4', 'TNe+R5', 'TNe+R6', 'TNe+R7', 'TNe+R8', 'TNe+R9', 'TNe+R10', 'TN', 'TN+I', 'TN+G', 'TN+I+G', 'TN+R2', 'TN+R3', 'TN+R4', 'TN+R5', 'TN+R6', 'TN+R7', 'TN+R8', 'TN+R9', 'TN+R10', 'K81', 'K81+I', 'K81+G', 'K81+I+G', 'K81+R2', 'K81+R3', 'K81+R4', 'K81+R5', 'K81+R6', 'K81+R7', 'K81+R8', 'K81+R9', 'K81+R10', 'K81u', 'K81u+I', 'K81u+G', 'K81u+I+G', 'K81u+R2', 'K81u+R3', 'K81u+R4', 'K81u+R5', 'K81u+R6', 'K81u+R7', 'K81u+R8', 'K81u+R9', 'K81u+R10', 'TPM2', 'TPM2+I', 'TPM2+G', 'TPM2+I+G', 'TPM2+R2', 'TPM2+R3', 'TPM2+R4', 'TPM2+R5', 'TPM2+R6', 'TPM2+R7', 'TPM2+R8', 'TPM2+R9', 'TPM2+R10', 'TPM2u', 'TPM2u+I', 'TPM2u+G', 'TPM2u+I+G', 'TPM2u+R2', 'TPM2u+R3', 'TPM2u+R4', 'TPM2u+R5', 'TPM2u+R6', 'TPM2u+R7', 'TPM2u+R8', 'TPM2u+R9', 'TPM2u+R10', 'TPM3', 'TPM3+I', 'TPM3+G', 'TPM3+I+G', 'TPM3+R2', 'TPM3+R3', 'TPM3+R4', 'TPM3+R5', 'TPM3+R6', 'TPM3+R7', 'TPM3+R8', 'TPM3+R9', 'TPM3+R10', 'TPM3u', 'TPM3u+I', 'TPM3u+G', 'TPM3u+I+G', 'TPM3u+R2', 'TPM3u+R3', 'TPM3u+R4', 'TPM3u+R5', 'TPM3u+R6', 'TPM3u+R7', 'TPM3u+R8', 'TPM3u+R9', 'TPM3u+R10', 'TIMe', 'TIMe+I', 'TIMe+G', 'TIMe+I+G', 'TIMe+R2', 'TIMe+R3', 'TIMe+R4', 'TIMe+R5', 'TIMe+R6', 'TIMe+R7', 'TIMe+R8', 'TIMe+R9', 'TIMe+R10', 'TIM', 'TIM+I', 'TIM+G', 'TIM+I+G', 'TIM+R2', 'TIM+R3', 'TIM+R4', 'TIM+R5', 'TIM+R6', 'TIM+R7', 'TIM+R8', 'TIM+R9', 'TIM+R10', 'TIM2e', 'TIM2e+I', 'TIM2e+G', 'TIM2e+I+G', 'TIM2e+R2', 'TIM2e+R3', 'TIM2e+R4', 'TIM2e+R5', 'TIM2e+R6', 'TIM2e+R7', 'TIM2e+R8', 'TIM2e+R9', 'TIM2e+R10', 'TIM2', 'TIM2+I', 'TIM2+G', 'TIM2+I+G', 'TIM2+R2', 'TIM2+R3', 'TIM2+R4', 'TIM2+R5', 'TIM2+R6', 'TIM2+R7', 'TIM2+R8', 'TIM2+R9', 'TIM2+R10', 'TIM3e', 'TIM3e+I', 'TIM3e+G', 'TIM3e+I+G', 'TIM3e+R2', 'TIM3e+R3', 'TIM3e+R4', 'TIM3e+R5', 'TIM3e+R6', 'TIM3e+R7', 'TIM3e+R8', 'TIM3e+R9', 'TIM3e+R10', 'TIM3', 'TIM3+I', 'TIM3+G', 'TIM3+I+G', 'TIM3+R2', 'TIM3+R3', 'TIM3+R4', 'TIM3+R5', 'TIM3+R6', 'TIM3+R7', 'TIM3+R8', 'TIM3+R9', 'TIM3+R10', 'TVMe', 'TVMe+I', 'TVMe+G', 'TVMe+I+G', 'TVMe+R2', 'TVMe+R3', 'TVMe+R4', 'TVMe+R5', 'TVMe+R6', 'TVMe+R7', 'TVMe+R8', 'TVMe+R9', 'TVMe+R10', 'TVM', 'TVM+I', 'TVM+G', 'TVM+I+G', 'TVM+R2', 'TVM+R3', 'TVM+R4', 'TVM+R5', 'TVM+R6', 'TVM+R7', 'TVM+R8', 'TVM+R9', 'TVM+R10', 'SYM', 'SYM+I', 'SYM+G', 'SYM+I+G', 'SYM+R2', 'SYM+R3', 'SYM+R4', 'SYM+R5', 'SYM+R6', 'SYM+R7', 'SYM+R8', 'SYM+R9', 'SYM+R10', 'GTR', 'GTR+I', 'GTR+G', 'GTR+I+G', 'GTR+R2', 'GTR+R3', 'GTR+R4', 'GTR+R5', 'GTR+R6', 'GTR+R7', 'GTR+R8', 'GTR+R9', 'GTR+R10', 'MFP', 'TEST')
Model of Nucleotide Substitution. If not provided, IQ-TREE will determine the best fit substitution model automatically.[default:
'MFP'
]- n_init_pars_trees:
Int
%
Range
(1, None)
Number of initial parsimony trees. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_top_init_trees:
Int
%
Range
(1, None)
Number of top initial trees. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_best_retain_trees:
Int
%
Range
(1, None)
Number of best trees retained during search. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_iter:
Int
%
Range
(1, None)
Fix number of iterations to stop. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- stop_iter:
Int
%
Range
(1, None)
Number of unsuccessful iterations to stop. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- perturb_nni_strength:
Float
%
Range
(0.01, 1.0)
Perturbation strength for randomized NNI. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- spr_radius:
Int
%
Range
(1, None)
Radius for parsimony SPR search. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- allnni:
Bool
Perform more thorough NNI search.[default:
False
]- fast:
Bool
Fast search to resemble FastTree.[default:
False
]- alrt:
Int
%
Range
(1000, None)
Single branch test method. Number of bootstrap replicates to perform an SH-like approximate likelihood ratio test (SH-aLRT). Minimum of 1000 replicates is required. Can be used with other 'single branch test methods'. Values reported in the order of: alrt, lbp, abayes.[optional]
- abayes:
Bool
Single branch test method. Approximate Bayes test. Can be used with other 'single branch test methods'. Values reported in the order of: alrt, lbp, abayes.[default:
False
]- lbp:
Int
%
Range
(1000, None)
Single branch test method. Number of bootstrap replicates to perform a fast local bootstrap probability method. Minimum of 1000 replicates is required. Can be used with other 'single branch test methods'. Values reported in the order of: alrt, lbp, abayes.[optional]
- safe:
Bool
Safe likelihood kernel to avoid numerical underflow.[default:
False
]
Outputs¶
- tree:
Phylogeny[Unrooted]
The resulting phylogenetic tree.[required]
phylogeny iqtree-ultrafast-bootstrap¶
Construct a phylogenetic tree using IQ-TREE (http://
Citations¶
Minh et al., 2020; Kalyaanamoorthy et al., 2017; Minh et al., 2013; Hoang et al., 2017
Inputs¶
- alignment:
FeatureData[AlignedSequence]
Aligned sequences to be used for phylogenetic reconstruction.[required]
Parameters¶
- seed:
Int
Random number seed. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_cores:
Threads
The number of cores to use for parallel processing. Use
auto
to let IQ-TREE automatically determine the optimal number of cores to use.[default:1
]- n_cores_max:
Threads
Limits the maximum number of cores to be used when 'n_cores' is set to 'auto'.[optional]
- n_runs:
Int
%
Range
(1, None)
Number of indepedent runs. Multiple independent runs (e.g. 10) can outperform a single run in terms of likelihood maximisation.[default:
1
]- substitution_model:
Str
%
Choices
('JC', 'JC+I', 'JC+G', 'JC+I+G', 'JC+R2', 'JC+R3', 'JC+R4', 'JC+R5', 'JC+R6', 'JC+R7', 'JC+R8', 'JC+R9', 'JC+R10', 'F81', 'F81+I', 'F81+G', 'F81+I+G', 'F81+R2', 'F81+R3', 'F81+R4', 'F81+R5', 'F81+R6', 'F81+R7', 'F81+R8', 'F81+R9', 'F81+R10', 'K80', 'K80+I', 'K80+G', 'K80+I+G', 'K80+R2', 'K80+R3', 'K80+R4', 'K80+R5', 'K80+R6', 'K80+R7', 'K80+R8', 'K80+R9', 'K80+R10', 'HKY', 'HKY+I', 'HKY+G', 'HKY+I+G', 'HKY+R2', 'HKY+R3', 'HKY+R4', 'HKY+R5', 'HKY+R6', 'HKY+R7', 'HKY+R8', 'HKY+R9', 'HKY+R10', 'TNe', 'TNe+I', 'TNe+G', 'TNe+I+G', 'TNe+R2', 'TNe+R3', 'TNe+R4', 'TNe+R5', 'TNe+R6', 'TNe+R7', 'TNe+R8', 'TNe+R9', 'TNe+R10', 'TN', 'TN+I', 'TN+G', 'TN+I+G', 'TN+R2', 'TN+R3', 'TN+R4', 'TN+R5', 'TN+R6', 'TN+R7', 'TN+R8', 'TN+R9', 'TN+R10', 'K81', 'K81+I', 'K81+G', 'K81+I+G', 'K81+R2', 'K81+R3', 'K81+R4', 'K81+R5', 'K81+R6', 'K81+R7', 'K81+R8', 'K81+R9', 'K81+R10', 'K81u', 'K81u+I', 'K81u+G', 'K81u+I+G', 'K81u+R2', 'K81u+R3', 'K81u+R4', 'K81u+R5', 'K81u+R6', 'K81u+R7', 'K81u+R8', 'K81u+R9', 'K81u+R10', 'TPM2', 'TPM2+I', 'TPM2+G', 'TPM2+I+G', 'TPM2+R2', 'TPM2+R3', 'TPM2+R4', 'TPM2+R5', 'TPM2+R6', 'TPM2+R7', 'TPM2+R8', 'TPM2+R9', 'TPM2+R10', 'TPM2u', 'TPM2u+I', 'TPM2u+G', 'TPM2u+I+G', 'TPM2u+R2', 'TPM2u+R3', 'TPM2u+R4', 'TPM2u+R5', 'TPM2u+R6', 'TPM2u+R7', 'TPM2u+R8', 'TPM2u+R9', 'TPM2u+R10', 'TPM3', 'TPM3+I', 'TPM3+G', 'TPM3+I+G', 'TPM3+R2', 'TPM3+R3', 'TPM3+R4', 'TPM3+R5', 'TPM3+R6', 'TPM3+R7', 'TPM3+R8', 'TPM3+R9', 'TPM3+R10', 'TPM3u', 'TPM3u+I', 'TPM3u+G', 'TPM3u+I+G', 'TPM3u+R2', 'TPM3u+R3', 'TPM3u+R4', 'TPM3u+R5', 'TPM3u+R6', 'TPM3u+R7', 'TPM3u+R8', 'TPM3u+R9', 'TPM3u+R10', 'TIMe', 'TIMe+I', 'TIMe+G', 'TIMe+I+G', 'TIMe+R2', 'TIMe+R3', 'TIMe+R4', 'TIMe+R5', 'TIMe+R6', 'TIMe+R7', 'TIMe+R8', 'TIMe+R9', 'TIMe+R10', 'TIM', 'TIM+I', 'TIM+G', 'TIM+I+G', 'TIM+R2', 'TIM+R3', 'TIM+R4', 'TIM+R5', 'TIM+R6', 'TIM+R7', 'TIM+R8', 'TIM+R9', 'TIM+R10', 'TIM2e', 'TIM2e+I', 'TIM2e+G', 'TIM2e+I+G', 'TIM2e+R2', 'TIM2e+R3', 'TIM2e+R4', 'TIM2e+R5', 'TIM2e+R6', 'TIM2e+R7', 'TIM2e+R8', 'TIM2e+R9', 'TIM2e+R10', 'TIM2', 'TIM2+I', 'TIM2+G', 'TIM2+I+G', 'TIM2+R2', 'TIM2+R3', 'TIM2+R4', 'TIM2+R5', 'TIM2+R6', 'TIM2+R7', 'TIM2+R8', 'TIM2+R9', 'TIM2+R10', 'TIM3e', 'TIM3e+I', 'TIM3e+G', 'TIM3e+I+G', 'TIM3e+R2', 'TIM3e+R3', 'TIM3e+R4', 'TIM3e+R5', 'TIM3e+R6', 'TIM3e+R7', 'TIM3e+R8', 'TIM3e+R9', 'TIM3e+R10', 'TIM3', 'TIM3+I', 'TIM3+G', 'TIM3+I+G', 'TIM3+R2', 'TIM3+R3', 'TIM3+R4', 'TIM3+R5', 'TIM3+R6', 'TIM3+R7', 'TIM3+R8', 'TIM3+R9', 'TIM3+R10', 'TVMe', 'TVMe+I', 'TVMe+G', 'TVMe+I+G', 'TVMe+R2', 'TVMe+R3', 'TVMe+R4', 'TVMe+R5', 'TVMe+R6', 'TVMe+R7', 'TVMe+R8', 'TVMe+R9', 'TVMe+R10', 'TVM', 'TVM+I', 'TVM+G', 'TVM+I+G', 'TVM+R2', 'TVM+R3', 'TVM+R4', 'TVM+R5', 'TVM+R6', 'TVM+R7', 'TVM+R8', 'TVM+R9', 'TVM+R10', 'SYM', 'SYM+I', 'SYM+G', 'SYM+I+G', 'SYM+R2', 'SYM+R3', 'SYM+R4', 'SYM+R5', 'SYM+R6', 'SYM+R7', 'SYM+R8', 'SYM+R9', 'SYM+R10', 'GTR', 'GTR+I', 'GTR+G', 'GTR+I+G', 'GTR+R2', 'GTR+R3', 'GTR+R4', 'GTR+R5', 'GTR+R6', 'GTR+R7', 'GTR+R8', 'GTR+R9', 'GTR+R10', 'MFP', 'TEST')
Model of Nucleotide Substitution.If not provided, IQ-TREE will determine the best fit substitution model automatically. [default:
'MFP'
]- bootstrap_replicates:
Int
%
Range
(1000, None)
The number of bootstrap searches to perform. Minimum of 1000 recomended. [default:
1000
]- n_init_pars_trees:
Int
%
Range
(1, None)
Number of initial parsimony trees. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_top_init_trees:
Int
%
Range
(1, None)
Number of top initial trees. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_best_retain_trees:
Int
%
Range
(1, None)
Number of best trees retained during search. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- stop_iter:
Int
%
Range
(1, None)
Number of unsuccessful iterations to stop. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- perturb_nni_strength:
Float
%
Range
(0.01, 1.0)
Perturbation strength for randomized NNI. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- spr_radius:
Int
%
Range
(1, None)
Radius for parsimony SPR search. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_max_ufboot_iter:
Int
%
Range
(1, None)
Maximum number of iterations. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_ufboot_steps:
Int
%
Range
(1, None)
Number of iterations for UFBoot stopping rule. If not set, program defaults will be used.See IQ-TREE manual for details.[optional]
- min_cor_ufboot:
Float
%
Range
(0.51, 0.99)
Minimum correlation coefficient. If not set, program defaults will be used.See IQ-TREE manual for details.[optional]
- ep_break_ufboot:
Float
%
Range
(0.01, 0.99)
Epsilon value to break tie. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- allnni:
Bool
Perform more thorough NNI search.[default:
False
]- alrt:
Int
%
Range
(1000, None)
Single branch test method. Number of bootstrap replicates to perform an SH-like approximate likelihood ratio test (SH-aLRT). Minimum of 1000 replicates is required. Can be used with other 'single branch test methods'. Values reported in the order of: alrt, lbp, abayes.[optional]
- abayes:
Bool
Single branch test method. Performs an approximate Bayes test. Can be used with other 'single branch test methods' and ultrafast bootstrap. Values reported in the order of: alrt, lbp, abayes, ufboot.[default:
False
]- lbp:
Int
%
Range
(1000, None)
Single branch test method. Number of bootstrap replicates to perform a fast local bootstrap probability method. Minimum of 1000 replicates is required. Can be used with other 'single branch test methods'. Values reported in the order of: alrt, lbp, abayes, ufboot.[optional]
- bnni:
Bool
Optimize UFBoot trees by NNI on bootstrap alignment. This option reduces the risk of overestimating branch supports with UFBoot due to severe model violations.[default:
False
]- safe:
Bool
Safe likelihood kernel to avoid numerical underflow.[default:
False
]
Outputs¶
- tree:
Phylogeny[Unrooted]
The resulting phylogenetic tree.[required]
phylogeny filter-table¶
Remove features from a feature table if their identifiers are not tip identifiers in tree.
Inputs¶
- table:
FeatureTable[Frequency¹ | RelativeFrequency² | PresenceAbsence³]
Feature table that features should be filtered from.[required]
- tree:
Phylogeny[Rooted | Unrooted]
Tree where tip identifiers are the feature identifiers that should be retained in the table.[required]
Outputs¶
- filtered_table:
FeatureTable[Frequency¹ | RelativeFrequency² | PresenceAbsence³]
The resulting feature table.[required]
phylogeny filter-tree¶
Remove tips from a tree if their identifiers based on a set of provided identifiers.
Inputs¶
- tree:
Phylogeny[Rooted¹ | Unrooted²]
Tree that should be filtered[required]
- table:
FeatureTable[Frequency | RelativeFrequency | PresenceAbsence | Composition]
Feature table which contains the identifier that should be retained in the tree[optional]
Parameters¶
- metadata:
Metadata
Feature metadata to use with the 'where' statement or to select tips to be retained. Metadata objects could also include FeatureData[Sequence] data types, if, forinstance, you want to filter to match represenative sequencces.[optional]
- where:
Str
SQLite WHERE clause specifying sample metadata criteria that must be met to be included in the filtered feature table. If not provided, all samples in
metadata
that are also in the feature table will be retained.[optional]
Outputs¶
- filtered_tree:
Phylogeny[Rooted¹ | Unrooted²]
The resulting phylogenetic tree.[required]
phylogeny robinson-foulds¶
Calculate the Robinson-Foulds symmetric difference metric between two or more phylogenetic trees.
Citations¶
Robinson & Foulds, 1981
Inputs¶
- trees:
List
[
Phylogeny[Rooted | Unrooted]
]
Phylogenetic trees to compare with Robinson-Foulds. Rooting information and branch lengths are ignored by this metric.[required]
Parameters¶
- labels:
List
[
Str
]
Labels to use for the tree names in the distance matrix. If ommited, labels will be "tree_n" where "n" ranges from 1..N. The number of labels must match the number of trees.[optional]
- missing_tips:
Str
%
Choices
('error', 'intersect-all')
How to handle tips that are not shared between trees. "error" will raise an error if the set of tips is not identical between all input trees. "intersect-all" will remove tips that are not shared between all trees before computing distances beteen trees.[default:
'error'
]
Outputs¶
- distance_matrix:
DistanceMatrix
The distances between trees as a symmetric matrix.[required]
phylogeny align-to-tree-mafft-fasttree¶
This pipeline will start by creating a sequence alignment using MAFFT, after which any alignment columns that are phylogenetically uninformative or ambiguously aligned will be removed (masked). The resulting masked alignment will be used to infer a phylogenetic tree and then subsequently rooted at its midpoint. Output files from each step of the pipeline will be saved. This includes both the unmasked and masked MAFFT alignment from q2-alignment methods, and both the rooted and unrooted phylogenies from q2-phylogeny methods.
Inputs¶
- sequences:
FeatureData[Sequence]
The sequences to be used for creating a fasttree based rooted phylogenetic tree.[required]
Parameters¶
- n_threads:
Threads
The number of threads. (Use
auto
to automatically use all available cores) This value is used when aligning the sequences and creating the tree with fasttree.[default:1
]- mask_max_gap_frequency:
Float
%
Range
(0, 1, inclusive_end=True)
The maximum relative frequency of gap characters in a column for the column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive), where 0.0 retains only those columns without gap characters, and 1.0 retains all columns regardless of gap character frequency. This value is used when masking the aligned sequences.[default:
1.0
]- mask_min_conservation:
Float
%
Range
(0, 1, inclusive_end=True)
The minimum relative frequency of at least one non-gap character in a column for that column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive). For example, if a value of 0.4 is provided, a column will only be retained if it contains at least one character that is present in at least 40% of the sequences. This value is used when masking the aligned sequences.[default:
0.4
]- parttree:
Bool
This flag is required if the number of sequences being aligned are larger than 1000000. Disabled by default.[default:
False
]
Outputs¶
- alignment:
FeatureData[AlignedSequence]
The aligned sequences.[required]
- masked_alignment:
FeatureData[AlignedSequence]
The masked alignment.[required]
- tree:
Phylogeny[Unrooted]
The unrooted phylogenetic tree.[required]
- rooted_tree:
Phylogeny[Rooted]
The rooted phylogenetic tree.[required]
Examples¶
align_to_tree_mafft_fasttree¶
wget -O 'rep-seqs.qza' \
'https://amplicon-docs.qiime2.org/en/latest/data/examples/phylogeny/align-to-tree-mafft-fasttree/1/rep-seqs.qza'
qiime phylogeny align-to-tree-mafft-fasttree \
--i-sequences rep-seqs.qza \
--o-alignment aligned-rep-seqs.qza \
--o-masked-alignment masked-aligned-rep-seqs.qza \
--o-tree unrooted-tree.qza \
--o-rooted-tree rooted-tree.qza
from qiime2 import Artifact
from urllib import request
import qiime2.plugins.phylogeny.actions as phylogeny_actions
url = 'https://amplicon-docs.qiime2.org/en/latest/data/examples/phylogeny/align-to-tree-mafft-fasttree/1/rep-seqs.qza'
fn = 'rep-seqs.qza'
request.urlretrieve(url, fn)
rep_seqs = Artifact.load(fn)
aligned_rep_seqs, masked_aligned_rep_seqs, unrooted_tree, rooted_tree = phylogeny_actions.align_to_tree_mafft_fasttree(
sequences=rep_seqs,
)
- Using the
Upload Data
tool: - On the first tab (Regular), press the
Paste/Fetch
data button at the bottom.- Set "Name" (first text-field) to:
rep-seqs.qza
- In the larger text-area, copy-and-paste: https://
amplicon -docs .qiime2 .org /en /latest /data /examples /phylogeny /align -to -tree -mafft -fasttree /1 /rep -seqs .qza - ("Type", "Genome", and "Settings" can be ignored)
- Set "Name" (first text-field) to:
- Press the
Start
button at the bottom.
- On the first tab (Regular), press the
- Using the
qiime2 phylogeny align-to-tree-mafft-fasttree
tool: - Set "sequences" to
#: rep-seqs.qza
- Press the
Execute
button.
- Set "sequences" to
- Once completed, for each new entry in your history, use the
Edit
button to set the name as follows: - (Renaming is optional, but it will make any subsequent steps easier to complete.)
History Name "Name" to set (be sure to press [Save]) #: qiime2 phylogeny align-to-tree-mafft-fasttree [...] : alignment.qza
aligned-rep-seqs.qza
#: qiime2 phylogeny align-to-tree-mafft-fasttree [...] : masked_alignment.qza
masked-aligned-rep-seqs.qza
#: qiime2 phylogeny align-to-tree-mafft-fasttree [...] : tree.qza
unrooted-tree.qza
#: qiime2 phylogeny align-to-tree-mafft-fasttree [...] : rooted_tree.qza
rooted-tree.qza
library(reticulate)
Artifact <- import("qiime2")$Artifact
phylogeny_actions <- import("qiime2.plugins.phylogeny.actions")
request <- import("urllib")$request
url <- 'https://amplicon-docs.qiime2.org/en/latest/data/examples/phylogeny/align-to-tree-mafft-fasttree/1/rep-seqs.qza'
fn <- 'rep-seqs.qza'
request$urlretrieve(url, fn)
rep_seqs <- Artifact$load(fn)
action_results <- phylogeny_actions$align_to_tree_mafft_fasttree(
sequences=rep_seqs,
)
aligned_rep_seqs <- action_results$alignment
masked_aligned_rep_seqs <- action_results$masked_alignment
unrooted_tree <- action_results$tree
rooted_tree <- action_results$rooted_tree
from q2_phylogeny._examples import phylogeny_align_to_tree_mafft_fasttree
phylogeny_align_to_tree_mafft_fasttree(use)
phylogeny align-to-tree-mafft-iqtree¶
This pipeline will start by creating a sequence alignment using MAFFT, after which any alignment columns that are phylogenetically uninformative or ambiguously aligned will be removed (masked). The resulting masked alignment will be used to infer a phylogenetic tree using IQ-TREE. By default the best fit substitution model will be determined by ModelFinder prior to phylogenetic inference. The resulting tree will be subsequently rooted at its midpoint. Output files from each step of the pipeline will be saved. This includes both the unmasked and masked MAFFT alignment from q2-alignment methods, and both the rooted and unrooted phylogenies from q2-phylogeny methods.
Inputs¶
- sequences:
FeatureData[Sequence]
The sequences to be used for creating a iqtree based rooted phylogenetic tree.[required]
Parameters¶
- n_threads:
Threads
The number of threads. (Use 0 to automatically use all available cores This value is used when aligning the sequences and creating the tree with iqtree.[default:
1
]- mask_max_gap_frequency:
Float
%
Range
(0, 1, inclusive_end=True)
The maximum relative frequency of gap characters in a column for the column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive), where 0.0 retains only those columns without gap characters, and 1.0 retains all columns regardless of gap character frequency. This value is used when masking the aligned sequences.[default:
1.0
]- mask_min_conservation:
Float
%
Range
(0, 1, inclusive_end=True)
The minimum relative frequency of at least one non-gap character in a column for that column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive). For example, if a value of 0.4 is provided, a column will only be retained if it contains at least one character that is present in at least 40% of the sequences. This value is used when masking the aligned sequences.[default:
0.4
]- substitution_model:
Str
%
Choices
('JC', 'JC+I', 'JC+G', 'JC+I+G', 'JC+R2', 'JC+R3', 'JC+R4', 'JC+R5', 'JC+R6', 'JC+R7', 'JC+R8', 'JC+R9', 'JC+R10', 'F81', 'F81+I', 'F81+G', 'F81+I+G', 'F81+R2', 'F81+R3', 'F81+R4', 'F81+R5', 'F81+R6', 'F81+R7', 'F81+R8', 'F81+R9', 'F81+R10', 'K80', 'K80+I', 'K80+G', 'K80+I+G', 'K80+R2', 'K80+R3', 'K80+R4', 'K80+R5', 'K80+R6', 'K80+R7', 'K80+R8', 'K80+R9', 'K80+R10', 'HKY', 'HKY+I', 'HKY+G', 'HKY+I+G', 'HKY+R2', 'HKY+R3', 'HKY+R4', 'HKY+R5', 'HKY+R6', 'HKY+R7', 'HKY+R8', 'HKY+R9', 'HKY+R10', 'TNe', 'TNe+I', 'TNe+G', 'TNe+I+G', 'TNe+R2', 'TNe+R3', 'TNe+R4', 'TNe+R5', 'TNe+R6', 'TNe+R7', 'TNe+R8', 'TNe+R9', 'TNe+R10', 'TN', 'TN+I', 'TN+G', 'TN+I+G', 'TN+R2', 'TN+R3', 'TN+R4', 'TN+R5', 'TN+R6', 'TN+R7', 'TN+R8', 'TN+R9', 'TN+R10', 'K81', 'K81+I', 'K81+G', 'K81+I+G', 'K81+R2', 'K81+R3', 'K81+R4', 'K81+R5', 'K81+R6', 'K81+R7', 'K81+R8', 'K81+R9', 'K81+R10', 'K81u', 'K81u+I', 'K81u+G', 'K81u+I+G', 'K81u+R2', 'K81u+R3', 'K81u+R4', 'K81u+R5', 'K81u+R6', 'K81u+R7', 'K81u+R8', 'K81u+R9', 'K81u+R10', 'TPM2', 'TPM2+I', 'TPM2+G', 'TPM2+I+G', 'TPM2+R2', 'TPM2+R3', 'TPM2+R4', 'TPM2+R5', 'TPM2+R6', 'TPM2+R7', 'TPM2+R8', 'TPM2+R9', 'TPM2+R10', 'TPM2u', 'TPM2u+I', 'TPM2u+G', 'TPM2u+I+G', 'TPM2u+R2', 'TPM2u+R3', 'TPM2u+R4', 'TPM2u+R5', 'TPM2u+R6', 'TPM2u+R7', 'TPM2u+R8', 'TPM2u+R9', 'TPM2u+R10', 'TPM3', 'TPM3+I', 'TPM3+G', 'TPM3+I+G', 'TPM3+R2', 'TPM3+R3', 'TPM3+R4', 'TPM3+R5', 'TPM3+R6', 'TPM3+R7', 'TPM3+R8', 'TPM3+R9', 'TPM3+R10', 'TPM3u', 'TPM3u+I', 'TPM3u+G', 'TPM3u+I+G', 'TPM3u+R2', 'TPM3u+R3', 'TPM3u+R4', 'TPM3u+R5', 'TPM3u+R6', 'TPM3u+R7', 'TPM3u+R8', 'TPM3u+R9', 'TPM3u+R10', 'TIMe', 'TIMe+I', 'TIMe+G', 'TIMe+I+G', 'TIMe+R2', 'TIMe+R3', 'TIMe+R4', 'TIMe+R5', 'TIMe+R6', 'TIMe+R7', 'TIMe+R8', 'TIMe+R9', 'TIMe+R10', 'TIM', 'TIM+I', 'TIM+G', 'TIM+I+G', 'TIM+R2', 'TIM+R3', 'TIM+R4', 'TIM+R5', 'TIM+R6', 'TIM+R7', 'TIM+R8', 'TIM+R9', 'TIM+R10', 'TIM2e', 'TIM2e+I', 'TIM2e+G', 'TIM2e+I+G', 'TIM2e+R2', 'TIM2e+R3', 'TIM2e+R4', 'TIM2e+R5', 'TIM2e+R6', 'TIM2e+R7', 'TIM2e+R8', 'TIM2e+R9', 'TIM2e+R10', 'TIM2', 'TIM2+I', 'TIM2+G', 'TIM2+I+G', 'TIM2+R2', 'TIM2+R3', 'TIM2+R4', 'TIM2+R5', 'TIM2+R6', 'TIM2+R7', 'TIM2+R8', 'TIM2+R9', 'TIM2+R10', 'TIM3e', 'TIM3e+I', 'TIM3e+G', 'TIM3e+I+G', 'TIM3e+R2', 'TIM3e+R3', 'TIM3e+R4', 'TIM3e+R5', 'TIM3e+R6', 'TIM3e+R7', 'TIM3e+R8', 'TIM3e+R9', 'TIM3e+R10', 'TIM3', 'TIM3+I', 'TIM3+G', 'TIM3+I+G', 'TIM3+R2', 'TIM3+R3', 'TIM3+R4', 'TIM3+R5', 'TIM3+R6', 'TIM3+R7', 'TIM3+R8', 'TIM3+R9', 'TIM3+R10', 'TVMe', 'TVMe+I', 'TVMe+G', 'TVMe+I+G', 'TVMe+R2', 'TVMe+R3', 'TVMe+R4', 'TVMe+R5', 'TVMe+R6', 'TVMe+R7', 'TVMe+R8', 'TVMe+R9', 'TVMe+R10', 'TVM', 'TVM+I', 'TVM+G', 'TVM+I+G', 'TVM+R2', 'TVM+R3', 'TVM+R4', 'TVM+R5', 'TVM+R6', 'TVM+R7', 'TVM+R8', 'TVM+R9', 'TVM+R10', 'SYM', 'SYM+I', 'SYM+G', 'SYM+I+G', 'SYM+R2', 'SYM+R3', 'SYM+R4', 'SYM+R5', 'SYM+R6', 'SYM+R7', 'SYM+R8', 'SYM+R9', 'SYM+R10', 'GTR', 'GTR+I', 'GTR+G', 'GTR+I+G', 'GTR+R2', 'GTR+R3', 'GTR+R4', 'GTR+R5', 'GTR+R6', 'GTR+R7', 'GTR+R8', 'GTR+R9', 'GTR+R10', 'MFP', 'TEST')
Model of Nucleotide Substitution. If not provided, IQ-TREE will determine the best fit substitution model automatically.[default:
'MFP'
]- fast:
Bool
Fast search to resemble FastTree.[default:
False
]- alrt:
Int
%
Range
(1000, None)
Single branch test method. Number of bootstrap replicates to perform an SH-like approximate likelihood ratio test (SH-aLRT). Minimum of 1000 replicates is required.[optional]
- seed:
Int
Random number seed for the iqtree parsimony starting tree. This allows you to reproduce tree results. If not supplied then one will be randomly chosen.[optional]
- stop_iter:
Int
%
Range
(1, None)
Number of unsuccessful iterations to stop. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- perturb_nni_strength:
Float
%
Range
(0.01, 1.0)
Perturbation strength for randomized NNI. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
Outputs¶
- alignment:
FeatureData[AlignedSequence]
The aligned sequences.[required]
- masked_alignment:
FeatureData[AlignedSequence]
The masked alignment.[required]
- tree:
Phylogeny[Unrooted]
The unrooted phylogenetic tree.[required]
- rooted_tree:
Phylogeny[Rooted]
The rooted phylogenetic tree.[required]
phylogeny align-to-tree-mafft-raxml¶
This pipeline will start by creating a sequence alignment using MAFFT, after which any alignment columns that are phylogenetically uninformative or ambiguously aligned will be removed (masked). The resulting masked alignment will be used to infer a phylogenetic tree using RAxML, under the specified substitution model, and then subsequently rooted at its midpoint. Output files from each step of the pipeline will be saved. This includes both the unmasked and masked MAFFT alignment from q2-alignment methods, and both the rooted and unrooted phylogenies from q2-phylogeny methods.
Inputs¶
- sequences:
FeatureData[Sequence]
The sequences to be used for creating a iqtree based rooted phylogenetic tree.[required]
Parameters¶
- n_threads:
Threads
The number of threads. (Use
all
to automatically use all available cores. This value is used when aligning the sequences and creating the tree with iqtree.[default:1
]- mask_max_gap_frequency:
Float
%
Range
(0, 1, inclusive_end=True)
The maximum relative frequency of gap characters in a column for the column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive), where 0.0 retains only those columns without gap characters, and 1.0 retains all columns regardless of gap character frequency. This value is used when masking the aligned sequences.[default:
1.0
]- mask_min_conservation:
Float
%
Range
(0, 1, inclusive_end=True)
The minimum relative frequency of at least one non-gap character in a column for that column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive). For example, if a value of 0.4 is provided, a column will only be retained if it contains at least one character that is present in at least 40% of the sequences. This value is used when masking the aligned sequences.[default:
0.4
]- parttree:
Bool
This flag is required if the number of sequences being aligned are larger than 1000000. Disabled by default. NOTE: if using this option, it is recomended that only the CAT-based substitution models of RAxML be considered for this pipeline.[default:
False
]- substitution_model:
Str
%
Choices
('GTRGAMMA', 'GTRGAMMAI', 'GTRCAT', 'GTRCATI')
Model of Nucleotide Substitution.[default:
'GTRGAMMA'
]- seed:
Int
Random number seed for the parsimony starting tree. This allows you to reproduce tree results. If not supplied then one will be randomly chosen.[optional]
- raxml_version:
Str
%
Choices
('Standard', 'SSE3', 'AVX2')
Select a specific CPU optimization of RAxML to use. The SSE3 versions will run approximately 40% faster than the standard version. The AVX2 version will run 10-30% faster than the SSE3 version.[default:
'Standard'
]
Outputs¶
- alignment:
FeatureData[AlignedSequence]
The aligned sequences.[required]
- masked_alignment:
FeatureData[AlignedSequence]
The masked alignment.[required]
- tree:
Phylogeny[Unrooted]
The unrooted phylogenetic tree.[required]
- rooted_tree:
Phylogeny[Rooted]
The rooted phylogenetic tree.[required]
This QIIME 2 plugin supports generating and manipulating phylogenetic trees.
- version:
2024.10.0
- website: https://
github .com /qiime2 /q2 -phylogeny - user support:
- Please post to the QIIME 2 forum for help with this plugin: https://
forum .qiime2 .org
Actions¶
Name | Type | Short Description |
---|---|---|
midpoint-root | method | Midpoint root an unrooted phylogenetic tree. |
fasttree | method | Construct a phylogenetic tree with FastTree. |
raxml | method | Construct a phylogenetic tree with RAxML. |
raxml-rapid-bootstrap | method | Construct a phylogenetic tree with bootstrap supports using RAxML. |
iqtree | method | Construct a phylogenetic tree with IQ-TREE. |
iqtree-ultrafast-bootstrap | method | Construct a phylogenetic tree with IQ-TREE with bootstrap supports. |
filter-table | method | Remove features from table if they're not present in tree. |
filter-tree | method | Remove features from tree based on metadata |
robinson-foulds | method | Calculate Robinson-Foulds distance between phylogenetic trees. |
align-to-tree-mafft-fasttree | pipeline | Build a phylogenetic tree using fasttree and mafft alignment |
align-to-tree-mafft-iqtree | pipeline | Build a phylogenetic tree using iqtree and mafft alignment. |
align-to-tree-mafft-raxml | pipeline | Build a phylogenetic tree using raxml and mafft alignment. |
phylogeny midpoint-root¶
Midpoint root an unrooted phylogenetic tree.
Inputs¶
- tree:
Phylogeny[Unrooted]
The phylogenetic tree to be rooted.[required]
Outputs¶
- rooted_tree:
Phylogeny[Rooted]
The rooted phylogenetic tree.[required]
phylogeny fasttree¶
Construct a phylogenetic tree with FastTree.
Citations¶
Inputs¶
- alignment:
FeatureData[AlignedSequence]
Aligned sequences to be used for phylogenetic reconstruction.[required]
Parameters¶
- n_threads:
Threads
The number of threads. Using more than one thread runs the non-deterministic variant of
FastTree
(FastTreeMP
), and may result in a different tree than single-threading. See http://www .microbesonline .org /fasttree / #OpenMP for details. (Use auto
to automatically use all available cores)[default:1
]
Outputs¶
- tree:
Phylogeny[Unrooted]
The resulting phylogenetic tree.[required]
phylogeny raxml¶
Construct a phylogenetic tree with RAxML. See: https://
Citations¶
Inputs¶
- alignment:
FeatureData[AlignedSequence]
Aligned sequences to be used for phylogenetic reconstruction.[required]
Parameters¶
- seed:
Int
Random number seed for the parsimony starting tree. This allows you to reproduce tree results. If not supplied then one will be randomly chosen.[optional]
- n_searches:
Int
%
Range
(1, None)
The number of independent maximum likelihood searches to perform. The single best scoring tree is returned.[default:
1
]- n_threads:
Threads
The number of threads to use for multithreaded processing. Using more than one thread will enable the PTHREADS version of RAxML.[default:
1
]- raxml_version:
Str
%
Choices
('Standard', 'SSE3', 'AVX2')
Select a specific CPU optimization of RAxML to use. The SSE3 versions will run approximately 40% faster than the standard version. The AVX2 version will run 10-30% faster than the SSE3 version.[default:
'Standard'
]- substitution_model:
Str
%
Choices
('GTRGAMMA', 'GTRGAMMAI', 'GTRCAT', 'GTRCATI')
Model of Nucleotide Substitution.[default:
'GTRGAMMA'
]
Outputs¶
- tree:
Phylogeny[Unrooted]
The resulting phylogenetic tree.[required]
phylogeny raxml-rapid-bootstrap¶
Construct a phylogenetic tree with RAxML with the addition of rapid bootstrapping support values. See: https://
Citations¶
Stamatakis, 2014; Stamatakis et al., 2008
Inputs¶
- alignment:
FeatureData[AlignedSequence]
Aligned sequences to be used for phylogenetic reconstruction.[required]
Parameters¶
- seed:
Int
Random number seed for the parsimony starting tree. This allows you to reproduce tree results. If not supplied then one will be randomly chosen.[optional]
- rapid_bootstrap_seed:
Int
Specify a random seed for rapid bootstrapping. This allows you to reproduce rapid bootstrap results. If not supplied then one will be randomly chosen.[optional]
- bootstrap_replicates:
Int
%
Range
(10, None)
The number of bootstrap searches to perform.[default:
100
]- n_threads:
Threads
The number of threads to use for multithreaded processing. Using more than one thread will enable the PTHREADS version of RAxML.[default:
1
]- raxml_version:
Str
%
Choices
('Standard', 'SSE3', 'AVX2')
Select a specific CPU optimization of RAxML to use. The SSE3 versions will run approximately 40% faster than the standard version. The AVX2 version will run 10-30% faster than the SSE3 version.[default:
'Standard'
]- substitution_model:
Str
%
Choices
('GTRGAMMA', 'GTRGAMMAI', 'GTRCAT', 'GTRCATI')
Model of Nucleotide Substitution[default:
'GTRGAMMA'
]
Outputs¶
- tree:
Phylogeny[Unrooted]
The resulting phylogenetic tree.[required]
phylogeny iqtree¶
Construct a phylogenetic tree using IQ-TREE (http://
Citations¶
Minh et al., 2020; Kalyaanamoorthy et al., 2017
Inputs¶
- alignment:
FeatureData[AlignedSequence]
Aligned sequences to be used for phylogenetic reconstruction.[required]
Parameters¶
- seed:
Int
Random number seed. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_cores:
Threads
The number of cores to use for parallel processing. Use
auto
to let IQ-TREE automatically determine the optimal number of cores to use.[default:1
]- n_cores_max:
Threads
Limits the maximum number of cores to be used when 'n_cores' is set to 'auto'.[optional]
- n_runs:
Int
%
Range
(1, None)
Number of indepedent runs. Multiple independent runs (e.g. 10) can outperform a single run in terms of likelihood maximisation.[default:
1
]- substitution_model:
Str
%
Choices
('JC', 'JC+I', 'JC+G', 'JC+I+G', 'JC+R2', 'JC+R3', 'JC+R4', 'JC+R5', 'JC+R6', 'JC+R7', 'JC+R8', 'JC+R9', 'JC+R10', 'F81', 'F81+I', 'F81+G', 'F81+I+G', 'F81+R2', 'F81+R3', 'F81+R4', 'F81+R5', 'F81+R6', 'F81+R7', 'F81+R8', 'F81+R9', 'F81+R10', 'K80', 'K80+I', 'K80+G', 'K80+I+G', 'K80+R2', 'K80+R3', 'K80+R4', 'K80+R5', 'K80+R6', 'K80+R7', 'K80+R8', 'K80+R9', 'K80+R10', 'HKY', 'HKY+I', 'HKY+G', 'HKY+I+G', 'HKY+R2', 'HKY+R3', 'HKY+R4', 'HKY+R5', 'HKY+R6', 'HKY+R7', 'HKY+R8', 'HKY+R9', 'HKY+R10', 'TNe', 'TNe+I', 'TNe+G', 'TNe+I+G', 'TNe+R2', 'TNe+R3', 'TNe+R4', 'TNe+R5', 'TNe+R6', 'TNe+R7', 'TNe+R8', 'TNe+R9', 'TNe+R10', 'TN', 'TN+I', 'TN+G', 'TN+I+G', 'TN+R2', 'TN+R3', 'TN+R4', 'TN+R5', 'TN+R6', 'TN+R7', 'TN+R8', 'TN+R9', 'TN+R10', 'K81', 'K81+I', 'K81+G', 'K81+I+G', 'K81+R2', 'K81+R3', 'K81+R4', 'K81+R5', 'K81+R6', 'K81+R7', 'K81+R8', 'K81+R9', 'K81+R10', 'K81u', 'K81u+I', 'K81u+G', 'K81u+I+G', 'K81u+R2', 'K81u+R3', 'K81u+R4', 'K81u+R5', 'K81u+R6', 'K81u+R7', 'K81u+R8', 'K81u+R9', 'K81u+R10', 'TPM2', 'TPM2+I', 'TPM2+G', 'TPM2+I+G', 'TPM2+R2', 'TPM2+R3', 'TPM2+R4', 'TPM2+R5', 'TPM2+R6', 'TPM2+R7', 'TPM2+R8', 'TPM2+R9', 'TPM2+R10', 'TPM2u', 'TPM2u+I', 'TPM2u+G', 'TPM2u+I+G', 'TPM2u+R2', 'TPM2u+R3', 'TPM2u+R4', 'TPM2u+R5', 'TPM2u+R6', 'TPM2u+R7', 'TPM2u+R8', 'TPM2u+R9', 'TPM2u+R10', 'TPM3', 'TPM3+I', 'TPM3+G', 'TPM3+I+G', 'TPM3+R2', 'TPM3+R3', 'TPM3+R4', 'TPM3+R5', 'TPM3+R6', 'TPM3+R7', 'TPM3+R8', 'TPM3+R9', 'TPM3+R10', 'TPM3u', 'TPM3u+I', 'TPM3u+G', 'TPM3u+I+G', 'TPM3u+R2', 'TPM3u+R3', 'TPM3u+R4', 'TPM3u+R5', 'TPM3u+R6', 'TPM3u+R7', 'TPM3u+R8', 'TPM3u+R9', 'TPM3u+R10', 'TIMe', 'TIMe+I', 'TIMe+G', 'TIMe+I+G', 'TIMe+R2', 'TIMe+R3', 'TIMe+R4', 'TIMe+R5', 'TIMe+R6', 'TIMe+R7', 'TIMe+R8', 'TIMe+R9', 'TIMe+R10', 'TIM', 'TIM+I', 'TIM+G', 'TIM+I+G', 'TIM+R2', 'TIM+R3', 'TIM+R4', 'TIM+R5', 'TIM+R6', 'TIM+R7', 'TIM+R8', 'TIM+R9', 'TIM+R10', 'TIM2e', 'TIM2e+I', 'TIM2e+G', 'TIM2e+I+G', 'TIM2e+R2', 'TIM2e+R3', 'TIM2e+R4', 'TIM2e+R5', 'TIM2e+R6', 'TIM2e+R7', 'TIM2e+R8', 'TIM2e+R9', 'TIM2e+R10', 'TIM2', 'TIM2+I', 'TIM2+G', 'TIM2+I+G', 'TIM2+R2', 'TIM2+R3', 'TIM2+R4', 'TIM2+R5', 'TIM2+R6', 'TIM2+R7', 'TIM2+R8', 'TIM2+R9', 'TIM2+R10', 'TIM3e', 'TIM3e+I', 'TIM3e+G', 'TIM3e+I+G', 'TIM3e+R2', 'TIM3e+R3', 'TIM3e+R4', 'TIM3e+R5', 'TIM3e+R6', 'TIM3e+R7', 'TIM3e+R8', 'TIM3e+R9', 'TIM3e+R10', 'TIM3', 'TIM3+I', 'TIM3+G', 'TIM3+I+G', 'TIM3+R2', 'TIM3+R3', 'TIM3+R4', 'TIM3+R5', 'TIM3+R6', 'TIM3+R7', 'TIM3+R8', 'TIM3+R9', 'TIM3+R10', 'TVMe', 'TVMe+I', 'TVMe+G', 'TVMe+I+G', 'TVMe+R2', 'TVMe+R3', 'TVMe+R4', 'TVMe+R5', 'TVMe+R6', 'TVMe+R7', 'TVMe+R8', 'TVMe+R9', 'TVMe+R10', 'TVM', 'TVM+I', 'TVM+G', 'TVM+I+G', 'TVM+R2', 'TVM+R3', 'TVM+R4', 'TVM+R5', 'TVM+R6', 'TVM+R7', 'TVM+R8', 'TVM+R9', 'TVM+R10', 'SYM', 'SYM+I', 'SYM+G', 'SYM+I+G', 'SYM+R2', 'SYM+R3', 'SYM+R4', 'SYM+R5', 'SYM+R6', 'SYM+R7', 'SYM+R8', 'SYM+R9', 'SYM+R10', 'GTR', 'GTR+I', 'GTR+G', 'GTR+I+G', 'GTR+R2', 'GTR+R3', 'GTR+R4', 'GTR+R5', 'GTR+R6', 'GTR+R7', 'GTR+R8', 'GTR+R9', 'GTR+R10', 'MFP', 'TEST')
Model of Nucleotide Substitution. If not provided, IQ-TREE will determine the best fit substitution model automatically.[default:
'MFP'
]- n_init_pars_trees:
Int
%
Range
(1, None)
Number of initial parsimony trees. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_top_init_trees:
Int
%
Range
(1, None)
Number of top initial trees. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_best_retain_trees:
Int
%
Range
(1, None)
Number of best trees retained during search. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_iter:
Int
%
Range
(1, None)
Fix number of iterations to stop. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- stop_iter:
Int
%
Range
(1, None)
Number of unsuccessful iterations to stop. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- perturb_nni_strength:
Float
%
Range
(0.01, 1.0)
Perturbation strength for randomized NNI. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- spr_radius:
Int
%
Range
(1, None)
Radius for parsimony SPR search. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- allnni:
Bool
Perform more thorough NNI search.[default:
False
]- fast:
Bool
Fast search to resemble FastTree.[default:
False
]- alrt:
Int
%
Range
(1000, None)
Single branch test method. Number of bootstrap replicates to perform an SH-like approximate likelihood ratio test (SH-aLRT). Minimum of 1000 replicates is required. Can be used with other 'single branch test methods'. Values reported in the order of: alrt, lbp, abayes.[optional]
- abayes:
Bool
Single branch test method. Approximate Bayes test. Can be used with other 'single branch test methods'. Values reported in the order of: alrt, lbp, abayes.[default:
False
]- lbp:
Int
%
Range
(1000, None)
Single branch test method. Number of bootstrap replicates to perform a fast local bootstrap probability method. Minimum of 1000 replicates is required. Can be used with other 'single branch test methods'. Values reported in the order of: alrt, lbp, abayes.[optional]
- safe:
Bool
Safe likelihood kernel to avoid numerical underflow.[default:
False
]
Outputs¶
- tree:
Phylogeny[Unrooted]
The resulting phylogenetic tree.[required]
phylogeny iqtree-ultrafast-bootstrap¶
Construct a phylogenetic tree using IQ-TREE (http://
Citations¶
Minh et al., 2020; Kalyaanamoorthy et al., 2017; Minh et al., 2013; Hoang et al., 2017
Inputs¶
- alignment:
FeatureData[AlignedSequence]
Aligned sequences to be used for phylogenetic reconstruction.[required]
Parameters¶
- seed:
Int
Random number seed. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_cores:
Threads
The number of cores to use for parallel processing. Use
auto
to let IQ-TREE automatically determine the optimal number of cores to use.[default:1
]- n_cores_max:
Threads
Limits the maximum number of cores to be used when 'n_cores' is set to 'auto'.[optional]
- n_runs:
Int
%
Range
(1, None)
Number of indepedent runs. Multiple independent runs (e.g. 10) can outperform a single run in terms of likelihood maximisation.[default:
1
]- substitution_model:
Str
%
Choices
('JC', 'JC+I', 'JC+G', 'JC+I+G', 'JC+R2', 'JC+R3', 'JC+R4', 'JC+R5', 'JC+R6', 'JC+R7', 'JC+R8', 'JC+R9', 'JC+R10', 'F81', 'F81+I', 'F81+G', 'F81+I+G', 'F81+R2', 'F81+R3', 'F81+R4', 'F81+R5', 'F81+R6', 'F81+R7', 'F81+R8', 'F81+R9', 'F81+R10', 'K80', 'K80+I', 'K80+G', 'K80+I+G', 'K80+R2', 'K80+R3', 'K80+R4', 'K80+R5', 'K80+R6', 'K80+R7', 'K80+R8', 'K80+R9', 'K80+R10', 'HKY', 'HKY+I', 'HKY+G', 'HKY+I+G', 'HKY+R2', 'HKY+R3', 'HKY+R4', 'HKY+R5', 'HKY+R6', 'HKY+R7', 'HKY+R8', 'HKY+R9', 'HKY+R10', 'TNe', 'TNe+I', 'TNe+G', 'TNe+I+G', 'TNe+R2', 'TNe+R3', 'TNe+R4', 'TNe+R5', 'TNe+R6', 'TNe+R7', 'TNe+R8', 'TNe+R9', 'TNe+R10', 'TN', 'TN+I', 'TN+G', 'TN+I+G', 'TN+R2', 'TN+R3', 'TN+R4', 'TN+R5', 'TN+R6', 'TN+R7', 'TN+R8', 'TN+R9', 'TN+R10', 'K81', 'K81+I', 'K81+G', 'K81+I+G', 'K81+R2', 'K81+R3', 'K81+R4', 'K81+R5', 'K81+R6', 'K81+R7', 'K81+R8', 'K81+R9', 'K81+R10', 'K81u', 'K81u+I', 'K81u+G', 'K81u+I+G', 'K81u+R2', 'K81u+R3', 'K81u+R4', 'K81u+R5', 'K81u+R6', 'K81u+R7', 'K81u+R8', 'K81u+R9', 'K81u+R10', 'TPM2', 'TPM2+I', 'TPM2+G', 'TPM2+I+G', 'TPM2+R2', 'TPM2+R3', 'TPM2+R4', 'TPM2+R5', 'TPM2+R6', 'TPM2+R7', 'TPM2+R8', 'TPM2+R9', 'TPM2+R10', 'TPM2u', 'TPM2u+I', 'TPM2u+G', 'TPM2u+I+G', 'TPM2u+R2', 'TPM2u+R3', 'TPM2u+R4', 'TPM2u+R5', 'TPM2u+R6', 'TPM2u+R7', 'TPM2u+R8', 'TPM2u+R9', 'TPM2u+R10', 'TPM3', 'TPM3+I', 'TPM3+G', 'TPM3+I+G', 'TPM3+R2', 'TPM3+R3', 'TPM3+R4', 'TPM3+R5', 'TPM3+R6', 'TPM3+R7', 'TPM3+R8', 'TPM3+R9', 'TPM3+R10', 'TPM3u', 'TPM3u+I', 'TPM3u+G', 'TPM3u+I+G', 'TPM3u+R2', 'TPM3u+R3', 'TPM3u+R4', 'TPM3u+R5', 'TPM3u+R6', 'TPM3u+R7', 'TPM3u+R8', 'TPM3u+R9', 'TPM3u+R10', 'TIMe', 'TIMe+I', 'TIMe+G', 'TIMe+I+G', 'TIMe+R2', 'TIMe+R3', 'TIMe+R4', 'TIMe+R5', 'TIMe+R6', 'TIMe+R7', 'TIMe+R8', 'TIMe+R9', 'TIMe+R10', 'TIM', 'TIM+I', 'TIM+G', 'TIM+I+G', 'TIM+R2', 'TIM+R3', 'TIM+R4', 'TIM+R5', 'TIM+R6', 'TIM+R7', 'TIM+R8', 'TIM+R9', 'TIM+R10', 'TIM2e', 'TIM2e+I', 'TIM2e+G', 'TIM2e+I+G', 'TIM2e+R2', 'TIM2e+R3', 'TIM2e+R4', 'TIM2e+R5', 'TIM2e+R6', 'TIM2e+R7', 'TIM2e+R8', 'TIM2e+R9', 'TIM2e+R10', 'TIM2', 'TIM2+I', 'TIM2+G', 'TIM2+I+G', 'TIM2+R2', 'TIM2+R3', 'TIM2+R4', 'TIM2+R5', 'TIM2+R6', 'TIM2+R7', 'TIM2+R8', 'TIM2+R9', 'TIM2+R10', 'TIM3e', 'TIM3e+I', 'TIM3e+G', 'TIM3e+I+G', 'TIM3e+R2', 'TIM3e+R3', 'TIM3e+R4', 'TIM3e+R5', 'TIM3e+R6', 'TIM3e+R7', 'TIM3e+R8', 'TIM3e+R9', 'TIM3e+R10', 'TIM3', 'TIM3+I', 'TIM3+G', 'TIM3+I+G', 'TIM3+R2', 'TIM3+R3', 'TIM3+R4', 'TIM3+R5', 'TIM3+R6', 'TIM3+R7', 'TIM3+R8', 'TIM3+R9', 'TIM3+R10', 'TVMe', 'TVMe+I', 'TVMe+G', 'TVMe+I+G', 'TVMe+R2', 'TVMe+R3', 'TVMe+R4', 'TVMe+R5', 'TVMe+R6', 'TVMe+R7', 'TVMe+R8', 'TVMe+R9', 'TVMe+R10', 'TVM', 'TVM+I', 'TVM+G', 'TVM+I+G', 'TVM+R2', 'TVM+R3', 'TVM+R4', 'TVM+R5', 'TVM+R6', 'TVM+R7', 'TVM+R8', 'TVM+R9', 'TVM+R10', 'SYM', 'SYM+I', 'SYM+G', 'SYM+I+G', 'SYM+R2', 'SYM+R3', 'SYM+R4', 'SYM+R5', 'SYM+R6', 'SYM+R7', 'SYM+R8', 'SYM+R9', 'SYM+R10', 'GTR', 'GTR+I', 'GTR+G', 'GTR+I+G', 'GTR+R2', 'GTR+R3', 'GTR+R4', 'GTR+R5', 'GTR+R6', 'GTR+R7', 'GTR+R8', 'GTR+R9', 'GTR+R10', 'MFP', 'TEST')
Model of Nucleotide Substitution.If not provided, IQ-TREE will determine the best fit substitution model automatically. [default:
'MFP'
]- bootstrap_replicates:
Int
%
Range
(1000, None)
The number of bootstrap searches to perform. Minimum of 1000 recomended. [default:
1000
]- n_init_pars_trees:
Int
%
Range
(1, None)
Number of initial parsimony trees. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_top_init_trees:
Int
%
Range
(1, None)
Number of top initial trees. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_best_retain_trees:
Int
%
Range
(1, None)
Number of best trees retained during search. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- stop_iter:
Int
%
Range
(1, None)
Number of unsuccessful iterations to stop. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- perturb_nni_strength:
Float
%
Range
(0.01, 1.0)
Perturbation strength for randomized NNI. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- spr_radius:
Int
%
Range
(1, None)
Radius for parsimony SPR search. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_max_ufboot_iter:
Int
%
Range
(1, None)
Maximum number of iterations. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_ufboot_steps:
Int
%
Range
(1, None)
Number of iterations for UFBoot stopping rule. If not set, program defaults will be used.See IQ-TREE manual for details.[optional]
- min_cor_ufboot:
Float
%
Range
(0.51, 0.99)
Minimum correlation coefficient. If not set, program defaults will be used.See IQ-TREE manual for details.[optional]
- ep_break_ufboot:
Float
%
Range
(0.01, 0.99)
Epsilon value to break tie. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- allnni:
Bool
Perform more thorough NNI search.[default:
False
]- alrt:
Int
%
Range
(1000, None)
Single branch test method. Number of bootstrap replicates to perform an SH-like approximate likelihood ratio test (SH-aLRT). Minimum of 1000 replicates is required. Can be used with other 'single branch test methods'. Values reported in the order of: alrt, lbp, abayes.[optional]
- abayes:
Bool
Single branch test method. Performs an approximate Bayes test. Can be used with other 'single branch test methods' and ultrafast bootstrap. Values reported in the order of: alrt, lbp, abayes, ufboot.[default:
False
]- lbp:
Int
%
Range
(1000, None)
Single branch test method. Number of bootstrap replicates to perform a fast local bootstrap probability method. Minimum of 1000 replicates is required. Can be used with other 'single branch test methods'. Values reported in the order of: alrt, lbp, abayes, ufboot.[optional]
- bnni:
Bool
Optimize UFBoot trees by NNI on bootstrap alignment. This option reduces the risk of overestimating branch supports with UFBoot due to severe model violations.[default:
False
]- safe:
Bool
Safe likelihood kernel to avoid numerical underflow.[default:
False
]
Outputs¶
- tree:
Phylogeny[Unrooted]
The resulting phylogenetic tree.[required]
phylogeny filter-table¶
Remove features from a feature table if their identifiers are not tip identifiers in tree.
Inputs¶
- table:
FeatureTable[Frequency¹ | RelativeFrequency² | PresenceAbsence³]
Feature table that features should be filtered from.[required]
- tree:
Phylogeny[Rooted | Unrooted]
Tree where tip identifiers are the feature identifiers that should be retained in the table.[required]
Outputs¶
- filtered_table:
FeatureTable[Frequency¹ | RelativeFrequency² | PresenceAbsence³]
The resulting feature table.[required]
phylogeny filter-tree¶
Remove tips from a tree if their identifiers based on a set of provided identifiers.
Inputs¶
- tree:
Phylogeny[Rooted¹ | Unrooted²]
Tree that should be filtered[required]
- table:
FeatureTable[Frequency | RelativeFrequency | PresenceAbsence | Composition]
Feature table which contains the identifier that should be retained in the tree[optional]
Parameters¶
- metadata:
Metadata
Feature metadata to use with the 'where' statement or to select tips to be retained. Metadata objects could also include FeatureData[Sequence] data types, if, forinstance, you want to filter to match represenative sequencces.[optional]
- where:
Str
SQLite WHERE clause specifying sample metadata criteria that must be met to be included in the filtered feature table. If not provided, all samples in
metadata
that are also in the feature table will be retained.[optional]
Outputs¶
- filtered_tree:
Phylogeny[Rooted¹ | Unrooted²]
The resulting phylogenetic tree.[required]
phylogeny robinson-foulds¶
Calculate the Robinson-Foulds symmetric difference metric between two or more phylogenetic trees.
Citations¶
Robinson & Foulds, 1981
Inputs¶
- trees:
List
[
Phylogeny[Rooted | Unrooted]
]
Phylogenetic trees to compare with Robinson-Foulds. Rooting information and branch lengths are ignored by this metric.[required]
Parameters¶
- labels:
List
[
Str
]
Labels to use for the tree names in the distance matrix. If ommited, labels will be "tree_n" where "n" ranges from 1..N. The number of labels must match the number of trees.[optional]
- missing_tips:
Str
%
Choices
('error', 'intersect-all')
How to handle tips that are not shared between trees. "error" will raise an error if the set of tips is not identical between all input trees. "intersect-all" will remove tips that are not shared between all trees before computing distances beteen trees.[default:
'error'
]
Outputs¶
- distance_matrix:
DistanceMatrix
The distances between trees as a symmetric matrix.[required]
phylogeny align-to-tree-mafft-fasttree¶
This pipeline will start by creating a sequence alignment using MAFFT, after which any alignment columns that are phylogenetically uninformative or ambiguously aligned will be removed (masked). The resulting masked alignment will be used to infer a phylogenetic tree and then subsequently rooted at its midpoint. Output files from each step of the pipeline will be saved. This includes both the unmasked and masked MAFFT alignment from q2-alignment methods, and both the rooted and unrooted phylogenies from q2-phylogeny methods.
Inputs¶
- sequences:
FeatureData[Sequence]
The sequences to be used for creating a fasttree based rooted phylogenetic tree.[required]
Parameters¶
- n_threads:
Threads
The number of threads. (Use
auto
to automatically use all available cores) This value is used when aligning the sequences and creating the tree with fasttree.[default:1
]- mask_max_gap_frequency:
Float
%
Range
(0, 1, inclusive_end=True)
The maximum relative frequency of gap characters in a column for the column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive), where 0.0 retains only those columns without gap characters, and 1.0 retains all columns regardless of gap character frequency. This value is used when masking the aligned sequences.[default:
1.0
]- mask_min_conservation:
Float
%
Range
(0, 1, inclusive_end=True)
The minimum relative frequency of at least one non-gap character in a column for that column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive). For example, if a value of 0.4 is provided, a column will only be retained if it contains at least one character that is present in at least 40% of the sequences. This value is used when masking the aligned sequences.[default:
0.4
]- parttree:
Bool
This flag is required if the number of sequences being aligned are larger than 1000000. Disabled by default.[default:
False
]
Outputs¶
- alignment:
FeatureData[AlignedSequence]
The aligned sequences.[required]
- masked_alignment:
FeatureData[AlignedSequence]
The masked alignment.[required]
- tree:
Phylogeny[Unrooted]
The unrooted phylogenetic tree.[required]
- rooted_tree:
Phylogeny[Rooted]
The rooted phylogenetic tree.[required]
Examples¶
align_to_tree_mafft_fasttree¶
wget -O 'rep-seqs.qza' \
'https://amplicon-docs.qiime2.org/en/latest/data/examples/phylogeny/align-to-tree-mafft-fasttree/1/rep-seqs.qza'
qiime phylogeny align-to-tree-mafft-fasttree \
--i-sequences rep-seqs.qza \
--o-alignment aligned-rep-seqs.qza \
--o-masked-alignment masked-aligned-rep-seqs.qza \
--o-tree unrooted-tree.qza \
--o-rooted-tree rooted-tree.qza
from qiime2 import Artifact
from urllib import request
import qiime2.plugins.phylogeny.actions as phylogeny_actions
url = 'https://amplicon-docs.qiime2.org/en/latest/data/examples/phylogeny/align-to-tree-mafft-fasttree/1/rep-seqs.qza'
fn = 'rep-seqs.qza'
request.urlretrieve(url, fn)
rep_seqs = Artifact.load(fn)
aligned_rep_seqs, masked_aligned_rep_seqs, unrooted_tree, rooted_tree = phylogeny_actions.align_to_tree_mafft_fasttree(
sequences=rep_seqs,
)
- Using the
Upload Data
tool: - On the first tab (Regular), press the
Paste/Fetch
data button at the bottom.- Set "Name" (first text-field) to:
rep-seqs.qza
- In the larger text-area, copy-and-paste: https://
amplicon -docs .qiime2 .org /en /latest /data /examples /phylogeny /align -to -tree -mafft -fasttree /1 /rep -seqs .qza - ("Type", "Genome", and "Settings" can be ignored)
- Set "Name" (first text-field) to:
- Press the
Start
button at the bottom.
- On the first tab (Regular), press the
- Using the
qiime2 phylogeny align-to-tree-mafft-fasttree
tool: - Set "sequences" to
#: rep-seqs.qza
- Press the
Execute
button.
- Set "sequences" to
- Once completed, for each new entry in your history, use the
Edit
button to set the name as follows: - (Renaming is optional, but it will make any subsequent steps easier to complete.)
History Name "Name" to set (be sure to press [Save]) #: qiime2 phylogeny align-to-tree-mafft-fasttree [...] : alignment.qza
aligned-rep-seqs.qza
#: qiime2 phylogeny align-to-tree-mafft-fasttree [...] : masked_alignment.qza
masked-aligned-rep-seqs.qza
#: qiime2 phylogeny align-to-tree-mafft-fasttree [...] : tree.qza
unrooted-tree.qza
#: qiime2 phylogeny align-to-tree-mafft-fasttree [...] : rooted_tree.qza
rooted-tree.qza
library(reticulate)
Artifact <- import("qiime2")$Artifact
phylogeny_actions <- import("qiime2.plugins.phylogeny.actions")
request <- import("urllib")$request
url <- 'https://amplicon-docs.qiime2.org/en/latest/data/examples/phylogeny/align-to-tree-mafft-fasttree/1/rep-seqs.qza'
fn <- 'rep-seqs.qza'
request$urlretrieve(url, fn)
rep_seqs <- Artifact$load(fn)
action_results <- phylogeny_actions$align_to_tree_mafft_fasttree(
sequences=rep_seqs,
)
aligned_rep_seqs <- action_results$alignment
masked_aligned_rep_seqs <- action_results$masked_alignment
unrooted_tree <- action_results$tree
rooted_tree <- action_results$rooted_tree
from q2_phylogeny._examples import phylogeny_align_to_tree_mafft_fasttree
phylogeny_align_to_tree_mafft_fasttree(use)
phylogeny align-to-tree-mafft-iqtree¶
This pipeline will start by creating a sequence alignment using MAFFT, after which any alignment columns that are phylogenetically uninformative or ambiguously aligned will be removed (masked). The resulting masked alignment will be used to infer a phylogenetic tree using IQ-TREE. By default the best fit substitution model will be determined by ModelFinder prior to phylogenetic inference. The resulting tree will be subsequently rooted at its midpoint. Output files from each step of the pipeline will be saved. This includes both the unmasked and masked MAFFT alignment from q2-alignment methods, and both the rooted and unrooted phylogenies from q2-phylogeny methods.
Inputs¶
- sequences:
FeatureData[Sequence]
The sequences to be used for creating a iqtree based rooted phylogenetic tree.[required]
Parameters¶
- n_threads:
Threads
The number of threads. (Use 0 to automatically use all available cores This value is used when aligning the sequences and creating the tree with iqtree.[default:
1
]- mask_max_gap_frequency:
Float
%
Range
(0, 1, inclusive_end=True)
The maximum relative frequency of gap characters in a column for the column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive), where 0.0 retains only those columns without gap characters, and 1.0 retains all columns regardless of gap character frequency. This value is used when masking the aligned sequences.[default:
1.0
]- mask_min_conservation:
Float
%
Range
(0, 1, inclusive_end=True)
The minimum relative frequency of at least one non-gap character in a column for that column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive). For example, if a value of 0.4 is provided, a column will only be retained if it contains at least one character that is present in at least 40% of the sequences. This value is used when masking the aligned sequences.[default:
0.4
]- substitution_model:
Str
%
Choices
('JC', 'JC+I', 'JC+G', 'JC+I+G', 'JC+R2', 'JC+R3', 'JC+R4', 'JC+R5', 'JC+R6', 'JC+R7', 'JC+R8', 'JC+R9', 'JC+R10', 'F81', 'F81+I', 'F81+G', 'F81+I+G', 'F81+R2', 'F81+R3', 'F81+R4', 'F81+R5', 'F81+R6', 'F81+R7', 'F81+R8', 'F81+R9', 'F81+R10', 'K80', 'K80+I', 'K80+G', 'K80+I+G', 'K80+R2', 'K80+R3', 'K80+R4', 'K80+R5', 'K80+R6', 'K80+R7', 'K80+R8', 'K80+R9', 'K80+R10', 'HKY', 'HKY+I', 'HKY+G', 'HKY+I+G', 'HKY+R2', 'HKY+R3', 'HKY+R4', 'HKY+R5', 'HKY+R6', 'HKY+R7', 'HKY+R8', 'HKY+R9', 'HKY+R10', 'TNe', 'TNe+I', 'TNe+G', 'TNe+I+G', 'TNe+R2', 'TNe+R3', 'TNe+R4', 'TNe+R5', 'TNe+R6', 'TNe+R7', 'TNe+R8', 'TNe+R9', 'TNe+R10', 'TN', 'TN+I', 'TN+G', 'TN+I+G', 'TN+R2', 'TN+R3', 'TN+R4', 'TN+R5', 'TN+R6', 'TN+R7', 'TN+R8', 'TN+R9', 'TN+R10', 'K81', 'K81+I', 'K81+G', 'K81+I+G', 'K81+R2', 'K81+R3', 'K81+R4', 'K81+R5', 'K81+R6', 'K81+R7', 'K81+R8', 'K81+R9', 'K81+R10', 'K81u', 'K81u+I', 'K81u+G', 'K81u+I+G', 'K81u+R2', 'K81u+R3', 'K81u+R4', 'K81u+R5', 'K81u+R6', 'K81u+R7', 'K81u+R8', 'K81u+R9', 'K81u+R10', 'TPM2', 'TPM2+I', 'TPM2+G', 'TPM2+I+G', 'TPM2+R2', 'TPM2+R3', 'TPM2+R4', 'TPM2+R5', 'TPM2+R6', 'TPM2+R7', 'TPM2+R8', 'TPM2+R9', 'TPM2+R10', 'TPM2u', 'TPM2u+I', 'TPM2u+G', 'TPM2u+I+G', 'TPM2u+R2', 'TPM2u+R3', 'TPM2u+R4', 'TPM2u+R5', 'TPM2u+R6', 'TPM2u+R7', 'TPM2u+R8', 'TPM2u+R9', 'TPM2u+R10', 'TPM3', 'TPM3+I', 'TPM3+G', 'TPM3+I+G', 'TPM3+R2', 'TPM3+R3', 'TPM3+R4', 'TPM3+R5', 'TPM3+R6', 'TPM3+R7', 'TPM3+R8', 'TPM3+R9', 'TPM3+R10', 'TPM3u', 'TPM3u+I', 'TPM3u+G', 'TPM3u+I+G', 'TPM3u+R2', 'TPM3u+R3', 'TPM3u+R4', 'TPM3u+R5', 'TPM3u+R6', 'TPM3u+R7', 'TPM3u+R8', 'TPM3u+R9', 'TPM3u+R10', 'TIMe', 'TIMe+I', 'TIMe+G', 'TIMe+I+G', 'TIMe+R2', 'TIMe+R3', 'TIMe+R4', 'TIMe+R5', 'TIMe+R6', 'TIMe+R7', 'TIMe+R8', 'TIMe+R9', 'TIMe+R10', 'TIM', 'TIM+I', 'TIM+G', 'TIM+I+G', 'TIM+R2', 'TIM+R3', 'TIM+R4', 'TIM+R5', 'TIM+R6', 'TIM+R7', 'TIM+R8', 'TIM+R9', 'TIM+R10', 'TIM2e', 'TIM2e+I', 'TIM2e+G', 'TIM2e+I+G', 'TIM2e+R2', 'TIM2e+R3', 'TIM2e+R4', 'TIM2e+R5', 'TIM2e+R6', 'TIM2e+R7', 'TIM2e+R8', 'TIM2e+R9', 'TIM2e+R10', 'TIM2', 'TIM2+I', 'TIM2+G', 'TIM2+I+G', 'TIM2+R2', 'TIM2+R3', 'TIM2+R4', 'TIM2+R5', 'TIM2+R6', 'TIM2+R7', 'TIM2+R8', 'TIM2+R9', 'TIM2+R10', 'TIM3e', 'TIM3e+I', 'TIM3e+G', 'TIM3e+I+G', 'TIM3e+R2', 'TIM3e+R3', 'TIM3e+R4', 'TIM3e+R5', 'TIM3e+R6', 'TIM3e+R7', 'TIM3e+R8', 'TIM3e+R9', 'TIM3e+R10', 'TIM3', 'TIM3+I', 'TIM3+G', 'TIM3+I+G', 'TIM3+R2', 'TIM3+R3', 'TIM3+R4', 'TIM3+R5', 'TIM3+R6', 'TIM3+R7', 'TIM3+R8', 'TIM3+R9', 'TIM3+R10', 'TVMe', 'TVMe+I', 'TVMe+G', 'TVMe+I+G', 'TVMe+R2', 'TVMe+R3', 'TVMe+R4', 'TVMe+R5', 'TVMe+R6', 'TVMe+R7', 'TVMe+R8', 'TVMe+R9', 'TVMe+R10', 'TVM', 'TVM+I', 'TVM+G', 'TVM+I+G', 'TVM+R2', 'TVM+R3', 'TVM+R4', 'TVM+R5', 'TVM+R6', 'TVM+R7', 'TVM+R8', 'TVM+R9', 'TVM+R10', 'SYM', 'SYM+I', 'SYM+G', 'SYM+I+G', 'SYM+R2', 'SYM+R3', 'SYM+R4', 'SYM+R5', 'SYM+R6', 'SYM+R7', 'SYM+R8', 'SYM+R9', 'SYM+R10', 'GTR', 'GTR+I', 'GTR+G', 'GTR+I+G', 'GTR+R2', 'GTR+R3', 'GTR+R4', 'GTR+R5', 'GTR+R6', 'GTR+R7', 'GTR+R8', 'GTR+R9', 'GTR+R10', 'MFP', 'TEST')
Model of Nucleotide Substitution. If not provided, IQ-TREE will determine the best fit substitution model automatically.[default:
'MFP'
]- fast:
Bool
Fast search to resemble FastTree.[default:
False
]- alrt:
Int
%
Range
(1000, None)
Single branch test method. Number of bootstrap replicates to perform an SH-like approximate likelihood ratio test (SH-aLRT). Minimum of 1000 replicates is required.[optional]
- seed:
Int
Random number seed for the iqtree parsimony starting tree. This allows you to reproduce tree results. If not supplied then one will be randomly chosen.[optional]
- stop_iter:
Int
%
Range
(1, None)
Number of unsuccessful iterations to stop. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- perturb_nni_strength:
Float
%
Range
(0.01, 1.0)
Perturbation strength for randomized NNI. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
Outputs¶
- alignment:
FeatureData[AlignedSequence]
The aligned sequences.[required]
- masked_alignment:
FeatureData[AlignedSequence]
The masked alignment.[required]
- tree:
Phylogeny[Unrooted]
The unrooted phylogenetic tree.[required]
- rooted_tree:
Phylogeny[Rooted]
The rooted phylogenetic tree.[required]
phylogeny align-to-tree-mafft-raxml¶
This pipeline will start by creating a sequence alignment using MAFFT, after which any alignment columns that are phylogenetically uninformative or ambiguously aligned will be removed (masked). The resulting masked alignment will be used to infer a phylogenetic tree using RAxML, under the specified substitution model, and then subsequently rooted at its midpoint. Output files from each step of the pipeline will be saved. This includes both the unmasked and masked MAFFT alignment from q2-alignment methods, and both the rooted and unrooted phylogenies from q2-phylogeny methods.
Inputs¶
- sequences:
FeatureData[Sequence]
The sequences to be used for creating a iqtree based rooted phylogenetic tree.[required]
Parameters¶
- n_threads:
Threads
The number of threads. (Use
all
to automatically use all available cores. This value is used when aligning the sequences and creating the tree with iqtree.[default:1
]- mask_max_gap_frequency:
Float
%
Range
(0, 1, inclusive_end=True)
The maximum relative frequency of gap characters in a column for the column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive), where 0.0 retains only those columns without gap characters, and 1.0 retains all columns regardless of gap character frequency. This value is used when masking the aligned sequences.[default:
1.0
]- mask_min_conservation:
Float
%
Range
(0, 1, inclusive_end=True)
The minimum relative frequency of at least one non-gap character in a column for that column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive). For example, if a value of 0.4 is provided, a column will only be retained if it contains at least one character that is present in at least 40% of the sequences. This value is used when masking the aligned sequences.[default:
0.4
]- parttree:
Bool
This flag is required if the number of sequences being aligned are larger than 1000000. Disabled by default. NOTE: if using this option, it is recomended that only the CAT-based substitution models of RAxML be considered for this pipeline.[default:
False
]- substitution_model:
Str
%
Choices
('GTRGAMMA', 'GTRGAMMAI', 'GTRCAT', 'GTRCATI')
Model of Nucleotide Substitution.[default:
'GTRGAMMA'
]- seed:
Int
Random number seed for the parsimony starting tree. This allows you to reproduce tree results. If not supplied then one will be randomly chosen.[optional]
- raxml_version:
Str
%
Choices
('Standard', 'SSE3', 'AVX2')
Select a specific CPU optimization of RAxML to use. The SSE3 versions will run approximately 40% faster than the standard version. The AVX2 version will run 10-30% faster than the SSE3 version.[default:
'Standard'
]
Outputs¶
- alignment:
FeatureData[AlignedSequence]
The aligned sequences.[required]
- masked_alignment:
FeatureData[AlignedSequence]
The masked alignment.[required]
- tree:
Phylogeny[Unrooted]
The unrooted phylogenetic tree.[required]
- rooted_tree:
Phylogeny[Rooted]
The rooted phylogenetic tree.[required]
This QIIME 2 plugin supports generating and manipulating phylogenetic trees.
- version:
2024.10.0
- website: https://
github .com /qiime2 /q2 -phylogeny - user support:
- Please post to the QIIME 2 forum for help with this plugin: https://
forum .qiime2 .org
Actions¶
Name | Type | Short Description |
---|---|---|
midpoint-root | method | Midpoint root an unrooted phylogenetic tree. |
fasttree | method | Construct a phylogenetic tree with FastTree. |
raxml | method | Construct a phylogenetic tree with RAxML. |
raxml-rapid-bootstrap | method | Construct a phylogenetic tree with bootstrap supports using RAxML. |
iqtree | method | Construct a phylogenetic tree with IQ-TREE. |
iqtree-ultrafast-bootstrap | method | Construct a phylogenetic tree with IQ-TREE with bootstrap supports. |
filter-table | method | Remove features from table if they're not present in tree. |
filter-tree | method | Remove features from tree based on metadata |
robinson-foulds | method | Calculate Robinson-Foulds distance between phylogenetic trees. |
align-to-tree-mafft-fasttree | pipeline | Build a phylogenetic tree using fasttree and mafft alignment |
align-to-tree-mafft-iqtree | pipeline | Build a phylogenetic tree using iqtree and mafft alignment. |
align-to-tree-mafft-raxml | pipeline | Build a phylogenetic tree using raxml and mafft alignment. |
phylogeny midpoint-root¶
Midpoint root an unrooted phylogenetic tree.
Inputs¶
- tree:
Phylogeny[Unrooted]
The phylogenetic tree to be rooted.[required]
Outputs¶
- rooted_tree:
Phylogeny[Rooted]
The rooted phylogenetic tree.[required]
phylogeny fasttree¶
Construct a phylogenetic tree with FastTree.
Citations¶
Inputs¶
- alignment:
FeatureData[AlignedSequence]
Aligned sequences to be used for phylogenetic reconstruction.[required]
Parameters¶
- n_threads:
Threads
The number of threads. Using more than one thread runs the non-deterministic variant of
FastTree
(FastTreeMP
), and may result in a different tree than single-threading. See http://www .microbesonline .org /fasttree / #OpenMP for details. (Use auto
to automatically use all available cores)[default:1
]
Outputs¶
- tree:
Phylogeny[Unrooted]
The resulting phylogenetic tree.[required]
phylogeny raxml¶
Construct a phylogenetic tree with RAxML. See: https://
Citations¶
Inputs¶
- alignment:
FeatureData[AlignedSequence]
Aligned sequences to be used for phylogenetic reconstruction.[required]
Parameters¶
- seed:
Int
Random number seed for the parsimony starting tree. This allows you to reproduce tree results. If not supplied then one will be randomly chosen.[optional]
- n_searches:
Int
%
Range
(1, None)
The number of independent maximum likelihood searches to perform. The single best scoring tree is returned.[default:
1
]- n_threads:
Threads
The number of threads to use for multithreaded processing. Using more than one thread will enable the PTHREADS version of RAxML.[default:
1
]- raxml_version:
Str
%
Choices
('Standard', 'SSE3', 'AVX2')
Select a specific CPU optimization of RAxML to use. The SSE3 versions will run approximately 40% faster than the standard version. The AVX2 version will run 10-30% faster than the SSE3 version.[default:
'Standard'
]- substitution_model:
Str
%
Choices
('GTRGAMMA', 'GTRGAMMAI', 'GTRCAT', 'GTRCATI')
Model of Nucleotide Substitution.[default:
'GTRGAMMA'
]
Outputs¶
- tree:
Phylogeny[Unrooted]
The resulting phylogenetic tree.[required]
phylogeny raxml-rapid-bootstrap¶
Construct a phylogenetic tree with RAxML with the addition of rapid bootstrapping support values. See: https://
Citations¶
Stamatakis, 2014; Stamatakis et al., 2008
Inputs¶
- alignment:
FeatureData[AlignedSequence]
Aligned sequences to be used for phylogenetic reconstruction.[required]
Parameters¶
- seed:
Int
Random number seed for the parsimony starting tree. This allows you to reproduce tree results. If not supplied then one will be randomly chosen.[optional]
- rapid_bootstrap_seed:
Int
Specify a random seed for rapid bootstrapping. This allows you to reproduce rapid bootstrap results. If not supplied then one will be randomly chosen.[optional]
- bootstrap_replicates:
Int
%
Range
(10, None)
The number of bootstrap searches to perform.[default:
100
]- n_threads:
Threads
The number of threads to use for multithreaded processing. Using more than one thread will enable the PTHREADS version of RAxML.[default:
1
]- raxml_version:
Str
%
Choices
('Standard', 'SSE3', 'AVX2')
Select a specific CPU optimization of RAxML to use. The SSE3 versions will run approximately 40% faster than the standard version. The AVX2 version will run 10-30% faster than the SSE3 version.[default:
'Standard'
]- substitution_model:
Str
%
Choices
('GTRGAMMA', 'GTRGAMMAI', 'GTRCAT', 'GTRCATI')
Model of Nucleotide Substitution[default:
'GTRGAMMA'
]
Outputs¶
- tree:
Phylogeny[Unrooted]
The resulting phylogenetic tree.[required]
phylogeny iqtree¶
Construct a phylogenetic tree using IQ-TREE (http://
Citations¶
Minh et al., 2020; Kalyaanamoorthy et al., 2017
Inputs¶
- alignment:
FeatureData[AlignedSequence]
Aligned sequences to be used for phylogenetic reconstruction.[required]
Parameters¶
- seed:
Int
Random number seed. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_cores:
Threads
The number of cores to use for parallel processing. Use
auto
to let IQ-TREE automatically determine the optimal number of cores to use.[default:1
]- n_cores_max:
Threads
Limits the maximum number of cores to be used when 'n_cores' is set to 'auto'.[optional]
- n_runs:
Int
%
Range
(1, None)
Number of indepedent runs. Multiple independent runs (e.g. 10) can outperform a single run in terms of likelihood maximisation.[default:
1
]- substitution_model:
Str
%
Choices
('JC', 'JC+I', 'JC+G', 'JC+I+G', 'JC+R2', 'JC+R3', 'JC+R4', 'JC+R5', 'JC+R6', 'JC+R7', 'JC+R8', 'JC+R9', 'JC+R10', 'F81', 'F81+I', 'F81+G', 'F81+I+G', 'F81+R2', 'F81+R3', 'F81+R4', 'F81+R5', 'F81+R6', 'F81+R7', 'F81+R8', 'F81+R9', 'F81+R10', 'K80', 'K80+I', 'K80+G', 'K80+I+G', 'K80+R2', 'K80+R3', 'K80+R4', 'K80+R5', 'K80+R6', 'K80+R7', 'K80+R8', 'K80+R9', 'K80+R10', 'HKY', 'HKY+I', 'HKY+G', 'HKY+I+G', 'HKY+R2', 'HKY+R3', 'HKY+R4', 'HKY+R5', 'HKY+R6', 'HKY+R7', 'HKY+R8', 'HKY+R9', 'HKY+R10', 'TNe', 'TNe+I', 'TNe+G', 'TNe+I+G', 'TNe+R2', 'TNe+R3', 'TNe+R4', 'TNe+R5', 'TNe+R6', 'TNe+R7', 'TNe+R8', 'TNe+R9', 'TNe+R10', 'TN', 'TN+I', 'TN+G', 'TN+I+G', 'TN+R2', 'TN+R3', 'TN+R4', 'TN+R5', 'TN+R6', 'TN+R7', 'TN+R8', 'TN+R9', 'TN+R10', 'K81', 'K81+I', 'K81+G', 'K81+I+G', 'K81+R2', 'K81+R3', 'K81+R4', 'K81+R5', 'K81+R6', 'K81+R7', 'K81+R8', 'K81+R9', 'K81+R10', 'K81u', 'K81u+I', 'K81u+G', 'K81u+I+G', 'K81u+R2', 'K81u+R3', 'K81u+R4', 'K81u+R5', 'K81u+R6', 'K81u+R7', 'K81u+R8', 'K81u+R9', 'K81u+R10', 'TPM2', 'TPM2+I', 'TPM2+G', 'TPM2+I+G', 'TPM2+R2', 'TPM2+R3', 'TPM2+R4', 'TPM2+R5', 'TPM2+R6', 'TPM2+R7', 'TPM2+R8', 'TPM2+R9', 'TPM2+R10', 'TPM2u', 'TPM2u+I', 'TPM2u+G', 'TPM2u+I+G', 'TPM2u+R2', 'TPM2u+R3', 'TPM2u+R4', 'TPM2u+R5', 'TPM2u+R6', 'TPM2u+R7', 'TPM2u+R8', 'TPM2u+R9', 'TPM2u+R10', 'TPM3', 'TPM3+I', 'TPM3+G', 'TPM3+I+G', 'TPM3+R2', 'TPM3+R3', 'TPM3+R4', 'TPM3+R5', 'TPM3+R6', 'TPM3+R7', 'TPM3+R8', 'TPM3+R9', 'TPM3+R10', 'TPM3u', 'TPM3u+I', 'TPM3u+G', 'TPM3u+I+G', 'TPM3u+R2', 'TPM3u+R3', 'TPM3u+R4', 'TPM3u+R5', 'TPM3u+R6', 'TPM3u+R7', 'TPM3u+R8', 'TPM3u+R9', 'TPM3u+R10', 'TIMe', 'TIMe+I', 'TIMe+G', 'TIMe+I+G', 'TIMe+R2', 'TIMe+R3', 'TIMe+R4', 'TIMe+R5', 'TIMe+R6', 'TIMe+R7', 'TIMe+R8', 'TIMe+R9', 'TIMe+R10', 'TIM', 'TIM+I', 'TIM+G', 'TIM+I+G', 'TIM+R2', 'TIM+R3', 'TIM+R4', 'TIM+R5', 'TIM+R6', 'TIM+R7', 'TIM+R8', 'TIM+R9', 'TIM+R10', 'TIM2e', 'TIM2e+I', 'TIM2e+G', 'TIM2e+I+G', 'TIM2e+R2', 'TIM2e+R3', 'TIM2e+R4', 'TIM2e+R5', 'TIM2e+R6', 'TIM2e+R7', 'TIM2e+R8', 'TIM2e+R9', 'TIM2e+R10', 'TIM2', 'TIM2+I', 'TIM2+G', 'TIM2+I+G', 'TIM2+R2', 'TIM2+R3', 'TIM2+R4', 'TIM2+R5', 'TIM2+R6', 'TIM2+R7', 'TIM2+R8', 'TIM2+R9', 'TIM2+R10', 'TIM3e', 'TIM3e+I', 'TIM3e+G', 'TIM3e+I+G', 'TIM3e+R2', 'TIM3e+R3', 'TIM3e+R4', 'TIM3e+R5', 'TIM3e+R6', 'TIM3e+R7', 'TIM3e+R8', 'TIM3e+R9', 'TIM3e+R10', 'TIM3', 'TIM3+I', 'TIM3+G', 'TIM3+I+G', 'TIM3+R2', 'TIM3+R3', 'TIM3+R4', 'TIM3+R5', 'TIM3+R6', 'TIM3+R7', 'TIM3+R8', 'TIM3+R9', 'TIM3+R10', 'TVMe', 'TVMe+I', 'TVMe+G', 'TVMe+I+G', 'TVMe+R2', 'TVMe+R3', 'TVMe+R4', 'TVMe+R5', 'TVMe+R6', 'TVMe+R7', 'TVMe+R8', 'TVMe+R9', 'TVMe+R10', 'TVM', 'TVM+I', 'TVM+G', 'TVM+I+G', 'TVM+R2', 'TVM+R3', 'TVM+R4', 'TVM+R5', 'TVM+R6', 'TVM+R7', 'TVM+R8', 'TVM+R9', 'TVM+R10', 'SYM', 'SYM+I', 'SYM+G', 'SYM+I+G', 'SYM+R2', 'SYM+R3', 'SYM+R4', 'SYM+R5', 'SYM+R6', 'SYM+R7', 'SYM+R8', 'SYM+R9', 'SYM+R10', 'GTR', 'GTR+I', 'GTR+G', 'GTR+I+G', 'GTR+R2', 'GTR+R3', 'GTR+R4', 'GTR+R5', 'GTR+R6', 'GTR+R7', 'GTR+R8', 'GTR+R9', 'GTR+R10', 'MFP', 'TEST')
Model of Nucleotide Substitution. If not provided, IQ-TREE will determine the best fit substitution model automatically.[default:
'MFP'
]- n_init_pars_trees:
Int
%
Range
(1, None)
Number of initial parsimony trees. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_top_init_trees:
Int
%
Range
(1, None)
Number of top initial trees. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_best_retain_trees:
Int
%
Range
(1, None)
Number of best trees retained during search. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_iter:
Int
%
Range
(1, None)
Fix number of iterations to stop. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- stop_iter:
Int
%
Range
(1, None)
Number of unsuccessful iterations to stop. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- perturb_nni_strength:
Float
%
Range
(0.01, 1.0)
Perturbation strength for randomized NNI. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- spr_radius:
Int
%
Range
(1, None)
Radius for parsimony SPR search. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- allnni:
Bool
Perform more thorough NNI search.[default:
False
]- fast:
Bool
Fast search to resemble FastTree.[default:
False
]- alrt:
Int
%
Range
(1000, None)
Single branch test method. Number of bootstrap replicates to perform an SH-like approximate likelihood ratio test (SH-aLRT). Minimum of 1000 replicates is required. Can be used with other 'single branch test methods'. Values reported in the order of: alrt, lbp, abayes.[optional]
- abayes:
Bool
Single branch test method. Approximate Bayes test. Can be used with other 'single branch test methods'. Values reported in the order of: alrt, lbp, abayes.[default:
False
]- lbp:
Int
%
Range
(1000, None)
Single branch test method. Number of bootstrap replicates to perform a fast local bootstrap probability method. Minimum of 1000 replicates is required. Can be used with other 'single branch test methods'. Values reported in the order of: alrt, lbp, abayes.[optional]
- safe:
Bool
Safe likelihood kernel to avoid numerical underflow.[default:
False
]
Outputs¶
- tree:
Phylogeny[Unrooted]
The resulting phylogenetic tree.[required]
phylogeny iqtree-ultrafast-bootstrap¶
Construct a phylogenetic tree using IQ-TREE (http://
Citations¶
Minh et al., 2020; Kalyaanamoorthy et al., 2017; Minh et al., 2013; Hoang et al., 2017
Inputs¶
- alignment:
FeatureData[AlignedSequence]
Aligned sequences to be used for phylogenetic reconstruction.[required]
Parameters¶
- seed:
Int
Random number seed. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_cores:
Threads
The number of cores to use for parallel processing. Use
auto
to let IQ-TREE automatically determine the optimal number of cores to use.[default:1
]- n_cores_max:
Threads
Limits the maximum number of cores to be used when 'n_cores' is set to 'auto'.[optional]
- n_runs:
Int
%
Range
(1, None)
Number of indepedent runs. Multiple independent runs (e.g. 10) can outperform a single run in terms of likelihood maximisation.[default:
1
]- substitution_model:
Str
%
Choices
('JC', 'JC+I', 'JC+G', 'JC+I+G', 'JC+R2', 'JC+R3', 'JC+R4', 'JC+R5', 'JC+R6', 'JC+R7', 'JC+R8', 'JC+R9', 'JC+R10', 'F81', 'F81+I', 'F81+G', 'F81+I+G', 'F81+R2', 'F81+R3', 'F81+R4', 'F81+R5', 'F81+R6', 'F81+R7', 'F81+R8', 'F81+R9', 'F81+R10', 'K80', 'K80+I', 'K80+G', 'K80+I+G', 'K80+R2', 'K80+R3', 'K80+R4', 'K80+R5', 'K80+R6', 'K80+R7', 'K80+R8', 'K80+R9', 'K80+R10', 'HKY', 'HKY+I', 'HKY+G', 'HKY+I+G', 'HKY+R2', 'HKY+R3', 'HKY+R4', 'HKY+R5', 'HKY+R6', 'HKY+R7', 'HKY+R8', 'HKY+R9', 'HKY+R10', 'TNe', 'TNe+I', 'TNe+G', 'TNe+I+G', 'TNe+R2', 'TNe+R3', 'TNe+R4', 'TNe+R5', 'TNe+R6', 'TNe+R7', 'TNe+R8', 'TNe+R9', 'TNe+R10', 'TN', 'TN+I', 'TN+G', 'TN+I+G', 'TN+R2', 'TN+R3', 'TN+R4', 'TN+R5', 'TN+R6', 'TN+R7', 'TN+R8', 'TN+R9', 'TN+R10', 'K81', 'K81+I', 'K81+G', 'K81+I+G', 'K81+R2', 'K81+R3', 'K81+R4', 'K81+R5', 'K81+R6', 'K81+R7', 'K81+R8', 'K81+R9', 'K81+R10', 'K81u', 'K81u+I', 'K81u+G', 'K81u+I+G', 'K81u+R2', 'K81u+R3', 'K81u+R4', 'K81u+R5', 'K81u+R6', 'K81u+R7', 'K81u+R8', 'K81u+R9', 'K81u+R10', 'TPM2', 'TPM2+I', 'TPM2+G', 'TPM2+I+G', 'TPM2+R2', 'TPM2+R3', 'TPM2+R4', 'TPM2+R5', 'TPM2+R6', 'TPM2+R7', 'TPM2+R8', 'TPM2+R9', 'TPM2+R10', 'TPM2u', 'TPM2u+I', 'TPM2u+G', 'TPM2u+I+G', 'TPM2u+R2', 'TPM2u+R3', 'TPM2u+R4', 'TPM2u+R5', 'TPM2u+R6', 'TPM2u+R7', 'TPM2u+R8', 'TPM2u+R9', 'TPM2u+R10', 'TPM3', 'TPM3+I', 'TPM3+G', 'TPM3+I+G', 'TPM3+R2', 'TPM3+R3', 'TPM3+R4', 'TPM3+R5', 'TPM3+R6', 'TPM3+R7', 'TPM3+R8', 'TPM3+R9', 'TPM3+R10', 'TPM3u', 'TPM3u+I', 'TPM3u+G', 'TPM3u+I+G', 'TPM3u+R2', 'TPM3u+R3', 'TPM3u+R4', 'TPM3u+R5', 'TPM3u+R6', 'TPM3u+R7', 'TPM3u+R8', 'TPM3u+R9', 'TPM3u+R10', 'TIMe', 'TIMe+I', 'TIMe+G', 'TIMe+I+G', 'TIMe+R2', 'TIMe+R3', 'TIMe+R4', 'TIMe+R5', 'TIMe+R6', 'TIMe+R7', 'TIMe+R8', 'TIMe+R9', 'TIMe+R10', 'TIM', 'TIM+I', 'TIM+G', 'TIM+I+G', 'TIM+R2', 'TIM+R3', 'TIM+R4', 'TIM+R5', 'TIM+R6', 'TIM+R7', 'TIM+R8', 'TIM+R9', 'TIM+R10', 'TIM2e', 'TIM2e+I', 'TIM2e+G', 'TIM2e+I+G', 'TIM2e+R2', 'TIM2e+R3', 'TIM2e+R4', 'TIM2e+R5', 'TIM2e+R6', 'TIM2e+R7', 'TIM2e+R8', 'TIM2e+R9', 'TIM2e+R10', 'TIM2', 'TIM2+I', 'TIM2+G', 'TIM2+I+G', 'TIM2+R2', 'TIM2+R3', 'TIM2+R4', 'TIM2+R5', 'TIM2+R6', 'TIM2+R7', 'TIM2+R8', 'TIM2+R9', 'TIM2+R10', 'TIM3e', 'TIM3e+I', 'TIM3e+G', 'TIM3e+I+G', 'TIM3e+R2', 'TIM3e+R3', 'TIM3e+R4', 'TIM3e+R5', 'TIM3e+R6', 'TIM3e+R7', 'TIM3e+R8', 'TIM3e+R9', 'TIM3e+R10', 'TIM3', 'TIM3+I', 'TIM3+G', 'TIM3+I+G', 'TIM3+R2', 'TIM3+R3', 'TIM3+R4', 'TIM3+R5', 'TIM3+R6', 'TIM3+R7', 'TIM3+R8', 'TIM3+R9', 'TIM3+R10', 'TVMe', 'TVMe+I', 'TVMe+G', 'TVMe+I+G', 'TVMe+R2', 'TVMe+R3', 'TVMe+R4', 'TVMe+R5', 'TVMe+R6', 'TVMe+R7', 'TVMe+R8', 'TVMe+R9', 'TVMe+R10', 'TVM', 'TVM+I', 'TVM+G', 'TVM+I+G', 'TVM+R2', 'TVM+R3', 'TVM+R4', 'TVM+R5', 'TVM+R6', 'TVM+R7', 'TVM+R8', 'TVM+R9', 'TVM+R10', 'SYM', 'SYM+I', 'SYM+G', 'SYM+I+G', 'SYM+R2', 'SYM+R3', 'SYM+R4', 'SYM+R5', 'SYM+R6', 'SYM+R7', 'SYM+R8', 'SYM+R9', 'SYM+R10', 'GTR', 'GTR+I', 'GTR+G', 'GTR+I+G', 'GTR+R2', 'GTR+R3', 'GTR+R4', 'GTR+R5', 'GTR+R6', 'GTR+R7', 'GTR+R8', 'GTR+R9', 'GTR+R10', 'MFP', 'TEST')
Model of Nucleotide Substitution.If not provided, IQ-TREE will determine the best fit substitution model automatically. [default:
'MFP'
]- bootstrap_replicates:
Int
%
Range
(1000, None)
The number of bootstrap searches to perform. Minimum of 1000 recomended. [default:
1000
]- n_init_pars_trees:
Int
%
Range
(1, None)
Number of initial parsimony trees. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_top_init_trees:
Int
%
Range
(1, None)
Number of top initial trees. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_best_retain_trees:
Int
%
Range
(1, None)
Number of best trees retained during search. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- stop_iter:
Int
%
Range
(1, None)
Number of unsuccessful iterations to stop. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- perturb_nni_strength:
Float
%
Range
(0.01, 1.0)
Perturbation strength for randomized NNI. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- spr_radius:
Int
%
Range
(1, None)
Radius for parsimony SPR search. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_max_ufboot_iter:
Int
%
Range
(1, None)
Maximum number of iterations. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_ufboot_steps:
Int
%
Range
(1, None)
Number of iterations for UFBoot stopping rule. If not set, program defaults will be used.See IQ-TREE manual for details.[optional]
- min_cor_ufboot:
Float
%
Range
(0.51, 0.99)
Minimum correlation coefficient. If not set, program defaults will be used.See IQ-TREE manual for details.[optional]
- ep_break_ufboot:
Float
%
Range
(0.01, 0.99)
Epsilon value to break tie. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- allnni:
Bool
Perform more thorough NNI search.[default:
False
]- alrt:
Int
%
Range
(1000, None)
Single branch test method. Number of bootstrap replicates to perform an SH-like approximate likelihood ratio test (SH-aLRT). Minimum of 1000 replicates is required. Can be used with other 'single branch test methods'. Values reported in the order of: alrt, lbp, abayes.[optional]
- abayes:
Bool
Single branch test method. Performs an approximate Bayes test. Can be used with other 'single branch test methods' and ultrafast bootstrap. Values reported in the order of: alrt, lbp, abayes, ufboot.[default:
False
]- lbp:
Int
%
Range
(1000, None)
Single branch test method. Number of bootstrap replicates to perform a fast local bootstrap probability method. Minimum of 1000 replicates is required. Can be used with other 'single branch test methods'. Values reported in the order of: alrt, lbp, abayes, ufboot.[optional]
- bnni:
Bool
Optimize UFBoot trees by NNI on bootstrap alignment. This option reduces the risk of overestimating branch supports with UFBoot due to severe model violations.[default:
False
]- safe:
Bool
Safe likelihood kernel to avoid numerical underflow.[default:
False
]
Outputs¶
- tree:
Phylogeny[Unrooted]
The resulting phylogenetic tree.[required]
phylogeny filter-table¶
Remove features from a feature table if their identifiers are not tip identifiers in tree.
Inputs¶
- table:
FeatureTable[Frequency¹ | RelativeFrequency² | PresenceAbsence³]
Feature table that features should be filtered from.[required]
- tree:
Phylogeny[Rooted | Unrooted]
Tree where tip identifiers are the feature identifiers that should be retained in the table.[required]
Outputs¶
- filtered_table:
FeatureTable[Frequency¹ | RelativeFrequency² | PresenceAbsence³]
The resulting feature table.[required]
phylogeny filter-tree¶
Remove tips from a tree if their identifiers based on a set of provided identifiers.
Inputs¶
- tree:
Phylogeny[Rooted¹ | Unrooted²]
Tree that should be filtered[required]
- table:
FeatureTable[Frequency | RelativeFrequency | PresenceAbsence | Composition]
Feature table which contains the identifier that should be retained in the tree[optional]
Parameters¶
- metadata:
Metadata
Feature metadata to use with the 'where' statement or to select tips to be retained. Metadata objects could also include FeatureData[Sequence] data types, if, forinstance, you want to filter to match represenative sequencces.[optional]
- where:
Str
SQLite WHERE clause specifying sample metadata criteria that must be met to be included in the filtered feature table. If not provided, all samples in
metadata
that are also in the feature table will be retained.[optional]
Outputs¶
- filtered_tree:
Phylogeny[Rooted¹ | Unrooted²]
The resulting phylogenetic tree.[required]
phylogeny robinson-foulds¶
Calculate the Robinson-Foulds symmetric difference metric between two or more phylogenetic trees.
Citations¶
Robinson & Foulds, 1981
Inputs¶
- trees:
List
[
Phylogeny[Rooted | Unrooted]
]
Phylogenetic trees to compare with Robinson-Foulds. Rooting information and branch lengths are ignored by this metric.[required]
Parameters¶
- labels:
List
[
Str
]
Labels to use for the tree names in the distance matrix. If ommited, labels will be "tree_n" where "n" ranges from 1..N. The number of labels must match the number of trees.[optional]
- missing_tips:
Str
%
Choices
('error', 'intersect-all')
How to handle tips that are not shared between trees. "error" will raise an error if the set of tips is not identical between all input trees. "intersect-all" will remove tips that are not shared between all trees before computing distances beteen trees.[default:
'error'
]
Outputs¶
- distance_matrix:
DistanceMatrix
The distances between trees as a symmetric matrix.[required]
phylogeny align-to-tree-mafft-fasttree¶
This pipeline will start by creating a sequence alignment using MAFFT, after which any alignment columns that are phylogenetically uninformative or ambiguously aligned will be removed (masked). The resulting masked alignment will be used to infer a phylogenetic tree and then subsequently rooted at its midpoint. Output files from each step of the pipeline will be saved. This includes both the unmasked and masked MAFFT alignment from q2-alignment methods, and both the rooted and unrooted phylogenies from q2-phylogeny methods.
Inputs¶
- sequences:
FeatureData[Sequence]
The sequences to be used for creating a fasttree based rooted phylogenetic tree.[required]
Parameters¶
- n_threads:
Threads
The number of threads. (Use
auto
to automatically use all available cores) This value is used when aligning the sequences and creating the tree with fasttree.[default:1
]- mask_max_gap_frequency:
Float
%
Range
(0, 1, inclusive_end=True)
The maximum relative frequency of gap characters in a column for the column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive), where 0.0 retains only those columns without gap characters, and 1.0 retains all columns regardless of gap character frequency. This value is used when masking the aligned sequences.[default:
1.0
]- mask_min_conservation:
Float
%
Range
(0, 1, inclusive_end=True)
The minimum relative frequency of at least one non-gap character in a column for that column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive). For example, if a value of 0.4 is provided, a column will only be retained if it contains at least one character that is present in at least 40% of the sequences. This value is used when masking the aligned sequences.[default:
0.4
]- parttree:
Bool
This flag is required if the number of sequences being aligned are larger than 1000000. Disabled by default.[default:
False
]
Outputs¶
- alignment:
FeatureData[AlignedSequence]
The aligned sequences.[required]
- masked_alignment:
FeatureData[AlignedSequence]
The masked alignment.[required]
- tree:
Phylogeny[Unrooted]
The unrooted phylogenetic tree.[required]
- rooted_tree:
Phylogeny[Rooted]
The rooted phylogenetic tree.[required]
Examples¶
align_to_tree_mafft_fasttree¶
wget -O 'rep-seqs.qza' \
'https://amplicon-docs.qiime2.org/en/latest/data/examples/phylogeny/align-to-tree-mafft-fasttree/1/rep-seqs.qza'
qiime phylogeny align-to-tree-mafft-fasttree \
--i-sequences rep-seqs.qza \
--o-alignment aligned-rep-seqs.qza \
--o-masked-alignment masked-aligned-rep-seqs.qza \
--o-tree unrooted-tree.qza \
--o-rooted-tree rooted-tree.qza
from qiime2 import Artifact
from urllib import request
import qiime2.plugins.phylogeny.actions as phylogeny_actions
url = 'https://amplicon-docs.qiime2.org/en/latest/data/examples/phylogeny/align-to-tree-mafft-fasttree/1/rep-seqs.qza'
fn = 'rep-seqs.qza'
request.urlretrieve(url, fn)
rep_seqs = Artifact.load(fn)
aligned_rep_seqs, masked_aligned_rep_seqs, unrooted_tree, rooted_tree = phylogeny_actions.align_to_tree_mafft_fasttree(
sequences=rep_seqs,
)
- Using the
Upload Data
tool: - On the first tab (Regular), press the
Paste/Fetch
data button at the bottom.- Set "Name" (first text-field) to:
rep-seqs.qza
- In the larger text-area, copy-and-paste: https://
amplicon -docs .qiime2 .org /en /latest /data /examples /phylogeny /align -to -tree -mafft -fasttree /1 /rep -seqs .qza - ("Type", "Genome", and "Settings" can be ignored)
- Set "Name" (first text-field) to:
- Press the
Start
button at the bottom.
- On the first tab (Regular), press the
- Using the
qiime2 phylogeny align-to-tree-mafft-fasttree
tool: - Set "sequences" to
#: rep-seqs.qza
- Press the
Execute
button.
- Set "sequences" to
- Once completed, for each new entry in your history, use the
Edit
button to set the name as follows: - (Renaming is optional, but it will make any subsequent steps easier to complete.)
History Name "Name" to set (be sure to press [Save]) #: qiime2 phylogeny align-to-tree-mafft-fasttree [...] : alignment.qza
aligned-rep-seqs.qza
#: qiime2 phylogeny align-to-tree-mafft-fasttree [...] : masked_alignment.qza
masked-aligned-rep-seqs.qza
#: qiime2 phylogeny align-to-tree-mafft-fasttree [...] : tree.qza
unrooted-tree.qza
#: qiime2 phylogeny align-to-tree-mafft-fasttree [...] : rooted_tree.qza
rooted-tree.qza
library(reticulate)
Artifact <- import("qiime2")$Artifact
phylogeny_actions <- import("qiime2.plugins.phylogeny.actions")
request <- import("urllib")$request
url <- 'https://amplicon-docs.qiime2.org/en/latest/data/examples/phylogeny/align-to-tree-mafft-fasttree/1/rep-seqs.qza'
fn <- 'rep-seqs.qza'
request$urlretrieve(url, fn)
rep_seqs <- Artifact$load(fn)
action_results <- phylogeny_actions$align_to_tree_mafft_fasttree(
sequences=rep_seqs,
)
aligned_rep_seqs <- action_results$alignment
masked_aligned_rep_seqs <- action_results$masked_alignment
unrooted_tree <- action_results$tree
rooted_tree <- action_results$rooted_tree
from q2_phylogeny._examples import phylogeny_align_to_tree_mafft_fasttree
phylogeny_align_to_tree_mafft_fasttree(use)
phylogeny align-to-tree-mafft-iqtree¶
This pipeline will start by creating a sequence alignment using MAFFT, after which any alignment columns that are phylogenetically uninformative or ambiguously aligned will be removed (masked). The resulting masked alignment will be used to infer a phylogenetic tree using IQ-TREE. By default the best fit substitution model will be determined by ModelFinder prior to phylogenetic inference. The resulting tree will be subsequently rooted at its midpoint. Output files from each step of the pipeline will be saved. This includes both the unmasked and masked MAFFT alignment from q2-alignment methods, and both the rooted and unrooted phylogenies from q2-phylogeny methods.
Inputs¶
- sequences:
FeatureData[Sequence]
The sequences to be used for creating a iqtree based rooted phylogenetic tree.[required]
Parameters¶
- n_threads:
Threads
The number of threads. (Use 0 to automatically use all available cores This value is used when aligning the sequences and creating the tree with iqtree.[default:
1
]- mask_max_gap_frequency:
Float
%
Range
(0, 1, inclusive_end=True)
The maximum relative frequency of gap characters in a column for the column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive), where 0.0 retains only those columns without gap characters, and 1.0 retains all columns regardless of gap character frequency. This value is used when masking the aligned sequences.[default:
1.0
]- mask_min_conservation:
Float
%
Range
(0, 1, inclusive_end=True)
The minimum relative frequency of at least one non-gap character in a column for that column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive). For example, if a value of 0.4 is provided, a column will only be retained if it contains at least one character that is present in at least 40% of the sequences. This value is used when masking the aligned sequences.[default:
0.4
]- substitution_model:
Str
%
Choices
('JC', 'JC+I', 'JC+G', 'JC+I+G', 'JC+R2', 'JC+R3', 'JC+R4', 'JC+R5', 'JC+R6', 'JC+R7', 'JC+R8', 'JC+R9', 'JC+R10', 'F81', 'F81+I', 'F81+G', 'F81+I+G', 'F81+R2', 'F81+R3', 'F81+R4', 'F81+R5', 'F81+R6', 'F81+R7', 'F81+R8', 'F81+R9', 'F81+R10', 'K80', 'K80+I', 'K80+G', 'K80+I+G', 'K80+R2', 'K80+R3', 'K80+R4', 'K80+R5', 'K80+R6', 'K80+R7', 'K80+R8', 'K80+R9', 'K80+R10', 'HKY', 'HKY+I', 'HKY+G', 'HKY+I+G', 'HKY+R2', 'HKY+R3', 'HKY+R4', 'HKY+R5', 'HKY+R6', 'HKY+R7', 'HKY+R8', 'HKY+R9', 'HKY+R10', 'TNe', 'TNe+I', 'TNe+G', 'TNe+I+G', 'TNe+R2', 'TNe+R3', 'TNe+R4', 'TNe+R5', 'TNe+R6', 'TNe+R7', 'TNe+R8', 'TNe+R9', 'TNe+R10', 'TN', 'TN+I', 'TN+G', 'TN+I+G', 'TN+R2', 'TN+R3', 'TN+R4', 'TN+R5', 'TN+R6', 'TN+R7', 'TN+R8', 'TN+R9', 'TN+R10', 'K81', 'K81+I', 'K81+G', 'K81+I+G', 'K81+R2', 'K81+R3', 'K81+R4', 'K81+R5', 'K81+R6', 'K81+R7', 'K81+R8', 'K81+R9', 'K81+R10', 'K81u', 'K81u+I', 'K81u+G', 'K81u+I+G', 'K81u+R2', 'K81u+R3', 'K81u+R4', 'K81u+R5', 'K81u+R6', 'K81u+R7', 'K81u+R8', 'K81u+R9', 'K81u+R10', 'TPM2', 'TPM2+I', 'TPM2+G', 'TPM2+I+G', 'TPM2+R2', 'TPM2+R3', 'TPM2+R4', 'TPM2+R5', 'TPM2+R6', 'TPM2+R7', 'TPM2+R8', 'TPM2+R9', 'TPM2+R10', 'TPM2u', 'TPM2u+I', 'TPM2u+G', 'TPM2u+I+G', 'TPM2u+R2', 'TPM2u+R3', 'TPM2u+R4', 'TPM2u+R5', 'TPM2u+R6', 'TPM2u+R7', 'TPM2u+R8', 'TPM2u+R9', 'TPM2u+R10', 'TPM3', 'TPM3+I', 'TPM3+G', 'TPM3+I+G', 'TPM3+R2', 'TPM3+R3', 'TPM3+R4', 'TPM3+R5', 'TPM3+R6', 'TPM3+R7', 'TPM3+R8', 'TPM3+R9', 'TPM3+R10', 'TPM3u', 'TPM3u+I', 'TPM3u+G', 'TPM3u+I+G', 'TPM3u+R2', 'TPM3u+R3', 'TPM3u+R4', 'TPM3u+R5', 'TPM3u+R6', 'TPM3u+R7', 'TPM3u+R8', 'TPM3u+R9', 'TPM3u+R10', 'TIMe', 'TIMe+I', 'TIMe+G', 'TIMe+I+G', 'TIMe+R2', 'TIMe+R3', 'TIMe+R4', 'TIMe+R5', 'TIMe+R6', 'TIMe+R7', 'TIMe+R8', 'TIMe+R9', 'TIMe+R10', 'TIM', 'TIM+I', 'TIM+G', 'TIM+I+G', 'TIM+R2', 'TIM+R3', 'TIM+R4', 'TIM+R5', 'TIM+R6', 'TIM+R7', 'TIM+R8', 'TIM+R9', 'TIM+R10', 'TIM2e', 'TIM2e+I', 'TIM2e+G', 'TIM2e+I+G', 'TIM2e+R2', 'TIM2e+R3', 'TIM2e+R4', 'TIM2e+R5', 'TIM2e+R6', 'TIM2e+R7', 'TIM2e+R8', 'TIM2e+R9', 'TIM2e+R10', 'TIM2', 'TIM2+I', 'TIM2+G', 'TIM2+I+G', 'TIM2+R2', 'TIM2+R3', 'TIM2+R4', 'TIM2+R5', 'TIM2+R6', 'TIM2+R7', 'TIM2+R8', 'TIM2+R9', 'TIM2+R10', 'TIM3e', 'TIM3e+I', 'TIM3e+G', 'TIM3e+I+G', 'TIM3e+R2', 'TIM3e+R3', 'TIM3e+R4', 'TIM3e+R5', 'TIM3e+R6', 'TIM3e+R7', 'TIM3e+R8', 'TIM3e+R9', 'TIM3e+R10', 'TIM3', 'TIM3+I', 'TIM3+G', 'TIM3+I+G', 'TIM3+R2', 'TIM3+R3', 'TIM3+R4', 'TIM3+R5', 'TIM3+R6', 'TIM3+R7', 'TIM3+R8', 'TIM3+R9', 'TIM3+R10', 'TVMe', 'TVMe+I', 'TVMe+G', 'TVMe+I+G', 'TVMe+R2', 'TVMe+R3', 'TVMe+R4', 'TVMe+R5', 'TVMe+R6', 'TVMe+R7', 'TVMe+R8', 'TVMe+R9', 'TVMe+R10', 'TVM', 'TVM+I', 'TVM+G', 'TVM+I+G', 'TVM+R2', 'TVM+R3', 'TVM+R4', 'TVM+R5', 'TVM+R6', 'TVM+R7', 'TVM+R8', 'TVM+R9', 'TVM+R10', 'SYM', 'SYM+I', 'SYM+G', 'SYM+I+G', 'SYM+R2', 'SYM+R3', 'SYM+R4', 'SYM+R5', 'SYM+R6', 'SYM+R7', 'SYM+R8', 'SYM+R9', 'SYM+R10', 'GTR', 'GTR+I', 'GTR+G', 'GTR+I+G', 'GTR+R2', 'GTR+R3', 'GTR+R4', 'GTR+R5', 'GTR+R6', 'GTR+R7', 'GTR+R8', 'GTR+R9', 'GTR+R10', 'MFP', 'TEST')
Model of Nucleotide Substitution. If not provided, IQ-TREE will determine the best fit substitution model automatically.[default:
'MFP'
]- fast:
Bool
Fast search to resemble FastTree.[default:
False
]- alrt:
Int
%
Range
(1000, None)
Single branch test method. Number of bootstrap replicates to perform an SH-like approximate likelihood ratio test (SH-aLRT). Minimum of 1000 replicates is required.[optional]
- seed:
Int
Random number seed for the iqtree parsimony starting tree. This allows you to reproduce tree results. If not supplied then one will be randomly chosen.[optional]
- stop_iter:
Int
%
Range
(1, None)
Number of unsuccessful iterations to stop. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- perturb_nni_strength:
Float
%
Range
(0.01, 1.0)
Perturbation strength for randomized NNI. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
Outputs¶
- alignment:
FeatureData[AlignedSequence]
The aligned sequences.[required]
- masked_alignment:
FeatureData[AlignedSequence]
The masked alignment.[required]
- tree:
Phylogeny[Unrooted]
The unrooted phylogenetic tree.[required]
- rooted_tree:
Phylogeny[Rooted]
The rooted phylogenetic tree.[required]
phylogeny align-to-tree-mafft-raxml¶
This pipeline will start by creating a sequence alignment using MAFFT, after which any alignment columns that are phylogenetically uninformative or ambiguously aligned will be removed (masked). The resulting masked alignment will be used to infer a phylogenetic tree using RAxML, under the specified substitution model, and then subsequently rooted at its midpoint. Output files from each step of the pipeline will be saved. This includes both the unmasked and masked MAFFT alignment from q2-alignment methods, and both the rooted and unrooted phylogenies from q2-phylogeny methods.
Inputs¶
- sequences:
FeatureData[Sequence]
The sequences to be used for creating a iqtree based rooted phylogenetic tree.[required]
Parameters¶
- n_threads:
Threads
The number of threads. (Use
all
to automatically use all available cores. This value is used when aligning the sequences and creating the tree with iqtree.[default:1
]- mask_max_gap_frequency:
Float
%
Range
(0, 1, inclusive_end=True)
The maximum relative frequency of gap characters in a column for the column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive), where 0.0 retains only those columns without gap characters, and 1.0 retains all columns regardless of gap character frequency. This value is used when masking the aligned sequences.[default:
1.0
]- mask_min_conservation:
Float
%
Range
(0, 1, inclusive_end=True)
The minimum relative frequency of at least one non-gap character in a column for that column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive). For example, if a value of 0.4 is provided, a column will only be retained if it contains at least one character that is present in at least 40% of the sequences. This value is used when masking the aligned sequences.[default:
0.4
]- parttree:
Bool
This flag is required if the number of sequences being aligned are larger than 1000000. Disabled by default. NOTE: if using this option, it is recomended that only the CAT-based substitution models of RAxML be considered for this pipeline.[default:
False
]- substitution_model:
Str
%
Choices
('GTRGAMMA', 'GTRGAMMAI', 'GTRCAT', 'GTRCATI')
Model of Nucleotide Substitution.[default:
'GTRGAMMA'
]- seed:
Int
Random number seed for the parsimony starting tree. This allows you to reproduce tree results. If not supplied then one will be randomly chosen.[optional]
- raxml_version:
Str
%
Choices
('Standard', 'SSE3', 'AVX2')
Select a specific CPU optimization of RAxML to use. The SSE3 versions will run approximately 40% faster than the standard version. The AVX2 version will run 10-30% faster than the SSE3 version.[default:
'Standard'
]
Outputs¶
- alignment:
FeatureData[AlignedSequence]
The aligned sequences.[required]
- masked_alignment:
FeatureData[AlignedSequence]
The masked alignment.[required]
- tree:
Phylogeny[Unrooted]
The unrooted phylogenetic tree.[required]
- rooted_tree:
Phylogeny[Rooted]
The rooted phylogenetic tree.[required]
This QIIME 2 plugin supports generating and manipulating phylogenetic trees.
- version:
2024.10.0
- website: https://
github .com /qiime2 /q2 -phylogeny - user support:
- Please post to the QIIME 2 forum for help with this plugin: https://
forum .qiime2 .org
Actions¶
Name | Type | Short Description |
---|---|---|
midpoint-root | method | Midpoint root an unrooted phylogenetic tree. |
fasttree | method | Construct a phylogenetic tree with FastTree. |
raxml | method | Construct a phylogenetic tree with RAxML. |
raxml-rapid-bootstrap | method | Construct a phylogenetic tree with bootstrap supports using RAxML. |
iqtree | method | Construct a phylogenetic tree with IQ-TREE. |
iqtree-ultrafast-bootstrap | method | Construct a phylogenetic tree with IQ-TREE with bootstrap supports. |
filter-table | method | Remove features from table if they're not present in tree. |
filter-tree | method | Remove features from tree based on metadata |
robinson-foulds | method | Calculate Robinson-Foulds distance between phylogenetic trees. |
align-to-tree-mafft-fasttree | pipeline | Build a phylogenetic tree using fasttree and mafft alignment |
align-to-tree-mafft-iqtree | pipeline | Build a phylogenetic tree using iqtree and mafft alignment. |
align-to-tree-mafft-raxml | pipeline | Build a phylogenetic tree using raxml and mafft alignment. |
phylogeny midpoint-root¶
Midpoint root an unrooted phylogenetic tree.
Inputs¶
- tree:
Phylogeny[Unrooted]
The phylogenetic tree to be rooted.[required]
Outputs¶
- rooted_tree:
Phylogeny[Rooted]
The rooted phylogenetic tree.[required]
phylogeny fasttree¶
Construct a phylogenetic tree with FastTree.
Citations¶
Inputs¶
- alignment:
FeatureData[AlignedSequence]
Aligned sequences to be used for phylogenetic reconstruction.[required]
Parameters¶
- n_threads:
Threads
The number of threads. Using more than one thread runs the non-deterministic variant of
FastTree
(FastTreeMP
), and may result in a different tree than single-threading. See http://www .microbesonline .org /fasttree / #OpenMP for details. (Use auto
to automatically use all available cores)[default:1
]
Outputs¶
- tree:
Phylogeny[Unrooted]
The resulting phylogenetic tree.[required]
phylogeny raxml¶
Construct a phylogenetic tree with RAxML. See: https://
Citations¶
Inputs¶
- alignment:
FeatureData[AlignedSequence]
Aligned sequences to be used for phylogenetic reconstruction.[required]
Parameters¶
- seed:
Int
Random number seed for the parsimony starting tree. This allows you to reproduce tree results. If not supplied then one will be randomly chosen.[optional]
- n_searches:
Int
%
Range
(1, None)
The number of independent maximum likelihood searches to perform. The single best scoring tree is returned.[default:
1
]- n_threads:
Threads
The number of threads to use for multithreaded processing. Using more than one thread will enable the PTHREADS version of RAxML.[default:
1
]- raxml_version:
Str
%
Choices
('Standard', 'SSE3', 'AVX2')
Select a specific CPU optimization of RAxML to use. The SSE3 versions will run approximately 40% faster than the standard version. The AVX2 version will run 10-30% faster than the SSE3 version.[default:
'Standard'
]- substitution_model:
Str
%
Choices
('GTRGAMMA', 'GTRGAMMAI', 'GTRCAT', 'GTRCATI')
Model of Nucleotide Substitution.[default:
'GTRGAMMA'
]
Outputs¶
- tree:
Phylogeny[Unrooted]
The resulting phylogenetic tree.[required]
phylogeny raxml-rapid-bootstrap¶
Construct a phylogenetic tree with RAxML with the addition of rapid bootstrapping support values. See: https://
Citations¶
Stamatakis, 2014; Stamatakis et al., 2008
Inputs¶
- alignment:
FeatureData[AlignedSequence]
Aligned sequences to be used for phylogenetic reconstruction.[required]
Parameters¶
- seed:
Int
Random number seed for the parsimony starting tree. This allows you to reproduce tree results. If not supplied then one will be randomly chosen.[optional]
- rapid_bootstrap_seed:
Int
Specify a random seed for rapid bootstrapping. This allows you to reproduce rapid bootstrap results. If not supplied then one will be randomly chosen.[optional]
- bootstrap_replicates:
Int
%
Range
(10, None)
The number of bootstrap searches to perform.[default:
100
]- n_threads:
Threads
The number of threads to use for multithreaded processing. Using more than one thread will enable the PTHREADS version of RAxML.[default:
1
]- raxml_version:
Str
%
Choices
('Standard', 'SSE3', 'AVX2')
Select a specific CPU optimization of RAxML to use. The SSE3 versions will run approximately 40% faster than the standard version. The AVX2 version will run 10-30% faster than the SSE3 version.[default:
'Standard'
]- substitution_model:
Str
%
Choices
('GTRGAMMA', 'GTRGAMMAI', 'GTRCAT', 'GTRCATI')
Model of Nucleotide Substitution[default:
'GTRGAMMA'
]
Outputs¶
- tree:
Phylogeny[Unrooted]
The resulting phylogenetic tree.[required]
phylogeny iqtree¶
Construct a phylogenetic tree using IQ-TREE (http://
Citations¶
Minh et al., 2020; Kalyaanamoorthy et al., 2017
Inputs¶
- alignment:
FeatureData[AlignedSequence]
Aligned sequences to be used for phylogenetic reconstruction.[required]
Parameters¶
- seed:
Int
Random number seed. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_cores:
Threads
The number of cores to use for parallel processing. Use
auto
to let IQ-TREE automatically determine the optimal number of cores to use.[default:1
]- n_cores_max:
Threads
Limits the maximum number of cores to be used when 'n_cores' is set to 'auto'.[optional]
- n_runs:
Int
%
Range
(1, None)
Number of indepedent runs. Multiple independent runs (e.g. 10) can outperform a single run in terms of likelihood maximisation.[default:
1
]- substitution_model:
Str
%
Choices
('JC', 'JC+I', 'JC+G', 'JC+I+G', 'JC+R2', 'JC+R3', 'JC+R4', 'JC+R5', 'JC+R6', 'JC+R7', 'JC+R8', 'JC+R9', 'JC+R10', 'F81', 'F81+I', 'F81+G', 'F81+I+G', 'F81+R2', 'F81+R3', 'F81+R4', 'F81+R5', 'F81+R6', 'F81+R7', 'F81+R8', 'F81+R9', 'F81+R10', 'K80', 'K80+I', 'K80+G', 'K80+I+G', 'K80+R2', 'K80+R3', 'K80+R4', 'K80+R5', 'K80+R6', 'K80+R7', 'K80+R8', 'K80+R9', 'K80+R10', 'HKY', 'HKY+I', 'HKY+G', 'HKY+I+G', 'HKY+R2', 'HKY+R3', 'HKY+R4', 'HKY+R5', 'HKY+R6', 'HKY+R7', 'HKY+R8', 'HKY+R9', 'HKY+R10', 'TNe', 'TNe+I', 'TNe+G', 'TNe+I+G', 'TNe+R2', 'TNe+R3', 'TNe+R4', 'TNe+R5', 'TNe+R6', 'TNe+R7', 'TNe+R8', 'TNe+R9', 'TNe+R10', 'TN', 'TN+I', 'TN+G', 'TN+I+G', 'TN+R2', 'TN+R3', 'TN+R4', 'TN+R5', 'TN+R6', 'TN+R7', 'TN+R8', 'TN+R9', 'TN+R10', 'K81', 'K81+I', 'K81+G', 'K81+I+G', 'K81+R2', 'K81+R3', 'K81+R4', 'K81+R5', 'K81+R6', 'K81+R7', 'K81+R8', 'K81+R9', 'K81+R10', 'K81u', 'K81u+I', 'K81u+G', 'K81u+I+G', 'K81u+R2', 'K81u+R3', 'K81u+R4', 'K81u+R5', 'K81u+R6', 'K81u+R7', 'K81u+R8', 'K81u+R9', 'K81u+R10', 'TPM2', 'TPM2+I', 'TPM2+G', 'TPM2+I+G', 'TPM2+R2', 'TPM2+R3', 'TPM2+R4', 'TPM2+R5', 'TPM2+R6', 'TPM2+R7', 'TPM2+R8', 'TPM2+R9', 'TPM2+R10', 'TPM2u', 'TPM2u+I', 'TPM2u+G', 'TPM2u+I+G', 'TPM2u+R2', 'TPM2u+R3', 'TPM2u+R4', 'TPM2u+R5', 'TPM2u+R6', 'TPM2u+R7', 'TPM2u+R8', 'TPM2u+R9', 'TPM2u+R10', 'TPM3', 'TPM3+I', 'TPM3+G', 'TPM3+I+G', 'TPM3+R2', 'TPM3+R3', 'TPM3+R4', 'TPM3+R5', 'TPM3+R6', 'TPM3+R7', 'TPM3+R8', 'TPM3+R9', 'TPM3+R10', 'TPM3u', 'TPM3u+I', 'TPM3u+G', 'TPM3u+I+G', 'TPM3u+R2', 'TPM3u+R3', 'TPM3u+R4', 'TPM3u+R5', 'TPM3u+R6', 'TPM3u+R7', 'TPM3u+R8', 'TPM3u+R9', 'TPM3u+R10', 'TIMe', 'TIMe+I', 'TIMe+G', 'TIMe+I+G', 'TIMe+R2', 'TIMe+R3', 'TIMe+R4', 'TIMe+R5', 'TIMe+R6', 'TIMe+R7', 'TIMe+R8', 'TIMe+R9', 'TIMe+R10', 'TIM', 'TIM+I', 'TIM+G', 'TIM+I+G', 'TIM+R2', 'TIM+R3', 'TIM+R4', 'TIM+R5', 'TIM+R6', 'TIM+R7', 'TIM+R8', 'TIM+R9', 'TIM+R10', 'TIM2e', 'TIM2e+I', 'TIM2e+G', 'TIM2e+I+G', 'TIM2e+R2', 'TIM2e+R3', 'TIM2e+R4', 'TIM2e+R5', 'TIM2e+R6', 'TIM2e+R7', 'TIM2e+R8', 'TIM2e+R9', 'TIM2e+R10', 'TIM2', 'TIM2+I', 'TIM2+G', 'TIM2+I+G', 'TIM2+R2', 'TIM2+R3', 'TIM2+R4', 'TIM2+R5', 'TIM2+R6', 'TIM2+R7', 'TIM2+R8', 'TIM2+R9', 'TIM2+R10', 'TIM3e', 'TIM3e+I', 'TIM3e+G', 'TIM3e+I+G', 'TIM3e+R2', 'TIM3e+R3', 'TIM3e+R4', 'TIM3e+R5', 'TIM3e+R6', 'TIM3e+R7', 'TIM3e+R8', 'TIM3e+R9', 'TIM3e+R10', 'TIM3', 'TIM3+I', 'TIM3+G', 'TIM3+I+G', 'TIM3+R2', 'TIM3+R3', 'TIM3+R4', 'TIM3+R5', 'TIM3+R6', 'TIM3+R7', 'TIM3+R8', 'TIM3+R9', 'TIM3+R10', 'TVMe', 'TVMe+I', 'TVMe+G', 'TVMe+I+G', 'TVMe+R2', 'TVMe+R3', 'TVMe+R4', 'TVMe+R5', 'TVMe+R6', 'TVMe+R7', 'TVMe+R8', 'TVMe+R9', 'TVMe+R10', 'TVM', 'TVM+I', 'TVM+G', 'TVM+I+G', 'TVM+R2', 'TVM+R3', 'TVM+R4', 'TVM+R5', 'TVM+R6', 'TVM+R7', 'TVM+R8', 'TVM+R9', 'TVM+R10', 'SYM', 'SYM+I', 'SYM+G', 'SYM+I+G', 'SYM+R2', 'SYM+R3', 'SYM+R4', 'SYM+R5', 'SYM+R6', 'SYM+R7', 'SYM+R8', 'SYM+R9', 'SYM+R10', 'GTR', 'GTR+I', 'GTR+G', 'GTR+I+G', 'GTR+R2', 'GTR+R3', 'GTR+R4', 'GTR+R5', 'GTR+R6', 'GTR+R7', 'GTR+R8', 'GTR+R9', 'GTR+R10', 'MFP', 'TEST')
Model of Nucleotide Substitution. If not provided, IQ-TREE will determine the best fit substitution model automatically.[default:
'MFP'
]- n_init_pars_trees:
Int
%
Range
(1, None)
Number of initial parsimony trees. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_top_init_trees:
Int
%
Range
(1, None)
Number of top initial trees. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_best_retain_trees:
Int
%
Range
(1, None)
Number of best trees retained during search. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_iter:
Int
%
Range
(1, None)
Fix number of iterations to stop. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- stop_iter:
Int
%
Range
(1, None)
Number of unsuccessful iterations to stop. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- perturb_nni_strength:
Float
%
Range
(0.01, 1.0)
Perturbation strength for randomized NNI. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- spr_radius:
Int
%
Range
(1, None)
Radius for parsimony SPR search. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- allnni:
Bool
Perform more thorough NNI search.[default:
False
]- fast:
Bool
Fast search to resemble FastTree.[default:
False
]- alrt:
Int
%
Range
(1000, None)
Single branch test method. Number of bootstrap replicates to perform an SH-like approximate likelihood ratio test (SH-aLRT). Minimum of 1000 replicates is required. Can be used with other 'single branch test methods'. Values reported in the order of: alrt, lbp, abayes.[optional]
- abayes:
Bool
Single branch test method. Approximate Bayes test. Can be used with other 'single branch test methods'. Values reported in the order of: alrt, lbp, abayes.[default:
False
]- lbp:
Int
%
Range
(1000, None)
Single branch test method. Number of bootstrap replicates to perform a fast local bootstrap probability method. Minimum of 1000 replicates is required. Can be used with other 'single branch test methods'. Values reported in the order of: alrt, lbp, abayes.[optional]
- safe:
Bool
Safe likelihood kernel to avoid numerical underflow.[default:
False
]
Outputs¶
- tree:
Phylogeny[Unrooted]
The resulting phylogenetic tree.[required]
phylogeny iqtree-ultrafast-bootstrap¶
Construct a phylogenetic tree using IQ-TREE (http://
Citations¶
Minh et al., 2020; Kalyaanamoorthy et al., 2017; Minh et al., 2013; Hoang et al., 2017
Inputs¶
- alignment:
FeatureData[AlignedSequence]
Aligned sequences to be used for phylogenetic reconstruction.[required]
Parameters¶
- seed:
Int
Random number seed. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_cores:
Threads
The number of cores to use for parallel processing. Use
auto
to let IQ-TREE automatically determine the optimal number of cores to use.[default:1
]- n_cores_max:
Threads
Limits the maximum number of cores to be used when 'n_cores' is set to 'auto'.[optional]
- n_runs:
Int
%
Range
(1, None)
Number of indepedent runs. Multiple independent runs (e.g. 10) can outperform a single run in terms of likelihood maximisation.[default:
1
]- substitution_model:
Str
%
Choices
('JC', 'JC+I', 'JC+G', 'JC+I+G', 'JC+R2', 'JC+R3', 'JC+R4', 'JC+R5', 'JC+R6', 'JC+R7', 'JC+R8', 'JC+R9', 'JC+R10', 'F81', 'F81+I', 'F81+G', 'F81+I+G', 'F81+R2', 'F81+R3', 'F81+R4', 'F81+R5', 'F81+R6', 'F81+R7', 'F81+R8', 'F81+R9', 'F81+R10', 'K80', 'K80+I', 'K80+G', 'K80+I+G', 'K80+R2', 'K80+R3', 'K80+R4', 'K80+R5', 'K80+R6', 'K80+R7', 'K80+R8', 'K80+R9', 'K80+R10', 'HKY', 'HKY+I', 'HKY+G', 'HKY+I+G', 'HKY+R2', 'HKY+R3', 'HKY+R4', 'HKY+R5', 'HKY+R6', 'HKY+R7', 'HKY+R8', 'HKY+R9', 'HKY+R10', 'TNe', 'TNe+I', 'TNe+G', 'TNe+I+G', 'TNe+R2', 'TNe+R3', 'TNe+R4', 'TNe+R5', 'TNe+R6', 'TNe+R7', 'TNe+R8', 'TNe+R9', 'TNe+R10', 'TN', 'TN+I', 'TN+G', 'TN+I+G', 'TN+R2', 'TN+R3', 'TN+R4', 'TN+R5', 'TN+R6', 'TN+R7', 'TN+R8', 'TN+R9', 'TN+R10', 'K81', 'K81+I', 'K81+G', 'K81+I+G', 'K81+R2', 'K81+R3', 'K81+R4', 'K81+R5', 'K81+R6', 'K81+R7', 'K81+R8', 'K81+R9', 'K81+R10', 'K81u', 'K81u+I', 'K81u+G', 'K81u+I+G', 'K81u+R2', 'K81u+R3', 'K81u+R4', 'K81u+R5', 'K81u+R6', 'K81u+R7', 'K81u+R8', 'K81u+R9', 'K81u+R10', 'TPM2', 'TPM2+I', 'TPM2+G', 'TPM2+I+G', 'TPM2+R2', 'TPM2+R3', 'TPM2+R4', 'TPM2+R5', 'TPM2+R6', 'TPM2+R7', 'TPM2+R8', 'TPM2+R9', 'TPM2+R10', 'TPM2u', 'TPM2u+I', 'TPM2u+G', 'TPM2u+I+G', 'TPM2u+R2', 'TPM2u+R3', 'TPM2u+R4', 'TPM2u+R5', 'TPM2u+R6', 'TPM2u+R7', 'TPM2u+R8', 'TPM2u+R9', 'TPM2u+R10', 'TPM3', 'TPM3+I', 'TPM3+G', 'TPM3+I+G', 'TPM3+R2', 'TPM3+R3', 'TPM3+R4', 'TPM3+R5', 'TPM3+R6', 'TPM3+R7', 'TPM3+R8', 'TPM3+R9', 'TPM3+R10', 'TPM3u', 'TPM3u+I', 'TPM3u+G', 'TPM3u+I+G', 'TPM3u+R2', 'TPM3u+R3', 'TPM3u+R4', 'TPM3u+R5', 'TPM3u+R6', 'TPM3u+R7', 'TPM3u+R8', 'TPM3u+R9', 'TPM3u+R10', 'TIMe', 'TIMe+I', 'TIMe+G', 'TIMe+I+G', 'TIMe+R2', 'TIMe+R3', 'TIMe+R4', 'TIMe+R5', 'TIMe+R6', 'TIMe+R7', 'TIMe+R8', 'TIMe+R9', 'TIMe+R10', 'TIM', 'TIM+I', 'TIM+G', 'TIM+I+G', 'TIM+R2', 'TIM+R3', 'TIM+R4', 'TIM+R5', 'TIM+R6', 'TIM+R7', 'TIM+R8', 'TIM+R9', 'TIM+R10', 'TIM2e', 'TIM2e+I', 'TIM2e+G', 'TIM2e+I+G', 'TIM2e+R2', 'TIM2e+R3', 'TIM2e+R4', 'TIM2e+R5', 'TIM2e+R6', 'TIM2e+R7', 'TIM2e+R8', 'TIM2e+R9', 'TIM2e+R10', 'TIM2', 'TIM2+I', 'TIM2+G', 'TIM2+I+G', 'TIM2+R2', 'TIM2+R3', 'TIM2+R4', 'TIM2+R5', 'TIM2+R6', 'TIM2+R7', 'TIM2+R8', 'TIM2+R9', 'TIM2+R10', 'TIM3e', 'TIM3e+I', 'TIM3e+G', 'TIM3e+I+G', 'TIM3e+R2', 'TIM3e+R3', 'TIM3e+R4', 'TIM3e+R5', 'TIM3e+R6', 'TIM3e+R7', 'TIM3e+R8', 'TIM3e+R9', 'TIM3e+R10', 'TIM3', 'TIM3+I', 'TIM3+G', 'TIM3+I+G', 'TIM3+R2', 'TIM3+R3', 'TIM3+R4', 'TIM3+R5', 'TIM3+R6', 'TIM3+R7', 'TIM3+R8', 'TIM3+R9', 'TIM3+R10', 'TVMe', 'TVMe+I', 'TVMe+G', 'TVMe+I+G', 'TVMe+R2', 'TVMe+R3', 'TVMe+R4', 'TVMe+R5', 'TVMe+R6', 'TVMe+R7', 'TVMe+R8', 'TVMe+R9', 'TVMe+R10', 'TVM', 'TVM+I', 'TVM+G', 'TVM+I+G', 'TVM+R2', 'TVM+R3', 'TVM+R4', 'TVM+R5', 'TVM+R6', 'TVM+R7', 'TVM+R8', 'TVM+R9', 'TVM+R10', 'SYM', 'SYM+I', 'SYM+G', 'SYM+I+G', 'SYM+R2', 'SYM+R3', 'SYM+R4', 'SYM+R5', 'SYM+R6', 'SYM+R7', 'SYM+R8', 'SYM+R9', 'SYM+R10', 'GTR', 'GTR+I', 'GTR+G', 'GTR+I+G', 'GTR+R2', 'GTR+R3', 'GTR+R4', 'GTR+R5', 'GTR+R6', 'GTR+R7', 'GTR+R8', 'GTR+R9', 'GTR+R10', 'MFP', 'TEST')
Model of Nucleotide Substitution.If not provided, IQ-TREE will determine the best fit substitution model automatically. [default:
'MFP'
]- bootstrap_replicates:
Int
%
Range
(1000, None)
The number of bootstrap searches to perform. Minimum of 1000 recomended. [default:
1000
]- n_init_pars_trees:
Int
%
Range
(1, None)
Number of initial parsimony trees. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_top_init_trees:
Int
%
Range
(1, None)
Number of top initial trees. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_best_retain_trees:
Int
%
Range
(1, None)
Number of best trees retained during search. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- stop_iter:
Int
%
Range
(1, None)
Number of unsuccessful iterations to stop. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- perturb_nni_strength:
Float
%
Range
(0.01, 1.0)
Perturbation strength for randomized NNI. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- spr_radius:
Int
%
Range
(1, None)
Radius for parsimony SPR search. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_max_ufboot_iter:
Int
%
Range
(1, None)
Maximum number of iterations. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_ufboot_steps:
Int
%
Range
(1, None)
Number of iterations for UFBoot stopping rule. If not set, program defaults will be used.See IQ-TREE manual for details.[optional]
- min_cor_ufboot:
Float
%
Range
(0.51, 0.99)
Minimum correlation coefficient. If not set, program defaults will be used.See IQ-TREE manual for details.[optional]
- ep_break_ufboot:
Float
%
Range
(0.01, 0.99)
Epsilon value to break tie. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- allnni:
Bool
Perform more thorough NNI search.[default:
False
]- alrt:
Int
%
Range
(1000, None)
Single branch test method. Number of bootstrap replicates to perform an SH-like approximate likelihood ratio test (SH-aLRT). Minimum of 1000 replicates is required. Can be used with other 'single branch test methods'. Values reported in the order of: alrt, lbp, abayes.[optional]
- abayes:
Bool
Single branch test method. Performs an approximate Bayes test. Can be used with other 'single branch test methods' and ultrafast bootstrap. Values reported in the order of: alrt, lbp, abayes, ufboot.[default:
False
]- lbp:
Int
%
Range
(1000, None)
Single branch test method. Number of bootstrap replicates to perform a fast local bootstrap probability method. Minimum of 1000 replicates is required. Can be used with other 'single branch test methods'. Values reported in the order of: alrt, lbp, abayes, ufboot.[optional]
- bnni:
Bool
Optimize UFBoot trees by NNI on bootstrap alignment. This option reduces the risk of overestimating branch supports with UFBoot due to severe model violations.[default:
False
]- safe:
Bool
Safe likelihood kernel to avoid numerical underflow.[default:
False
]
Outputs¶
- tree:
Phylogeny[Unrooted]
The resulting phylogenetic tree.[required]
phylogeny filter-table¶
Remove features from a feature table if their identifiers are not tip identifiers in tree.
Inputs¶
- table:
FeatureTable[Frequency¹ | RelativeFrequency² | PresenceAbsence³]
Feature table that features should be filtered from.[required]
- tree:
Phylogeny[Rooted | Unrooted]
Tree where tip identifiers are the feature identifiers that should be retained in the table.[required]
Outputs¶
- filtered_table:
FeatureTable[Frequency¹ | RelativeFrequency² | PresenceAbsence³]
The resulting feature table.[required]
phylogeny filter-tree¶
Remove tips from a tree if their identifiers based on a set of provided identifiers.
Inputs¶
- tree:
Phylogeny[Rooted¹ | Unrooted²]
Tree that should be filtered[required]
- table:
FeatureTable[Frequency | RelativeFrequency | PresenceAbsence | Composition]
Feature table which contains the identifier that should be retained in the tree[optional]
Parameters¶
- metadata:
Metadata
Feature metadata to use with the 'where' statement or to select tips to be retained. Metadata objects could also include FeatureData[Sequence] data types, if, forinstance, you want to filter to match represenative sequencces.[optional]
- where:
Str
SQLite WHERE clause specifying sample metadata criteria that must be met to be included in the filtered feature table. If not provided, all samples in
metadata
that are also in the feature table will be retained.[optional]
Outputs¶
- filtered_tree:
Phylogeny[Rooted¹ | Unrooted²]
The resulting phylogenetic tree.[required]
phylogeny robinson-foulds¶
Calculate the Robinson-Foulds symmetric difference metric between two or more phylogenetic trees.
Citations¶
Robinson & Foulds, 1981
Inputs¶
- trees:
List
[
Phylogeny[Rooted | Unrooted]
]
Phylogenetic trees to compare with Robinson-Foulds. Rooting information and branch lengths are ignored by this metric.[required]
Parameters¶
- labels:
List
[
Str
]
Labels to use for the tree names in the distance matrix. If ommited, labels will be "tree_n" where "n" ranges from 1..N. The number of labels must match the number of trees.[optional]
- missing_tips:
Str
%
Choices
('error', 'intersect-all')
How to handle tips that are not shared between trees. "error" will raise an error if the set of tips is not identical between all input trees. "intersect-all" will remove tips that are not shared between all trees before computing distances beteen trees.[default:
'error'
]
Outputs¶
- distance_matrix:
DistanceMatrix
The distances between trees as a symmetric matrix.[required]
phylogeny align-to-tree-mafft-fasttree¶
This pipeline will start by creating a sequence alignment using MAFFT, after which any alignment columns that are phylogenetically uninformative or ambiguously aligned will be removed (masked). The resulting masked alignment will be used to infer a phylogenetic tree and then subsequently rooted at its midpoint. Output files from each step of the pipeline will be saved. This includes both the unmasked and masked MAFFT alignment from q2-alignment methods, and both the rooted and unrooted phylogenies from q2-phylogeny methods.
Inputs¶
- sequences:
FeatureData[Sequence]
The sequences to be used for creating a fasttree based rooted phylogenetic tree.[required]
Parameters¶
- n_threads:
Threads
The number of threads. (Use
auto
to automatically use all available cores) This value is used when aligning the sequences and creating the tree with fasttree.[default:1
]- mask_max_gap_frequency:
Float
%
Range
(0, 1, inclusive_end=True)
The maximum relative frequency of gap characters in a column for the column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive), where 0.0 retains only those columns without gap characters, and 1.0 retains all columns regardless of gap character frequency. This value is used when masking the aligned sequences.[default:
1.0
]- mask_min_conservation:
Float
%
Range
(0, 1, inclusive_end=True)
The minimum relative frequency of at least one non-gap character in a column for that column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive). For example, if a value of 0.4 is provided, a column will only be retained if it contains at least one character that is present in at least 40% of the sequences. This value is used when masking the aligned sequences.[default:
0.4
]- parttree:
Bool
This flag is required if the number of sequences being aligned are larger than 1000000. Disabled by default.[default:
False
]
Outputs¶
- alignment:
FeatureData[AlignedSequence]
The aligned sequences.[required]
- masked_alignment:
FeatureData[AlignedSequence]
The masked alignment.[required]
- tree:
Phylogeny[Unrooted]
The unrooted phylogenetic tree.[required]
- rooted_tree:
Phylogeny[Rooted]
The rooted phylogenetic tree.[required]
Examples¶
align_to_tree_mafft_fasttree¶
wget -O 'rep-seqs.qza' \
'https://amplicon-docs.qiime2.org/en/latest/data/examples/phylogeny/align-to-tree-mafft-fasttree/1/rep-seqs.qza'
qiime phylogeny align-to-tree-mafft-fasttree \
--i-sequences rep-seqs.qza \
--o-alignment aligned-rep-seqs.qza \
--o-masked-alignment masked-aligned-rep-seqs.qza \
--o-tree unrooted-tree.qza \
--o-rooted-tree rooted-tree.qza
from qiime2 import Artifact
from urllib import request
import qiime2.plugins.phylogeny.actions as phylogeny_actions
url = 'https://amplicon-docs.qiime2.org/en/latest/data/examples/phylogeny/align-to-tree-mafft-fasttree/1/rep-seqs.qza'
fn = 'rep-seqs.qza'
request.urlretrieve(url, fn)
rep_seqs = Artifact.load(fn)
aligned_rep_seqs, masked_aligned_rep_seqs, unrooted_tree, rooted_tree = phylogeny_actions.align_to_tree_mafft_fasttree(
sequences=rep_seqs,
)
- Using the
Upload Data
tool: - On the first tab (Regular), press the
Paste/Fetch
data button at the bottom.- Set "Name" (first text-field) to:
rep-seqs.qza
- In the larger text-area, copy-and-paste: https://
amplicon -docs .qiime2 .org /en /latest /data /examples /phylogeny /align -to -tree -mafft -fasttree /1 /rep -seqs .qza - ("Type", "Genome", and "Settings" can be ignored)
- Set "Name" (first text-field) to:
- Press the
Start
button at the bottom.
- On the first tab (Regular), press the
- Using the
qiime2 phylogeny align-to-tree-mafft-fasttree
tool: - Set "sequences" to
#: rep-seqs.qza
- Press the
Execute
button.
- Set "sequences" to
- Once completed, for each new entry in your history, use the
Edit
button to set the name as follows: - (Renaming is optional, but it will make any subsequent steps easier to complete.)
History Name "Name" to set (be sure to press [Save]) #: qiime2 phylogeny align-to-tree-mafft-fasttree [...] : alignment.qza
aligned-rep-seqs.qza
#: qiime2 phylogeny align-to-tree-mafft-fasttree [...] : masked_alignment.qza
masked-aligned-rep-seqs.qza
#: qiime2 phylogeny align-to-tree-mafft-fasttree [...] : tree.qza
unrooted-tree.qza
#: qiime2 phylogeny align-to-tree-mafft-fasttree [...] : rooted_tree.qza
rooted-tree.qza
library(reticulate)
Artifact <- import("qiime2")$Artifact
phylogeny_actions <- import("qiime2.plugins.phylogeny.actions")
request <- import("urllib")$request
url <- 'https://amplicon-docs.qiime2.org/en/latest/data/examples/phylogeny/align-to-tree-mafft-fasttree/1/rep-seqs.qza'
fn <- 'rep-seqs.qza'
request$urlretrieve(url, fn)
rep_seqs <- Artifact$load(fn)
action_results <- phylogeny_actions$align_to_tree_mafft_fasttree(
sequences=rep_seqs,
)
aligned_rep_seqs <- action_results$alignment
masked_aligned_rep_seqs <- action_results$masked_alignment
unrooted_tree <- action_results$tree
rooted_tree <- action_results$rooted_tree
from q2_phylogeny._examples import phylogeny_align_to_tree_mafft_fasttree
phylogeny_align_to_tree_mafft_fasttree(use)
phylogeny align-to-tree-mafft-iqtree¶
This pipeline will start by creating a sequence alignment using MAFFT, after which any alignment columns that are phylogenetically uninformative or ambiguously aligned will be removed (masked). The resulting masked alignment will be used to infer a phylogenetic tree using IQ-TREE. By default the best fit substitution model will be determined by ModelFinder prior to phylogenetic inference. The resulting tree will be subsequently rooted at its midpoint. Output files from each step of the pipeline will be saved. This includes both the unmasked and masked MAFFT alignment from q2-alignment methods, and both the rooted and unrooted phylogenies from q2-phylogeny methods.
Inputs¶
- sequences:
FeatureData[Sequence]
The sequences to be used for creating a iqtree based rooted phylogenetic tree.[required]
Parameters¶
- n_threads:
Threads
The number of threads. (Use 0 to automatically use all available cores This value is used when aligning the sequences and creating the tree with iqtree.[default:
1
]- mask_max_gap_frequency:
Float
%
Range
(0, 1, inclusive_end=True)
The maximum relative frequency of gap characters in a column for the column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive), where 0.0 retains only those columns without gap characters, and 1.0 retains all columns regardless of gap character frequency. This value is used when masking the aligned sequences.[default:
1.0
]- mask_min_conservation:
Float
%
Range
(0, 1, inclusive_end=True)
The minimum relative frequency of at least one non-gap character in a column for that column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive). For example, if a value of 0.4 is provided, a column will only be retained if it contains at least one character that is present in at least 40% of the sequences. This value is used when masking the aligned sequences.[default:
0.4
]- substitution_model:
Str
%
Choices
('JC', 'JC+I', 'JC+G', 'JC+I+G', 'JC+R2', 'JC+R3', 'JC+R4', 'JC+R5', 'JC+R6', 'JC+R7', 'JC+R8', 'JC+R9', 'JC+R10', 'F81', 'F81+I', 'F81+G', 'F81+I+G', 'F81+R2', 'F81+R3', 'F81+R4', 'F81+R5', 'F81+R6', 'F81+R7', 'F81+R8', 'F81+R9', 'F81+R10', 'K80', 'K80+I', 'K80+G', 'K80+I+G', 'K80+R2', 'K80+R3', 'K80+R4', 'K80+R5', 'K80+R6', 'K80+R7', 'K80+R8', 'K80+R9', 'K80+R10', 'HKY', 'HKY+I', 'HKY+G', 'HKY+I+G', 'HKY+R2', 'HKY+R3', 'HKY+R4', 'HKY+R5', 'HKY+R6', 'HKY+R7', 'HKY+R8', 'HKY+R9', 'HKY+R10', 'TNe', 'TNe+I', 'TNe+G', 'TNe+I+G', 'TNe+R2', 'TNe+R3', 'TNe+R4', 'TNe+R5', 'TNe+R6', 'TNe+R7', 'TNe+R8', 'TNe+R9', 'TNe+R10', 'TN', 'TN+I', 'TN+G', 'TN+I+G', 'TN+R2', 'TN+R3', 'TN+R4', 'TN+R5', 'TN+R6', 'TN+R7', 'TN+R8', 'TN+R9', 'TN+R10', 'K81', 'K81+I', 'K81+G', 'K81+I+G', 'K81+R2', 'K81+R3', 'K81+R4', 'K81+R5', 'K81+R6', 'K81+R7', 'K81+R8', 'K81+R9', 'K81+R10', 'K81u', 'K81u+I', 'K81u+G', 'K81u+I+G', 'K81u+R2', 'K81u+R3', 'K81u+R4', 'K81u+R5', 'K81u+R6', 'K81u+R7', 'K81u+R8', 'K81u+R9', 'K81u+R10', 'TPM2', 'TPM2+I', 'TPM2+G', 'TPM2+I+G', 'TPM2+R2', 'TPM2+R3', 'TPM2+R4', 'TPM2+R5', 'TPM2+R6', 'TPM2+R7', 'TPM2+R8', 'TPM2+R9', 'TPM2+R10', 'TPM2u', 'TPM2u+I', 'TPM2u+G', 'TPM2u+I+G', 'TPM2u+R2', 'TPM2u+R3', 'TPM2u+R4', 'TPM2u+R5', 'TPM2u+R6', 'TPM2u+R7', 'TPM2u+R8', 'TPM2u+R9', 'TPM2u+R10', 'TPM3', 'TPM3+I', 'TPM3+G', 'TPM3+I+G', 'TPM3+R2', 'TPM3+R3', 'TPM3+R4', 'TPM3+R5', 'TPM3+R6', 'TPM3+R7', 'TPM3+R8', 'TPM3+R9', 'TPM3+R10', 'TPM3u', 'TPM3u+I', 'TPM3u+G', 'TPM3u+I+G', 'TPM3u+R2', 'TPM3u+R3', 'TPM3u+R4', 'TPM3u+R5', 'TPM3u+R6', 'TPM3u+R7', 'TPM3u+R8', 'TPM3u+R9', 'TPM3u+R10', 'TIMe', 'TIMe+I', 'TIMe+G', 'TIMe+I+G', 'TIMe+R2', 'TIMe+R3', 'TIMe+R4', 'TIMe+R5', 'TIMe+R6', 'TIMe+R7', 'TIMe+R8', 'TIMe+R9', 'TIMe+R10', 'TIM', 'TIM+I', 'TIM+G', 'TIM+I+G', 'TIM+R2', 'TIM+R3', 'TIM+R4', 'TIM+R5', 'TIM+R6', 'TIM+R7', 'TIM+R8', 'TIM+R9', 'TIM+R10', 'TIM2e', 'TIM2e+I', 'TIM2e+G', 'TIM2e+I+G', 'TIM2e+R2', 'TIM2e+R3', 'TIM2e+R4', 'TIM2e+R5', 'TIM2e+R6', 'TIM2e+R7', 'TIM2e+R8', 'TIM2e+R9', 'TIM2e+R10', 'TIM2', 'TIM2+I', 'TIM2+G', 'TIM2+I+G', 'TIM2+R2', 'TIM2+R3', 'TIM2+R4', 'TIM2+R5', 'TIM2+R6', 'TIM2+R7', 'TIM2+R8', 'TIM2+R9', 'TIM2+R10', 'TIM3e', 'TIM3e+I', 'TIM3e+G', 'TIM3e+I+G', 'TIM3e+R2', 'TIM3e+R3', 'TIM3e+R4', 'TIM3e+R5', 'TIM3e+R6', 'TIM3e+R7', 'TIM3e+R8', 'TIM3e+R9', 'TIM3e+R10', 'TIM3', 'TIM3+I', 'TIM3+G', 'TIM3+I+G', 'TIM3+R2', 'TIM3+R3', 'TIM3+R4', 'TIM3+R5', 'TIM3+R6', 'TIM3+R7', 'TIM3+R8', 'TIM3+R9', 'TIM3+R10', 'TVMe', 'TVMe+I', 'TVMe+G', 'TVMe+I+G', 'TVMe+R2', 'TVMe+R3', 'TVMe+R4', 'TVMe+R5', 'TVMe+R6', 'TVMe+R7', 'TVMe+R8', 'TVMe+R9', 'TVMe+R10', 'TVM', 'TVM+I', 'TVM+G', 'TVM+I+G', 'TVM+R2', 'TVM+R3', 'TVM+R4', 'TVM+R5', 'TVM+R6', 'TVM+R7', 'TVM+R8', 'TVM+R9', 'TVM+R10', 'SYM', 'SYM+I', 'SYM+G', 'SYM+I+G', 'SYM+R2', 'SYM+R3', 'SYM+R4', 'SYM+R5', 'SYM+R6', 'SYM+R7', 'SYM+R8', 'SYM+R9', 'SYM+R10', 'GTR', 'GTR+I', 'GTR+G', 'GTR+I+G', 'GTR+R2', 'GTR+R3', 'GTR+R4', 'GTR+R5', 'GTR+R6', 'GTR+R7', 'GTR+R8', 'GTR+R9', 'GTR+R10', 'MFP', 'TEST')
Model of Nucleotide Substitution. If not provided, IQ-TREE will determine the best fit substitution model automatically.[default:
'MFP'
]- fast:
Bool
Fast search to resemble FastTree.[default:
False
]- alrt:
Int
%
Range
(1000, None)
Single branch test method. Number of bootstrap replicates to perform an SH-like approximate likelihood ratio test (SH-aLRT). Minimum of 1000 replicates is required.[optional]
- seed:
Int
Random number seed for the iqtree parsimony starting tree. This allows you to reproduce tree results. If not supplied then one will be randomly chosen.[optional]
- stop_iter:
Int
%
Range
(1, None)
Number of unsuccessful iterations to stop. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- perturb_nni_strength:
Float
%
Range
(0.01, 1.0)
Perturbation strength for randomized NNI. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
Outputs¶
- alignment:
FeatureData[AlignedSequence]
The aligned sequences.[required]
- masked_alignment:
FeatureData[AlignedSequence]
The masked alignment.[required]
- tree:
Phylogeny[Unrooted]
The unrooted phylogenetic tree.[required]
- rooted_tree:
Phylogeny[Rooted]
The rooted phylogenetic tree.[required]
phylogeny align-to-tree-mafft-raxml¶
This pipeline will start by creating a sequence alignment using MAFFT, after which any alignment columns that are phylogenetically uninformative or ambiguously aligned will be removed (masked). The resulting masked alignment will be used to infer a phylogenetic tree using RAxML, under the specified substitution model, and then subsequently rooted at its midpoint. Output files from each step of the pipeline will be saved. This includes both the unmasked and masked MAFFT alignment from q2-alignment methods, and both the rooted and unrooted phylogenies from q2-phylogeny methods.
Inputs¶
- sequences:
FeatureData[Sequence]
The sequences to be used for creating a iqtree based rooted phylogenetic tree.[required]
Parameters¶
- n_threads:
Threads
The number of threads. (Use
all
to automatically use all available cores. This value is used when aligning the sequences and creating the tree with iqtree.[default:1
]- mask_max_gap_frequency:
Float
%
Range
(0, 1, inclusive_end=True)
The maximum relative frequency of gap characters in a column for the column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive), where 0.0 retains only those columns without gap characters, and 1.0 retains all columns regardless of gap character frequency. This value is used when masking the aligned sequences.[default:
1.0
]- mask_min_conservation:
Float
%
Range
(0, 1, inclusive_end=True)
The minimum relative frequency of at least one non-gap character in a column for that column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive). For example, if a value of 0.4 is provided, a column will only be retained if it contains at least one character that is present in at least 40% of the sequences. This value is used when masking the aligned sequences.[default:
0.4
]- parttree:
Bool
This flag is required if the number of sequences being aligned are larger than 1000000. Disabled by default. NOTE: if using this option, it is recomended that only the CAT-based substitution models of RAxML be considered for this pipeline.[default:
False
]- substitution_model:
Str
%
Choices
('GTRGAMMA', 'GTRGAMMAI', 'GTRCAT', 'GTRCATI')
Model of Nucleotide Substitution.[default:
'GTRGAMMA'
]- seed:
Int
Random number seed for the parsimony starting tree. This allows you to reproduce tree results. If not supplied then one will be randomly chosen.[optional]
- raxml_version:
Str
%
Choices
('Standard', 'SSE3', 'AVX2')
Select a specific CPU optimization of RAxML to use. The SSE3 versions will run approximately 40% faster than the standard version. The AVX2 version will run 10-30% faster than the SSE3 version.[default:
'Standard'
]
Outputs¶
- alignment:
FeatureData[AlignedSequence]
The aligned sequences.[required]
- masked_alignment:
FeatureData[AlignedSequence]
The masked alignment.[required]
- tree:
Phylogeny[Unrooted]
The unrooted phylogenetic tree.[required]
- rooted_tree:
Phylogeny[Rooted]
The rooted phylogenetic tree.[required]
This QIIME 2 plugin supports generating and manipulating phylogenetic trees.
- version:
2024.10.0
- website: https://
github .com /qiime2 /q2 -phylogeny - user support:
- Please post to the QIIME 2 forum for help with this plugin: https://
forum .qiime2 .org
Actions¶
Name | Type | Short Description |
---|---|---|
midpoint-root | method | Midpoint root an unrooted phylogenetic tree. |
fasttree | method | Construct a phylogenetic tree with FastTree. |
raxml | method | Construct a phylogenetic tree with RAxML. |
raxml-rapid-bootstrap | method | Construct a phylogenetic tree with bootstrap supports using RAxML. |
iqtree | method | Construct a phylogenetic tree with IQ-TREE. |
iqtree-ultrafast-bootstrap | method | Construct a phylogenetic tree with IQ-TREE with bootstrap supports. |
filter-table | method | Remove features from table if they're not present in tree. |
filter-tree | method | Remove features from tree based on metadata |
robinson-foulds | method | Calculate Robinson-Foulds distance between phylogenetic trees. |
align-to-tree-mafft-fasttree | pipeline | Build a phylogenetic tree using fasttree and mafft alignment |
align-to-tree-mafft-iqtree | pipeline | Build a phylogenetic tree using iqtree and mafft alignment. |
align-to-tree-mafft-raxml | pipeline | Build a phylogenetic tree using raxml and mafft alignment. |
phylogeny midpoint-root¶
Midpoint root an unrooted phylogenetic tree.
Inputs¶
- tree:
Phylogeny[Unrooted]
The phylogenetic tree to be rooted.[required]
Outputs¶
- rooted_tree:
Phylogeny[Rooted]
The rooted phylogenetic tree.[required]
phylogeny fasttree¶
Construct a phylogenetic tree with FastTree.
Citations¶
Inputs¶
- alignment:
FeatureData[AlignedSequence]
Aligned sequences to be used for phylogenetic reconstruction.[required]
Parameters¶
- n_threads:
Threads
The number of threads. Using more than one thread runs the non-deterministic variant of
FastTree
(FastTreeMP
), and may result in a different tree than single-threading. See http://www .microbesonline .org /fasttree / #OpenMP for details. (Use auto
to automatically use all available cores)[default:1
]
Outputs¶
- tree:
Phylogeny[Unrooted]
The resulting phylogenetic tree.[required]
phylogeny raxml¶
Construct a phylogenetic tree with RAxML. See: https://
Citations¶
Inputs¶
- alignment:
FeatureData[AlignedSequence]
Aligned sequences to be used for phylogenetic reconstruction.[required]
Parameters¶
- seed:
Int
Random number seed for the parsimony starting tree. This allows you to reproduce tree results. If not supplied then one will be randomly chosen.[optional]
- n_searches:
Int
%
Range
(1, None)
The number of independent maximum likelihood searches to perform. The single best scoring tree is returned.[default:
1
]- n_threads:
Threads
The number of threads to use for multithreaded processing. Using more than one thread will enable the PTHREADS version of RAxML.[default:
1
]- raxml_version:
Str
%
Choices
('Standard', 'SSE3', 'AVX2')
Select a specific CPU optimization of RAxML to use. The SSE3 versions will run approximately 40% faster than the standard version. The AVX2 version will run 10-30% faster than the SSE3 version.[default:
'Standard'
]- substitution_model:
Str
%
Choices
('GTRGAMMA', 'GTRGAMMAI', 'GTRCAT', 'GTRCATI')
Model of Nucleotide Substitution.[default:
'GTRGAMMA'
]
Outputs¶
- tree:
Phylogeny[Unrooted]
The resulting phylogenetic tree.[required]
phylogeny raxml-rapid-bootstrap¶
Construct a phylogenetic tree with RAxML with the addition of rapid bootstrapping support values. See: https://
Citations¶
Stamatakis, 2014; Stamatakis et al., 2008
Inputs¶
- alignment:
FeatureData[AlignedSequence]
Aligned sequences to be used for phylogenetic reconstruction.[required]
Parameters¶
- seed:
Int
Random number seed for the parsimony starting tree. This allows you to reproduce tree results. If not supplied then one will be randomly chosen.[optional]
- rapid_bootstrap_seed:
Int
Specify a random seed for rapid bootstrapping. This allows you to reproduce rapid bootstrap results. If not supplied then one will be randomly chosen.[optional]
- bootstrap_replicates:
Int
%
Range
(10, None)
The number of bootstrap searches to perform.[default:
100
]- n_threads:
Threads
The number of threads to use for multithreaded processing. Using more than one thread will enable the PTHREADS version of RAxML.[default:
1
]- raxml_version:
Str
%
Choices
('Standard', 'SSE3', 'AVX2')
Select a specific CPU optimization of RAxML to use. The SSE3 versions will run approximately 40% faster than the standard version. The AVX2 version will run 10-30% faster than the SSE3 version.[default:
'Standard'
]- substitution_model:
Str
%
Choices
('GTRGAMMA', 'GTRGAMMAI', 'GTRCAT', 'GTRCATI')
Model of Nucleotide Substitution[default:
'GTRGAMMA'
]
Outputs¶
- tree:
Phylogeny[Unrooted]
The resulting phylogenetic tree.[required]
phylogeny iqtree¶
Construct a phylogenetic tree using IQ-TREE (http://
Citations¶
Minh et al., 2020; Kalyaanamoorthy et al., 2017
Inputs¶
- alignment:
FeatureData[AlignedSequence]
Aligned sequences to be used for phylogenetic reconstruction.[required]
Parameters¶
- seed:
Int
Random number seed. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_cores:
Threads
The number of cores to use for parallel processing. Use
auto
to let IQ-TREE automatically determine the optimal number of cores to use.[default:1
]- n_cores_max:
Threads
Limits the maximum number of cores to be used when 'n_cores' is set to 'auto'.[optional]
- n_runs:
Int
%
Range
(1, None)
Number of indepedent runs. Multiple independent runs (e.g. 10) can outperform a single run in terms of likelihood maximisation.[default:
1
]- substitution_model:
Str
%
Choices
('JC', 'JC+I', 'JC+G', 'JC+I+G', 'JC+R2', 'JC+R3', 'JC+R4', 'JC+R5', 'JC+R6', 'JC+R7', 'JC+R8', 'JC+R9', 'JC+R10', 'F81', 'F81+I', 'F81+G', 'F81+I+G', 'F81+R2', 'F81+R3', 'F81+R4', 'F81+R5', 'F81+R6', 'F81+R7', 'F81+R8', 'F81+R9', 'F81+R10', 'K80', 'K80+I', 'K80+G', 'K80+I+G', 'K80+R2', 'K80+R3', 'K80+R4', 'K80+R5', 'K80+R6', 'K80+R7', 'K80+R8', 'K80+R9', 'K80+R10', 'HKY', 'HKY+I', 'HKY+G', 'HKY+I+G', 'HKY+R2', 'HKY+R3', 'HKY+R4', 'HKY+R5', 'HKY+R6', 'HKY+R7', 'HKY+R8', 'HKY+R9', 'HKY+R10', 'TNe', 'TNe+I', 'TNe+G', 'TNe+I+G', 'TNe+R2', 'TNe+R3', 'TNe+R4', 'TNe+R5', 'TNe+R6', 'TNe+R7', 'TNe+R8', 'TNe+R9', 'TNe+R10', 'TN', 'TN+I', 'TN+G', 'TN+I+G', 'TN+R2', 'TN+R3', 'TN+R4', 'TN+R5', 'TN+R6', 'TN+R7', 'TN+R8', 'TN+R9', 'TN+R10', 'K81', 'K81+I', 'K81+G', 'K81+I+G', 'K81+R2', 'K81+R3', 'K81+R4', 'K81+R5', 'K81+R6', 'K81+R7', 'K81+R8', 'K81+R9', 'K81+R10', 'K81u', 'K81u+I', 'K81u+G', 'K81u+I+G', 'K81u+R2', 'K81u+R3', 'K81u+R4', 'K81u+R5', 'K81u+R6', 'K81u+R7', 'K81u+R8', 'K81u+R9', 'K81u+R10', 'TPM2', 'TPM2+I', 'TPM2+G', 'TPM2+I+G', 'TPM2+R2', 'TPM2+R3', 'TPM2+R4', 'TPM2+R5', 'TPM2+R6', 'TPM2+R7', 'TPM2+R8', 'TPM2+R9', 'TPM2+R10', 'TPM2u', 'TPM2u+I', 'TPM2u+G', 'TPM2u+I+G', 'TPM2u+R2', 'TPM2u+R3', 'TPM2u+R4', 'TPM2u+R5', 'TPM2u+R6', 'TPM2u+R7', 'TPM2u+R8', 'TPM2u+R9', 'TPM2u+R10', 'TPM3', 'TPM3+I', 'TPM3+G', 'TPM3+I+G', 'TPM3+R2', 'TPM3+R3', 'TPM3+R4', 'TPM3+R5', 'TPM3+R6', 'TPM3+R7', 'TPM3+R8', 'TPM3+R9', 'TPM3+R10', 'TPM3u', 'TPM3u+I', 'TPM3u+G', 'TPM3u+I+G', 'TPM3u+R2', 'TPM3u+R3', 'TPM3u+R4', 'TPM3u+R5', 'TPM3u+R6', 'TPM3u+R7', 'TPM3u+R8', 'TPM3u+R9', 'TPM3u+R10', 'TIMe', 'TIMe+I', 'TIMe+G', 'TIMe+I+G', 'TIMe+R2', 'TIMe+R3', 'TIMe+R4', 'TIMe+R5', 'TIMe+R6', 'TIMe+R7', 'TIMe+R8', 'TIMe+R9', 'TIMe+R10', 'TIM', 'TIM+I', 'TIM+G', 'TIM+I+G', 'TIM+R2', 'TIM+R3', 'TIM+R4', 'TIM+R5', 'TIM+R6', 'TIM+R7', 'TIM+R8', 'TIM+R9', 'TIM+R10', 'TIM2e', 'TIM2e+I', 'TIM2e+G', 'TIM2e+I+G', 'TIM2e+R2', 'TIM2e+R3', 'TIM2e+R4', 'TIM2e+R5', 'TIM2e+R6', 'TIM2e+R7', 'TIM2e+R8', 'TIM2e+R9', 'TIM2e+R10', 'TIM2', 'TIM2+I', 'TIM2+G', 'TIM2+I+G', 'TIM2+R2', 'TIM2+R3', 'TIM2+R4', 'TIM2+R5', 'TIM2+R6', 'TIM2+R7', 'TIM2+R8', 'TIM2+R9', 'TIM2+R10', 'TIM3e', 'TIM3e+I', 'TIM3e+G', 'TIM3e+I+G', 'TIM3e+R2', 'TIM3e+R3', 'TIM3e+R4', 'TIM3e+R5', 'TIM3e+R6', 'TIM3e+R7', 'TIM3e+R8', 'TIM3e+R9', 'TIM3e+R10', 'TIM3', 'TIM3+I', 'TIM3+G', 'TIM3+I+G', 'TIM3+R2', 'TIM3+R3', 'TIM3+R4', 'TIM3+R5', 'TIM3+R6', 'TIM3+R7', 'TIM3+R8', 'TIM3+R9', 'TIM3+R10', 'TVMe', 'TVMe+I', 'TVMe+G', 'TVMe+I+G', 'TVMe+R2', 'TVMe+R3', 'TVMe+R4', 'TVMe+R5', 'TVMe+R6', 'TVMe+R7', 'TVMe+R8', 'TVMe+R9', 'TVMe+R10', 'TVM', 'TVM+I', 'TVM+G', 'TVM+I+G', 'TVM+R2', 'TVM+R3', 'TVM+R4', 'TVM+R5', 'TVM+R6', 'TVM+R7', 'TVM+R8', 'TVM+R9', 'TVM+R10', 'SYM', 'SYM+I', 'SYM+G', 'SYM+I+G', 'SYM+R2', 'SYM+R3', 'SYM+R4', 'SYM+R5', 'SYM+R6', 'SYM+R7', 'SYM+R8', 'SYM+R9', 'SYM+R10', 'GTR', 'GTR+I', 'GTR+G', 'GTR+I+G', 'GTR+R2', 'GTR+R3', 'GTR+R4', 'GTR+R5', 'GTR+R6', 'GTR+R7', 'GTR+R8', 'GTR+R9', 'GTR+R10', 'MFP', 'TEST')
Model of Nucleotide Substitution. If not provided, IQ-TREE will determine the best fit substitution model automatically.[default:
'MFP'
]- n_init_pars_trees:
Int
%
Range
(1, None)
Number of initial parsimony trees. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_top_init_trees:
Int
%
Range
(1, None)
Number of top initial trees. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_best_retain_trees:
Int
%
Range
(1, None)
Number of best trees retained during search. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_iter:
Int
%
Range
(1, None)
Fix number of iterations to stop. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- stop_iter:
Int
%
Range
(1, None)
Number of unsuccessful iterations to stop. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- perturb_nni_strength:
Float
%
Range
(0.01, 1.0)
Perturbation strength for randomized NNI. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- spr_radius:
Int
%
Range
(1, None)
Radius for parsimony SPR search. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- allnni:
Bool
Perform more thorough NNI search.[default:
False
]- fast:
Bool
Fast search to resemble FastTree.[default:
False
]- alrt:
Int
%
Range
(1000, None)
Single branch test method. Number of bootstrap replicates to perform an SH-like approximate likelihood ratio test (SH-aLRT). Minimum of 1000 replicates is required. Can be used with other 'single branch test methods'. Values reported in the order of: alrt, lbp, abayes.[optional]
- abayes:
Bool
Single branch test method. Approximate Bayes test. Can be used with other 'single branch test methods'. Values reported in the order of: alrt, lbp, abayes.[default:
False
]- lbp:
Int
%
Range
(1000, None)
Single branch test method. Number of bootstrap replicates to perform a fast local bootstrap probability method. Minimum of 1000 replicates is required. Can be used with other 'single branch test methods'. Values reported in the order of: alrt, lbp, abayes.[optional]
- safe:
Bool
Safe likelihood kernel to avoid numerical underflow.[default:
False
]
Outputs¶
- tree:
Phylogeny[Unrooted]
The resulting phylogenetic tree.[required]
phylogeny iqtree-ultrafast-bootstrap¶
Construct a phylogenetic tree using IQ-TREE (http://
Citations¶
Minh et al., 2020; Kalyaanamoorthy et al., 2017; Minh et al., 2013; Hoang et al., 2017
Inputs¶
- alignment:
FeatureData[AlignedSequence]
Aligned sequences to be used for phylogenetic reconstruction.[required]
Parameters¶
- seed:
Int
Random number seed. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_cores:
Threads
The number of cores to use for parallel processing. Use
auto
to let IQ-TREE automatically determine the optimal number of cores to use.[default:1
]- n_cores_max:
Threads
Limits the maximum number of cores to be used when 'n_cores' is set to 'auto'.[optional]
- n_runs:
Int
%
Range
(1, None)
Number of indepedent runs. Multiple independent runs (e.g. 10) can outperform a single run in terms of likelihood maximisation.[default:
1
]- substitution_model:
Str
%
Choices
('JC', 'JC+I', 'JC+G', 'JC+I+G', 'JC+R2', 'JC+R3', 'JC+R4', 'JC+R5', 'JC+R6', 'JC+R7', 'JC+R8', 'JC+R9', 'JC+R10', 'F81', 'F81+I', 'F81+G', 'F81+I+G', 'F81+R2', 'F81+R3', 'F81+R4', 'F81+R5', 'F81+R6', 'F81+R7', 'F81+R8', 'F81+R9', 'F81+R10', 'K80', 'K80+I', 'K80+G', 'K80+I+G', 'K80+R2', 'K80+R3', 'K80+R4', 'K80+R5', 'K80+R6', 'K80+R7', 'K80+R8', 'K80+R9', 'K80+R10', 'HKY', 'HKY+I', 'HKY+G', 'HKY+I+G', 'HKY+R2', 'HKY+R3', 'HKY+R4', 'HKY+R5', 'HKY+R6', 'HKY+R7', 'HKY+R8', 'HKY+R9', 'HKY+R10', 'TNe', 'TNe+I', 'TNe+G', 'TNe+I+G', 'TNe+R2', 'TNe+R3', 'TNe+R4', 'TNe+R5', 'TNe+R6', 'TNe+R7', 'TNe+R8', 'TNe+R9', 'TNe+R10', 'TN', 'TN+I', 'TN+G', 'TN+I+G', 'TN+R2', 'TN+R3', 'TN+R4', 'TN+R5', 'TN+R6', 'TN+R7', 'TN+R8', 'TN+R9', 'TN+R10', 'K81', 'K81+I', 'K81+G', 'K81+I+G', 'K81+R2', 'K81+R3', 'K81+R4', 'K81+R5', 'K81+R6', 'K81+R7', 'K81+R8', 'K81+R9', 'K81+R10', 'K81u', 'K81u+I', 'K81u+G', 'K81u+I+G', 'K81u+R2', 'K81u+R3', 'K81u+R4', 'K81u+R5', 'K81u+R6', 'K81u+R7', 'K81u+R8', 'K81u+R9', 'K81u+R10', 'TPM2', 'TPM2+I', 'TPM2+G', 'TPM2+I+G', 'TPM2+R2', 'TPM2+R3', 'TPM2+R4', 'TPM2+R5', 'TPM2+R6', 'TPM2+R7', 'TPM2+R8', 'TPM2+R9', 'TPM2+R10', 'TPM2u', 'TPM2u+I', 'TPM2u+G', 'TPM2u+I+G', 'TPM2u+R2', 'TPM2u+R3', 'TPM2u+R4', 'TPM2u+R5', 'TPM2u+R6', 'TPM2u+R7', 'TPM2u+R8', 'TPM2u+R9', 'TPM2u+R10', 'TPM3', 'TPM3+I', 'TPM3+G', 'TPM3+I+G', 'TPM3+R2', 'TPM3+R3', 'TPM3+R4', 'TPM3+R5', 'TPM3+R6', 'TPM3+R7', 'TPM3+R8', 'TPM3+R9', 'TPM3+R10', 'TPM3u', 'TPM3u+I', 'TPM3u+G', 'TPM3u+I+G', 'TPM3u+R2', 'TPM3u+R3', 'TPM3u+R4', 'TPM3u+R5', 'TPM3u+R6', 'TPM3u+R7', 'TPM3u+R8', 'TPM3u+R9', 'TPM3u+R10', 'TIMe', 'TIMe+I', 'TIMe+G', 'TIMe+I+G', 'TIMe+R2', 'TIMe+R3', 'TIMe+R4', 'TIMe+R5', 'TIMe+R6', 'TIMe+R7', 'TIMe+R8', 'TIMe+R9', 'TIMe+R10', 'TIM', 'TIM+I', 'TIM+G', 'TIM+I+G', 'TIM+R2', 'TIM+R3', 'TIM+R4', 'TIM+R5', 'TIM+R6', 'TIM+R7', 'TIM+R8', 'TIM+R9', 'TIM+R10', 'TIM2e', 'TIM2e+I', 'TIM2e+G', 'TIM2e+I+G', 'TIM2e+R2', 'TIM2e+R3', 'TIM2e+R4', 'TIM2e+R5', 'TIM2e+R6', 'TIM2e+R7', 'TIM2e+R8', 'TIM2e+R9', 'TIM2e+R10', 'TIM2', 'TIM2+I', 'TIM2+G', 'TIM2+I+G', 'TIM2+R2', 'TIM2+R3', 'TIM2+R4', 'TIM2+R5', 'TIM2+R6', 'TIM2+R7', 'TIM2+R8', 'TIM2+R9', 'TIM2+R10', 'TIM3e', 'TIM3e+I', 'TIM3e+G', 'TIM3e+I+G', 'TIM3e+R2', 'TIM3e+R3', 'TIM3e+R4', 'TIM3e+R5', 'TIM3e+R6', 'TIM3e+R7', 'TIM3e+R8', 'TIM3e+R9', 'TIM3e+R10', 'TIM3', 'TIM3+I', 'TIM3+G', 'TIM3+I+G', 'TIM3+R2', 'TIM3+R3', 'TIM3+R4', 'TIM3+R5', 'TIM3+R6', 'TIM3+R7', 'TIM3+R8', 'TIM3+R9', 'TIM3+R10', 'TVMe', 'TVMe+I', 'TVMe+G', 'TVMe+I+G', 'TVMe+R2', 'TVMe+R3', 'TVMe+R4', 'TVMe+R5', 'TVMe+R6', 'TVMe+R7', 'TVMe+R8', 'TVMe+R9', 'TVMe+R10', 'TVM', 'TVM+I', 'TVM+G', 'TVM+I+G', 'TVM+R2', 'TVM+R3', 'TVM+R4', 'TVM+R5', 'TVM+R6', 'TVM+R7', 'TVM+R8', 'TVM+R9', 'TVM+R10', 'SYM', 'SYM+I', 'SYM+G', 'SYM+I+G', 'SYM+R2', 'SYM+R3', 'SYM+R4', 'SYM+R5', 'SYM+R6', 'SYM+R7', 'SYM+R8', 'SYM+R9', 'SYM+R10', 'GTR', 'GTR+I', 'GTR+G', 'GTR+I+G', 'GTR+R2', 'GTR+R3', 'GTR+R4', 'GTR+R5', 'GTR+R6', 'GTR+R7', 'GTR+R8', 'GTR+R9', 'GTR+R10', 'MFP', 'TEST')
Model of Nucleotide Substitution.If not provided, IQ-TREE will determine the best fit substitution model automatically. [default:
'MFP'
]- bootstrap_replicates:
Int
%
Range
(1000, None)
The number of bootstrap searches to perform. Minimum of 1000 recomended. [default:
1000
]- n_init_pars_trees:
Int
%
Range
(1, None)
Number of initial parsimony trees. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_top_init_trees:
Int
%
Range
(1, None)
Number of top initial trees. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_best_retain_trees:
Int
%
Range
(1, None)
Number of best trees retained during search. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- stop_iter:
Int
%
Range
(1, None)
Number of unsuccessful iterations to stop. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- perturb_nni_strength:
Float
%
Range
(0.01, 1.0)
Perturbation strength for randomized NNI. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- spr_radius:
Int
%
Range
(1, None)
Radius for parsimony SPR search. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_max_ufboot_iter:
Int
%
Range
(1, None)
Maximum number of iterations. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_ufboot_steps:
Int
%
Range
(1, None)
Number of iterations for UFBoot stopping rule. If not set, program defaults will be used.See IQ-TREE manual for details.[optional]
- min_cor_ufboot:
Float
%
Range
(0.51, 0.99)
Minimum correlation coefficient. If not set, program defaults will be used.See IQ-TREE manual for details.[optional]
- ep_break_ufboot:
Float
%
Range
(0.01, 0.99)
Epsilon value to break tie. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- allnni:
Bool
Perform more thorough NNI search.[default:
False
]- alrt:
Int
%
Range
(1000, None)
Single branch test method. Number of bootstrap replicates to perform an SH-like approximate likelihood ratio test (SH-aLRT). Minimum of 1000 replicates is required. Can be used with other 'single branch test methods'. Values reported in the order of: alrt, lbp, abayes.[optional]
- abayes:
Bool
Single branch test method. Performs an approximate Bayes test. Can be used with other 'single branch test methods' and ultrafast bootstrap. Values reported in the order of: alrt, lbp, abayes, ufboot.[default:
False
]- lbp:
Int
%
Range
(1000, None)
Single branch test method. Number of bootstrap replicates to perform a fast local bootstrap probability method. Minimum of 1000 replicates is required. Can be used with other 'single branch test methods'. Values reported in the order of: alrt, lbp, abayes, ufboot.[optional]
- bnni:
Bool
Optimize UFBoot trees by NNI on bootstrap alignment. This option reduces the risk of overestimating branch supports with UFBoot due to severe model violations.[default:
False
]- safe:
Bool
Safe likelihood kernel to avoid numerical underflow.[default:
False
]
Outputs¶
- tree:
Phylogeny[Unrooted]
The resulting phylogenetic tree.[required]
phylogeny filter-table¶
Remove features from a feature table if their identifiers are not tip identifiers in tree.
Inputs¶
- table:
FeatureTable[Frequency¹ | RelativeFrequency² | PresenceAbsence³]
Feature table that features should be filtered from.[required]
- tree:
Phylogeny[Rooted | Unrooted]
Tree where tip identifiers are the feature identifiers that should be retained in the table.[required]
Outputs¶
- filtered_table:
FeatureTable[Frequency¹ | RelativeFrequency² | PresenceAbsence³]
The resulting feature table.[required]
phylogeny filter-tree¶
Remove tips from a tree if their identifiers based on a set of provided identifiers.
Inputs¶
- tree:
Phylogeny[Rooted¹ | Unrooted²]
Tree that should be filtered[required]
- table:
FeatureTable[Frequency | RelativeFrequency | PresenceAbsence | Composition]
Feature table which contains the identifier that should be retained in the tree[optional]
Parameters¶
- metadata:
Metadata
Feature metadata to use with the 'where' statement or to select tips to be retained. Metadata objects could also include FeatureData[Sequence] data types, if, forinstance, you want to filter to match represenative sequencces.[optional]
- where:
Str
SQLite WHERE clause specifying sample metadata criteria that must be met to be included in the filtered feature table. If not provided, all samples in
metadata
that are also in the feature table will be retained.[optional]
Outputs¶
- filtered_tree:
Phylogeny[Rooted¹ | Unrooted²]
The resulting phylogenetic tree.[required]
phylogeny robinson-foulds¶
Calculate the Robinson-Foulds symmetric difference metric between two or more phylogenetic trees.
Citations¶
Robinson & Foulds, 1981
Inputs¶
- trees:
List
[
Phylogeny[Rooted | Unrooted]
]
Phylogenetic trees to compare with Robinson-Foulds. Rooting information and branch lengths are ignored by this metric.[required]
Parameters¶
- labels:
List
[
Str
]
Labels to use for the tree names in the distance matrix. If ommited, labels will be "tree_n" where "n" ranges from 1..N. The number of labels must match the number of trees.[optional]
- missing_tips:
Str
%
Choices
('error', 'intersect-all')
How to handle tips that are not shared between trees. "error" will raise an error if the set of tips is not identical between all input trees. "intersect-all" will remove tips that are not shared between all trees before computing distances beteen trees.[default:
'error'
]
Outputs¶
- distance_matrix:
DistanceMatrix
The distances between trees as a symmetric matrix.[required]
phylogeny align-to-tree-mafft-fasttree¶
This pipeline will start by creating a sequence alignment using MAFFT, after which any alignment columns that are phylogenetically uninformative or ambiguously aligned will be removed (masked). The resulting masked alignment will be used to infer a phylogenetic tree and then subsequently rooted at its midpoint. Output files from each step of the pipeline will be saved. This includes both the unmasked and masked MAFFT alignment from q2-alignment methods, and both the rooted and unrooted phylogenies from q2-phylogeny methods.
Inputs¶
- sequences:
FeatureData[Sequence]
The sequences to be used for creating a fasttree based rooted phylogenetic tree.[required]
Parameters¶
- n_threads:
Threads
The number of threads. (Use
auto
to automatically use all available cores) This value is used when aligning the sequences and creating the tree with fasttree.[default:1
]- mask_max_gap_frequency:
Float
%
Range
(0, 1, inclusive_end=True)
The maximum relative frequency of gap characters in a column for the column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive), where 0.0 retains only those columns without gap characters, and 1.0 retains all columns regardless of gap character frequency. This value is used when masking the aligned sequences.[default:
1.0
]- mask_min_conservation:
Float
%
Range
(0, 1, inclusive_end=True)
The minimum relative frequency of at least one non-gap character in a column for that column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive). For example, if a value of 0.4 is provided, a column will only be retained if it contains at least one character that is present in at least 40% of the sequences. This value is used when masking the aligned sequences.[default:
0.4
]- parttree:
Bool
This flag is required if the number of sequences being aligned are larger than 1000000. Disabled by default.[default:
False
]
Outputs¶
- alignment:
FeatureData[AlignedSequence]
The aligned sequences.[required]
- masked_alignment:
FeatureData[AlignedSequence]
The masked alignment.[required]
- tree:
Phylogeny[Unrooted]
The unrooted phylogenetic tree.[required]
- rooted_tree:
Phylogeny[Rooted]
The rooted phylogenetic tree.[required]
Examples¶
align_to_tree_mafft_fasttree¶
wget -O 'rep-seqs.qza' \
'https://amplicon-docs.qiime2.org/en/latest/data/examples/phylogeny/align-to-tree-mafft-fasttree/1/rep-seqs.qza'
qiime phylogeny align-to-tree-mafft-fasttree \
--i-sequences rep-seqs.qza \
--o-alignment aligned-rep-seqs.qza \
--o-masked-alignment masked-aligned-rep-seqs.qza \
--o-tree unrooted-tree.qza \
--o-rooted-tree rooted-tree.qza
from qiime2 import Artifact
from urllib import request
import qiime2.plugins.phylogeny.actions as phylogeny_actions
url = 'https://amplicon-docs.qiime2.org/en/latest/data/examples/phylogeny/align-to-tree-mafft-fasttree/1/rep-seqs.qza'
fn = 'rep-seqs.qza'
request.urlretrieve(url, fn)
rep_seqs = Artifact.load(fn)
aligned_rep_seqs, masked_aligned_rep_seqs, unrooted_tree, rooted_tree = phylogeny_actions.align_to_tree_mafft_fasttree(
sequences=rep_seqs,
)
- Using the
Upload Data
tool: - On the first tab (Regular), press the
Paste/Fetch
data button at the bottom.- Set "Name" (first text-field) to:
rep-seqs.qza
- In the larger text-area, copy-and-paste: https://
amplicon -docs .qiime2 .org /en /latest /data /examples /phylogeny /align -to -tree -mafft -fasttree /1 /rep -seqs .qza - ("Type", "Genome", and "Settings" can be ignored)
- Set "Name" (first text-field) to:
- Press the
Start
button at the bottom.
- On the first tab (Regular), press the
- Using the
qiime2 phylogeny align-to-tree-mafft-fasttree
tool: - Set "sequences" to
#: rep-seqs.qza
- Press the
Execute
button.
- Set "sequences" to
- Once completed, for each new entry in your history, use the
Edit
button to set the name as follows: - (Renaming is optional, but it will make any subsequent steps easier to complete.)
History Name "Name" to set (be sure to press [Save]) #: qiime2 phylogeny align-to-tree-mafft-fasttree [...] : alignment.qza
aligned-rep-seqs.qza
#: qiime2 phylogeny align-to-tree-mafft-fasttree [...] : masked_alignment.qza
masked-aligned-rep-seqs.qza
#: qiime2 phylogeny align-to-tree-mafft-fasttree [...] : tree.qza
unrooted-tree.qza
#: qiime2 phylogeny align-to-tree-mafft-fasttree [...] : rooted_tree.qza
rooted-tree.qza
library(reticulate)
Artifact <- import("qiime2")$Artifact
phylogeny_actions <- import("qiime2.plugins.phylogeny.actions")
request <- import("urllib")$request
url <- 'https://amplicon-docs.qiime2.org/en/latest/data/examples/phylogeny/align-to-tree-mafft-fasttree/1/rep-seqs.qza'
fn <- 'rep-seqs.qza'
request$urlretrieve(url, fn)
rep_seqs <- Artifact$load(fn)
action_results <- phylogeny_actions$align_to_tree_mafft_fasttree(
sequences=rep_seqs,
)
aligned_rep_seqs <- action_results$alignment
masked_aligned_rep_seqs <- action_results$masked_alignment
unrooted_tree <- action_results$tree
rooted_tree <- action_results$rooted_tree
from q2_phylogeny._examples import phylogeny_align_to_tree_mafft_fasttree
phylogeny_align_to_tree_mafft_fasttree(use)
phylogeny align-to-tree-mafft-iqtree¶
This pipeline will start by creating a sequence alignment using MAFFT, after which any alignment columns that are phylogenetically uninformative or ambiguously aligned will be removed (masked). The resulting masked alignment will be used to infer a phylogenetic tree using IQ-TREE. By default the best fit substitution model will be determined by ModelFinder prior to phylogenetic inference. The resulting tree will be subsequently rooted at its midpoint. Output files from each step of the pipeline will be saved. This includes both the unmasked and masked MAFFT alignment from q2-alignment methods, and both the rooted and unrooted phylogenies from q2-phylogeny methods.
Inputs¶
- sequences:
FeatureData[Sequence]
The sequences to be used for creating a iqtree based rooted phylogenetic tree.[required]
Parameters¶
- n_threads:
Threads
The number of threads. (Use 0 to automatically use all available cores This value is used when aligning the sequences and creating the tree with iqtree.[default:
1
]- mask_max_gap_frequency:
Float
%
Range
(0, 1, inclusive_end=True)
The maximum relative frequency of gap characters in a column for the column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive), where 0.0 retains only those columns without gap characters, and 1.0 retains all columns regardless of gap character frequency. This value is used when masking the aligned sequences.[default:
1.0
]- mask_min_conservation:
Float
%
Range
(0, 1, inclusive_end=True)
The minimum relative frequency of at least one non-gap character in a column for that column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive). For example, if a value of 0.4 is provided, a column will only be retained if it contains at least one character that is present in at least 40% of the sequences. This value is used when masking the aligned sequences.[default:
0.4
]- substitution_model:
Str
%
Choices
('JC', 'JC+I', 'JC+G', 'JC+I+G', 'JC+R2', 'JC+R3', 'JC+R4', 'JC+R5', 'JC+R6', 'JC+R7', 'JC+R8', 'JC+R9', 'JC+R10', 'F81', 'F81+I', 'F81+G', 'F81+I+G', 'F81+R2', 'F81+R3', 'F81+R4', 'F81+R5', 'F81+R6', 'F81+R7', 'F81+R8', 'F81+R9', 'F81+R10', 'K80', 'K80+I', 'K80+G', 'K80+I+G', 'K80+R2', 'K80+R3', 'K80+R4', 'K80+R5', 'K80+R6', 'K80+R7', 'K80+R8', 'K80+R9', 'K80+R10', 'HKY', 'HKY+I', 'HKY+G', 'HKY+I+G', 'HKY+R2', 'HKY+R3', 'HKY+R4', 'HKY+R5', 'HKY+R6', 'HKY+R7', 'HKY+R8', 'HKY+R9', 'HKY+R10', 'TNe', 'TNe+I', 'TNe+G', 'TNe+I+G', 'TNe+R2', 'TNe+R3', 'TNe+R4', 'TNe+R5', 'TNe+R6', 'TNe+R7', 'TNe+R8', 'TNe+R9', 'TNe+R10', 'TN', 'TN+I', 'TN+G', 'TN+I+G', 'TN+R2', 'TN+R3', 'TN+R4', 'TN+R5', 'TN+R6', 'TN+R7', 'TN+R8', 'TN+R9', 'TN+R10', 'K81', 'K81+I', 'K81+G', 'K81+I+G', 'K81+R2', 'K81+R3', 'K81+R4', 'K81+R5', 'K81+R6', 'K81+R7', 'K81+R8', 'K81+R9', 'K81+R10', 'K81u', 'K81u+I', 'K81u+G', 'K81u+I+G', 'K81u+R2', 'K81u+R3', 'K81u+R4', 'K81u+R5', 'K81u+R6', 'K81u+R7', 'K81u+R8', 'K81u+R9', 'K81u+R10', 'TPM2', 'TPM2+I', 'TPM2+G', 'TPM2+I+G', 'TPM2+R2', 'TPM2+R3', 'TPM2+R4', 'TPM2+R5', 'TPM2+R6', 'TPM2+R7', 'TPM2+R8', 'TPM2+R9', 'TPM2+R10', 'TPM2u', 'TPM2u+I', 'TPM2u+G', 'TPM2u+I+G', 'TPM2u+R2', 'TPM2u+R3', 'TPM2u+R4', 'TPM2u+R5', 'TPM2u+R6', 'TPM2u+R7', 'TPM2u+R8', 'TPM2u+R9', 'TPM2u+R10', 'TPM3', 'TPM3+I', 'TPM3+G', 'TPM3+I+G', 'TPM3+R2', 'TPM3+R3', 'TPM3+R4', 'TPM3+R5', 'TPM3+R6', 'TPM3+R7', 'TPM3+R8', 'TPM3+R9', 'TPM3+R10', 'TPM3u', 'TPM3u+I', 'TPM3u+G', 'TPM3u+I+G', 'TPM3u+R2', 'TPM3u+R3', 'TPM3u+R4', 'TPM3u+R5', 'TPM3u+R6', 'TPM3u+R7', 'TPM3u+R8', 'TPM3u+R9', 'TPM3u+R10', 'TIMe', 'TIMe+I', 'TIMe+G', 'TIMe+I+G', 'TIMe+R2', 'TIMe+R3', 'TIMe+R4', 'TIMe+R5', 'TIMe+R6', 'TIMe+R7', 'TIMe+R8', 'TIMe+R9', 'TIMe+R10', 'TIM', 'TIM+I', 'TIM+G', 'TIM+I+G', 'TIM+R2', 'TIM+R3', 'TIM+R4', 'TIM+R5', 'TIM+R6', 'TIM+R7', 'TIM+R8', 'TIM+R9', 'TIM+R10', 'TIM2e', 'TIM2e+I', 'TIM2e+G', 'TIM2e+I+G', 'TIM2e+R2', 'TIM2e+R3', 'TIM2e+R4', 'TIM2e+R5', 'TIM2e+R6', 'TIM2e+R7', 'TIM2e+R8', 'TIM2e+R9', 'TIM2e+R10', 'TIM2', 'TIM2+I', 'TIM2+G', 'TIM2+I+G', 'TIM2+R2', 'TIM2+R3', 'TIM2+R4', 'TIM2+R5', 'TIM2+R6', 'TIM2+R7', 'TIM2+R8', 'TIM2+R9', 'TIM2+R10', 'TIM3e', 'TIM3e+I', 'TIM3e+G', 'TIM3e+I+G', 'TIM3e+R2', 'TIM3e+R3', 'TIM3e+R4', 'TIM3e+R5', 'TIM3e+R6', 'TIM3e+R7', 'TIM3e+R8', 'TIM3e+R9', 'TIM3e+R10', 'TIM3', 'TIM3+I', 'TIM3+G', 'TIM3+I+G', 'TIM3+R2', 'TIM3+R3', 'TIM3+R4', 'TIM3+R5', 'TIM3+R6', 'TIM3+R7', 'TIM3+R8', 'TIM3+R9', 'TIM3+R10', 'TVMe', 'TVMe+I', 'TVMe+G', 'TVMe+I+G', 'TVMe+R2', 'TVMe+R3', 'TVMe+R4', 'TVMe+R5', 'TVMe+R6', 'TVMe+R7', 'TVMe+R8', 'TVMe+R9', 'TVMe+R10', 'TVM', 'TVM+I', 'TVM+G', 'TVM+I+G', 'TVM+R2', 'TVM+R3', 'TVM+R4', 'TVM+R5', 'TVM+R6', 'TVM+R7', 'TVM+R8', 'TVM+R9', 'TVM+R10', 'SYM', 'SYM+I', 'SYM+G', 'SYM+I+G', 'SYM+R2', 'SYM+R3', 'SYM+R4', 'SYM+R5', 'SYM+R6', 'SYM+R7', 'SYM+R8', 'SYM+R9', 'SYM+R10', 'GTR', 'GTR+I', 'GTR+G', 'GTR+I+G', 'GTR+R2', 'GTR+R3', 'GTR+R4', 'GTR+R5', 'GTR+R6', 'GTR+R7', 'GTR+R8', 'GTR+R9', 'GTR+R10', 'MFP', 'TEST')
Model of Nucleotide Substitution. If not provided, IQ-TREE will determine the best fit substitution model automatically.[default:
'MFP'
]- fast:
Bool
Fast search to resemble FastTree.[default:
False
]- alrt:
Int
%
Range
(1000, None)
Single branch test method. Number of bootstrap replicates to perform an SH-like approximate likelihood ratio test (SH-aLRT). Minimum of 1000 replicates is required.[optional]
- seed:
Int
Random number seed for the iqtree parsimony starting tree. This allows you to reproduce tree results. If not supplied then one will be randomly chosen.[optional]
- stop_iter:
Int
%
Range
(1, None)
Number of unsuccessful iterations to stop. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- perturb_nni_strength:
Float
%
Range
(0.01, 1.0)
Perturbation strength for randomized NNI. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
Outputs¶
- alignment:
FeatureData[AlignedSequence]
The aligned sequences.[required]
- masked_alignment:
FeatureData[AlignedSequence]
The masked alignment.[required]
- tree:
Phylogeny[Unrooted]
The unrooted phylogenetic tree.[required]
- rooted_tree:
Phylogeny[Rooted]
The rooted phylogenetic tree.[required]
phylogeny align-to-tree-mafft-raxml¶
This pipeline will start by creating a sequence alignment using MAFFT, after which any alignment columns that are phylogenetically uninformative or ambiguously aligned will be removed (masked). The resulting masked alignment will be used to infer a phylogenetic tree using RAxML, under the specified substitution model, and then subsequently rooted at its midpoint. Output files from each step of the pipeline will be saved. This includes both the unmasked and masked MAFFT alignment from q2-alignment methods, and both the rooted and unrooted phylogenies from q2-phylogeny methods.
Inputs¶
- sequences:
FeatureData[Sequence]
The sequences to be used for creating a iqtree based rooted phylogenetic tree.[required]
Parameters¶
- n_threads:
Threads
The number of threads. (Use
all
to automatically use all available cores. This value is used when aligning the sequences and creating the tree with iqtree.[default:1
]- mask_max_gap_frequency:
Float
%
Range
(0, 1, inclusive_end=True)
The maximum relative frequency of gap characters in a column for the column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive), where 0.0 retains only those columns without gap characters, and 1.0 retains all columns regardless of gap character frequency. This value is used when masking the aligned sequences.[default:
1.0
]- mask_min_conservation:
Float
%
Range
(0, 1, inclusive_end=True)
The minimum relative frequency of at least one non-gap character in a column for that column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive). For example, if a value of 0.4 is provided, a column will only be retained if it contains at least one character that is present in at least 40% of the sequences. This value is used when masking the aligned sequences.[default:
0.4
]- parttree:
Bool
This flag is required if the number of sequences being aligned are larger than 1000000. Disabled by default. NOTE: if using this option, it is recomended that only the CAT-based substitution models of RAxML be considered for this pipeline.[default:
False
]- substitution_model:
Str
%
Choices
('GTRGAMMA', 'GTRGAMMAI', 'GTRCAT', 'GTRCATI')
Model of Nucleotide Substitution.[default:
'GTRGAMMA'
]- seed:
Int
Random number seed for the parsimony starting tree. This allows you to reproduce tree results. If not supplied then one will be randomly chosen.[optional]
- raxml_version:
Str
%
Choices
('Standard', 'SSE3', 'AVX2')
Select a specific CPU optimization of RAxML to use. The SSE3 versions will run approximately 40% faster than the standard version. The AVX2 version will run 10-30% faster than the SSE3 version.[default:
'Standard'
]
Outputs¶
- alignment:
FeatureData[AlignedSequence]
The aligned sequences.[required]
- masked_alignment:
FeatureData[AlignedSequence]
The masked alignment.[required]
- tree:
Phylogeny[Unrooted]
The unrooted phylogenetic tree.[required]
- rooted_tree:
Phylogeny[Rooted]
The rooted phylogenetic tree.[required]
This QIIME 2 plugin supports generating and manipulating phylogenetic trees.
- version:
2024.10.0
- website: https://
github .com /qiime2 /q2 -phylogeny - user support:
- Please post to the QIIME 2 forum for help with this plugin: https://
forum .qiime2 .org
Actions¶
Name | Type | Short Description |
---|---|---|
midpoint-root | method | Midpoint root an unrooted phylogenetic tree. |
fasttree | method | Construct a phylogenetic tree with FastTree. |
raxml | method | Construct a phylogenetic tree with RAxML. |
raxml-rapid-bootstrap | method | Construct a phylogenetic tree with bootstrap supports using RAxML. |
iqtree | method | Construct a phylogenetic tree with IQ-TREE. |
iqtree-ultrafast-bootstrap | method | Construct a phylogenetic tree with IQ-TREE with bootstrap supports. |
filter-table | method | Remove features from table if they're not present in tree. |
filter-tree | method | Remove features from tree based on metadata |
robinson-foulds | method | Calculate Robinson-Foulds distance between phylogenetic trees. |
align-to-tree-mafft-fasttree | pipeline | Build a phylogenetic tree using fasttree and mafft alignment |
align-to-tree-mafft-iqtree | pipeline | Build a phylogenetic tree using iqtree and mafft alignment. |
align-to-tree-mafft-raxml | pipeline | Build a phylogenetic tree using raxml and mafft alignment. |
phylogeny midpoint-root¶
Midpoint root an unrooted phylogenetic tree.
Inputs¶
- tree:
Phylogeny[Unrooted]
The phylogenetic tree to be rooted.[required]
Outputs¶
- rooted_tree:
Phylogeny[Rooted]
The rooted phylogenetic tree.[required]
phylogeny fasttree¶
Construct a phylogenetic tree with FastTree.
Citations¶
Inputs¶
- alignment:
FeatureData[AlignedSequence]
Aligned sequences to be used for phylogenetic reconstruction.[required]
Parameters¶
- n_threads:
Threads
The number of threads. Using more than one thread runs the non-deterministic variant of
FastTree
(FastTreeMP
), and may result in a different tree than single-threading. See http://www .microbesonline .org /fasttree / #OpenMP for details. (Use auto
to automatically use all available cores)[default:1
]
Outputs¶
- tree:
Phylogeny[Unrooted]
The resulting phylogenetic tree.[required]
phylogeny raxml¶
Construct a phylogenetic tree with RAxML. See: https://
Citations¶
Inputs¶
- alignment:
FeatureData[AlignedSequence]
Aligned sequences to be used for phylogenetic reconstruction.[required]
Parameters¶
- seed:
Int
Random number seed for the parsimony starting tree. This allows you to reproduce tree results. If not supplied then one will be randomly chosen.[optional]
- n_searches:
Int
%
Range
(1, None)
The number of independent maximum likelihood searches to perform. The single best scoring tree is returned.[default:
1
]- n_threads:
Threads
The number of threads to use for multithreaded processing. Using more than one thread will enable the PTHREADS version of RAxML.[default:
1
]- raxml_version:
Str
%
Choices
('Standard', 'SSE3', 'AVX2')
Select a specific CPU optimization of RAxML to use. The SSE3 versions will run approximately 40% faster than the standard version. The AVX2 version will run 10-30% faster than the SSE3 version.[default:
'Standard'
]- substitution_model:
Str
%
Choices
('GTRGAMMA', 'GTRGAMMAI', 'GTRCAT', 'GTRCATI')
Model of Nucleotide Substitution.[default:
'GTRGAMMA'
]
Outputs¶
- tree:
Phylogeny[Unrooted]
The resulting phylogenetic tree.[required]
phylogeny raxml-rapid-bootstrap¶
Construct a phylogenetic tree with RAxML with the addition of rapid bootstrapping support values. See: https://
Citations¶
Stamatakis, 2014; Stamatakis et al., 2008
Inputs¶
- alignment:
FeatureData[AlignedSequence]
Aligned sequences to be used for phylogenetic reconstruction.[required]
Parameters¶
- seed:
Int
Random number seed for the parsimony starting tree. This allows you to reproduce tree results. If not supplied then one will be randomly chosen.[optional]
- rapid_bootstrap_seed:
Int
Specify a random seed for rapid bootstrapping. This allows you to reproduce rapid bootstrap results. If not supplied then one will be randomly chosen.[optional]
- bootstrap_replicates:
Int
%
Range
(10, None)
The number of bootstrap searches to perform.[default:
100
]- n_threads:
Threads
The number of threads to use for multithreaded processing. Using more than one thread will enable the PTHREADS version of RAxML.[default:
1
]- raxml_version:
Str
%
Choices
('Standard', 'SSE3', 'AVX2')
Select a specific CPU optimization of RAxML to use. The SSE3 versions will run approximately 40% faster than the standard version. The AVX2 version will run 10-30% faster than the SSE3 version.[default:
'Standard'
]- substitution_model:
Str
%
Choices
('GTRGAMMA', 'GTRGAMMAI', 'GTRCAT', 'GTRCATI')
Model of Nucleotide Substitution[default:
'GTRGAMMA'
]
Outputs¶
- tree:
Phylogeny[Unrooted]
The resulting phylogenetic tree.[required]
phylogeny iqtree¶
Construct a phylogenetic tree using IQ-TREE (http://
Citations¶
Minh et al., 2020; Kalyaanamoorthy et al., 2017
Inputs¶
- alignment:
FeatureData[AlignedSequence]
Aligned sequences to be used for phylogenetic reconstruction.[required]
Parameters¶
- seed:
Int
Random number seed. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_cores:
Threads
The number of cores to use for parallel processing. Use
auto
to let IQ-TREE automatically determine the optimal number of cores to use.[default:1
]- n_cores_max:
Threads
Limits the maximum number of cores to be used when 'n_cores' is set to 'auto'.[optional]
- n_runs:
Int
%
Range
(1, None)
Number of indepedent runs. Multiple independent runs (e.g. 10) can outperform a single run in terms of likelihood maximisation.[default:
1
]- substitution_model:
Str
%
Choices
('JC', 'JC+I', 'JC+G', 'JC+I+G', 'JC+R2', 'JC+R3', 'JC+R4', 'JC+R5', 'JC+R6', 'JC+R7', 'JC+R8', 'JC+R9', 'JC+R10', 'F81', 'F81+I', 'F81+G', 'F81+I+G', 'F81+R2', 'F81+R3', 'F81+R4', 'F81+R5', 'F81+R6', 'F81+R7', 'F81+R8', 'F81+R9', 'F81+R10', 'K80', 'K80+I', 'K80+G', 'K80+I+G', 'K80+R2', 'K80+R3', 'K80+R4', 'K80+R5', 'K80+R6', 'K80+R7', 'K80+R8', 'K80+R9', 'K80+R10', 'HKY', 'HKY+I', 'HKY+G', 'HKY+I+G', 'HKY+R2', 'HKY+R3', 'HKY+R4', 'HKY+R5', 'HKY+R6', 'HKY+R7', 'HKY+R8', 'HKY+R9', 'HKY+R10', 'TNe', 'TNe+I', 'TNe+G', 'TNe+I+G', 'TNe+R2', 'TNe+R3', 'TNe+R4', 'TNe+R5', 'TNe+R6', 'TNe+R7', 'TNe+R8', 'TNe+R9', 'TNe+R10', 'TN', 'TN+I', 'TN+G', 'TN+I+G', 'TN+R2', 'TN+R3', 'TN+R4', 'TN+R5', 'TN+R6', 'TN+R7', 'TN+R8', 'TN+R9', 'TN+R10', 'K81', 'K81+I', 'K81+G', 'K81+I+G', 'K81+R2', 'K81+R3', 'K81+R4', 'K81+R5', 'K81+R6', 'K81+R7', 'K81+R8', 'K81+R9', 'K81+R10', 'K81u', 'K81u+I', 'K81u+G', 'K81u+I+G', 'K81u+R2', 'K81u+R3', 'K81u+R4', 'K81u+R5', 'K81u+R6', 'K81u+R7', 'K81u+R8', 'K81u+R9', 'K81u+R10', 'TPM2', 'TPM2+I', 'TPM2+G', 'TPM2+I+G', 'TPM2+R2', 'TPM2+R3', 'TPM2+R4', 'TPM2+R5', 'TPM2+R6', 'TPM2+R7', 'TPM2+R8', 'TPM2+R9', 'TPM2+R10', 'TPM2u', 'TPM2u+I', 'TPM2u+G', 'TPM2u+I+G', 'TPM2u+R2', 'TPM2u+R3', 'TPM2u+R4', 'TPM2u+R5', 'TPM2u+R6', 'TPM2u+R7', 'TPM2u+R8', 'TPM2u+R9', 'TPM2u+R10', 'TPM3', 'TPM3+I', 'TPM3+G', 'TPM3+I+G', 'TPM3+R2', 'TPM3+R3', 'TPM3+R4', 'TPM3+R5', 'TPM3+R6', 'TPM3+R7', 'TPM3+R8', 'TPM3+R9', 'TPM3+R10', 'TPM3u', 'TPM3u+I', 'TPM3u+G', 'TPM3u+I+G', 'TPM3u+R2', 'TPM3u+R3', 'TPM3u+R4', 'TPM3u+R5', 'TPM3u+R6', 'TPM3u+R7', 'TPM3u+R8', 'TPM3u+R9', 'TPM3u+R10', 'TIMe', 'TIMe+I', 'TIMe+G', 'TIMe+I+G', 'TIMe+R2', 'TIMe+R3', 'TIMe+R4', 'TIMe+R5', 'TIMe+R6', 'TIMe+R7', 'TIMe+R8', 'TIMe+R9', 'TIMe+R10', 'TIM', 'TIM+I', 'TIM+G', 'TIM+I+G', 'TIM+R2', 'TIM+R3', 'TIM+R4', 'TIM+R5', 'TIM+R6', 'TIM+R7', 'TIM+R8', 'TIM+R9', 'TIM+R10', 'TIM2e', 'TIM2e+I', 'TIM2e+G', 'TIM2e+I+G', 'TIM2e+R2', 'TIM2e+R3', 'TIM2e+R4', 'TIM2e+R5', 'TIM2e+R6', 'TIM2e+R7', 'TIM2e+R8', 'TIM2e+R9', 'TIM2e+R10', 'TIM2', 'TIM2+I', 'TIM2+G', 'TIM2+I+G', 'TIM2+R2', 'TIM2+R3', 'TIM2+R4', 'TIM2+R5', 'TIM2+R6', 'TIM2+R7', 'TIM2+R8', 'TIM2+R9', 'TIM2+R10', 'TIM3e', 'TIM3e+I', 'TIM3e+G', 'TIM3e+I+G', 'TIM3e+R2', 'TIM3e+R3', 'TIM3e+R4', 'TIM3e+R5', 'TIM3e+R6', 'TIM3e+R7', 'TIM3e+R8', 'TIM3e+R9', 'TIM3e+R10', 'TIM3', 'TIM3+I', 'TIM3+G', 'TIM3+I+G', 'TIM3+R2', 'TIM3+R3', 'TIM3+R4', 'TIM3+R5', 'TIM3+R6', 'TIM3+R7', 'TIM3+R8', 'TIM3+R9', 'TIM3+R10', 'TVMe', 'TVMe+I', 'TVMe+G', 'TVMe+I+G', 'TVMe+R2', 'TVMe+R3', 'TVMe+R4', 'TVMe+R5', 'TVMe+R6', 'TVMe+R7', 'TVMe+R8', 'TVMe+R9', 'TVMe+R10', 'TVM', 'TVM+I', 'TVM+G', 'TVM+I+G', 'TVM+R2', 'TVM+R3', 'TVM+R4', 'TVM+R5', 'TVM+R6', 'TVM+R7', 'TVM+R8', 'TVM+R9', 'TVM+R10', 'SYM', 'SYM+I', 'SYM+G', 'SYM+I+G', 'SYM+R2', 'SYM+R3', 'SYM+R4', 'SYM+R5', 'SYM+R6', 'SYM+R7', 'SYM+R8', 'SYM+R9', 'SYM+R10', 'GTR', 'GTR+I', 'GTR+G', 'GTR+I+G', 'GTR+R2', 'GTR+R3', 'GTR+R4', 'GTR+R5', 'GTR+R6', 'GTR+R7', 'GTR+R8', 'GTR+R9', 'GTR+R10', 'MFP', 'TEST')
Model of Nucleotide Substitution. If not provided, IQ-TREE will determine the best fit substitution model automatically.[default:
'MFP'
]- n_init_pars_trees:
Int
%
Range
(1, None)
Number of initial parsimony trees. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_top_init_trees:
Int
%
Range
(1, None)
Number of top initial trees. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_best_retain_trees:
Int
%
Range
(1, None)
Number of best trees retained during search. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_iter:
Int
%
Range
(1, None)
Fix number of iterations to stop. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- stop_iter:
Int
%
Range
(1, None)
Number of unsuccessful iterations to stop. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- perturb_nni_strength:
Float
%
Range
(0.01, 1.0)
Perturbation strength for randomized NNI. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- spr_radius:
Int
%
Range
(1, None)
Radius for parsimony SPR search. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- allnni:
Bool
Perform more thorough NNI search.[default:
False
]- fast:
Bool
Fast search to resemble FastTree.[default:
False
]- alrt:
Int
%
Range
(1000, None)
Single branch test method. Number of bootstrap replicates to perform an SH-like approximate likelihood ratio test (SH-aLRT). Minimum of 1000 replicates is required. Can be used with other 'single branch test methods'. Values reported in the order of: alrt, lbp, abayes.[optional]
- abayes:
Bool
Single branch test method. Approximate Bayes test. Can be used with other 'single branch test methods'. Values reported in the order of: alrt, lbp, abayes.[default:
False
]- lbp:
Int
%
Range
(1000, None)
Single branch test method. Number of bootstrap replicates to perform a fast local bootstrap probability method. Minimum of 1000 replicates is required. Can be used with other 'single branch test methods'. Values reported in the order of: alrt, lbp, abayes.[optional]
- safe:
Bool
Safe likelihood kernel to avoid numerical underflow.[default:
False
]
Outputs¶
- tree:
Phylogeny[Unrooted]
The resulting phylogenetic tree.[required]
phylogeny iqtree-ultrafast-bootstrap¶
Construct a phylogenetic tree using IQ-TREE (http://
Citations¶
Minh et al., 2020; Kalyaanamoorthy et al., 2017; Minh et al., 2013; Hoang et al., 2017
Inputs¶
- alignment:
FeatureData[AlignedSequence]
Aligned sequences to be used for phylogenetic reconstruction.[required]
Parameters¶
- seed:
Int
Random number seed. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_cores:
Threads
The number of cores to use for parallel processing. Use
auto
to let IQ-TREE automatically determine the optimal number of cores to use.[default:1
]- n_cores_max:
Threads
Limits the maximum number of cores to be used when 'n_cores' is set to 'auto'.[optional]
- n_runs:
Int
%
Range
(1, None)
Number of indepedent runs. Multiple independent runs (e.g. 10) can outperform a single run in terms of likelihood maximisation.[default:
1
]- substitution_model:
Str
%
Choices
('JC', 'JC+I', 'JC+G', 'JC+I+G', 'JC+R2', 'JC+R3', 'JC+R4', 'JC+R5', 'JC+R6', 'JC+R7', 'JC+R8', 'JC+R9', 'JC+R10', 'F81', 'F81+I', 'F81+G', 'F81+I+G', 'F81+R2', 'F81+R3', 'F81+R4', 'F81+R5', 'F81+R6', 'F81+R7', 'F81+R8', 'F81+R9', 'F81+R10', 'K80', 'K80+I', 'K80+G', 'K80+I+G', 'K80+R2', 'K80+R3', 'K80+R4', 'K80+R5', 'K80+R6', 'K80+R7', 'K80+R8', 'K80+R9', 'K80+R10', 'HKY', 'HKY+I', 'HKY+G', 'HKY+I+G', 'HKY+R2', 'HKY+R3', 'HKY+R4', 'HKY+R5', 'HKY+R6', 'HKY+R7', 'HKY+R8', 'HKY+R9', 'HKY+R10', 'TNe', 'TNe+I', 'TNe+G', 'TNe+I+G', 'TNe+R2', 'TNe+R3', 'TNe+R4', 'TNe+R5', 'TNe+R6', 'TNe+R7', 'TNe+R8', 'TNe+R9', 'TNe+R10', 'TN', 'TN+I', 'TN+G', 'TN+I+G', 'TN+R2', 'TN+R3', 'TN+R4', 'TN+R5', 'TN+R6', 'TN+R7', 'TN+R8', 'TN+R9', 'TN+R10', 'K81', 'K81+I', 'K81+G', 'K81+I+G', 'K81+R2', 'K81+R3', 'K81+R4', 'K81+R5', 'K81+R6', 'K81+R7', 'K81+R8', 'K81+R9', 'K81+R10', 'K81u', 'K81u+I', 'K81u+G', 'K81u+I+G', 'K81u+R2', 'K81u+R3', 'K81u+R4', 'K81u+R5', 'K81u+R6', 'K81u+R7', 'K81u+R8', 'K81u+R9', 'K81u+R10', 'TPM2', 'TPM2+I', 'TPM2+G', 'TPM2+I+G', 'TPM2+R2', 'TPM2+R3', 'TPM2+R4', 'TPM2+R5', 'TPM2+R6', 'TPM2+R7', 'TPM2+R8', 'TPM2+R9', 'TPM2+R10', 'TPM2u', 'TPM2u+I', 'TPM2u+G', 'TPM2u+I+G', 'TPM2u+R2', 'TPM2u+R3', 'TPM2u+R4', 'TPM2u+R5', 'TPM2u+R6', 'TPM2u+R7', 'TPM2u+R8', 'TPM2u+R9', 'TPM2u+R10', 'TPM3', 'TPM3+I', 'TPM3+G', 'TPM3+I+G', 'TPM3+R2', 'TPM3+R3', 'TPM3+R4', 'TPM3+R5', 'TPM3+R6', 'TPM3+R7', 'TPM3+R8', 'TPM3+R9', 'TPM3+R10', 'TPM3u', 'TPM3u+I', 'TPM3u+G', 'TPM3u+I+G', 'TPM3u+R2', 'TPM3u+R3', 'TPM3u+R4', 'TPM3u+R5', 'TPM3u+R6', 'TPM3u+R7', 'TPM3u+R8', 'TPM3u+R9', 'TPM3u+R10', 'TIMe', 'TIMe+I', 'TIMe+G', 'TIMe+I+G', 'TIMe+R2', 'TIMe+R3', 'TIMe+R4', 'TIMe+R5', 'TIMe+R6', 'TIMe+R7', 'TIMe+R8', 'TIMe+R9', 'TIMe+R10', 'TIM', 'TIM+I', 'TIM+G', 'TIM+I+G', 'TIM+R2', 'TIM+R3', 'TIM+R4', 'TIM+R5', 'TIM+R6', 'TIM+R7', 'TIM+R8', 'TIM+R9', 'TIM+R10', 'TIM2e', 'TIM2e+I', 'TIM2e+G', 'TIM2e+I+G', 'TIM2e+R2', 'TIM2e+R3', 'TIM2e+R4', 'TIM2e+R5', 'TIM2e+R6', 'TIM2e+R7', 'TIM2e+R8', 'TIM2e+R9', 'TIM2e+R10', 'TIM2', 'TIM2+I', 'TIM2+G', 'TIM2+I+G', 'TIM2+R2', 'TIM2+R3', 'TIM2+R4', 'TIM2+R5', 'TIM2+R6', 'TIM2+R7', 'TIM2+R8', 'TIM2+R9', 'TIM2+R10', 'TIM3e', 'TIM3e+I', 'TIM3e+G', 'TIM3e+I+G', 'TIM3e+R2', 'TIM3e+R3', 'TIM3e+R4', 'TIM3e+R5', 'TIM3e+R6', 'TIM3e+R7', 'TIM3e+R8', 'TIM3e+R9', 'TIM3e+R10', 'TIM3', 'TIM3+I', 'TIM3+G', 'TIM3+I+G', 'TIM3+R2', 'TIM3+R3', 'TIM3+R4', 'TIM3+R5', 'TIM3+R6', 'TIM3+R7', 'TIM3+R8', 'TIM3+R9', 'TIM3+R10', 'TVMe', 'TVMe+I', 'TVMe+G', 'TVMe+I+G', 'TVMe+R2', 'TVMe+R3', 'TVMe+R4', 'TVMe+R5', 'TVMe+R6', 'TVMe+R7', 'TVMe+R8', 'TVMe+R9', 'TVMe+R10', 'TVM', 'TVM+I', 'TVM+G', 'TVM+I+G', 'TVM+R2', 'TVM+R3', 'TVM+R4', 'TVM+R5', 'TVM+R6', 'TVM+R7', 'TVM+R8', 'TVM+R9', 'TVM+R10', 'SYM', 'SYM+I', 'SYM+G', 'SYM+I+G', 'SYM+R2', 'SYM+R3', 'SYM+R4', 'SYM+R5', 'SYM+R6', 'SYM+R7', 'SYM+R8', 'SYM+R9', 'SYM+R10', 'GTR', 'GTR+I', 'GTR+G', 'GTR+I+G', 'GTR+R2', 'GTR+R3', 'GTR+R4', 'GTR+R5', 'GTR+R6', 'GTR+R7', 'GTR+R8', 'GTR+R9', 'GTR+R10', 'MFP', 'TEST')
Model of Nucleotide Substitution.If not provided, IQ-TREE will determine the best fit substitution model automatically. [default:
'MFP'
]- bootstrap_replicates:
Int
%
Range
(1000, None)
The number of bootstrap searches to perform. Minimum of 1000 recomended. [default:
1000
]- n_init_pars_trees:
Int
%
Range
(1, None)
Number of initial parsimony trees. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_top_init_trees:
Int
%
Range
(1, None)
Number of top initial trees. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_best_retain_trees:
Int
%
Range
(1, None)
Number of best trees retained during search. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- stop_iter:
Int
%
Range
(1, None)
Number of unsuccessful iterations to stop. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- perturb_nni_strength:
Float
%
Range
(0.01, 1.0)
Perturbation strength for randomized NNI. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- spr_radius:
Int
%
Range
(1, None)
Radius for parsimony SPR search. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_max_ufboot_iter:
Int
%
Range
(1, None)
Maximum number of iterations. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- n_ufboot_steps:
Int
%
Range
(1, None)
Number of iterations for UFBoot stopping rule. If not set, program defaults will be used.See IQ-TREE manual for details.[optional]
- min_cor_ufboot:
Float
%
Range
(0.51, 0.99)
Minimum correlation coefficient. If not set, program defaults will be used.See IQ-TREE manual for details.[optional]
- ep_break_ufboot:
Float
%
Range
(0.01, 0.99)
Epsilon value to break tie. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- allnni:
Bool
Perform more thorough NNI search.[default:
False
]- alrt:
Int
%
Range
(1000, None)
Single branch test method. Number of bootstrap replicates to perform an SH-like approximate likelihood ratio test (SH-aLRT). Minimum of 1000 replicates is required. Can be used with other 'single branch test methods'. Values reported in the order of: alrt, lbp, abayes.[optional]
- abayes:
Bool
Single branch test method. Performs an approximate Bayes test. Can be used with other 'single branch test methods' and ultrafast bootstrap. Values reported in the order of: alrt, lbp, abayes, ufboot.[default:
False
]- lbp:
Int
%
Range
(1000, None)
Single branch test method. Number of bootstrap replicates to perform a fast local bootstrap probability method. Minimum of 1000 replicates is required. Can be used with other 'single branch test methods'. Values reported in the order of: alrt, lbp, abayes, ufboot.[optional]
- bnni:
Bool
Optimize UFBoot trees by NNI on bootstrap alignment. This option reduces the risk of overestimating branch supports with UFBoot due to severe model violations.[default:
False
]- safe:
Bool
Safe likelihood kernel to avoid numerical underflow.[default:
False
]
Outputs¶
- tree:
Phylogeny[Unrooted]
The resulting phylogenetic tree.[required]
phylogeny filter-table¶
Remove features from a feature table if their identifiers are not tip identifiers in tree.
Inputs¶
- table:
FeatureTable[Frequency¹ | RelativeFrequency² | PresenceAbsence³]
Feature table that features should be filtered from.[required]
- tree:
Phylogeny[Rooted | Unrooted]
Tree where tip identifiers are the feature identifiers that should be retained in the table.[required]
Outputs¶
- filtered_table:
FeatureTable[Frequency¹ | RelativeFrequency² | PresenceAbsence³]
The resulting feature table.[required]
phylogeny filter-tree¶
Remove tips from a tree if their identifiers based on a set of provided identifiers.
Inputs¶
- tree:
Phylogeny[Rooted¹ | Unrooted²]
Tree that should be filtered[required]
- table:
FeatureTable[Frequency | RelativeFrequency | PresenceAbsence | Composition]
Feature table which contains the identifier that should be retained in the tree[optional]
Parameters¶
- metadata:
Metadata
Feature metadata to use with the 'where' statement or to select tips to be retained. Metadata objects could also include FeatureData[Sequence] data types, if, forinstance, you want to filter to match represenative sequencces.[optional]
- where:
Str
SQLite WHERE clause specifying sample metadata criteria that must be met to be included in the filtered feature table. If not provided, all samples in
metadata
that are also in the feature table will be retained.[optional]
Outputs¶
- filtered_tree:
Phylogeny[Rooted¹ | Unrooted²]
The resulting phylogenetic tree.[required]
phylogeny robinson-foulds¶
Calculate the Robinson-Foulds symmetric difference metric between two or more phylogenetic trees.
Citations¶
Robinson & Foulds, 1981
Inputs¶
- trees:
List
[
Phylogeny[Rooted | Unrooted]
]
Phylogenetic trees to compare with Robinson-Foulds. Rooting information and branch lengths are ignored by this metric.[required]
Parameters¶
- labels:
List
[
Str
]
Labels to use for the tree names in the distance matrix. If ommited, labels will be "tree_n" where "n" ranges from 1..N. The number of labels must match the number of trees.[optional]
- missing_tips:
Str
%
Choices
('error', 'intersect-all')
How to handle tips that are not shared between trees. "error" will raise an error if the set of tips is not identical between all input trees. "intersect-all" will remove tips that are not shared between all trees before computing distances beteen trees.[default:
'error'
]
Outputs¶
- distance_matrix:
DistanceMatrix
The distances between trees as a symmetric matrix.[required]
phylogeny align-to-tree-mafft-fasttree¶
This pipeline will start by creating a sequence alignment using MAFFT, after which any alignment columns that are phylogenetically uninformative or ambiguously aligned will be removed (masked). The resulting masked alignment will be used to infer a phylogenetic tree and then subsequently rooted at its midpoint. Output files from each step of the pipeline will be saved. This includes both the unmasked and masked MAFFT alignment from q2-alignment methods, and both the rooted and unrooted phylogenies from q2-phylogeny methods.
Inputs¶
- sequences:
FeatureData[Sequence]
The sequences to be used for creating a fasttree based rooted phylogenetic tree.[required]
Parameters¶
- n_threads:
Threads
The number of threads. (Use
auto
to automatically use all available cores) This value is used when aligning the sequences and creating the tree with fasttree.[default:1
]- mask_max_gap_frequency:
Float
%
Range
(0, 1, inclusive_end=True)
The maximum relative frequency of gap characters in a column for the column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive), where 0.0 retains only those columns without gap characters, and 1.0 retains all columns regardless of gap character frequency. This value is used when masking the aligned sequences.[default:
1.0
]- mask_min_conservation:
Float
%
Range
(0, 1, inclusive_end=True)
The minimum relative frequency of at least one non-gap character in a column for that column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive). For example, if a value of 0.4 is provided, a column will only be retained if it contains at least one character that is present in at least 40% of the sequences. This value is used when masking the aligned sequences.[default:
0.4
]- parttree:
Bool
This flag is required if the number of sequences being aligned are larger than 1000000. Disabled by default.[default:
False
]
Outputs¶
- alignment:
FeatureData[AlignedSequence]
The aligned sequences.[required]
- masked_alignment:
FeatureData[AlignedSequence]
The masked alignment.[required]
- tree:
Phylogeny[Unrooted]
The unrooted phylogenetic tree.[required]
- rooted_tree:
Phylogeny[Rooted]
The rooted phylogenetic tree.[required]
Examples¶
align_to_tree_mafft_fasttree¶
wget -O 'rep-seqs.qza' \
'https://amplicon-docs.qiime2.org/en/latest/data/examples/phylogeny/align-to-tree-mafft-fasttree/1/rep-seqs.qza'
qiime phylogeny align-to-tree-mafft-fasttree \
--i-sequences rep-seqs.qza \
--o-alignment aligned-rep-seqs.qza \
--o-masked-alignment masked-aligned-rep-seqs.qza \
--o-tree unrooted-tree.qza \
--o-rooted-tree rooted-tree.qza
from qiime2 import Artifact
from urllib import request
import qiime2.plugins.phylogeny.actions as phylogeny_actions
url = 'https://amplicon-docs.qiime2.org/en/latest/data/examples/phylogeny/align-to-tree-mafft-fasttree/1/rep-seqs.qza'
fn = 'rep-seqs.qza'
request.urlretrieve(url, fn)
rep_seqs = Artifact.load(fn)
aligned_rep_seqs, masked_aligned_rep_seqs, unrooted_tree, rooted_tree = phylogeny_actions.align_to_tree_mafft_fasttree(
sequences=rep_seqs,
)
- Using the
Upload Data
tool: - On the first tab (Regular), press the
Paste/Fetch
data button at the bottom.- Set "Name" (first text-field) to:
rep-seqs.qza
- In the larger text-area, copy-and-paste: https://
amplicon -docs .qiime2 .org /en /latest /data /examples /phylogeny /align -to -tree -mafft -fasttree /1 /rep -seqs .qza - ("Type", "Genome", and "Settings" can be ignored)
- Set "Name" (first text-field) to:
- Press the
Start
button at the bottom.
- On the first tab (Regular), press the
- Using the
qiime2 phylogeny align-to-tree-mafft-fasttree
tool: - Set "sequences" to
#: rep-seqs.qza
- Press the
Execute
button.
- Set "sequences" to
- Once completed, for each new entry in your history, use the
Edit
button to set the name as follows: - (Renaming is optional, but it will make any subsequent steps easier to complete.)
History Name "Name" to set (be sure to press [Save]) #: qiime2 phylogeny align-to-tree-mafft-fasttree [...] : alignment.qza
aligned-rep-seqs.qza
#: qiime2 phylogeny align-to-tree-mafft-fasttree [...] : masked_alignment.qza
masked-aligned-rep-seqs.qza
#: qiime2 phylogeny align-to-tree-mafft-fasttree [...] : tree.qza
unrooted-tree.qza
#: qiime2 phylogeny align-to-tree-mafft-fasttree [...] : rooted_tree.qza
rooted-tree.qza
library(reticulate)
Artifact <- import("qiime2")$Artifact
phylogeny_actions <- import("qiime2.plugins.phylogeny.actions")
request <- import("urllib")$request
url <- 'https://amplicon-docs.qiime2.org/en/latest/data/examples/phylogeny/align-to-tree-mafft-fasttree/1/rep-seqs.qza'
fn <- 'rep-seqs.qza'
request$urlretrieve(url, fn)
rep_seqs <- Artifact$load(fn)
action_results <- phylogeny_actions$align_to_tree_mafft_fasttree(
sequences=rep_seqs,
)
aligned_rep_seqs <- action_results$alignment
masked_aligned_rep_seqs <- action_results$masked_alignment
unrooted_tree <- action_results$tree
rooted_tree <- action_results$rooted_tree
from q2_phylogeny._examples import phylogeny_align_to_tree_mafft_fasttree
phylogeny_align_to_tree_mafft_fasttree(use)
phylogeny align-to-tree-mafft-iqtree¶
This pipeline will start by creating a sequence alignment using MAFFT, after which any alignment columns that are phylogenetically uninformative or ambiguously aligned will be removed (masked). The resulting masked alignment will be used to infer a phylogenetic tree using IQ-TREE. By default the best fit substitution model will be determined by ModelFinder prior to phylogenetic inference. The resulting tree will be subsequently rooted at its midpoint. Output files from each step of the pipeline will be saved. This includes both the unmasked and masked MAFFT alignment from q2-alignment methods, and both the rooted and unrooted phylogenies from q2-phylogeny methods.
Inputs¶
- sequences:
FeatureData[Sequence]
The sequences to be used for creating a iqtree based rooted phylogenetic tree.[required]
Parameters¶
- n_threads:
Threads
The number of threads. (Use 0 to automatically use all available cores This value is used when aligning the sequences and creating the tree with iqtree.[default:
1
]- mask_max_gap_frequency:
Float
%
Range
(0, 1, inclusive_end=True)
The maximum relative frequency of gap characters in a column for the column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive), where 0.0 retains only those columns without gap characters, and 1.0 retains all columns regardless of gap character frequency. This value is used when masking the aligned sequences.[default:
1.0
]- mask_min_conservation:
Float
%
Range
(0, 1, inclusive_end=True)
The minimum relative frequency of at least one non-gap character in a column for that column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive). For example, if a value of 0.4 is provided, a column will only be retained if it contains at least one character that is present in at least 40% of the sequences. This value is used when masking the aligned sequences.[default:
0.4
]- substitution_model:
Str
%
Choices
('JC', 'JC+I', 'JC+G', 'JC+I+G', 'JC+R2', 'JC+R3', 'JC+R4', 'JC+R5', 'JC+R6', 'JC+R7', 'JC+R8', 'JC+R9', 'JC+R10', 'F81', 'F81+I', 'F81+G', 'F81+I+G', 'F81+R2', 'F81+R3', 'F81+R4', 'F81+R5', 'F81+R6', 'F81+R7', 'F81+R8', 'F81+R9', 'F81+R10', 'K80', 'K80+I', 'K80+G', 'K80+I+G', 'K80+R2', 'K80+R3', 'K80+R4', 'K80+R5', 'K80+R6', 'K80+R7', 'K80+R8', 'K80+R9', 'K80+R10', 'HKY', 'HKY+I', 'HKY+G', 'HKY+I+G', 'HKY+R2', 'HKY+R3', 'HKY+R4', 'HKY+R5', 'HKY+R6', 'HKY+R7', 'HKY+R8', 'HKY+R9', 'HKY+R10', 'TNe', 'TNe+I', 'TNe+G', 'TNe+I+G', 'TNe+R2', 'TNe+R3', 'TNe+R4', 'TNe+R5', 'TNe+R6', 'TNe+R7', 'TNe+R8', 'TNe+R9', 'TNe+R10', 'TN', 'TN+I', 'TN+G', 'TN+I+G', 'TN+R2', 'TN+R3', 'TN+R4', 'TN+R5', 'TN+R6', 'TN+R7', 'TN+R8', 'TN+R9', 'TN+R10', 'K81', 'K81+I', 'K81+G', 'K81+I+G', 'K81+R2', 'K81+R3', 'K81+R4', 'K81+R5', 'K81+R6', 'K81+R7', 'K81+R8', 'K81+R9', 'K81+R10', 'K81u', 'K81u+I', 'K81u+G', 'K81u+I+G', 'K81u+R2', 'K81u+R3', 'K81u+R4', 'K81u+R5', 'K81u+R6', 'K81u+R7', 'K81u+R8', 'K81u+R9', 'K81u+R10', 'TPM2', 'TPM2+I', 'TPM2+G', 'TPM2+I+G', 'TPM2+R2', 'TPM2+R3', 'TPM2+R4', 'TPM2+R5', 'TPM2+R6', 'TPM2+R7', 'TPM2+R8', 'TPM2+R9', 'TPM2+R10', 'TPM2u', 'TPM2u+I', 'TPM2u+G', 'TPM2u+I+G', 'TPM2u+R2', 'TPM2u+R3', 'TPM2u+R4', 'TPM2u+R5', 'TPM2u+R6', 'TPM2u+R7', 'TPM2u+R8', 'TPM2u+R9', 'TPM2u+R10', 'TPM3', 'TPM3+I', 'TPM3+G', 'TPM3+I+G', 'TPM3+R2', 'TPM3+R3', 'TPM3+R4', 'TPM3+R5', 'TPM3+R6', 'TPM3+R7', 'TPM3+R8', 'TPM3+R9', 'TPM3+R10', 'TPM3u', 'TPM3u+I', 'TPM3u+G', 'TPM3u+I+G', 'TPM3u+R2', 'TPM3u+R3', 'TPM3u+R4', 'TPM3u+R5', 'TPM3u+R6', 'TPM3u+R7', 'TPM3u+R8', 'TPM3u+R9', 'TPM3u+R10', 'TIMe', 'TIMe+I', 'TIMe+G', 'TIMe+I+G', 'TIMe+R2', 'TIMe+R3', 'TIMe+R4', 'TIMe+R5', 'TIMe+R6', 'TIMe+R7', 'TIMe+R8', 'TIMe+R9', 'TIMe+R10', 'TIM', 'TIM+I', 'TIM+G', 'TIM+I+G', 'TIM+R2', 'TIM+R3', 'TIM+R4', 'TIM+R5', 'TIM+R6', 'TIM+R7', 'TIM+R8', 'TIM+R9', 'TIM+R10', 'TIM2e', 'TIM2e+I', 'TIM2e+G', 'TIM2e+I+G', 'TIM2e+R2', 'TIM2e+R3', 'TIM2e+R4', 'TIM2e+R5', 'TIM2e+R6', 'TIM2e+R7', 'TIM2e+R8', 'TIM2e+R9', 'TIM2e+R10', 'TIM2', 'TIM2+I', 'TIM2+G', 'TIM2+I+G', 'TIM2+R2', 'TIM2+R3', 'TIM2+R4', 'TIM2+R5', 'TIM2+R6', 'TIM2+R7', 'TIM2+R8', 'TIM2+R9', 'TIM2+R10', 'TIM3e', 'TIM3e+I', 'TIM3e+G', 'TIM3e+I+G', 'TIM3e+R2', 'TIM3e+R3', 'TIM3e+R4', 'TIM3e+R5', 'TIM3e+R6', 'TIM3e+R7', 'TIM3e+R8', 'TIM3e+R9', 'TIM3e+R10', 'TIM3', 'TIM3+I', 'TIM3+G', 'TIM3+I+G', 'TIM3+R2', 'TIM3+R3', 'TIM3+R4', 'TIM3+R5', 'TIM3+R6', 'TIM3+R7', 'TIM3+R8', 'TIM3+R9', 'TIM3+R10', 'TVMe', 'TVMe+I', 'TVMe+G', 'TVMe+I+G', 'TVMe+R2', 'TVMe+R3', 'TVMe+R4', 'TVMe+R5', 'TVMe+R6', 'TVMe+R7', 'TVMe+R8', 'TVMe+R9', 'TVMe+R10', 'TVM', 'TVM+I', 'TVM+G', 'TVM+I+G', 'TVM+R2', 'TVM+R3', 'TVM+R4', 'TVM+R5', 'TVM+R6', 'TVM+R7', 'TVM+R8', 'TVM+R9', 'TVM+R10', 'SYM', 'SYM+I', 'SYM+G', 'SYM+I+G', 'SYM+R2', 'SYM+R3', 'SYM+R4', 'SYM+R5', 'SYM+R6', 'SYM+R7', 'SYM+R8', 'SYM+R9', 'SYM+R10', 'GTR', 'GTR+I', 'GTR+G', 'GTR+I+G', 'GTR+R2', 'GTR+R3', 'GTR+R4', 'GTR+R5', 'GTR+R6', 'GTR+R7', 'GTR+R8', 'GTR+R9', 'GTR+R10', 'MFP', 'TEST')
Model of Nucleotide Substitution. If not provided, IQ-TREE will determine the best fit substitution model automatically.[default:
'MFP'
]- fast:
Bool
Fast search to resemble FastTree.[default:
False
]- alrt:
Int
%
Range
(1000, None)
Single branch test method. Number of bootstrap replicates to perform an SH-like approximate likelihood ratio test (SH-aLRT). Minimum of 1000 replicates is required.[optional]
- seed:
Int
Random number seed for the iqtree parsimony starting tree. This allows you to reproduce tree results. If not supplied then one will be randomly chosen.[optional]
- stop_iter:
Int
%
Range
(1, None)
Number of unsuccessful iterations to stop. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
- perturb_nni_strength:
Float
%
Range
(0.01, 1.0)
Perturbation strength for randomized NNI. If not set, program defaults will be used. See IQ-TREE manual for details.[optional]
Outputs¶
- alignment:
FeatureData[AlignedSequence]
The aligned sequences.[required]
- masked_alignment:
FeatureData[AlignedSequence]
The masked alignment.[required]
- tree:
Phylogeny[Unrooted]
The unrooted phylogenetic tree.[required]
- rooted_tree:
Phylogeny[Rooted]
The rooted phylogenetic tree.[required]
phylogeny align-to-tree-mafft-raxml¶
This pipeline will start by creating a sequence alignment using MAFFT, after which any alignment columns that are phylogenetically uninformative or ambiguously aligned will be removed (masked). The resulting masked alignment will be used to infer a phylogenetic tree using RAxML, under the specified substitution model, and then subsequently rooted at its midpoint. Output files from each step of the pipeline will be saved. This includes both the unmasked and masked MAFFT alignment from q2-alignment methods, and both the rooted and unrooted phylogenies from q2-phylogeny methods.
Inputs¶
- sequences:
FeatureData[Sequence]
The sequences to be used for creating a iqtree based rooted phylogenetic tree.[required]
Parameters¶
- n_threads:
Threads
The number of threads. (Use
all
to automatically use all available cores. This value is used when aligning the sequences and creating the tree with iqtree.[default:1
]- mask_max_gap_frequency:
Float
%
Range
(0, 1, inclusive_end=True)
The maximum relative frequency of gap characters in a column for the column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive), where 0.0 retains only those columns without gap characters, and 1.0 retains all columns regardless of gap character frequency. This value is used when masking the aligned sequences.[default:
1.0
]- mask_min_conservation:
Float
%
Range
(0, 1, inclusive_end=True)
The minimum relative frequency of at least one non-gap character in a column for that column to be retained. This relative frequency must be a number between 0.0 and 1.0 (inclusive). For example, if a value of 0.4 is provided, a column will only be retained if it contains at least one character that is present in at least 40% of the sequences. This value is used when masking the aligned sequences.[default:
0.4
]- parttree:
Bool
This flag is required if the number of sequences being aligned are larger than 1000000. Disabled by default. NOTE: if using this option, it is recomended that only the CAT-based substitution models of RAxML be considered for this pipeline.[default:
False
]- substitution_model:
Str
%
Choices
('GTRGAMMA', 'GTRGAMMAI', 'GTRCAT', 'GTRCATI')
Model of Nucleotide Substitution.[default:
'GTRGAMMA'
]- seed:
Int
Random number seed for the parsimony starting tree. This allows you to reproduce tree results. If not supplied then one will be randomly chosen.[optional]
- raxml_version:
Str
%
Choices
('Standard', 'SSE3', 'AVX2')
Select a specific CPU optimization of RAxML to use. The SSE3 versions will run approximately 40% faster than the standard version. The AVX2 version will run 10-30% faster than the SSE3 version.[default:
'Standard'
]
Outputs¶
- alignment:
FeatureData[AlignedSequence]
The aligned sequences.[required]
- masked_alignment:
FeatureData[AlignedSequence]
The masked alignment.[required]
- tree:
Phylogeny[Unrooted]
The unrooted phylogenetic tree.[required]
- rooted_tree:
Phylogeny[Rooted]
The rooted phylogenetic tree.[required]
- Links
- Documentation
- Source Code
- Stars
- 4
- Last Commit
- 966ab0f
- Available Distros
- 2024.10
- 2024.10/amplicon
- 2024.5
- 2024.5/amplicon
- 2024.2
- 2024.2/amplicon
- 2023.9
- 2023.9/amplicon
- 2023.7
- 2023.7/core