I believe there is a minor issue with the function that exports the results of a ClaDS run to R.
Namely, some of the variables within the phylo objects you export differ from what Ape usually calls them.
This doesn't seem to cause issues when just plotting the results with functions from ape, but other packages, like "ggtree" can't work with your phylo objects.
This is not a big issue, as the tree can just be reimported from the newick file, but with the phylo objects in CladsOutput$enhanced_trees, this is not really an option.
By generating a tree with ape using rtree and then assigning the values from your trees to this tree, everything works, but it's not the nicest workaround.
Steps to reproduce:
#Install ggtree in R (https://bioconductor.org/packages/release/bioc/html/ggtree.html)
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("ggtree")
library(ggtree)
load("clads_output.RData") #Import output from Julia Clads into R
g = ggtree(CladsOutput$tree)
plot(g) #Try to plot tree using ggtree / ggplot2
I'm guessing this is easily fixed by changing the respective variable names in src/clads/export_in_R.jl Line 13, but I'm not good with Julia so I haven't tried to fix it there.
Sidenote: In your installation instructions, you say R packages need to be installed with
I believe there is a minor issue with the function that exports the results of a ClaDS run to R.
Namely, some of the variables within the phylo objects you export differ from what Ape usually calls them. This doesn't seem to cause issues when just plotting the results with functions from ape, but other packages, like "ggtree" can't work with your phylo objects.
Your phylo object:
phylo object created by ape
This is not a big issue, as the tree can just be reimported from the newick file, but with the phylo objects in CladsOutput$enhanced_trees, this is not really an option. By generating a tree with ape using rtree and then assigning the values from your trees to this tree, everything works, but it's not the nicest workaround.
Steps to reproduce:
I'm guessing this is easily fixed by changing the respective variable names in src/clads/export_in_R.jl Line 13, but I'm not good with Julia so I haven't tried to fix it there.
Sidenote: In your installation instructions, you say R packages need to be installed with
This line doesn't work, it needs to be
Otherwise, R will try to use "coda" as the library install location, which doesn't work.