alifestd_mark_ot_mrca_polars

alifestd_mark_ot_mrca_polars(phylogeny_df: DataFrame, *, mark_as: str = 'ot_mrca') DataFrame

Appends columns characterizing the Most Recent Common Ancestor (MRCA) of the entire extant population at each taxon’s origin_time.

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

The extant population is defined in terms of active lineages: any branch of the tree existing at an origin_time which contains at least one descendant at or after that time.

New Columns

ot_mrca_idint

The unique identifier of the MRCA for the population that was extant at this organism’s origin_time.

ot_mrca_time_ofint or float

The origin_time of that MRCA.

ot_mrca_time_sinceint or float

The duration elapsed between the MRCA’s origin_time and this taxon’s origin_time.

Parameters

phylogeny_dfpolars.DataFrame

The phylogeny as a dataframe in alife standard format.

Must represent an asexual phylogeny with a single root.

Returns

polars.DataFrame

The phylogeny with added ot_mrca_id, ot_mrca_time_of, and ot_mrca_time_since columns.

See Also

alifestd_mark_ot_mrca_asexual :

Pandas-based implementation.