It may be better to use a phyogenetic based distance software. Many exist including ape:
library(ape)
# Load your phylogenetic tree (Newick format or other)
tree <- read.tree("your_tree_file.nwk")
# Calculate patristic distances
patristic_distances <- cophenetic.phylo(tree)
# Standardize the distances (optional: divide by total tree length)
tree_length <- sum(tree$edge.length)
standardized_distances <- patristic_distances / tree_length
# View the standardized distances
print(standardized_distances)
This way we could use the pairwise distance matrix in the plots of syntenic breaks over time (protein distance at the moment)
It may be better to use a phyogenetic based distance software. Many exist including ape:
This way we could use the pairwise distance matrix in the plots of syntenic breaks over time (protein distance at the moment)