This notebook describes the data analysis of evapotranspiration data obtained over 41 Arabidopsis T-DNA insertion lines screened in PhenoRig setup for responses to drought over the period of two weeks. The experiment was performed and analyzed by Magda Julkowska at Boyce Thompson Institute using the PhenoRig setup. Additionally, the plants were imaged from above every 30 minutes, and the analysis of this data can be found elsewhere.
The seedlings were germinated on agar plates (1/2 MS, 0.5% sucrose, 1% agar, 0.1% MES buffer, pH 5.8 KOH) for one week, and were subsequently transplanted to soil pots filled with soil watered to 100% soil water holding capacity (SWHC). The pots were subsequently left to dry out to their target weight (60% SWHC for Control and 10% SWHC for Drought). The pot weight was recorded and adjusted every 2nd day from 2 weeks after germination. At the last day of measurement, the photosynthetic efficiency was measured of one leaf per plant using PhotoSynQ.
All raw data analyzed in here can be found in Zenodo Repository.
list.files(pattern=".csv")
## [1] "Nov2022.PhotoSynQ.Arabidopsis.homologs.pilot.csv"
## [2] "Table S4. Arabidopsis mutants - Experiment1 - pot & EVT.csv"
## [3] "Table S4. Arabidopsis mutants - Experiment2 - pot & EVT.csv"
Exp1 <- read.csv("Table S4. Arabidopsis mutants - Experiment1 - pot & EVT.csv")
Exp2 <- read.csv("Table S4. Arabidopsis mutants - Experiment2 - pot & EVT.csv")
head(Exp1)
head(Exp2)
let’s isolate only the collumns containing the evpotranspiration data and other important details:
colnames(Exp1)
## [1] "Tray" "RaspID"
## [3] "Pot" "dry.weight.28.10.2022"
## [5] "wet.weight.29.10.2022" "Genotype"
## [7] "BTI.code.geno" "Treatment"
## [9] "Target.Weight" "Weight.Before.04.11.2022"
## [11] "Weight.After.04.11.2022" "Weight.Before.06.11.2022"
## [13] "Weight.After.06.11.2022" "Weight.Before.08.11.2022"
## [15] "Weight.After.08.11.2022" "Weight.Before.10.11.2022"
## [17] "Weight.After.10.11.2022" "Weight.Before.12.11.2022"
## [19] "Weight.After.12.11.2022" "Weight.Before.14.11.2022"
## [21] "Weight.After.14.11.2022" "Weight.Before.16.11.2022"
## [23] "d3" "d5"
## [25] "d7" "d9"
## [27] "d11" "d13"
## [29] "med.EVT.all" "med.EVT.d9.d13"
Exp1_med <- Exp1[,c(7:8,29:30)]
Exp2_med <- Exp2[,c(7:8,29:30)]
Exp1 <- Exp1[,c(1,3,7:8,23:28)]
Exp2 <- Exp2[,c(1,3,7:8,23:28)]
Exp1
great - now I want to melt this dataset and plot the evaporatranspiration over time:
library(reshape2)
Exp1m <- melt(Exp1, id = c("Tray", "Pot", "BTI.code.geno", "Treatment"))
Exp2m <- melt(Exp2, id = c("Tray", "Pot", "BTI.code.geno", "Treatment"))
Exp1m
now- lets create a plant.id by merging Tray and Pot IDs into one variable - which will allow us to plot line for each observed plant:
Exp1m$Plant.ID <- paste(Exp1m$Tray, Exp1m$Pot, sep="_")
Exp2m$Plant.ID <- paste(Exp2m$Tray, Exp2m$Pot, sep="_")
Great - let’s clean up the files and plot:
Exp1m <- Exp1m[,c(7,3:6)]
Exp2m <- Exp2m[,c(7,3:6)]
colnames(Exp1m)[4] <- "day"
colnames(Exp1m)[5] <- "EVT"
colnames(Exp2m)[4] <- "day"
colnames(Exp2m)[5] <- "EVT"
Exp1m$day <- gsub("d", "", Exp1m$day)
Exp2m$day <- gsub("d", "", Exp2m$day)
Exp1m
Exp1m$day <- factor(Exp1m$day, levels = c("3", "5", "7", "9", "11", "13"))
Exp2m$day <- factor(Exp2m$day, levels = c("3", "5", "7", "9", "11", "13"))
Exp1m <- subset(Exp1m, Exp1m$EVT < 100)
Exp2m <- subset(Exp2m, Exp2m$EVT < 100)
Exp2m <- subset(Exp2m, Exp2m$EVT > 0)
library(ggplot2)
library(ggpubr)
library("ggsci")
EVT1_lgraph <- ggplot(data=Exp1m, aes(x= day, y=EVT, group = Plant.ID, color = Treatment))
EVT1_lgraph <- EVT1_lgraph + geom_line(alpha = 0.1)
EVT1_lgraph <- EVT1_lgraph + stat_summary(fun.data = mean_se, geom="ribbon", linetype=0, aes(group= Treatment), alpha=0.3)
EVT1_lgraph <- EVT1_lgraph + stat_summary(fun=mean, aes(group= Treatment), size=0.7, geom="line", linetype = "dashed")
## Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
## ℹ Please use `linewidth` instead.
EVT1_lgraph <- EVT1_lgraph + stat_compare_means(aes(group = Treatment), label = "p.signif", method = "aov", hide.ns = T)
EVT1_lgraph <- EVT1_lgraph + ylab("Evapotranspiration Rrate (g H2O / 2 days)") + xlab("Days after stress") + scale_color_aaas() + theme_bw()
EVT1_lgraph <- EVT1_lgraph + guides(color=guide_legend(title="Treatment")) + theme(legend.position = "top")
EVT1_lgraph
EVT2_lgraph <- ggplot(data=Exp2m, aes(x= day, y=EVT, group = Plant.ID, color = Treatment))
EVT2_lgraph <- EVT2_lgraph + geom_line(alpha = 0.1)
EVT2_lgraph <- EVT2_lgraph + stat_summary(fun.data = mean_se, geom="ribbon", linetype=0, aes(group= Treatment), alpha=0.3)
EVT2_lgraph <- EVT2_lgraph + stat_summary(fun=mean, aes(group= Treatment), size=0.7, geom="line", linetype = "dashed")
EVT2_lgraph <- EVT2_lgraph + stat_compare_means(aes(group = Treatment), label = "p.signif", method = "aov", hide.ns = T)
EVT2_lgraph <- EVT2_lgraph + ylab("Evapotranspiration Rrate (g H2O / 2 days)") + xlab("Days after stress") + scale_color_aaas() + theme_bw()
EVT2_lgraph <- EVT2_lgraph + guides(color=guide_legend(title="Treatment")) + theme(legend.position = "top")
EVT2_lgraph
list.of.plants <- c("CP.NPQ7-1", "CP.NPQ4-1", "CP.EVT2-1", "CP.GR4-2", "CP.NPQ5-1", "CP.EVT6-2", "CP.EVT9-2", "CP.NPQ6-4", "CP.EVT5-1", "CP.NPQ1-1", "CP.EVT8", "CP.EVT4-2", "CP.EVT7", "CP.NPQ5-2", "CP.EVT4-1",
"CP.GR3-2", "CP.EVT3-1", "CP.GR2-2", "CP.EVT1-1", "CP.GR3-1", "CP.EVT9-1", "CP.GR4-1", "CP.GR2-3", "CP.NPQ1-2", "CP.GR5", "CP.NPQ6-3", "CP.EVT1-2", "CP.GR2-1", "CP.NPQ6-5", "CP.EVT2-2")
list.of.plants
## [1] "CP.NPQ7-1" "CP.NPQ4-1" "CP.EVT2-1" "CP.GR4-2" "CP.NPQ5-1" "CP.EVT6-2"
## [7] "CP.EVT9-2" "CP.NPQ6-4" "CP.EVT5-1" "CP.NPQ1-1" "CP.EVT8" "CP.EVT4-2"
## [13] "CP.EVT7" "CP.NPQ5-2" "CP.EVT4-1" "CP.GR3-2" "CP.EVT3-1" "CP.GR2-2"
## [19] "CP.EVT1-1" "CP.GR3-1" "CP.EVT9-1" "CP.GR4-1" "CP.GR2-3" "CP.NPQ1-2"
## [25] "CP.GR5" "CP.NPQ6-3" "CP.EVT1-2" "CP.GR2-1" "CP.NPQ6-5" "CP.EVT2-2"
for(i in 1:length(list.of.plants)){
new_list <- c("Col-0", list.of.plants[i])
temp <- subset(Exp1m, Exp1m$BTI.code.geno %in% new_list)
EVT1_temp_lgraph <- ggplot(data=temp, aes(x= day, y=EVT, group = Plant.ID, color = BTI.code.geno))
EVT1_temp_lgraph <- EVT1_temp_lgraph + geom_line(alpha = 0.1) + facet_wrap(~Treatment)
EVT1_temp_lgraph <- EVT1_temp_lgraph + stat_summary(fun.data = mean_se, geom="ribbon", linetype=0, aes(group= BTI.code.geno), alpha=0.3)
EVT1_temp_lgraph <- EVT1_temp_lgraph + stat_summary(fun=mean, aes(group= BTI.code.geno), size=0.7, geom="line", linetype = "dashed")
EVT1_temp_lgraph <- EVT1_temp_lgraph + stat_compare_means(aes(group = Treatment), label = "p.signif", method = "aov", hide.ns = T)
EVT1_temp_lgraph <- EVT1_temp_lgraph + ylab("Evapotranspiration Rrate (g H2O / 2 days)") + xlab("Days after stress") + scale_color_aaas() + theme_bw()
EVT1_temp_lgraph <- EVT1_temp_lgraph + guides(color=guide_legend(title="BTI.code.geno")) + theme(legend.position = "top")
EVT1_temp_lgraph
pdf(paste("EVT.through.time.Exp1.Col-0.vs",new_list[2],".pdf"))
plot(EVT1_temp_lgraph)
dev.off()
}
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
unique(Exp2m$BTI.code.geno)
## [1] "Col-0" "CP.EVT5-2" "CP.NPQ2" "CP.NPQ3" "CP.NPQ5-3" "CP.EVT6-1"
## [7] "CP.NPQ4-2" "CP.EVT3-2" "CP.NPQ6-1" "CP.GR1" "CP.NPQ6-2" "CP.NPQ7-2"
## [13] "CP.NPQ7-1" "CP.NPQ4-1" "CP.EVT2-1" "CP.GR4-2"
list.of.plants <- c("CP.EVT5-2", "CP.NPQ2", "CP.NPQ3", "CP.NPQ5-3", "CP.EVT6-1", "CP.NPQ4-2", "CP.EVT3-2", "CP.NPQ6-1", "CP.GR1", "CP.NPQ6-2", "CP.NPQ7-2", "CP.NPQ7-1", "CP.NPQ4-1", "CP.EVT2-1", "CP.GR4-2" )
for(i in 1:length(list.of.plants)){
new_list <- c("Col-0", list.of.plants[i])
temp <- subset(Exp1m, Exp1m$BTI.code.geno %in% new_list)
EVT1_temp_lgraph <- ggplot(data=temp, aes(x= day, y=EVT, group = Plant.ID, color = BTI.code.geno))
EVT1_temp_lgraph <- EVT1_temp_lgraph + geom_line(alpha = 0.1) + facet_wrap(~Treatment)
EVT1_temp_lgraph <- EVT1_temp_lgraph + stat_summary(fun.data = mean_se, geom="ribbon", linetype=0, aes(group= BTI.code.geno), alpha=0.3)
EVT1_temp_lgraph <- EVT1_temp_lgraph + stat_summary(fun=mean, aes(group= BTI.code.geno), size=0.7, geom="line", linetype = "dashed")
EVT1_temp_lgraph <- EVT1_temp_lgraph + stat_compare_means(aes(group = Treatment), label = "p.signif", method = "aov", hide.ns = T)
EVT1_temp_lgraph <- EVT1_temp_lgraph + ylab("Evapotranspiration Rrate (g H2O / 2 days)") + xlab("Days after stress") + scale_color_aaas() + theme_bw()
EVT1_temp_lgraph <- EVT1_temp_lgraph + guides(color=guide_legend(title="BTI.code.geno")) + theme(legend.position = "top")
EVT1_temp_lgraph
pdf(paste("EVT.through.time.Exp2.Col-0.vs",new_list[2],".pdf"))
plot(EVT1_temp_lgraph)
dev.off()
}
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
## Warning: Computation failed in `stat_compare_means()`
## Caused by error in `mutate()`:
## ! Problem while computing `p = purrr::map(...)`.
## Caused by error in `contrasts<-`:
## ! contrasts can be applied only to factors with 2 or more levels
Great to see that we have significant decrease in EVT under drought stress (I couldn’t observe any obvious differences in plant size - but then - what’s “obvious”?)
Now - let’s have a look at the differences between Col-0 and all of the screened mutants.
First of all - I d like to look at the median EVT over the course of experiment. And subsequently maybe calculate median EVT for dats 9-13 - since it seems that EVT is more stable for all the lines across both experiments - and thus “adjusted” to the individual conditions.
library(ggbeeswarm)
unique(Exp1_med$BTI.code.geno)
## [1] "Col-0" "CP.NPQ7-1" "CP.NPQ4-1" "CP.EVT2-1" "CP.GR4-2" "CP.NPQ5-1"
## [7] "CP.EVT6-2" "CP.EVT9-2" "CP.NPQ6-4" "CP.EVT5-1" "CP.NPQ1-1" "CP.EVT8"
## [13] "CP.EVT4-2" "CP.EVT7" "CP.NPQ5-2" "CP.EVT4-1" "CP.GR3-2" "CP.EVT3-1"
## [19] "CP.GR2-2" "CP.EVT1-1" "CP.GR3-1" "CP.EVT9-1" "CP.GR4-1" "CP.GR2-3"
## [25] "CP.NPQ1-2" "CP.GR5" "CP.NPQ6-3" "CP.EVT1-2" "CP.GR2-1" "CP.NPQ6-5"
## [31] "CP.EVT2-2"
Exp1_med
Exp1_med$BTI.code.geno <- factor(Exp1_med$BTI.code.geno, levels = c("Col-0", "CP.GR2-1", "CP.GR2-2", "CP.GR2-3", "CP.GR3-1", "CP.GR3-2", "CP.GR4-2", "CP.GR4-1", "CP.GR5",
"CP.NPQ1-1", "CP.NPQ1-2",
"CP.NPQ4-1", "CP.NPQ5-1", "CP.NPQ5-2", "CP.NPQ6-4", "CP.NPQ6-3", "CP.NPQ6-5", "CP.NPQ7-1",
"CP.EVT1-1", "CP.EVT1-2", "CP.EVT2-1", "CP.EVT2-2", "CP.EVT3-1",
"CP.EVT4-1", "CP.EVT4-2", "CP.EVT5-1", "CP.EVT6-2",
"CP.EVT7", "CP.EVT8", "CP.EVT9-1", "CP.EVT9-2"))
EVT_med.all_plot_1 <- ggplot(data = Exp1_med, mapping = aes(x = BTI.code.geno, y = med.EVT.all, colour = BTI.code.geno))
EVT_med.all_plot_1 <- EVT_med.all_plot_1 + geom_beeswarm(alpha=0.6, priority = "density")
EVT_med.all_plot_1 <- EVT_med.all_plot_1 + facet_wrap(~ Treatment)
EVT_med.all_plot_1 <- EVT_med.all_plot_1 + stat_summary(fun.y=mean, geom="point", shape=95, size=6, color="black", fill="black")
## Warning: The `fun.y` argument of `stat_summary()` is deprecated as of ggplot2 3.3.0.
## ℹ Please use the `fun` argument instead.
EVT_med.all_plot_1 <- EVT_med.all_plot_1 + theme(legend.position = "none")
EVT_med.all_plot_1 <- EVT_med.all_plot_1 + xlab("") + ylab("median Evapotranspiration (g H2O / 2 days)")
EVT_med.all_plot_1 <- EVT_med.all_plot_1 + scale_colour_manual(values=c("steelblue", "sienna3", "sienna3", "sienna3", "sienna3", "sienna3", "sienna3", "sienna3", "sienna3",
"deeppink4", "deeppink4",
"darkviolet", "darkviolet","darkviolet","darkviolet","darkviolet","darkviolet","darkviolet",
"cyan4", "cyan4", "cyan4", "cyan4", "cyan4",
"maroon4", "maroon4", "maroon4", "maroon4",
"plum4", "plum4", "plum4", "plum4"))
EVT_med.all_plot_1 <- EVT_med.all_plot_1 + theme(axis.text.x = element_text(angle=90, vjust=0.5))
EVT_med.all_plot_1 <- EVT_med.all_plot_1 + stat_compare_means(label = "p.signif", method = "t.test", ref.group = "Col-0", hide.ns = T)
EVT_med.all_plot_1
EVT_med.d9d13_plot_1 <- ggplot(data = Exp1_med, mapping = aes(x = BTI.code.geno, y = med.EVT.d9.d13, colour = BTI.code.geno))
EVT_med.d9d13_plot_1 <- EVT_med.d9d13_plot_1 + geom_beeswarm(alpha=0.6, priority = "density")
EVT_med.d9d13_plot_1 <- EVT_med.d9d13_plot_1 + facet_wrap(~ Treatment)
EVT_med.d9d13_plot_1 <- EVT_med.d9d13_plot_1 + stat_summary(fun.y=mean, geom="point", shape=95, size=6, color="black", fill="black")
EVT_med.d9d13_plot_1 <- EVT_med.d9d13_plot_1 + theme(legend.position = "none")
EVT_med.d9d13_plot_1 <- EVT_med.d9d13_plot_1 + xlab("") + ylab("median Evapotranspiration (g H2O / 2 days)")
EVT_med.d9d13_plot_1 <- EVT_med.d9d13_plot_1 + scale_colour_manual(values=c("steelblue", "sienna3", "sienna3", "sienna3", "sienna3", "sienna3", "sienna3", "sienna3", "sienna3",
"deeppink4", "deeppink4",
"darkviolet", "darkviolet","darkviolet","darkviolet","darkviolet","darkviolet","darkviolet",
"cyan4", "cyan4", "cyan4", "cyan4", "cyan4",
"maroon4", "maroon4", "maroon4", "maroon4",
"plum4", "plum4", "plum4", "plum4"))
EVT_med.d9d13_plot_1 <- EVT_med.d9d13_plot_1 + theme(axis.text.x = element_text(angle=90, vjust=0.5))
EVT_med.d9d13_plot_1 <- EVT_med.d9d13_plot_1 + stat_compare_means(label = "p.signif", method = "t.test", ref.group = "Col-0", hide.ns = T)
EVT_med.d9d13_plot_1
unique(Exp2_med$BTI.code.geno)
## [1] "Col-0" "CP.EVT5-2" "CP.NPQ2" "CP.NPQ3" "CP.NPQ5-3" "CP.EVT6-1"
## [7] "CP.NPQ4-2" "CP.EVT3-2" "CP.NPQ6-1" "CP.GR1" "CP.NPQ6-2" "CP.NPQ7-2"
## [13] "CP.NPQ7-1" "CP.NPQ4-1" "CP.EVT2-1" "CP.GR4-2"
Exp2_med$BTI.code.geno <- factor(Exp2_med$BTI.code.geno, levels= c("Col-0", "CP.GR1", "CP.GR4-2",
"CP.NPQ2",
"CP.NPQ3", "CP.NPQ4-2", "CP.NPQ5-3", "CP.NPQ6-1", "CP.NPQ6-2", "CP.NPQ7-1", "CP.NPQ7-2",
"CP.EVT2-1", "CP.EVT3-2",
"CP.NPQ4-1", "CP.EVT5-2", "CP.EVT6-1"))
EVT_med.all_plot_2 <- ggplot(data = Exp2_med, mapping = aes(x = BTI.code.geno, y = med.EVT.all, colour = BTI.code.geno))
EVT_med.all_plot_2 <- EVT_med.all_plot_2 + geom_beeswarm(alpha=0.6, priority = "density")
EVT_med.all_plot_2 <- EVT_med.all_plot_2 + facet_wrap(~ Treatment)
EVT_med.all_plot_2 <- EVT_med.all_plot_2 + stat_summary(fun.y=mean, geom="point", shape=95, size=6, color="black", fill="black")
EVT_med.all_plot_2 <- EVT_med.all_plot_2 + theme(legend.position = "none")
EVT_med.all_plot_2 <- EVT_med.all_plot_2 + xlab("") + ylab("median Evapotranspiration (g H2O / 2 days)")
EVT_med.all_plot_2 <- EVT_med.all_plot_2 + scale_colour_manual(values=c("steelblue", "sienna3", "sienna3",
"deeppink4",
"darkviolet", "darkviolet","darkviolet","darkviolet","darkviolet","darkviolet","darkviolet",
"cyan4", "cyan4",
"maroon4", "maroon4", "maroon4"))
EVT_med.all_plot_2 <- EVT_med.all_plot_2 + theme(axis.text.x = element_text(angle=90, vjust=0.5))
EVT_med.all_plot_2 <- EVT_med.all_plot_2 + stat_compare_means(label = "p.signif", method = "t.test", ref.group = "Col-0", hide.ns = T)
EVT_med.all_plot_2
EVT_med.d9d13_plot_2 <- ggplot(data = Exp2_med, mapping = aes(x = BTI.code.geno, y = med.EVT.d9.d13, colour = BTI.code.geno))
EVT_med.d9d13_plot_2 <- EVT_med.d9d13_plot_2 + geom_beeswarm(alpha=0.6, priority = "density")
EVT_med.d9d13_plot_2 <- EVT_med.d9d13_plot_2 + facet_wrap(~ Treatment)
EVT_med.d9d13_plot_2 <- EVT_med.d9d13_plot_2 + stat_summary(fun.y=mean, geom="point", shape=95, size=6, color="black", fill="black")
EVT_med.d9d13_plot_2 <- EVT_med.d9d13_plot_2 + theme(legend.position = "none")
EVT_med.d9d13_plot_2 <- EVT_med.d9d13_plot_2 + xlab("") + ylab("median Evapotranspiration (g H2O / 2 days)")
EVT_med.d9d13_plot_2 <- EVT_med.d9d13_plot_2 + scale_colour_manual(values=c("steelblue", "sienna3", "sienna3",
"deeppink4",
"darkviolet", "darkviolet","darkviolet","darkviolet","darkviolet","darkviolet","darkviolet",
"cyan4", "cyan4",
"maroon4", "maroon4", "maroon4"))
EVT_med.d9d13_plot_2 <- EVT_med.d9d13_plot_2 + theme(axis.text.x = element_text(angle=90, vjust=0.5))
EVT_med.d9d13_plot_2 <- EVT_med.d9d13_plot_2 + stat_compare_means(label = "p.signif", method = "t.test", ref.group = "Col-0", hide.ns = T)
EVT_med.d9d13_plot_2
Let’s combine all of the data into one graph too:
Exp_med <- rbind(Exp1_med, Exp2_med)
Exp_med
Exp_med$BTI.code.geno <- factor(Exp_med$BTI.code.geno, levels = c("Col-0",
"CP.GR1", "CP.GR2-1", "CP.GR2-2", "CP.GR2-3", "CP.GR3-1", "CP.GR3-2", "CP.GR4-1", "CP.GR4-2", "CP.GR5",
"CP.NPQ1-1", "CP.NPQ1-2", "CP.NPQ2",
"CP.NPQ3", "CP.NPQ4-1", "CP.NPQ4-2", "CP.NPQ5-1", "CP.NPQ5-2", "CP.NPQ5-3", "CP.NPQ6-1", "CP.NPQ6-2", "CP.NPQ6-3", "CP.NPQ6-4", "CP.NPQ6-5", "CP.NPQ7-1", "CP.NPQ7-2",
"CP.EVT1-1", "CP.EVT1-2", "CP.EVT2-1", "CP.EVT2-2", "CP.EVT3-1", "CP.EVT3-2",
"CP.EVT4-1", "CP.EVT4-2", "CP.EVT5-1", "CP.EVT5-2", "CP.EVT6-1", "CP.EVT6-2",
"CP.EVT7", "CP.EVT8", "CP.EVT9-1", "CP.EVT9-2" ))
EVT.med.all_plot <- ggplot(data = Exp_med, mapping = aes(x = BTI.code.geno, y = med.EVT.all, colour = BTI.code.geno))
EVT.med.all_plot <- EVT.med.all_plot + geom_beeswarm(alpha=0.6, priority = "density")
EVT.med.all_plot <- EVT.med.all_plot + facet_wrap(~ Treatment)
EVT.med.all_plot <- EVT.med.all_plot + stat_summary(fun.y=mean, geom="point", shape=95, size=6, color="black", fill="black")
EVT.med.all_plot <- EVT.med.all_plot + theme(legend.position = "none")
EVT.med.all_plot <- EVT.med.all_plot + xlab("") + ylab("median Evapotranspiration (g H2O / 2 days)")
EVT.med.all_plot <- EVT.med.all_plot + scale_colour_manual(values=c("steelblue", "sienna3", "sienna3", "sienna3", "sienna3", "sienna3", "sienna3", "sienna3", "sienna3", "sienna3",
"deeppink4", "deeppink4", "deeppink4",
"darkviolet", "darkviolet","darkviolet","darkviolet","darkviolet","darkviolet","darkviolet", "darkviolet", "darkviolet", "darkviolet", "darkviolet",
"darkviolet", "darkviolet",
"cyan4", "cyan4", "cyan4", "cyan4", "cyan4", "cyan4",
"maroon4", "maroon4", "maroon4", "maroon4", "maroon4", "maroon4",
"plum4", "plum4", "plum4", "plum4"))
EVT.med.all_plot <- EVT.med.all_plot + theme(axis.text.x = element_text(angle=90, vjust=0.5))
EVT.med.all_plot <- EVT.med.all_plot + stat_compare_means(label = "p.signif", method = "t.test", ref.group = "Col-0", hide.ns = T)
EVT.med.all_plot
PhotoSynQ <- read.csv("Nov2022.PhotoSynQ.Arabidopsis.homologs.pilot.csv")
head(PhotoSynQ)
colnames(PhotoSynQ)
## [1] "ID" "Series"
## [3] "Repeat" "plant.ID"
## [5] "Tray" "air_temp_kinetics"
## [7] "Ambient.Humidity" "Ambient.Pressure"
## [9] "Ambient.Temperature" "data_raw_PAM"
## [11] "ECS_averaged_trace" "ECS_tau"
## [13] "ECSt.mAU" "fitinput"
## [15] "FmPrime" "FoPrime"
## [17] "Fs" "FvP_over_FmP"
## [19] "gH." "humidity2_K"
## [21] "humidity_K" "kP700"
## [23] "leaf.angle" "Leaf.Temperature"
## [25] "Leaf.Temperature.Differenial" "Leaf.Temperature.Differential"
## [27] "LEAF_temp" "leaf_thickness"
## [29] "LEF" "LEFd_trace"
## [31] "Light.Intensity..PAR." "NPQt"
## [33] "outdata" "P700_DIRK_ampl"
## [35] "P700_DIRK_averaged_trace" "P700_fitinput"
## [37] "P700_outdata" "Phi2"
## [39] "PhiNO" "PhiNPQ"
## [41] "PS1.Active.Centers" "PS1.Open.Centers"
## [43] "PS1.Over.Reduced.Centers" "PS1.Oxidized.Centers"
## [45] "PSI_data_absorbance" "pump"
## [47] "qL" "SPAD"
## [49] "test_data_raw_PAM" "time"
## [51] "Time.of.Day" "tP700"
## [53] "v_initial_P700" "vH."
## [55] "User" "Device.ID"
## [57] "Latitude" "Longitude"
## [59] "Issues"
PhotoSynQ <- PhotoSynQ[,c(5,4, 18, 24, 28, 32, 40, 48)]
head(PhotoSynQ)
Now - let’s decode this data into individua treatments and genotype information:
Exp1 <- read.csv("Table S4. Arabidopsis mutants - Experiment1 - pot & EVT.csv")
Exp2 <- read.csv("Table S4. Arabidopsis mutants - Experiment2 - pot & EVT.csv")
Exp1 <- Exp1[,c(1,3,7:8)]
Exp2 <- Exp2[,c(1,3,7:8)]
Exp <- rbind(Exp1, Exp2)
Exp
unique(PhotoSynQ$plant.ID)
## [1] "c3" "d2" "d3" "d4" "e1" "e2" "h1" "h4" "h3" "h2" "g4" "g3"
## [13] "g2" "f4" "f3" "f2" "f1" "e4" "e3" "d1" "c4" "c2" "c1" "b3"
## [25] "b 2" "a4" "a1" "g1" "b2" "b1" "a3" "a2" "b4" "3"
PhotoSynQ$plant.ID <- gsub("a", "A", PhotoSynQ$plant.ID)
PhotoSynQ$plant.ID <- gsub("b", "B", PhotoSynQ$plant.ID)
PhotoSynQ$plant.ID <- gsub("c", "C", PhotoSynQ$plant.ID)
PhotoSynQ$plant.ID <- gsub("d", "D", PhotoSynQ$plant.ID)
PhotoSynQ$plant.ID <- gsub("e", "E", PhotoSynQ$plant.ID)
PhotoSynQ$plant.ID <- gsub("f", "F", PhotoSynQ$plant.ID)
PhotoSynQ$plant.ID <- gsub("g", "G", PhotoSynQ$plant.ID)
PhotoSynQ$plant.ID <- gsub("h", "H", PhotoSynQ$plant.ID)
PhotoSynQ$plant.ID <- gsub("B 2", "B2", PhotoSynQ$plant.ID)
keepers <- c("C3", "D2", "D3", "D4", "E1", "E2", "H1", "H4", "H3", "H2", "G4", "G3", "G2", "F4", "F3", "F2", "F1", "E4", "E3", "D1", "C4", "C2", "C1", "B3", "B2", "A4", "A1", "G1", "B1", "A3", "A2", "B4")
PSQ <- subset(PhotoSynQ, PhotoSynQ$plant.ID %in% keepers)
colnames(PSQ)[2] <- "Pot"
PSQ$Plant.ID <- paste(PSQ$Tray, PSQ$Pot, sep="_")
Exp$Plant.ID <- paste(Exp$Tray, Exp$Pot, sep="_")
PSQ_Exp <- merge(Exp, PSQ, by = c("Plant.ID", "Pot", "Tray"))
PSQ_Exp
unique(PSQ_Exp$BTI.code.geno)
## [1] "Col-0" "CP.NPQ7-1" "CP.NPQ4-1" "CP.EVT2-1" "CP.GR4-2" "CP.NPQ5-1"
## [7] "CP.EVT6-2" "CP.EVT9-2" "CP.NPQ6-4" "CP.EVT5-1" "CP.NPQ1-1" "CP.EVT8"
## [13] "CP.EVT4-2" "CP.EVT7" "CP.NPQ5-2" "CP.EVT4-1" "CP.EVT5-2" "CP.NPQ2"
## [19] "CP.NPQ5-3" "CP.EVT6-1" "CP.NPQ4-2" "CP.EVT3-2" "CP.NPQ6-1" "CP.NPQ6-2"
## [25] "CP.GR1" "CP.NPQ7-2" "CP.NPQ3" "CP.GR3-2" "CP.EVT3-1" "CP.GR2-2"
## [31] "CP.EVT1-1" "CP.EVT9-1" "CP.GR4-1" "CP.GR2-3" "CP.NPQ1-2" "CP.NPQ6-3"
## [37] "CP.EVT1-2" "CP.GR2-1" "CP.NPQ6-5" "CP.EVT2-2" "CP.GR3-1" "CP.GR5"
PSQ_Exp <- subset(PSQ_Exp, PSQ_Exp$FvP_over_FmP > 0.6)
#PSQ_Exp <- subset(PSQ_Exp, PSQ_Exp$leaf_thickness < 1)
PSQ_Exp$BTI.code.geno <- factor(PSQ_Exp$BTI.code.geno, levels = c("Col-0",
"CP.GR1", "CP.GR2-1", "CP.GR2-2", "CP.GR2-3", "CP.GR3-1", "CP.GR3-2", "CP.GR4-1", "CP.GR4-2", "CP.GR5",
"CP.NPQ1-1", "CP.NPQ1-2", "CP.NPQ2",
"CP.NPQ3", "CP.NPQ4-1", "CP.NPQ4-2", "CP.NPQ5-1", "CP.NPQ5-2", "CP.NPQ5-3", "CP.NPQ6-1", "CP.NPQ6-2", "CP.NPQ6-3", "CP.NPQ6-4", "CP.NPQ6-5", "CP.NPQ7-1", "CP.NPQ7-2",
"CP.EVT1-1", "CP.EVT1-2", "CP.EVT2-1", "CP.EVT2-2", "CP.EVT3-1", "CP.EVT3-2",
"CP.EVT4-1", "CP.EVT4-2", "CP.EVT5-1", "CP.EVT5-2", "CP.EVT6-1", "CP.EVT6-2",
"CP.EVT7", "CP.EVT8", "CP.EVT9-1", "CP.EVT9-2" ))
FvFm_plot <- ggplot(data = PSQ_Exp, mapping = aes(x = BTI.code.geno, y = FvP_over_FmP, colour = BTI.code.geno))
FvFm_plot <- FvFm_plot + geom_beeswarm(alpha=0.6, priority = "density")
FvFm_plot <- FvFm_plot + facet_wrap(~ Treatment)
FvFm_plot <- FvFm_plot + stat_summary(fun.y=mean, geom="point", shape=95, size=6, color="black", fill="black")
FvFm_plot <- FvFm_plot + theme(legend.position = "none")
FvFm_plot <- FvFm_plot + xlab("") + ylab("Fv'/Fm' (a.u.)")
FvFm_plot <- FvFm_plot + scale_colour_manual(values=c("steelblue", "sienna3", "sienna3", "sienna3", "sienna3", "sienna3", "sienna3", "sienna3", "sienna3", "sienna3",
"deeppink4", "deeppink4", "deeppink4",
"darkviolet", "darkviolet","darkviolet","darkviolet","darkviolet","darkviolet","darkviolet", "darkviolet", "darkviolet", "darkviolet", "darkviolet",
"darkviolet", "darkviolet",
"cyan4", "cyan4", "cyan4", "cyan4", "cyan4", "cyan4",
"maroon4", "maroon4", "maroon4", "maroon4", "maroon4", "maroon4",
"plum4", "plum4", "plum4", "plum4"))
FvFm_plot <- FvFm_plot + theme(axis.text.x = element_text(angle=90, vjust=0.5))
FvFm_plot <- FvFm_plot + stat_compare_means(label = "p.signif", method = "t.test", ref.group = "Col-0", hide.ns = T)
FvFm_plot
## Warning in compute_panel(...): The default behavior of beeswarm has changed in
## version 0.6.0. In versions <0.6.0, this plot would have been dodged on the y-
## axis. In versions >=0.6.0, grouponX=FALSE must be explicitly set to group on y-
## axis. Please set grouponX=TRUE/FALSE to avoid this warning and ensure proper
## axis choice.
## Warning in compute_panel(...): The default behavior of beeswarm has changed in
## version 0.6.0. In versions <0.6.0, this plot would have been dodged on the y-
## axis. In versions >=0.6.0, grouponX=FALSE must be explicitly set to group on y-
## axis. Please set grouponX=TRUE/FALSE to avoid this warning and ensure proper
## axis choice.
Leaf.temp_plot <- ggplot(data = PSQ_Exp, mapping = aes(x = BTI.code.geno, y = Leaf.Temperature, colour = BTI.code.geno))
Leaf.temp_plot <- Leaf.temp_plot + geom_beeswarm(alpha=0.6, priority = "density")
Leaf.temp_plot <- Leaf.temp_plot + facet_wrap(~ Treatment)
Leaf.temp_plot <- Leaf.temp_plot + stat_summary(fun.y=mean, geom="point", shape=95, size=6, color="black", fill="black")
Leaf.temp_plot <- Leaf.temp_plot + theme(legend.position = "none")
Leaf.temp_plot <- Leaf.temp_plot + xlab("") + ylab("Leaf temperature (deg. C)")
Leaf.temp_plot <- Leaf.temp_plot + scale_colour_manual(values=c("steelblue", "sienna3", "sienna3", "sienna3", "sienna3", "sienna3", "sienna3", "sienna3", "sienna3", "sienna3",
"deeppink4", "deeppink4", "deeppink4",
"darkviolet", "darkviolet","darkviolet","darkviolet","darkviolet","darkviolet","darkviolet", "darkviolet", "darkviolet", "darkviolet", "darkviolet",
"darkviolet", "darkviolet",
"cyan4", "cyan4", "cyan4", "cyan4", "cyan4", "cyan4",
"maroon4", "maroon4", "maroon4", "maroon4", "maroon4", "maroon4",
"plum4", "plum4", "plum4", "plum4"))
Leaf.temp_plot <- Leaf.temp_plot + theme(axis.text.x = element_text(angle=90, vjust=0.5))
Leaf.temp_plot <- Leaf.temp_plot + stat_compare_means(label = "p.signif", method = "t.test", ref.group = "Col-0", hide.ns = T)
Leaf.temp_plot
## Warning in compute_panel(...): The default behavior of beeswarm has changed in
## version 0.6.0. In versions <0.6.0, this plot would have been dodged on the y-
## axis. In versions >=0.6.0, grouponX=FALSE must be explicitly set to group on y-
## axis. Please set grouponX=TRUE/FALSE to avoid this warning and ensure proper
## axis choice.
NPQt_plot <- ggplot(data = PSQ_Exp, mapping = aes(x = BTI.code.geno, y = NPQt, colour = BTI.code.geno))
NPQt_plot <- NPQt_plot + geom_beeswarm(alpha=0.6, priority = "density")
NPQt_plot <- NPQt_plot + facet_wrap(~ Treatment)
NPQt_plot <- NPQt_plot + stat_summary(fun.y=mean, geom="point", shape=95, size=6, color="black", fill="black")
NPQt_plot <- NPQt_plot + theme(legend.position = "none")
NPQt_plot <- NPQt_plot + xlab("") + ylab("NPQt (a.u.)")
NPQt_plot <- NPQt_plot + scale_colour_manual(values=c("steelblue", "sienna3", "sienna3", "sienna3", "sienna3", "sienna3", "sienna3", "sienna3", "sienna3", "sienna3",
"deeppink4", "deeppink4", "deeppink4",
"darkviolet", "darkviolet","darkviolet","darkviolet","darkviolet","darkviolet","darkviolet", "darkviolet", "darkviolet", "darkviolet", "darkviolet",
"darkviolet", "darkviolet",
"cyan4", "cyan4", "cyan4", "cyan4", "cyan4", "cyan4",
"maroon4", "maroon4", "maroon4", "maroon4", "maroon4", "maroon4",
"plum4", "plum4", "plum4", "plum4"))
NPQt_plot <- NPQt_plot + theme(axis.text.x = element_text(angle=90, vjust=0.5))
NPQt_plot <- NPQt_plot + stat_compare_means(label = "p.signif", method = "t.test", ref.group = "Col-0", hide.ns = T)
NPQt_plot
PhiNPQ_plot <- ggplot(data = PSQ_Exp, mapping = aes(x = BTI.code.geno, y = PhiNPQ, colour = BTI.code.geno))
PhiNPQ_plot <- PhiNPQ_plot + geom_beeswarm(alpha=0.6, priority = "density")
PhiNPQ_plot <- PhiNPQ_plot + facet_wrap(~ Treatment)
PhiNPQ_plot <- PhiNPQ_plot + stat_summary(fun.y=mean, geom="point", shape=95, size=6, color="black", fill="black")
PhiNPQ_plot <- PhiNPQ_plot + theme(legend.position = "none")
PhiNPQ_plot <- PhiNPQ_plot + xlab("") + ylab("PhiNPQ (a.u.)")
PhiNPQ_plot <- PhiNPQ_plot + scale_colour_manual(values=c("steelblue", "sienna3", "sienna3", "sienna3", "sienna3", "sienna3", "sienna3", "sienna3", "sienna3", "sienna3",
"deeppink4", "deeppink4", "deeppink4",
"darkviolet", "darkviolet","darkviolet","darkviolet","darkviolet","darkviolet","darkviolet", "darkviolet", "darkviolet", "darkviolet", "darkviolet",
"darkviolet", "darkviolet",
"cyan4", "cyan4", "cyan4", "cyan4", "cyan4", "cyan4",
"maroon4", "maroon4", "maroon4", "maroon4", "maroon4", "maroon4",
"plum4", "plum4", "plum4", "plum4"))
PhiNPQ_plot <- PhiNPQ_plot + theme(axis.text.x = element_text(angle=90, vjust=0.5))
PhiNPQ_plot <- PhiNPQ_plot + stat_compare_means(label = "p.signif", method = "t.test", ref.group = "Col-0", hide.ns = T)
PhiNPQ_plot
Let;s combine most important graphs into a figure:
library(cowplot)
##
## Attaching package: 'cowplot'
## The following object is masked from 'package:ggpubr':
##
## get_legend
pdf("Fig.Arabidopsis.mutants.drought.pilot.Nov.2022.pdf", width = 15, heigh = 15)
plot_grid(EVT.med.all_plot, Leaf.temp_plot, NPQt_plot, PhiNPQ_plot, ncol=1, labels = "AUTO")
## Warning in compute_panel(...): The default behavior of beeswarm has changed in
## version 0.6.0. In versions <0.6.0, this plot would have been dodged on the y-
## axis. In versions >=0.6.0, grouponX=FALSE must be explicitly set to group on y-
## axis. Please set grouponX=TRUE/FALSE to avoid this warning and ensure proper
## axis choice.
dev.off()
## quartz_off_screen
## 2