alifestd_mark_next_sibling_id_asexual
- alifestd_mark_next_sibling_id_asexual(phylogeny_df: DataFrame, mutate: bool = False, *, mark_as: str = 'next_sibling_id') DataFrame
Add column next_sibling_id, the next-highest id sharing the same parent.
The output column name can be changed via the
mark_asparameter.If no such sibling exists, marks own id.
A topological sort will be applied if phylogeny_df is not topologically sorted. 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.