alifestd_make_balanced_bifurcating_polars

alifestd_make_balanced_bifurcating_polars(depth: int) DataFrame

Build a perfectly balanced bifurcating tree of given depth.

Parameters

depthint

Depth of the tree, where depth=1 is a single root node.

Returns

pl.DataFrame

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