Hi all,
I’ve been trying to plot the calibrated tree from Augur Refine using GGTree in R, but the scale on the x-axis doesn’t match that on the Auspice visualisation.
I ran augur-refine with the following command:
augur refine \
--tree $RESULTS/aligment.fasta.treefile \
--alignment $RESULTS/aligment.fasta \
--metadata $RESULTS/filtered_metadata.tsv \
--output-tree $RESULTS/time_solved.tree \
--output-node-data $RESULTS/time_solved_node_data.json \
--timetree \
--coalescent 'opt' \
--date-confidence \
--date-inference 'joint' \
--root 'best' \
--seed 1234567
and this is the tree when exported into auspice:
So, in R, I’ve ran:
tree <- read.newick("~/Desktop/Phylo/ML/results/time_solved.tree")
tree_plot <- ggtree(tree,
mrsd="2025-10-08",
color="gray30")+
theme_tree2()
tree_plot+
expand_limits(y=-250)
The topology and branch length seem to be the same. However, the temporal scale on the x axis is different.
Therefore, I had to adjust the length of the tree to fit the temporal scale, reproducing an approximate scale of the Auspice visualisation by multiplying the length of the edges by 3270. I tried multiple values before settling on this one, which seems to be the closest to the Auspice scaling.
tree <- read.newick("~/Desktop/Phylo/ML/results/time_solved.tree")
tree$edge.length <- tree$edge.length * 3270
tree_plot <- ggtree(rsva_tree,
mrsd="2025-10-08",
color="gray30")+
theme_tree2()+
expand_limits(y=-150)+
scale_x_continuous(limits = c(1920,2026),
breaks = seq(1920,2025,by=5)
)
tree_plot
Does anyone know if there is a solution for importing and visualising exact values in ggtree?
Best regards,
Diego


