alifestd_to_working_format
- alifestd_to_working_format(phylogeny_df: DataFrame, mutate: bool = False) DataFrame
Re-encode phylogeny_df to facilitate efficient analysis and transformation operations.
The returned phylogeny dataframe will * be topologically sorted (i.e., organisms appear after all ancestors), * have contiguous ids (i.e., organisms’ ids correspond to row number), * contain an integer datatype ancestor_id column if the phylogeny is asexual (i.e., a more performant representation of ancestor_list).
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.