yayuhuang commited on
Commit
5fcf3da
·
verified ·
1 Parent(s): eef915c

Upload Figure4 and FigureS4/Figure4 and FigureS4 v2.qmd

Browse files
Figure4 and FigureS4/Figure4 and FigureS4 v2.qmd ADDED
@@ -0,0 +1,1035 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: "Figure 5 and S5 v2"
3
+ format: html
4
+ editor: visual
5
+ ---
6
+
7
+ ## Quarto
8
+
9
+ Quarto enables you to weave together content and executable code into a finished document. To learn more about Quarto see <https://quarto.org>.
10
+
11
+ ## Running Code
12
+
13
+ ## 1.单因素方差分析
14
+
15
+ ### 1.1组合过表达统计分析
16
+
17
+ ```{r}
18
+ # =====================================================
19
+ # ANOVA分析 - SCI发表标准版
20
+ # 优化图形,标注p值
21
+ # =====================================================
22
+
23
+ # 加载必要的包
24
+ library(ggplot2)
25
+ library(ggsignif)
26
+ library(dplyr)
27
+ library(tidyr)
28
+
29
+ # 准备数据
30
+ data <- data.frame(
31
+ control = c(10, 12, 16, 11, 12, 5, 1, 5, 6),
32
+ GA = c(30, 28, 12, 10, 23, 14, 1, 20, 14),
33
+ GB = c(16, 49, 45, 28, 15, 43, 33, 19, 12),
34
+ GC = c(20, 41, 23, 11, 31, 4, 0, 26, 32)
35
+ )
36
+
37
+ # 转换为长格式
38
+ data_long <- pivot_longer(data,
39
+ cols = everything(),
40
+ names_to = "group",
41
+ values_to = "value")
42
+
43
+ data_long$group <- factor(data_long$group,
44
+ levels = c("control", "GA", "GB", "GC"))
45
+
46
+ # =====================================================
47
+ # 统计分析
48
+ # =====================================================
49
+
50
+ # ANOVA
51
+ anova_result <- aov(value ~ group, data = data_long)
52
+ summary_anova <- summary(anova_result)
53
+ anova_p <- summary_anova[[1]]$`Pr(>F)`[1]
54
+
55
+ # 效应量 (eta-squared)
56
+ eta_squared <- summary_anova[[1]]$`Sum Sq`[1] / sum(summary_anova[[1]]$`Sum Sq`)
57
+
58
+ # Tukey HSD事后检验
59
+ tukey_result <- TukeyHSD(anova_result)
60
+
61
+ # 提取与control组的比较结果
62
+ control_comparisons <- tukey_result$group[grep("control", rownames(tukey_result$group)), ]
63
+
64
+ # 创建比较结果数据框
65
+ comparisons_df <- data.frame(
66
+ comparison = rownames(control_comparisons),
67
+ diff = control_comparisons[, "diff"],
68
+ p_adj = control_comparisons[, "p adj"],
69
+ stars = case_when(
70
+ control_comparisons[, "p adj"] < 0.001 ~ "***",
71
+ control_comparisons[, "p adj"] < 0.01 ~ "**",
72
+ control_comparisons[, "p adj"] < 0.05 ~ "*",
73
+ TRUE ~ "ns"
74
+ ),
75
+ p_label = case_when(
76
+ control_comparisons[, "p adj"] < 0.001 ~ "p < 0.001",
77
+ control_comparisons[, "p adj"] < 0.01 ~ paste0("p = ", round(control_comparisons[, "p adj"], 3)),
78
+ control_comparisons[, "p adj"] < 0.05 ~ paste0("p = ", round(control_comparisons[, "p adj"], 3)),
79
+ TRUE ~ paste0("p = ", round(control_comparisons[, "p adj"], 3))
80
+ )
81
+ )
82
+
83
+ # 打印统计结果
84
+ cat("\n========== ANOVA Results ==========\n")
85
+ print(summary_anova)
86
+ cat("\nEffect size (η²) =", round(eta_squared, 3), "\n")
87
+
88
+ cat("\n========== Tukey HSD Results (vs control) ==========\n")
89
+ print(comparisons_df)
90
+
91
+ # 描述性统计
92
+ summary_stats <- data_long %>%
93
+ group_by(group) %>%
94
+ summarise(
95
+ n = n(),
96
+ Mean = round(mean(value), 2),
97
+ SD = round(sd(value), 2),
98
+ SEM = round(sd(value)/sqrt(n()), 2),
99
+ Min = min(value),
100
+ Max = max(value)
101
+ )
102
+
103
+ cat("\n========== Descriptive Statistics ==========\n")
104
+ print(summary_stats)
105
+
106
+ # =====================================================
107
+ # SCI期刊标准主题
108
+ # =====================================================
109
+
110
+ theme_sci <- theme_classic(base_size = 11) +
111
+ theme(
112
+ axis.title = element_text(size = 11, face = "bold"),
113
+ axis.text = element_text(size = 9, color = "black"),
114
+ axis.line = element_line(color = "black", size = 0.5),
115
+ axis.ticks = element_line(color = "black", size = 0.5),
116
+ legend.position = "none",
117
+ plot.title = element_text(size = 12, face = "bold", hjust = 0.5),
118
+ plot.subtitle = element_text(size = 9, color = "gray40", hjust = 0.5),
119
+ plot.margin = margin(0.5, 0.5, 0.5, 0.5, "cm")
120
+ )
121
+
122
+ # =====================================================
123
+ # 计算y轴最大位置(为p值标注留空间)
124
+ # =====================================================
125
+
126
+ y_max <- max(data_long$value)
127
+ y_positions <- c(y_max + 8, y_max + 12, y_max + 10) # 调整位置避免重叠
128
+
129
+ # =====================================================
130
+ # SCI标准配色
131
+ # =====================================================
132
+
133
+ sci_colors <- c(
134
+ "control" = "#999999", # 灰色
135
+ "GA" = "#E69F00", # 橙色
136
+ "GB" = "#56B4E9", # 蓝色
137
+ "GC" = "#009E73" # 绿色
138
+ )
139
+
140
+ # =====================================================
141
+ # 方法1:星号标注(最简洁,SCI常用)
142
+ # =====================================================
143
+
144
+ p1 <- ggplot(data_long, aes(x = group, y = value, fill = group)) +
145
+ geom_boxplot(alpha = 0.8, outlier.shape = NA, width = 0.6, size = 0.4) +
146
+ geom_jitter(width = 0.15, alpha = 0.6, size = 1.8,
147
+ shape = 21, color = "black", stroke = 0.3) +
148
+ scale_fill_manual(values = sci_colors) +
149
+ labs(
150
+ x = "",
151
+ y = "Number of infected neurons"
152
+ ) +
153
+ theme_sci +
154
+ ylim(0, y_max + 15)
155
+
156
+ # 添加ANOVA结果
157
+ p1 <- p1 + annotate("text", x = 2.5, y = y_max + 12,
158
+ label = paste0("ANOVA: p = ", format.pval(anova_p, digits = 3),
159
+ ", η² = ", round(eta_squared, 3)),
160
+ size = 3, fontface = "italic")
161
+
162
+ # 添加星号标注(只标注显著的)
163
+ for (i in 1:nrow(comparisons_df)) {
164
+ if (comparisons_df$p_adj[i] < 0.05) {
165
+ grp_name <- gsub("-control", "", comparisons_df$comparison[i])
166
+ grp_x <- which(levels(data_long$group) == grp_name)
167
+
168
+ p1 <- p1 + annotate("text",
169
+ x = grp_x,
170
+ y = y_max + 5,
171
+ label = comparisons_df$stars[i],
172
+ size = 6, fontface = "bold")
173
+ }
174
+ }
175
+
176
+ print(p1)
177
+
178
+ # =====================================================
179
+ # 方法2:bracket + p值(更正式)
180
+ # =====================================================
181
+
182
+ p2 <- ggplot(data_long, aes(x = group, y = value, fill = group)) +
183
+ geom_boxplot(alpha = 0.8, outlier.shape = NA, width = 0.6, size = 0.4) +
184
+ geom_jitter(width = 0.15, alpha = 0.6, size = 1.8,
185
+ shape = 21, color = "black", stroke = 0.3) +
186
+ scale_fill_manual(values = sci_colors) +
187
+ labs(
188
+ x = "",
189
+ y = "Number of infected neurons"
190
+ ) +
191
+ theme_sci +
192
+ ylim(0, y_max + 18)
193
+
194
+ # 添加ANOVA结果
195
+ p2 <- p2 + annotate("text", x = 2.5, y = y_max + 15,
196
+ label = paste0("ANOVA: p = ", format.pval(anova_p, digits = 3),
197
+ ", η² = ", round(eta_squared, 3)),
198
+ size = 3, fontface = "italic")
199
+
200
+ # 添加bracket和p值(只标注显著的)
201
+ sig_idx <- which(comparisons_df$p_adj < 0.05)
202
+ for (i in seq_along(sig_idx)) {
203
+ idx <- sig_idx[i]
204
+ grp_name <- gsub("-control", "", comparisons_df$comparison[idx])
205
+ grp_x <- which(levels(data_long$group) == grp_name)
206
+ y_pos <- y_positions[i]
207
+
208
+ # 绘制bracket线
209
+ p2 <- p2 +
210
+ annotate("segment",
211
+ x = 1, xend = grp_x,
212
+ y = y_pos, yend = y_pos,
213
+ color = "black", size = 0.4) +
214
+ annotate("segment",
215
+ x = 1, xend = 1,
216
+ y = y_pos - 0.3, yend = y_pos,
217
+ color = "black", size = 0.4) +
218
+ annotate("segment",
219
+ x = grp_x, xend = grp_x,
220
+ y = y_pos - 0.3, yend = y_pos,
221
+ color = "black", size = 0.4) +
222
+ annotate("text",
223
+ x = (1 + grp_x) / 2,
224
+ y = y_pos + 0.5,
225
+ label = comparisons_df$p_label[idx],
226
+ size = 2.8, fontface = "italic")
227
+ }
228
+
229
+ print(p2)
230
+
231
+ # =====================================================
232
+ # 方法3:使用ggsignif包
233
+ # =====================================================
234
+
235
+ # 创建比较列表和对应的y位置
236
+ comparison_list <- list(c("control", "GA"), c("control", "GB"), c("control", "GC"))
237
+ annotation_list <- comparisons_df$p_label
238
+ y_pos_ggsignif <- c(y_max + 8, y_max + 12, y_max + 16)
239
+
240
+ p3 <- ggplot(data_long, aes(x = group, y = value, fill = group)) +
241
+ geom_boxplot(alpha = 0.8, outlier.shape = NA, width = 0.6, size = 0.4) +
242
+ geom_jitter(width = 0.15, alpha = 0.6, size = 1.8,
243
+ shape = 21, color = "black", stroke = 0.3) +
244
+ scale_fill_manual(values = sci_colors) +
245
+ labs(
246
+ x = "",
247
+ y = "Number of infected neurons"
248
+ ) +
249
+ theme_sci +
250
+ ylim(0, y_max + 20)
251
+
252
+ # 添加ANOVA结果
253
+ p3 <- p3 + annotate("text", x = 2.5, y = y_max + 17,
254
+ label = paste0("ANOVA: p = ", format.pval(anova_p, digits = 3),
255
+ ", η² = ", round(eta_squared, 3)),
256
+ size = 3, fontface = "italic")
257
+
258
+ # 使用ggsignif添加显著性标记
259
+ p3 <- p3 + geom_signif(
260
+ comparisons = comparison_list,
261
+ annotations = annotation_list,
262
+ y_position = y_pos_ggsignif,
263
+ tip_length = 0.01,
264
+ size = 0.4,
265
+ textsize = 2.8,
266
+ vjust = -0.2
267
+ )
268
+
269
+ print(p3)
270
+
271
+ # =====================================================
272
+ # 保存图形
273
+ # =====================================================
274
+
275
+ output_dir <- "I:/RV Entry Factor Paper/Figure5 and FigureS5"
276
+ if(!dir.exists(output_dir)) {
277
+ dir.create(output_dir, recursive = TRUE)
278
+ }
279
+
280
+ # 保存三种版本
281
+ ggsave(file.path(output_dir, "Figure5_ANOVA_stars.pdf"),
282
+ p1, width = 5, height = 5, device = cairo_pdf)
283
+ ggsave(file.path(output_dir, "Figure5_ANOVA_stars.png"),
284
+ p1, width = 5, height = 5, dpi = 300, bg = "white")
285
+
286
+ ggsave(file.path(output_dir, "Figure5_ANOVA_bracket.pdf"),
287
+ p2, width = 5, height = 5, device = cairo_pdf)
288
+
289
+ ggsave(file.path(output_dir, "Figure5_ANOVA_ggsignif.pdf"),
290
+ p3, width = 5, height = 5, device = cairo_pdf)
291
+
292
+ # 保存统计结果
293
+ write.csv(summary_stats, file.path(output_dir, "Summary_statistics.csv"), row.names = FALSE)
294
+ write.csv(comparisons_df, file.path(output_dir, "Tukey_HSD_results.csv"), row.names = FALSE)
295
+
296
+ cat("\n========== Analysis Complete ==========\n")
297
+ cat("Output directory:", output_dir, "\n")
298
+ cat("\nGenerated files:\n")
299
+ cat(" - Figure5_ANOVA_stars.pdf (星号标注)\n")
300
+ cat(" - Figure5_ANOVA_stars.png\n")
301
+ cat(" - Figure5_ANOVA_bracket.pdf (bracket+p值)\n")
302
+ cat(" - Figure5_ANOVA_ggsignif.pdf (ggsignif包)\n")
303
+ cat(" - Summary_statistics.csv\n")
304
+ cat(" - Tukey_HSD_results.csv\n")
305
+ ```
306
+
307
+ ### 1.2 GroupB单独过表达统计分析
308
+
309
+ ```{r}
310
+ # =====================================================
311
+ # SAD-B19感染实验 - 各组与Control比较(只保留同一批次Control)
312
+ # Control批次: 1, 5, 6
313
+ # =====================================================
314
+
315
+ # 加载必要的包
316
+ library(ggplot2)
317
+ library(dplyr)
318
+ library(cowplot)
319
+
320
+ # 设置输出路径(请根据实际情况修改)
321
+ output_dir <- "I:/RV Entry Factor Paper/Figure5 and FigureS5"
322
+ if(!dir.exists(output_dir)) {
323
+ dir.create(output_dir, recursive = TRUE)
324
+ }
325
+
326
+ # =====================================================
327
+ # 1. 准备数据
328
+ # =====================================================
329
+
330
+ # 只使用同一批次的Control
331
+ data_list <- list(
332
+ control = c(1, 5, 6), # 只保留同一批次的3个值
333
+ Car10 = c(9, 12, 10),
334
+ Cplx2 = c(10, 14, 20, 12),
335
+ Slc1a2 = c(7, 12, 11, 1),
336
+ Fxyd7 = c(4, 11, 1),
337
+ Arc = c(1, 8, 0)
338
+ )
339
+
340
+ # 转换为长格式数据框
341
+ df <- data.frame()
342
+ for (grp in names(data_list)) {
343
+ df <- rbind(df, data.frame(
344
+ group = grp,
345
+ value = data_list[[grp]]
346
+ ))
347
+ }
348
+
349
+ # 设置因子顺序(control作为第一组)
350
+ df$group <- factor(df$group, levels = c("control", "Car10", "Cplx2", "Slc1a2", "Fxyd7", "Arc"))
351
+
352
+ # =====================================================
353
+ # 2. 描述性统计
354
+ # =====================================================
355
+
356
+ summary_stats <- df %>%
357
+ group_by(group) %>%
358
+ summarise(
359
+ n = n(),
360
+ Mean = round(mean(value), 2),
361
+ SD = round(sd(value), 2),
362
+ SEM = round(sd(value)/sqrt(n()), 2),
363
+ Min = min(value),
364
+ Max = max(value)
365
+ )
366
+
367
+ cat("\n========== Descriptive Statistics ==========\n")
368
+ print(as.data.frame(summary_stats))
369
+
370
+ # =====================================================
371
+ # 3. 单因素ANOVA
372
+ # =====================================================
373
+
374
+ anova_result <- aov(value ~ group, data = df)
375
+ summary_anova <- summary(anova_result)
376
+ anova_p <- summary_anova[[1]]$`Pr(>F)`[1]
377
+ eta_squared <- summary_anova[[1]]$`Sum Sq`[1] / sum(summary_anova[[1]]$`Sum Sq`)
378
+
379
+ cat("\n========== ANOVA Results ==========\n")
380
+ print(summary_anova)
381
+ cat("\nEffect size (η²) =", round(eta_squared, 3), "\n")
382
+
383
+ # =====================================================
384
+ # 4. 各组与Control的t检验
385
+ # =====================================================
386
+
387
+ control_data <- data_list$control
388
+ test_groups <- c("Car10", "Cplx2", "Slc1a2", "Fxyd7", "Arc")
389
+
390
+ # 存储结果
391
+ results <- data.frame(
392
+ group = test_groups,
393
+ mean_control = mean(control_data),
394
+ mean_test = NA,
395
+ mean_diff = NA,
396
+ p_value = NA,
397
+ p_label = NA
398
+ )
399
+
400
+ for (i in 1:length(test_groups)) {
401
+ grp <- test_groups[i]
402
+ test_data <- data_list[[grp]]
403
+ t_result <- t.test(test_data, control_data)
404
+
405
+ results$mean_test[i] <- mean(test_data)
406
+ results$mean_diff[i] <- mean(test_data) - mean(control_data)
407
+ results$p_value[i] <- t_result$p.value
408
+
409
+ # 格式化p值标签
410
+ if (t_result$p.value < 0.001) {
411
+ results$p_label[i] <- "p < 0.001"
412
+ } else if (t_result$p.value < 0.01) {
413
+ results$p_label[i] <- paste0("p = ", round(t_result$p.value, 3))
414
+ } else if (t_result$p.value < 0.05) {
415
+ results$p_label[i] <- paste0("p = ", round(t_result$p.value, 3))
416
+ } else {
417
+ results$p_label[i] <- paste0("p = ", round(t_result$p.value, 3))
418
+ }
419
+ }
420
+
421
+ cat("\n========== Pairwise t-test (each group vs control) ==========\n")
422
+ print(results)
423
+
424
+ # =====================================================
425
+ # 5. SCI期刊标准主题
426
+ # =====================================================
427
+
428
+ theme_sci <- theme_classic(base_size = 11) +
429
+ theme(
430
+ axis.title = element_text(size = 11, face = "bold"),
431
+ axis.text = element_text(size = 9, color = "black"),
432
+ axis.line = element_line(color = "black", size = 0.5),
433
+ axis.ticks = element_line(color = "black", size = 0.5),
434
+ legend.position = "none",
435
+ plot.margin = margin(0.5, 0.5, 0.5, 0.5, "cm")
436
+ )
437
+
438
+ # =====================================================
439
+ # 6. SCI标准配色
440
+ # =====================================================
441
+
442
+ sci_colors <- c(
443
+ "control" = "#999999", # 灰色
444
+ "Car10" = "#E69F00", # 橙色
445
+ "Cplx2" = "#56B4E9", # 蓝色
446
+ "Slc1a2" = "#009E73", # 绿色
447
+ "Fxyd7" = "#F0E442", # 黄色
448
+ "Arc" = "#D55E00" # 红色
449
+ )
450
+
451
+ # =====================================================
452
+ # 7. 计算y轴位置(为p值标注留空间)
453
+ # =====================================================
454
+
455
+ group_max <- df %>%
456
+ group_by(group) %>%
457
+ summarise(max_val = max(value))
458
+
459
+ control_max <- group_max$max_val[group_max$group == "control"]
460
+ y_max <- max(df$value)
461
+
462
+ # 为每个实验组计算标注位置
463
+ for (i in 1:nrow(results)) {
464
+ grp <- results$group[i]
465
+ test_max <- group_max$max_val[group_max$group == grp]
466
+ results$y_pos[i] <- max(control_max, test_max) + 1 + (i * 0.8)
467
+ }
468
+
469
+ # =====================================================
470
+ # 8. 方法1:在每个实验组上方直接标注p值
471
+ # =====================================================
472
+
473
+ p1 <- ggplot(df, aes(x = group, y = value, fill = group)) +
474
+ geom_boxplot(alpha = 0.8, outlier.shape = NA, width = 0.6, size = 0.4) +
475
+ geom_jitter(width = 0.15, alpha = 0.7, size = 2.5,
476
+ shape = 21, color = "black", stroke = 0.3) +
477
+ scale_fill_manual(values = sci_colors) +
478
+ labs(
479
+ x = "",
480
+ y = "Number of SAD-B19 infected neurons"
481
+ ) +
482
+ theme_sci +
483
+ ylim(0, y_max + 6)
484
+
485
+ # 添加ANOVA结果
486
+ p1 <- p1 + annotate("text", x = 3.5, y = y_max + 5,
487
+ label = paste0("ANOVA: p = ", format.pval(anova_p, digits = 3),
488
+ ", η² = ", round(eta_squared, 3)),
489
+ size = 3, fontface = "italic")
490
+
491
+ # 在每个实验组上方标注p值
492
+ for (i in 1:nrow(results)) {
493
+ grp_x <- which(levels(df$group) == results$group[i])
494
+ grp_y <- results$y_pos[i]
495
+
496
+ p1 <- p1 + annotate("text",
497
+ x = grp_x,
498
+ y = grp_y,
499
+ label = results$p_label[i],
500
+ size = 3, fontface = "italic")
501
+ }
502
+
503
+ print(p1)
504
+
505
+ # =====================================================
506
+ # 9. 方法2:用bracket线连接Control和实验组,标注p值
507
+ # =====================================================
508
+
509
+ # 计算bracket的y位置
510
+ y_positions <- seq(y_max + 1, y_max + 5, length.out = nrow(results))
511
+
512
+ p2 <- ggplot(df, aes(x = group, y = value, fill = group)) +
513
+ geom_boxplot(alpha = 0.8, outlier.shape = NA, width = 0.6, size = 0.4) +
514
+ geom_jitter(width = 0.15, alpha = 0.7, size = 2.5,
515
+ shape = 21, color = "black", stroke = 0.3) +
516
+ scale_fill_manual(values = sci_colors) +
517
+ labs(
518
+ x = "",
519
+ y = "Number of SAD-B19 infected neurons"
520
+ ) +
521
+ theme_sci +
522
+ ylim(0, y_max + 7)
523
+
524
+ # 添加ANOVA结果
525
+ p2 <- p2 + annotate("text", x = 3.5, y = y_max + 6,
526
+ label = paste0("ANOVA: p = ", format.pval(anova_p, digits = 3),
527
+ ", η² = ", round(eta_squared, 3)),
528
+ size = 3, fontface = "italic")
529
+
530
+ # 为每个实验组添加bracket和p值
531
+ for (i in 1:nrow(results)) {
532
+ grp_x <- which(levels(df$group) == results$group[i])
533
+ y_pos <- y_positions[i]
534
+
535
+ # 绘制bracket线
536
+ p2 <- p2 +
537
+ annotate("segment",
538
+ x = 1, xend = grp_x,
539
+ y = y_pos, yend = y_pos,
540
+ color = "black", size = 0.4) +
541
+ annotate("segment",
542
+ x = 1, xend = 1,
543
+ y = y_pos - 0.3, yend = y_pos,
544
+ color = "black", size = 0.4) +
545
+ annotate("segment",
546
+ x = grp_x, xend = grp_x,
547
+ y = y_pos - 0.3, yend = y_pos,
548
+ color = "black", size = 0.4) +
549
+ # 添加p值标签
550
+ annotate("text",
551
+ x = (1 + grp_x) / 2,
552
+ y = y_pos + 0.5,
553
+ label = results$p_label[i],
554
+ size = 2.8, fontface = "italic")
555
+ }
556
+
557
+ print(p2)
558
+
559
+ # =====================================================
560
+ # 10. 方法3:星号标注(SCI最常用)
561
+ # =====================================================
562
+
563
+ # 为每个实验组生成星号
564
+ results$stars <- case_when(
565
+ results$p_value < 0.001 ~ "***",
566
+ results$p_value < 0.01 ~ "**",
567
+ results$p_value < 0.05 ~ "*",
568
+ TRUE ~ "ns"
569
+ )
570
+
571
+ p3 <- ggplot(df, aes(x = group, y = value, fill = group)) +
572
+ geom_boxplot(alpha = 0.8, outlier.shape = NA, width = 0.6, size = 0.4) +
573
+ geom_jitter(width = 0.15, alpha = 0.7, size = 2.5,
574
+ shape = 21, color = "black", stroke = 0.3) +
575
+ scale_fill_manual(values = sci_colors) +
576
+ labs(
577
+ x = "",
578
+ y = "Number of SAD-B19 infected neurons"
579
+ ) +
580
+ theme_sci +
581
+ ylim(0, y_max + 3)
582
+
583
+ # 添加ANOVA结果
584
+ p3 <- p3 + annotate("text", x = 3.5, y = y_max + 2.5,
585
+ label = paste0("ANOVA: p = ", format.pval(anova_p, digits = 3)),
586
+ size = 3, fontface = "italic")
587
+
588
+ # 添加星号标注
589
+ for (i in 1:nrow(results)) {
590
+ if (results$p_value[i] < 0.05) {
591
+ grp_x <- which(levels(df$group) == results$group[i])
592
+ test_max <- group_max$max_val[group_max$group == results$group[i]]
593
+ y_pos <- test_max + 0.8
594
+
595
+ p3 <- p3 + annotate("text",
596
+ x = grp_x,
597
+ y = y_pos,
598
+ label = results$stars[i],
599
+ size = 5, fontface = "bold")
600
+ }
601
+ }
602
+
603
+ print(p3)
604
+
605
+ # =====================================================
606
+ # 11. 组合图形(方法1+方法2)
607
+ # =====================================================
608
+
609
+ combined <- plot_grid(p1, p2, ncol = 2, labels = c("A", "B"), label_size = 12)
610
+
611
+ # =====================================================
612
+ # 12. 保存图形
613
+ # =====================================================
614
+
615
+ # 方法1:直接标注p值
616
+ ggsave(file.path(output_dir, "Figure_SAD_B19_pvalues_above_bars.pdf"),
617
+ p1, width = 4, height = 8, device = cairo_pdf)
618
+ ggsave(file.path(output_dir, "Figure_SAD_B19_pvalues_above_bars.png"),
619
+ p1, width = 4, height = 8, dpi = 300, bg = "white")
620
+
621
+ # 方法2:bracket标注
622
+ ggsave(file.path(output_dir, "Figure_SAD_B19_pvalues_bracket.pdf"),
623
+ p2, width = 4, height = 8, device = cairo_pdf)
624
+
625
+ # 方法3:星号标注(推荐用于SCI发表)
626
+ ggsave(file.path(output_dir, "Figure_SAD_B19_stars.pdf"),
627
+ p3, width = 4, height = 8, device = cairo_pdf)
628
+ ggsave(file.path(output_dir, "Figure_SAD_B19_stars.png"),
629
+ p3, width = 4, height = 8, dpi = 300, bg = "white")
630
+
631
+ # 组合图形
632
+ ggsave(file.path(output_dir, "Figure_SAD_B19_combined.pdf"),
633
+ combined, width = 12, height = 5, device = cairo_pdf)
634
+
635
+ # =====================================================
636
+ # 13. 保存统计结果
637
+ # =====================================================
638
+
639
+ write.csv(summary_stats, file.path(output_dir, "Summary_statistics.csv"), row.names = FALSE)
640
+ write.csv(results, file.path(output_dir, "Pairwise_comparison_results.csv"), row.names = FALSE)
641
+
642
+ # =====================================================
643
+ # 14. 打印所有p值
644
+ # =====================================================
645
+
646
+ cat("\n========== All P-values (vs Control, same batch) ==========\n")
647
+ cat("Control values:", paste(control_data, collapse = ", "), "\n")
648
+ cat("Control mean:", mean(control_data), "\n\n")
649
+
650
+ for (i in 1:nrow(results)) {
651
+ cat(results$group[i], "vs Control:\n")
652
+ cat(" Test mean:", round(results$mean_test[i], 2), "\n")
653
+ cat(" Mean difference:", round(results$mean_diff[i], 2), "\n")
654
+ cat(" p =", results$p_value[i],
655
+ ifelse(results$p_value[i] < 0.05, " *", " ns"), "\n\n")
656
+ }
657
+
658
+ cat("\n========== Analysis Complete ==========\n")
659
+ cat("Output directory:", output_dir, "\n")
660
+ cat("\nGenerated files:\n")
661
+ cat(" - Figure_SAD_B19_pvalues_above_bars.pdf (p值标注在柱上)\n")
662
+ cat(" - Figure_SAD_B19_pvalues_bracket.pdf (bracket标注)\n")
663
+ cat(" - Figure_SAD_B19_stars.pdf (星号标注,推荐)\n")
664
+ cat(" - Figure_SAD_B19_combined.pdf (组合图)\n")
665
+ cat(" - Summary_statistics.csv\n")
666
+ cat(" - Pairwise_comparison_results.csv\n")
667
+ ```
668
+
669
+ ```{r}
670
+ # =====================================================
671
+ # SAD-B19感染实验 - 各组与Control比较(只保留同一批次Control)
672
+ # Control批次: 1, 5, 6
673
+ # 图形顺序: control, Cplx2, Car10, Slc1a2, Fxyd7, Arc
674
+ # =====================================================
675
+
676
+ # 加载必要的包
677
+ library(ggplot2)
678
+ library(dplyr)
679
+ library(cowplot)
680
+
681
+ # 设置输出路径(请根据实际情况修改)
682
+ output_dir <- "I:/RV Entry Factor Paper/Figure5 and FigureS5"
683
+ if(!dir.exists(output_dir)) {
684
+ dir.create(output_dir, recursive = TRUE)
685
+ }
686
+
687
+ # =====================================================
688
+ # 1. 准备数据
689
+ # =====================================================
690
+
691
+ # 只使用同一批次的Control
692
+ data_list <- list(
693
+ control = c(1, 5, 6),
694
+ Cplx2 = c(10, 14, 20, 12),
695
+ Car10 = c(9, 12, 10),
696
+ Slc1a2 = c(7, 12, 11, 1),
697
+ Fxyd7 = c(4, 11, 1),
698
+ Arc = c(1, 8, 0)
699
+ )
700
+
701
+ # 转换为长格式数据框
702
+ df <- data.frame()
703
+ for (grp in names(data_list)) {
704
+ df <- rbind(df, data.frame(
705
+ group = grp,
706
+ value = data_list[[grp]]
707
+ ))
708
+ }
709
+
710
+ # 设置因子顺序(control第一,然后按指定顺序)
711
+ df$group <- factor(df$group, levels = c("control", "Cplx2", "Car10", "Slc1a2", "Fxyd7", "Arc"))
712
+
713
+ # =====================================================
714
+ # 2. 描述性统计
715
+ # =====================================================
716
+
717
+ summary_stats <- df %>%
718
+ group_by(group) %>%
719
+ summarise(
720
+ n = n(),
721
+ Mean = round(mean(value), 2),
722
+ SD = round(sd(value), 2),
723
+ SEM = round(sd(value)/sqrt(n()), 2),
724
+ Min = min(value),
725
+ Max = max(value)
726
+ )
727
+
728
+ cat("\n========== Descriptive Statistics ==========\n")
729
+ print(as.data.frame(summary_stats))
730
+
731
+ # =====================================================
732
+ # 3. 单因素ANOVA
733
+ # =====================================================
734
+
735
+ anova_result <- aov(value ~ group, data = df)
736
+ summary_anova <- summary(anova_result)
737
+ anova_p <- summary_anova[[1]]$`Pr(>F)`[1]
738
+ eta_squared <- summary_anova[[1]]$`Sum Sq`[1] / sum(summary_anova[[1]]$`Sum Sq`)
739
+
740
+ cat("\n========== ANOVA Results ==========\n")
741
+ print(summary_anova)
742
+ cat("\nEffect size (η²) =", round(eta_squared, 3), "\n")
743
+
744
+ # =====================================================
745
+ # 4. 各组与Control的t检验
746
+ # =====================================================
747
+
748
+ control_data <- data_list$control
749
+ test_groups <- c("Cplx2", "Car10", "Slc1a2", "Fxyd7", "Arc")
750
+
751
+ # 存储结果
752
+ results <- data.frame(
753
+ group = test_groups,
754
+ mean_control = mean(control_data),
755
+ mean_test = NA,
756
+ mean_diff = NA,
757
+ p_value = NA,
758
+ p_label = NA
759
+ )
760
+
761
+ for (i in 1:length(test_groups)) {
762
+ grp <- test_groups[i]
763
+ test_data <- data_list[[grp]]
764
+ t_result <- t.test(test_data, control_data)
765
+
766
+ results$mean_test[i] <- mean(test_data)
767
+ results$mean_diff[i] <- mean(test_data) - mean(control_data)
768
+ results$p_value[i] <- t_result$p.value
769
+
770
+ # 格式化p值标签
771
+ if (t_result$p.value < 0.001) {
772
+ results$p_label[i] <- "p < 0.001"
773
+ } else if (t_result$p.value < 0.01) {
774
+ results$p_label[i] <- paste0("p = ", round(t_result$p.value, 3))
775
+ } else if (t_result$p.value < 0.05) {
776
+ results$p_label[i] <- paste0("p = ", round(t_result$p.value, 3))
777
+ } else {
778
+ results$p_label[i] <- paste0("p = ", round(t_result$p.value, 3))
779
+ }
780
+ }
781
+
782
+ # 按图形顺序重新排列results
783
+ results$group <- factor(results$group, levels = c("Cplx2", "Car10", "Slc1a2", "Fxyd7", "Arc"))
784
+ results <- results[order(results$group), ]
785
+
786
+ cat("\n========== Pairwise t-test (each group vs control) ==========\n")
787
+ print(results)
788
+
789
+ # =====================================================
790
+ # 5. SCI期刊标准主题
791
+ # =====================================================
792
+
793
+ theme_sci <- theme_classic(base_size = 11) +
794
+ theme(
795
+ axis.title = element_text(size = 11, face = "bold"),
796
+ axis.text = element_text(size = 9, color = "black"),
797
+ axis.line = element_line(color = "black", size = 0.5),
798
+ axis.ticks = element_line(color = "black", size = 0.5),
799
+ legend.position = "none",
800
+ plot.margin = margin(0.5, 0.5, 0.5, 0.5, "cm")
801
+ )
802
+
803
+ # =====================================================
804
+ # 6. SCI标准配色
805
+ # =====================================================
806
+
807
+ sci_colors <- c(
808
+ "control" = "#999999", # 灰色
809
+ "Cplx2" = "#56B4E9", # 蓝色
810
+ "Car10" = "#E69F00", # 橙色
811
+ "Slc1a2" = "#009E73", # 绿色
812
+ "Fxyd7" = "#F0E442", # 黄色
813
+ "Arc" = "#D55E00" # 红色
814
+ )
815
+
816
+ # =====================================================
817
+ # 7. 计算y轴位置(为p值标注留空间)- 修复版
818
+ # =====================================================
819
+
820
+ group_max <- df %>%
821
+ group_by(group) %>%
822
+ summarise(max_val = max(value), .groups = 'drop')
823
+
824
+ # 将group列转换为字符,避免因子水平问题
825
+ group_max$group <- as.character(group_max$group)
826
+
827
+ control_max <- group_max$max_val[group_max$group == "control"]
828
+ y_max <- max(df$value)
829
+
830
+ # 为每个实验组计算标注位置(按图形顺序)
831
+ for (i in 1:nrow(results)) {
832
+ grp <- as.character(results$group[i]) # 确保是字符
833
+ test_max <- group_max$max_val[group_max$group == grp]
834
+ results$y_pos[i] <- max(control_max, test_max) + 1 + (i * 0.8)
835
+ }
836
+
837
+ # =====================================================
838
+ # 8. 方法1:在每个实验组上方直接标注p值
839
+ # =====================================================
840
+
841
+ p1 <- ggplot(df, aes(x = group, y = value, fill = group)) +
842
+ geom_boxplot(alpha = 0.8, outlier.shape = NA, width = 0.6, size = 0.4) +
843
+ geom_jitter(width = 0.15, alpha = 0.7, size = 2.5,
844
+ shape = 21, color = "black", stroke = 0.3) +
845
+ scale_fill_manual(values = sci_colors) +
846
+ labs(
847
+ x = "",
848
+ y = "Number of SAD-B19 infected neurons"
849
+ ) +
850
+ theme_sci +
851
+ ylim(0, y_max + 6)
852
+
853
+ # 添加ANOVA结果
854
+ p1 <- p1 + annotate("text", x = 3.5, y = y_max + 5,
855
+ label = paste0("ANOVA: p = ", format.pval(anova_p, digits = 3),
856
+ ", η² = ", round(eta_squared, 3)),
857
+ size = 3, fontface = "italic")
858
+
859
+ # 在每个实验组上方标注p值
860
+ for (i in 1:nrow(results)) {
861
+ grp_x <- which(levels(df$group) == results$group[i])
862
+ grp_y <- results$y_pos[i]
863
+
864
+ p1 <- p1 + annotate("text",
865
+ x = grp_x,
866
+ y = grp_y,
867
+ label = results$p_label[i],
868
+ size = 3, fontface = "italic")
869
+ }
870
+
871
+ print(p1)
872
+
873
+ # =====================================================
874
+ # 9. 方法2:用bracket线连接Control和实验组,标注p值
875
+ # =====================================================
876
+
877
+ # 计算bracket的y位置
878
+ y_positions <- seq(y_max + 1, y_max + 5, length.out = nrow(results))
879
+
880
+ p2 <- ggplot(df, aes(x = group, y = value, fill = group)) +
881
+ geom_boxplot(alpha = 0.8, outlier.shape = NA, width = 0.6, size = 0.4) +
882
+ geom_jitter(width = 0.15, alpha = 0.7, size = 2.5,
883
+ shape = 21, color = "black", stroke = 0.3) +
884
+ scale_fill_manual(values = sci_colors) +
885
+ labs(
886
+ x = "",
887
+ y = "Number of SAD-B19 infected neurons"
888
+ ) +
889
+ theme_sci +
890
+ ylim(0, y_max + 7)
891
+
892
+ # 添加ANOVA结果
893
+ p2 <- p2 + annotate("text", x = 3.5, y = y_max + 6,
894
+ label = paste0("ANOVA: p = ", format.pval(anova_p, digits = 3),
895
+ ", η² = ", round(eta_squared, 3)),
896
+ size = 3, fontface = "italic")
897
+
898
+ # 为每个实验组添加bracket和p值
899
+ for (i in 1:nrow(results)) {
900
+ grp_x <- which(levels(df$group) == results$group[i])
901
+ y_pos <- y_positions[i]
902
+
903
+ # 绘制bracket线
904
+ p2 <- p2 +
905
+ annotate("segment",
906
+ x = 1, xend = grp_x,
907
+ y = y_pos, yend = y_pos,
908
+ color = "black", size = 0.4) +
909
+ annotate("segment",
910
+ x = 1, xend = 1,
911
+ y = y_pos - 0.3, yend = y_pos,
912
+ color = "black", size = 0.4) +
913
+ annotate("segment",
914
+ x = grp_x, xend = grp_x,
915
+ y = y_pos - 0.3, yend = y_pos,
916
+ color = "black", size = 0.4) +
917
+ # 添加p值标签
918
+ annotate("text",
919
+ x = (1 + grp_x) / 2,
920
+ y = y_pos + 0.5,
921
+ label = results$p_label[i],
922
+ size = 2.8, fontface = "italic")
923
+ }
924
+
925
+ print(p2)
926
+
927
+ # =====================================================
928
+ # 10. 方法3:星号标注(SCI最常用)
929
+ # =====================================================
930
+
931
+ # 为每个实验组生成星号
932
+ results$stars <- case_when(
933
+ results$p_value < 0.001 ~ "***",
934
+ results$p_value < 0.01 ~ "**",
935
+ results$p_value < 0.05 ~ "*",
936
+ TRUE ~ "ns"
937
+ )
938
+
939
+ p3 <- ggplot(df, aes(x = group, y = value, fill = group)) +
940
+ geom_boxplot(alpha = 0.8, outlier.shape = NA, width = 0.6, size = 0.4) +
941
+ geom_jitter(width = 0.15, alpha = 0.7, size = 2.5,
942
+ shape = 21, color = "black", stroke = 0.3) +
943
+ scale_fill_manual(values = sci_colors) +
944
+ labs(
945
+ x = "",
946
+ y = "Number of SAD-B19 infected neurons"
947
+ ) +
948
+ theme_sci +
949
+ ylim(0, y_max + 3)
950
+
951
+ # 添加ANOVA结果
952
+ p3 <- p3 + annotate("text", x = 3.5, y = y_max + 2.5,
953
+ label = paste0("ANOVA: p = ", format.pval(anova_p, digits = 3)),
954
+ size = 3, fontface = "italic")
955
+
956
+ # 添加星号标注
957
+ for (i in 1:nrow(results)) {
958
+ if (results$p_value[i] < 0.05) {
959
+ grp_x <- which(levels(df$group) == results$group[i])
960
+ test_max <- group_max$max_val[group_max$group == as.character(results$group[i])]
961
+ y_pos <- test_max + 0.8
962
+
963
+ p3 <- p3 + annotate("text",
964
+ x = grp_x,
965
+ y = y_pos,
966
+ label = results$stars[i],
967
+ size = 5, fontface = "bold")
968
+ }
969
+ }
970
+
971
+ print(p3)
972
+
973
+ # =====================================================
974
+ # 11. 组合图形(方法1+方法2)
975
+ # =====================================================
976
+
977
+ combined <- plot_grid(p1, p2, ncol = 2, labels = c("A", "B"), label_size = 12)
978
+
979
+ # =====================================================
980
+ # 12. 保存图形
981
+ # =====================================================
982
+
983
+ # 方法1:直接标注p值
984
+ ggsave(file.path(output_dir, "Figure_SAD_B19_pvalues_above_bars.pdf"),
985
+ p1, width = 4, height = 8, device = cairo_pdf)
986
+ ggsave(file.path(output_dir, "Figure_SAD_B19_pvalues_above_bars.png"),
987
+ p1, width = 4, height = 8, dpi = 300, bg = "white")
988
+
989
+ # 方法2:bracket标注
990
+ ggsave(file.path(output_dir, "Figure_SAD_B19_pvalues_bracket.pdf"),
991
+ p2, width = 4, height = 8, device = cairo_pdf)
992
+
993
+ # 方法3:星号标注(推荐用于SCI发表)
994
+ ggsave(file.path(output_dir, "Figure_SAD_B19_stars.pdf"),
995
+ p3, width = 4, height = 8, device = cairo_pdf)
996
+ ggsave(file.path(output_dir, "Figure_SAD_B19_stars.png"),
997
+ p3, width = 4, height = 8, dpi = 300, bg = "white")
998
+
999
+ # 组合图形
1000
+ ggsave(file.path(output_dir, "Figure_SAD_B19_combined.pdf"),
1001
+ combined, width = 12, height = 5, device = cairo_pdf)
1002
+
1003
+ # =====================================================
1004
+ # 13. 保存统计结果
1005
+ # =====================================================
1006
+
1007
+ write.csv(summary_stats, file.path(output_dir, "Summary_statistics.csv"), row.names = FALSE)
1008
+ write.csv(results, file.path(output_dir, "Pairwise_comparison_results.csv"), row.names = FALSE)
1009
+
1010
+ # =====================================================
1011
+ # 14. 打印所有p值
1012
+ # =====================================================
1013
+
1014
+ cat("\n========== All P-values (vs Control, same batch) ==========\n")
1015
+ cat("Control values:", paste(control_data, collapse = ", "), "\n")
1016
+ cat("Control mean:", mean(control_data), "\n\n")
1017
+
1018
+ for (i in 1:nrow(results)) {
1019
+ cat(results$group[i], "vs Control:\n")
1020
+ cat(" Test mean:", round(results$mean_test[i], 2), "\n")
1021
+ cat(" Mean difference:", round(results$mean_diff[i], 2), "\n")
1022
+ cat(" p =", results$p_value[i],
1023
+ ifelse(results$p_value[i] < 0.05, " *", " ns"), "\n\n")
1024
+ }
1025
+
1026
+ cat("\n========== Analysis Complete ==========\n")
1027
+ cat("Output directory:", output_dir, "\n")
1028
+ cat("\nGenerated files:\n")
1029
+ cat(" - Figure_SAD_B19_pvalues_above_bars.pdf (p值标注在柱上)\n")
1030
+ cat(" - Figure_SAD_B19_pvalues_bracket.pdf (bracket标注)\n")
1031
+ cat(" - Figure_SAD_B19_stars.pdf (星号标注,推荐)\n")
1032
+ cat(" - Figure_SAD_B19_combined.pdf (组合图)\n")
1033
+ cat(" - Summary_statistics.csv\n")
1034
+ cat(" - Pairwise_comparison_results.csv\n")
1035
+ ```