大豆响应 SMV 侵染后坏死症状的表达网络解析及 GmPR1-17 功能探究
df$node <- factor(df$node,levels = c(sankey$pathNames %>% unique()%>% rev(),
sankey$metamolites %>% unique() %>% rev()))
#自定义配色:
c4a_gui()
mycol<- c4a('rainbow_wh_rd',53)
#绘图:
p4<- ggplot(df, aes(x = x,
next_x= next_x,
node= node,
next_node= next_node,
fill= node,
label= node)) +
geom_sankey(flow.alpha = 0.5,
flow.fill = 'grey',
flow.color = 'grey80', #条带描边色
node.fill = mycol, #节点填充色
smooth= 8,
width= 0.08) +
geom_sankey_text(size = 3.2,
color= "black")+
theme_void() +
theme(legend.position = 'none')