Genomic insights into local adaptation and future climate-induced vulnerability of a keystone forest tree in East Asia
https://www.nature.com/articles/s41467-022-34206-8
论文的代码链接
https://github.com/jingwanglab/Populus_genomic_prediction_climate_vulnerability
今天的推文我们尝试复现一下论文中的figure3e和figure3i
image.png
image.png
image.png
p1<-ggplot(data = dat.fig3e,aes(x=hour,y=relative_expression))+
geom_point(aes(color=base),size=5)+
geom_line(aes(color=base),
show.legend = FALSE)+
geom_errorbar(aes(ymin=relative_expression-STD,
ymax=relative_expression+STD,color=base),
width=0.4)+
theme_bw(base_size = 20)+
theme(panel.grid = element_blank(),
legend.position = c(0.2,0.8))+
scale_color_manual(values = c("ALT"="#a2c0e4",
"REF"="#2d52a2"),
labels=c("CC","TC"),
name=NULL)+
labs(x="Time since submergence stress",
y="Expression")
p1
image.png
image.png
作图代码基本和fig3e的一致
但是这里的时间跨度从0,1,2,3突然跨到24,这样出图不是很好看,我们把24改成4,然后在坐标轴标签上再改为24
p2<-ggplot(data = dat.fig3i,aes(x=hour,y=relative_expression))+
geom_point(aes(color=base),size=5)+
geom_line(aes(color=base),
show.legend = FALSE)+
geom_errorbar(aes(ymin=relative_expression-STD,
ymax=relative_expression+STD,color=base),
width=0.2)+
theme_bw(base_size = 20)+
theme(panel.grid = element_blank(),
legend.position = c(0.2,0.8))+
scale_color_manual(values = c("ALT"="#e1c4c4",
"REF"="#b0383f"),
labels=c("AA","GG"),
name=NULL)+
labs(x="Time since heat stress",
y="Expression")+
scale_x_continuous(breaks = 0:4,
labels = paste0(c(0,1,2,3,24),"h"))
p2
image.png
library(patchwork)
p1+p2
image.png