-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJH12_Figure_S2.R
77 lines (62 loc) · 2.39 KB
/
JH12_Figure_S2.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#############################################################
#
# Ref to the ARTICLE
#
# Code to generate the Figure Supplementary S2 used in Maver et al., manuscript
# Revision 07/21
#
#############################################################
#############################################################
# Clean-up the memory and start a new session
#############################################################
rm(list=ls())
dev.off()
#############################################################
# Libraries required
#############################################################
library("ggplot2")
library("agricolae")
colorblind_Palette <- c("#E69F00", "#56B4E9", "#009E73", "#F0E442", "#0072B2", "#D55E00", "#CC79A7", "#000000")
dry_w<-read.csv('dry_weight.csv',header = TRUE, sep=",")
dry_w_subset = subset(dry_w, genotype!="Bulk")
# Figure S2
ggplot(dry_w_subset, aes(x=treatment, y=dw_g))+
#geom_bar(aes(fill=treatment),width = 0.5, stat = "count")+
geom_boxplot(aes(fill=treatment))+
facet_wrap(~genotype, strip.position = "top")+
#scale_y_continuous(limits = c(0,600), expand = c(0, 0))+
#coord_flip() +
#scale_fill_brewer(palette="Paired")+
#ggtitle("Genotypes response to Gramine application")+
xlab("genotype/treatments")+
ylab("Plant shoot dry weight (g)")+
scale_fill_manual(name = "Concentration", labels = c("G0", "G24", "G46"), values = colorblind_Palette)+
theme_bw()+
theme(axis.title.y = element_text(color="Black", size=16),
axis.title.x = element_blank(),
strip.text = element_text(size=18),
legend.key.size = unit(2,"line"),
legend.text = element_text(size = 14),
axis.text.y = element_text(size = 12),
axis.text.x = element_blank(),
legend.position="bottom",
legend.title = element_text(size = 16))
#ANOVA
dry_w_stats <- aov(dw_g ~ treatment, data = dry_w_subset)
summary(dry_w_stats)
#ANOVA
dry_w_stats <- aov(dw_g ~ treatment, data = subset(dry_w_subset, genotype=="Barke"))
summary(dry_w_stats)
#tukey test
TukeyHSD(dry_w_stats, ordered = TRUE)
tukey.test2 <- HSD.test(dry_w_stats, trt = ('treatment'))
tukey.test2
#ANOVA
dry_w_stats <- aov(dw_g ~ treatment, data = subset(dry_w_subset, genotype=="Morex"))
summary(dry_w_stats)
#tukey test
TukeyHSD(dry_w_stats, ordered = TRUE)
tukey.test2 <- HSD.test(dry_w_stats, trt = ('treatment'))
tukey.test2