alifestd_mark_clade_logistic_growth_sister_asexual

alifestd_mark_clade_logistic_growth_sister_asexual(phylogeny_df: ~pandas.core.frame.DataFrame, mutate: bool = False, *, mark_as: str = 'clade_logistic_growth_sister', 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 this clade’s descendant leaves versus those of its sister clade.

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

Clades with equal growth rate to their sister will have value approximately 0.0. Clades growing faster than their sister clade will have value greater than 0.0. Clades growing slower than their sister clade will have value less than 0.0.

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

Root 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