alifestd_make_star

alifestd_make_star(n_leaves: int) DataFrame

Build a star tree with n_leaves leaves.

Structure (e.g., n_leaves=4):

   0
 / | \ \
1  2  3 4

The root (id 0) has every leaf as a direct child.

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.