alifestd_mark_clade_logistic_growth_children_asexual

alifestd_mark_clade_logistic_growth_children_asexual(phylogeny_df: ~pandas.core.frame.DataFrame, mutate: bool = False, *, mark_as: str = 'clade_logistic_growth_children', parallel_backend: str | None = None, progress_wrap: ~typing.Callable = <function <lambda>>, work_mask: ~numpy.ndarray | None = None) DataFrame

Add column clade_logistic_growth_children, containing the coefficient of a logistic regression fit to origin times of the leaf descendants of each node.

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

Nodes with left/right child clades with equal growth rates will have value approximately 0.0. If left child clade has greater growth rate, value will be negative. If right child clade has greater growth rate, value will be positive.

Pass “loky” to parallel_backend to use joblib with loky backend.

Leaf nodes will have value NaN. If provided, any nodes not included in work_mask will also have value NaN.

Tree must be strictly bifurcating and single-rooted.

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

Input phylogeny_df and work_mask are 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.

References

Bonetti Franceschi V and Volz E. Phylogenetic signatures reveal

multilevel selection and fitness costs in SARS-CoV-2 [version 2; peer review: 2 approved, 1 approved with reservations]. Wellcome Open Res 2024, 9:85 (https://doi.org/10.12688/wellcomeopenres.20704.2)

Volz, E. Fitness, growth and transmissibility of SARS-CoV-2 genetic

variants. Nat Rev Genet 24, 724-734 (2023). https://doi.org/10.1038/s41576-023-00610-z