-
Notifications
You must be signed in to change notification settings - Fork 32
Description
Hi there,
I'm trying to get a scale bar for my phlyogenetic tree.
I’m using the instructions found in this tutorial: https://f1000research.com/articles/5-1492/v2
After I process my sequences and run the alignment, my script is as follows:
phang.align <- phyDat(as(alignment, "matrix"), type="DNA")
dm <- dist.ml(phang.align)
treeNJ <- NJ(dm)
fit = pml(treeNJ, data=phang.align)
negative edges length changed to 0!
fitGTR <- update(fit, k=4, inv=0.2)
fitGTR <- optim.pml(fitGTR, model="GTR", optInv=TRUE, optGamma=TRUE, rearrangement = "stochastic", control = pml.control (trace = 0))
I combine this into my phyloseq object, then I filter and prune my data set to give me the new phyloseq object: test15_2
I plot this tree using:
plot_tree(test15_2, color="Species", ladderize="left", label.tips=labeltips)
But I’m unsure of how to add the scale bar in here?
Any help would be appreciated.
Cheers,