alifestd_make_star_polars

alifestd_make_star_polars(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

pl.DataFrame

Phylogeny dataframe with ‘id’ and ‘ancestor_id’ columns.