Вы можете комментировать свое дерево с помощью geom_text
.Не видя ваших данных, трудно понять, что происходит, но вот пример с воспроизводимым набором данных.
library(devtools)
devtools::install_github("GuangchuangYu/ggtree")
bs <- data.frame(nodename = c("t30", "t12", "t22", "t26", "t6", "t17", "t4","t7", "t9", "t1", "t8", "t25","t23",
"t28", "t10", "t20", "t3", "t11", "t19", "t29", "t2","t18", "t24",
"t27", "t15", "t13", "t14", "t16", "t5","t21"), bootstrap = c(runif(30, 85, 98)), stringsAsFactors = F)
bs$bootstrap <- round(bs$bootstrap, digits = 0)
rownames(bs) <- NULL
nodesupport = c(round(runif(59, 65, 80), digits = 0))
set.seed(0)
tree <- rtree(30)
p <- ggtree(tree)
p <- p %<+% bs + geom_tiplab()
p <- p + geom_text(aes(label = bootstrap), hjust = 1, vjust = -0.4, size = 3) + geom_nodelab(aes(label = nodesupport)) # specify your node label here, looks like BP
p