High-level description
This file serves as the top-level module for the cassiopeia critique package. It imports and exposes two key functions,robinson_foulds and triplets_correct, from the compare module, which are used for comparing phylogenetic trees.
Symbols
robinson_foulds
Description
This function computes the Robinson-Foulds distance between two phylogenetic trees. It is imported from thecompare module.
Inputs
| Name | Type | Description |
|---|---|---|
| tree1 | CassiopeiaTree | The first tree to compare |
| tree2 | CassiopeiaTree | The second tree to compare |
Outputs
| Name | Type | Description |
|---|---|---|
| rf | float | The Robinson-Foulds distance between the two trees |
| rf_max | float | The maximum possible Robinson-Foulds distance for normalization |
triplets_correct
Description
This function calculates the triplets correct accuracy between two phylogenetic trees. It samples triplets at different depths and compares their structure between the two trees.Inputs
| Name | Type | Description |
|---|---|---|
| tree1 | CassiopeiaTree | The first tree to compare |
| tree2 | CassiopeiaTree | The second tree to compare |
| number_of_trials | int | Number of triplets to sample at each depth (default: 1000) |
| min_triplets_at_depth | int | Minimum number of triplets needed at a depth for inclusion (default: 1) |
Outputs
| Name | Type | Description |
|---|---|---|
| all_triplets_correct | Dict[int, float] | Total triplets correct at each depth |
| resolvable_triplets_correct | Dict[int, float] | Triplets correct for resolvable triplets at each depth |
| unresolved_triplets_correct | Dict[int, float] | Triplets correct for unresolvable triplets at each depth |
| proportion_resolvable | Dict[int, float] | Proportion of unresolvable triplets per depth |
Dependencies
| Dependency | Purpose |
|---|---|
| cassiopeia.critique.compare | Source of the imported functions for tree comparison |
