alifestd_mark_clade_subtended_duration_polars

alifestd_mark_clade_subtended_duration_polars(phylogeny_df: DataFrame, *, mark_as: str = 'clade_subtended_duration') DataFrame

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

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

Ancestor origin time for root nodes will be 0.