alifestd_mark_clade_subtended_duration_ratio_sister_asexual

alifestd_mark_clade_subtended_duration_ratio_sister_asexual(phylogeny_df: DataFrame, mutate: bool = False, *, mark_as: str = 'clade_subtended_duration_ratio_sister') DataFrame

Add column clade_subtended_duration_ratio_sister, containing the ratio of each clade’s subtended duration to that of its sister.

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

Root nodes will have ratio 1, unless also a leaf node. Leaf nodes and leaf-sisters may have ratio inf or NaN.

Tree must be strictly bifurcating.

Dataframe reindexing (e.g., df.index) may be applied.

Input dataframe is not mutated by this operation unless mutate set True. If mutate set True, operation does not occur in place; still use return value to get transformed phylogeny dataframe.