Eco-Flow / synteny

A Nextflow pipeline for running synteny analysis.
Other
13 stars 3 forks source link

Use a phylogenetic distance score #86

Closed chriswyatt1 closed 1 month ago

chriswyatt1 commented 2 months ago

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)

chriswyatt1 commented 2 months ago

Caluclated in : 00e46f2

chriswyatt1 commented 1 month ago

Now this is added to output tsv table in : a8f742d

chriswyatt1 commented 1 month ago

So now with the combine script for the figure (../plot_protein_vs_synteny.ex3.printTable.R), you can choose to use tree distance instead of protein similarity