论文
Telomere-to-mitochondria signalling by ZBP1 mediates replicative crisis
s41586-023-05710-8.pdf
大部分图的原始数据都有,争取把有原始数据的图都用R语言来复现一下
41586_2023_5710_MOESM4_ESM (1).xlsx
今天的推文复现一下论文中的Fig1c
论文中提供的数据集部分截图
手动整理成如下格式
然后按照行求均值和均值标准误sem
library(readxl)
library(tidyverse)
dat<-read_excel("data/20230521/figure1c.xlsx")
head(dat)
plotrix::std.error(c(1,2,3))
dat %>%
rowwise() %>%
mutate(mean_value=mean(c(rep1,rep2,rep3)),
std_error=plotrix::std.error(c(rep1,rep2,rep3))) %>%
ungroup() -> new.dat
作图代码
dat %>%
rowwise() %>%
mutate(mean_value=mean(c(rep1,rep2,rep3)),
std_error=plotrix::std.error(c(rep1,rep2,rep3))) %>%
ungroup() -> new.dat
ggplot(data=new.dat,aes(x=time,y=mean_value,color=group))+
geom_errorbar(aes(ymin=mean_value-std_error,
ymax=mean_value+std_error),
width=0.4)+
geom_point(size=5)+
scale_color_manual(values = c("A"="#000000",
"B"="#7bd2f6",
"D"="#094c8b",
"E"="#cbc08c",
"F"="#f27c79"),
labels=c("Vector","mRHIM2","mRHIM1",expression(paste("mZ",alpha,"2")),"WT"),
breaks = c("A","F","E","D","B"),
name=NULL)+
scale_x_continuous(limits = c(0,40),
expand = expansion(mult=c(0,0)),
breaks = seq(0,36,4))+
coord_cartesian(clip = "off")+
theme_classic()+
theme(legend.text = element_text(hjust=0),
legend.position = c(0.1,0.8))+
labs(x="Time (h)",
y=expression(paste("Dead cells per ",mm^2," (%)")))+
annotate(geom = "segment",x=37,xend=37,y=5,yend=28)+
annotate(geom = "segment",x=37,xend=37-0.2,y=28,yend=28)+
annotate(geom = "segment",x=37,xend=37-0.2,y=5,yend=5)+
annotate(geom="text",x=37.5,y=17,label="*n*n*")+
annotate(geom = "segment",x=38,xend=38,y=5,yend=33)+
annotate(geom = "segment",x=38,xend=38-0.2,y=33,yend=33)+
annotate(geom = "segment",x=38,xend=38-0.2,y=5,yend=5)+
annotate(geom="text",x=38.5,y=19,label="*n*n*")
推文记录的是自己的学习笔记,内容可能会存在错误,请大家批判着看,欢迎大家指出其中的错误
示例数据和代码可以给推文打赏一元获取,或者找到论文中的数据自己手动整理
声明:文中观点不代表本站立场。本文传送门:https://eyangzhen.com/30666.html