alifestd_sample_triplet_comparisons_asexual
- alifestd_sample_triplet_comparisons_asexual(first_df: ~pandas.core.frame.DataFrame, second_df: ~pandas.core.frame.DataFrame, taxon_label_key: str, n: int = 1000, progress_wrap: ~typing.Callable = <function <lambda>>, mutate: bool = False) DataFrame
Sample triplet comparisons between two asexual phylogenetic trees in alife standard form, creating a DataFrame with the triplet categorizations and comparison results as well as corresponding data from MRCA row within the first tree.
The MRCA row corresponds to the most recent common ancestor of two of the three taxa in the triplet.
Parameters
- first_dfpd.DataFrame
The DataFrame representing the first phylogenetic tree.
- second_dfpd.DataFrame
The DataFrame representing the second phylogenetic tree.
- taxon_label_keystr
The key in the DataFrame to identify the taxon labels.
- nint, default 1000
The number of samples to take.
Corresponds to number of rows in the returned DataFrame.
- progress_wraptyping.Callable, optional
Pass tqdm or equivalent to display a progress bar.
- mutatebool, default False
If True, allows mutation of input DataFrames.
Returns
- pd.DataFrame
A DataFrame with rows corresponding to sampled triplet comparisons and the following columns: - “triplet code, {first,second}”: the categorization of the triplet in
the first or second tree.
“triplet match, {lax,lax/strict,strict,strict/lax}”: whether the triplet categorizations match with differing treatment of polytomies.
all columns from the first tree.
Notes
The core comparison is done by sampling triplets of taxa, categorizing them, and comparing these categorizations across the two trees, taking into account the strict and lax parameters for handling polytomies. See alifestd_categorize_triplet_asexual for details.
See Also
alifestd_categorize_triplet_asexual alifestd_estimate_triplet_distance_asexual