Hi, I have some questions about unrooted tree. My code is as follows.
treeg <- read.tree("genome_fasttree.txt")
groupg <- read.table("genome_tree_annotation.txt",header=T,sep="\t")
groupginfo_g <-split(groupg$strain,groupg$species)
treegg<-ggtree(treeg,layout="daylight",size=3,branch.length='none')
treegg_group<-groupOTU(treegg,groupginfo_g,'host')+aes(color=host)+
scale_color_manual(values=c("#1a1a1a","#f46d43","#3288bd","#1a9850","#c51b7d"))+
geom_tiplab(size=8)+
theme(legend.position="right")
pg<-treegg_group+new_scale_fill()
pg1<-pg+new_scale_color()
cluster<-groupg[,c(2,3)]
pg2<-pg1 %<+% cluster +
geom_tippoint(aes(color=cluster,shape=cluster),alpha=.7,shape=16)+
scale_color_manual(breaks=c("Gillia_Acer_1","Gillia_Acer_2","Gillia_Acer_3","Gillia_Acer_4","Gillia_Acer_5","none"),values=c("#66c2a5","#8da0cb","#e78ac3","#a6d854","#ffd92f","#737373"))+
scale_shape_manual(breaks=c("Gillia_Acer_1","Gillia_Acer_2","Gillia_Acer_3","Gillia_Acer_4","Gillia_Acer_5","NA"),values=c(21,22,23,24,25,21))
pg2
ggsave("genome_tree2.pdf",treegg_group,width=48,height=40)
First, my tip label embedded in the branches as the picture.