alifestd_make_comb
- alifestd_make_comb(n_leaves: int) DataFrame
Build a comb/caterpillar tree with n_leaves leaves.
Structure (e.g., n_leaves=4):
0 / \ 1 2 / \ 3 4 / \ 5 6
Internal nodes: 0, 2, 4, … Leaves: 1, 3, 5, …
Parameters
- n_leavesint
Number of leaf nodes in the resulting tree.
Returns
- pd.DataFrame
Alife-standard phylogeny dataframe with ‘id’ and ‘ancestor_list’ columns.
Raises
- ValueError
If n_leaves is negative.