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 the compare module.

Inputs

NameTypeDescription
tree1CassiopeiaTreeThe first tree to compare
tree2CassiopeiaTreeThe second tree to compare

Outputs

NameTypeDescription
rffloatThe Robinson-Foulds distance between the two trees
rf_maxfloatThe 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

NameTypeDescription
tree1CassiopeiaTreeThe first tree to compare
tree2CassiopeiaTreeThe second tree to compare
number_of_trialsintNumber of triplets to sample at each depth (default: 1000)
min_triplets_at_depthintMinimum number of triplets needed at a depth for inclusion (default: 1)

Outputs

NameTypeDescription
all_triplets_correctDict[int, float]Total triplets correct at each depth
resolvable_triplets_correctDict[int, float]Triplets correct for resolvable triplets at each depth
unresolved_triplets_correctDict[int, float]Triplets correct for unresolvable triplets at each depth
proportion_resolvableDict[int, float]Proportion of unresolvable triplets per depth

Dependencies

DependencyPurpose
cassiopeia.critique.compareSource of the imported functions for tree comparison

This file acts as an interface to the tree comparison functionality in the cassiopeia critique module, making it easier for users to access these functions without having to import from deeper within the package structure.