alifestd_splay_polytomies

alifestd_splay_polytomies(phylogeny_df: DataFrame, mutate: bool = False) DataFrame

Use a simple splay strategy to resolve polytomies, converting them into bifurcations.

For example, ```

1

/|

2 3 4 ` becomes `

1

/

2 5

/

3 4

```

No adjustments to any branch length columns in phylogeny_df are performed. However, origin_time (as well as all other columns) of a polytomy’s parent node are duplicated in splayed-out nodes that resolve that polytomy. So, nodes added to perform the splaying-out will have zero- length subtending branches in this regard (i.e., their origin time will match their parent’s).

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.