I would like to add a geom_hilight for each phyla from the tip all the way to the root of each phylum. Here is my script and the table below with IDs of the tips and Phyla. Any tips appreciated.
p <- ggtree(tree.HMF.ape,ladderize = T, layout="fan", open.angle=12, size=0.2,right = T)
p1 <- p +
geom_fruit(
data=split.treeoflife,
geom=geom_point,
mapping=aes(y=SGB, colour=Phylum,fill=Phylum),
position="identity",
size=3
) +
scale_size_continuous(
range=c(1, 3), # the range of size.
guide=guide_legend(
keywidth=0.5,
keyheight=0.5,
order=2
)
) +
scale_fill_manual(
values=c("#8c510a","#276419","#b2182b","#2166ac","#fee090","#B0BEC5")
) +
scale_colour_manual(
values=c("#8c510a","#276419","#b2182b","#2166ac","#fee090","#B0BEC5"))
p1
p1 +
new_scale_fill() +
geom_fruit(
data=p.dat2,
geom=geom_tile,
mapping=aes(y=SGB,x=ring_alpha, alpha=MeanPrevalence, fill=ring_alpha),
pwidth=0.05,
axis.params=list(
axis="x", # add axis text of the layer.
text.angle=-45, # the text angle of x-axis.
hjust=0, # adjust the horizontal position of text of axis.
)
) +
scale_fill_manual(
values=c("#081d58", "#67000d"),
guide=guide_legend(keywidth=0.5, keyheight=0.1, order=4,title = "Sample type")
) +
scale_alpha_continuous(
range=c(0, 1), # the range of alpha
guide=guide_legend(keywidth=0.5, keyheight=0.3, order=5,title = "Abundance")
)
I would like to add a geom_hilight for each phyla from the tip all the way to the root of each phylum. Here is my script and the table below with IDs of the tips and Phyla. Any tips appreciated.