jungle
library. It allows specifying the number of trees, leaves per tree, and a shape parameter controlling the tree structure. The resulting annotated forest is then saved to a compressed pickle file.
jungle
library (jg
) for phylogenetic tree generation and manipulation.
generate_annotate_forest.py
Name | Type | Description |
---|---|---|
n_leaves | int | Number of leaves (tips) in each generated tree. |
n_trees | int | Number of trees to generate for the forest. |
alpha | float | Shape parameter influencing the tree structure (2.0 for neutral, 1.0 for positive selection). |
output_dir | str | Path to the directory where the output file will be saved. |
jungle
library to generate a forest of n_trees
trees, each with n_leaves
leaves, using the specified alpha
shape parameter.verbose
is True.Dependency | Purpose |
---|---|
jungle | Provides functionality for phylogenetic tree generation, manipulation, and analysis. |
sys | Used for accessing command line arguments. |
time | Used for tracking the script’s execution time. |
uuid | Used for generating a unique identifier for the output file. |
pickle | Used for serializing and saving the forest object. |
gzip | Used for compressing the output pickle file. |
verbose
variable is set to True
. This includes parameter values, progress updates, and timing information.