alifestd_mark_oldest_root

alifestd_mark_oldest_root(phylogeny_df: DataFrame, mutate: bool = False, *, mark_as: str = 'is_oldest_root') DataFrame

Point all other roots to oldest root, measured by lowest origin_time (if available) or otherwise lowest id.

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

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.