alifestd_mark_clade_duration_polars

alifestd_mark_clade_duration_polars(phylogeny_df: DataFrame, *, mark_as: str = 'clade_duration') DataFrame

Add column clade_duration, containing the difference between each node’s origin_time and the maximum origin_time of its descendants.

The output column name can be changed via the mark_as parameter.

Leaf nodes will have duration 0.