This notebook describes a quick analysis of the results collected by PhenoSight facility on wheat and brachypodium mutant lines, developed by Prof. Vatmaniuk’s lab, plants grown by Yana Kavulych. The data analysis was performed by Magda Julkowska
data1 <- read.csv("Exp_10236_PS2_Analysis.csv")
data1
data <- subset(data1, data1$Roi.No != "All")
data
OK - let’s separate the tray info from experiment:
strsplit(data$File[1], "_")
## [[1]]
## [1] "HDR" "10236" "41914" "10.INF"
for(i in 1:nrow(data)){
data$Tray[i] <- strsplit(data$File[i], "_")[[1]][3]
}
unique(data$Tray)
## [1] "41914" "41934"
data
colnames(data)[27] <- "phi.no"
colnames(data)[29] <- "phi.npq"
data
PS1 <- subset(data, data$nTmPam < 2)
PS2 <- subset(data, data$nTmPam > 1)
PS1
PS2
now - let’s add all of these additional FvFm into a better organized dataframe:
library(reshape2)
PS1 <- PS1[,c(1:4,6,9)]
PS1
PS2 <- PS2[,c(1:4,6, 10:39)]
PS2
PS3 <- merge(PS1, PS2, by = c("File", "Date", "Time", "Roi.No", "Roi.Mask"))
PS3
colnames(PS3)
## [1] "File" "Date" "Time" "Roi.No" "Roi.Mask" "Fv.Fm"
## [7] "s.d." "Fq..Fm." "s.d..1" "NPQ" "s.d..2" "F0."
## [13] "s.d..3" "qP" "s.d..4" "qN" "s.d..5" "qL"
## [19] "s.d..6" "qE" "s.d..7" "qI" "s.d..8" "phi.no"
## [25] "s.d..9" "phi.npq" "s.d..10" "npq.t." "s.d..11" "ChlIdx"
## [31] "s.d..12" "AriIdx" "s.d..13" "NDVI" "s.d..14" "Tray"
PS4 <- PS3[,c(1:5, 36, 6, 8, 10, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34)]
PS4
for(i in 1:nrow(PS4)){
PS4$month[i] <- substr(PS4$Date[i], 5, 6)
PS4$day[i] <- substr(PS4$Date[i], 7, 8)
PS4$hour[i] <- substr(PS4$Time[i], 1,2)
}
PS4
unique(PS4$month)
## [1] "09" "10"
temp <- subset(PS4, PS4$month == "09")
min(temp$day)
## [1] "17"
temp <- subset(temp, temp$day == "17")
min(temp$hour)
## [1] "22"
unique(PS4$day)
## [1] "21" "22" "23" "24" "25" "27" "28" "17" "29" "30" "01" "02" "03" "18" "04"
## [16] "05" "06" "07" "08" "09" "10" "11" "12" "13" "19" "14" "15" "16" "20"
unique(PS4$hour)
## [1] "20" "10" "08" "09" "11" "22" "14" "18" "16" "07" "12" "15"
PS4
OK - let’s calculate TOE (time of experiment):
PS4$cum.days <- 0
for(i in 1:nrow(PS4)){
if(PS4$month[i] == "09"){
PS4$cum.days[i] <- 0}
if(PS4$month[i] == "10"){
PS4$cum.days[i] <- 30}
}
PS4$TOE <- (as.numeric(as.character(PS4$day))-17)*24 + (PS4$cum.days*24) + as.numeric(as.character(PS4$hour))-22
PS4
#install.packages("ggplot2")
library(ggplot2)
## Warning: package 'ggplot2' was built under R version 4.3.3
lgraph <- ggplot(data=PS4, aes(x= TOE, y=Fv.Fm, group = Tray))
lgraph <- lgraph + geom_line(alpha = 0.6)
lgraph <- lgraph + ylab("Maximum Quantum Yield (Fv/Fm)") + xlab("Hours of Imaging")
lgraph
This is wrong - bc FvFm cannot be below 0.70 - so let’s use that to trim
the data to appropriate timeline:
PS5 <- subset(PS4, PS4$Fv.Fm > 0.7)
lgraph <- ggplot(data=PS5, aes(x= TOE, y=Fv.Fm, group = Tray))
lgraph <- lgraph + geom_line(alpha = 0.2)
lgraph <- lgraph + ylab("Maximum Quantum Yield (Fv/Fm)") + xlab("Hours of Imaging")
lgraph
unique(PS5$Tray)
## [1] "41914" "41934"
PS5
decode <- read.csv("decode_soil.csv")
PS6 <- merge(PS5, decode, by = c("Tray", "Roi.No"), all= T)
PS6
PS6 <- PS6[,c(1:5, 25:27, 6:20)]
PS6$Plant.ID <- paste(PS6$Tray, PS6$Roi.No, sep="_")
PS6
ok - now let’s plot the data to be compared to one another:
FvFm_graph <- ggplot(data=PS6, aes(x= TOE, y=Fv.Fm, group = Plant.ID, color = species))
FvFm_graph <- FvFm_graph + geom_line(alpha = 0.7)
FvFm_graph <- FvFm_graph + stat_summary(fun.data = mean_se, geom="ribbon", linetype=0, aes(group= species), alpha=0.3)
FvFm_graph <- FvFm_graph + stat_summary(fun=mean, aes(group= species), size=0.7, geom="line", linetype = "dashed")
## Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
## ℹ Please use `linewidth` instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
#FvFm_graph <- FvFm_graph + stat_compare_means(aes(group = Genotype), label = "p.signif", method = "t.test", hide.ns = TRUE)
FvFm_graph <- FvFm_graph + ylab("Fv/Fm (a.u.)") + xlab("Time of imaging (h)")
FvFm_graph
OK - so as you see - this graph is extremely messy. Let’s try to
separate it into three comparisons we are interested in making. For this
- we have to make a new column for the genotype
unique(PS6$Genotype)
## [1] "empty" "2.C" "5.C" "8.D" "3.C" "6.D" "10.D" "1.C" "9.D"
## [10] "4.C" "7.D" "2.A" "5.A" "8.B" "3.A" "6.B" "10.B" "1.A"
## [19] "9.B" "4.A" "7.B"
PS6$Genotype_clean <- PS6$Genotype
PS6$Genotype_clean <- gsub("1.", "", PS6$Genotype_clean)
PS6$Genotype_clean <- gsub("2.", "", PS6$Genotype_clean)
PS6$Genotype_clean <- gsub("3.", "", PS6$Genotype_clean)
PS6$Genotype_clean <- gsub("4.", "", PS6$Genotype_clean)
PS6$Genotype_clean <- gsub("5.", "", PS6$Genotype_clean)
PS6$Genotype_clean <- gsub("6.", "", PS6$Genotype_clean)
PS6$Genotype_clean <- gsub("7.", "", PS6$Genotype_clean)
PS6$Genotype_clean <- gsub("8.", "", PS6$Genotype_clean)
PS6$Genotype_clean <- gsub("9.", "", PS6$Genotype_clean)
PS6$Genotype_clean <- gsub("10.", "", PS6$Genotype_clean)
PS6$Genotype_clean <- gsub(".B", "B", PS6$Genotype_clean)
PS6$Genotype_clean <- gsub(".D", "D", PS6$Genotype_clean)
PS7 <- subset(PS6, PS6$Genotype != "empty")
PS7
FvFm_graph <- ggplot(data=PS7, aes(x= TOE, y=Fv.Fm, group = Plant.ID, color = Genotype_clean))
FvFm_graph <- FvFm_graph + geom_line(alpha = 0.7) + facet_wrap(~ species)
FvFm_graph <- FvFm_graph + stat_summary(fun.data = mean_se, geom="ribbon", linetype=0, aes(group= Genotype_clean), alpha=0.3)
FvFm_graph <- FvFm_graph + stat_summary(fun=mean, aes(group= Genotype_clean), size=0.7, geom="line", linetype = "dashed")
#FvFm_graph <- FvFm_graph + stat_compare_means(aes(group = Genotype), label = "p.signif", method = "t.test", hide.ns = TRUE)
FvFm_graph <- FvFm_graph + ylab("Fv/Fm (a.u.)") + xlab("Time of imaging (h)")
FvFm_graph
OK - this is better - but still a little messy. As you can see - there
are some lines that are not exactly the same timepoints - so we will get
in trouble when calculating averages. Therefore - we need to do
splines!
So - let’s first isolate one plant to establish our spline calculations
max(PS7$TOE)
## [1] 706
hours <- seq(0, 706, by = 12)
length(hours)
## [1] 59
hours
## [1] 0 12 24 36 48 60 72 84 96 108 120 132 144 156 168 180 192 204 216
## [20] 228 240 252 264 276 288 300 312 324 336 348 360 372 384 396 408 420 432 444
## [39] 456 468 480 492 504 516 528 540 552 564 576 588 600 612 624 636 648 660 672
## [58] 684 696
temp <- subset(PS7, PS7$Plant.ID == unique(PS7$Plant.ID)[1])
temp$TOE <- as.numeric(as.character(temp$TOE))
temp <- temp[order(temp$TOE, decreasing = F),]
plot.spl <- with(temp, smooth.spline(TOE, Fv.Fm, df = 32))
plot(Fv.Fm ~ TOE, data = temp)
lines(plot.spl, col = "blue")
lines(predict(plot.spl, hours), col = "red")
temp
plot.spl <- with(temp, smooth.spline(TOE, Fq..Fm., df = 32))
plot(Fq..Fm. ~ TOE, data = temp)
lines(plot.spl, col = "blue")
lines(predict(plot.spl, hours), col = "red")
plot.spl <- with(temp, smooth.spline(TOE, NPQ, df = 32))
plot(NPQ ~ TOE, data = temp)
lines(plot.spl, col = "blue")
lines(predict(plot.spl, hours), col = "red")
plot.spl <- with(temp, smooth.spline(TOE, qP, df = 32))
plot(qP ~ TOE, data = temp)
lines(plot.spl, col = "blue")
lines(predict(plot.spl, hours), col = "red")
plot.spl <- with(temp, smooth.spline(TOE, qN, df = 32))
plot(qN ~ TOE, data = temp)
lines(plot.spl, col = "blue")
lines(predict(plot.spl, hours), col = "red")
plot.spl <- with(temp, smooth.spline(TOE, qL, df = 32))
plot(qL ~ TOE, data = temp)
lines(plot.spl, col = "blue")
lines(predict(plot.spl, hours), col = "red")
plot.spl <- with(temp, smooth.spline(TOE, qE, df = 32))
plot(qE ~ TOE, data = temp)
lines(plot.spl, col = "blue")
lines(predict(plot.spl, hours), col = "red")
plot.spl <- with(temp, smooth.spline(TOE, qI, df = 32))
plot(qI ~ TOE, data = temp)
lines(plot.spl, col = "blue")
lines(predict(plot.spl, hours), col = "red")
plot.spl <- with(temp, smooth.spline(TOE, phi.no, df = 32))
plot(phi.no ~ TOE, data = temp)
lines(plot.spl, col = "blue")
lines(predict(plot.spl, hours), col = "red")
plot.spl <- with(temp, smooth.spline(TOE, phi.npq, df = 32))
plot(phi.npq ~ TOE, data = temp)
lines(plot.spl, col = "blue")
lines(predict(plot.spl, hours), col = "red")
plot.spl <- with(temp, smooth.spline(TOE, npq.t., df = 32))
plot(npq.t. ~ TOE, data = temp)
lines(plot.spl, col = "blue")
lines(predict(plot.spl, hours), col = "red")
plot.spl <- with(temp, smooth.spline(TOE, ChlIdx, df = 32))
plot(ChlIdx ~ TOE, data = temp)
lines(plot.spl, col = "blue")
lines(predict(plot.spl, hours), col = "red")
plot.spl <- with(temp, smooth.spline(TOE, AriIdx, df = 32))
plot(AriIdx ~ TOE, data = temp)
lines(plot.spl, col = "blue")
lines(predict(plot.spl, hours), col = "red")
plot.spl <- with(temp, smooth.spline(TOE, NDVI, df = 32))
plot(NDVI ~ TOE, data = temp)
lines(plot.spl, col = "blue")
lines(predict(plot.spl, hours), col = "red")
temp
plot.spl <- with(temp, smooth.spline(TOE, Roi.Mask, df = 32))
plot(Roi.Mask ~ TOE, data = temp)
lines(plot.spl, col = "blue")
lines(predict(plot.spl, hours), col = "red")
Then - let’s save all of the information into one file
names <- c(text = "Plant.ID", "Genotype", "comp", "TOE", "Roi.Mask","Fv.Fm", "Fq.Fm", "NPQ", "qP", "qN", "qL", "qE", "qI", "phiNO", "phiNPQ", "npq.t", "ChlIdx", "AriIdx", "NDVI")
spline_data <- data.frame()
for (k in names) {
spline_data[[k]] <- as.character()}
pred_temp <- predict(plot.spl, hours)
length(pred_temp$x)
## [1] 59
temp
dim(temp)
## [1] 38 25
spline_data[1:59,1] <- temp$Plant.ID[1]
spline_data[1:59,2] <- temp$Genotype_clean[1]
spline_data[1:59,3] <- temp$species[1]
spline_data[1:59,4] <- pred_temp$x
plot.spl <- with(temp, smooth.spline(TOE, Roi.Mask, df = 32))
pred_temp <- predict(plot.spl, hours)
spline_data[1:59,5] <- pred_temp$y
spline_data
plot.spl <- with(temp, smooth.spline(TOE, Fv.Fm, df = 32))
pred_temp <- predict(plot.spl, hours)
spline_data[1:59,6] <- pred_temp$y
plot.spl <- with(temp, smooth.spline(TOE, Fq..Fm., df = 32))
pred_temp <- predict(plot.spl, hours)
spline_data[1:59,7] <- pred_temp$y
plot.spl <- with(temp, smooth.spline(TOE, NPQ, df = 32))
pred_temp <- predict(plot.spl, hours)
spline_data[1:59,8] <- pred_temp$y
plot.spl <- with(temp, smooth.spline(TOE, qP, df = 32))
pred_temp <- predict(plot.spl, hours)
spline_data[1:59,9] <- pred_temp$y
plot.spl <- with(temp, smooth.spline(TOE, qN, df = 32))
pred_temp <- predict(plot.spl, hours)
spline_data[1:59,10] <- pred_temp$y
plot.spl <- with(temp, smooth.spline(TOE, qL, df = 32))
pred_temp <- predict(plot.spl, hours)
spline_data[1:59,11] <- pred_temp$y
plot.spl <- with(temp, smooth.spline(TOE, qE, df = 32))
pred_temp <- predict(plot.spl, hours)
spline_data[1:59,12] <- pred_temp$y
plot.spl <- with(temp, smooth.spline(TOE, qI, df = 32))
pred_temp <- predict(plot.spl, hours)
spline_data[1:59,13] <- pred_temp$y
plot.spl <- with(temp, smooth.spline(TOE, phi.no, df = 32))
pred_temp <- predict(plot.spl, hours)
spline_data[1:59,14] <- pred_temp$y
plot.spl <- with(temp, smooth.spline(TOE, phi.npq, df = 32))
pred_temp <- predict(plot.spl, hours)
spline_data[1:59,15] <- pred_temp$y
plot.spl <- with(temp, smooth.spline(TOE, npq.t., df = 32))
pred_temp <- predict(plot.spl, hours)
spline_data[1:59,16] <- pred_temp$y
plot.spl <- with(temp, smooth.spline(TOE, ChlIdx, df = 32))
pred_temp <- predict(plot.spl, hours)
spline_data[1:59,17] <- pred_temp$y
plot.spl <- with(temp, smooth.spline(TOE, AriIdx, df = 32))
pred_temp <- predict(plot.spl, hours)
spline_data[1:59,18] <- pred_temp$y
plot.spl <- with(temp, smooth.spline(TOE, NDVI, df = 32))
pred_temp <- predict(plot.spl, hours)
spline_data[1:59,19] <- pred_temp$y
final_spline <- spline_data
final_spline
all_plants <- unique(PS7$Plant.ID)
all_plants
## [1] "41914_10" "41914_12" "41914_14" "41914_16" "41914_18" "41914_2"
## [7] "41914_20" "41914_4" "41914_6" "41914_8" "41934_10" "41934_12"
## [13] "41934_14" "41934_16" "41934_18" "41934_2" "41934_20" "41934_4"
## [19] "41934_6" "41934_8"
for(i in 2:20){
temp <- subset(PS7, PS7$Plant.ID == all_plants[i])
if (dim(temp)[1] > 3) {
spline_data[1:59,1] <- temp$Plant.ID[1]
spline_data[1:59,2] <- temp$Genotype_clean[1]
spline_data[1:59,3] <- temp$species[1]
temp$TOE <- as.numeric(as.character(temp$TOE))
temp <- temp[order(temp$TOE, decreasing = F),]
plot.spl <- with(temp, smooth.spline(TOE, Roi.Mask, df = 32))
pred_temp <- predict(plot.spl, hours)
spline_data[1:59,4] <- pred_temp$x
spline_data[1:59,5] <- pred_temp$y
plot.spl <- with(temp, smooth.spline(TOE, Fv.Fm, df = 32))
pred_temp <- predict(plot.spl, hours)
spline_data[1:59,6] <- pred_temp$y
plot.spl <- with(temp, smooth.spline(TOE, Fq..Fm., df = 32))
pred_temp <- predict(plot.spl, hours)
spline_data[1:59,7] <- pred_temp$y
plot.spl <- with(temp, smooth.spline(TOE, NPQ, df = 32))
pred_temp <- predict(plot.spl, hours)
spline_data[1:59,8] <- pred_temp$y
plot.spl <- with(temp, smooth.spline(TOE, qP, df = 32))
pred_temp <- predict(plot.spl, hours)
spline_data[1:59,9] <- pred_temp$y
plot.spl <- with(temp, smooth.spline(TOE, qN, df = 32))
pred_temp <- predict(plot.spl, hours)
spline_data[1:59,10] <- pred_temp$y
plot.spl <- with(temp, smooth.spline(TOE, qL, df = 32))
pred_temp <- predict(plot.spl, hours)
spline_data[1:59,11] <- pred_temp$y
plot.spl <- with(temp, smooth.spline(TOE, qE, df = 32))
pred_temp <- predict(plot.spl, hours)
spline_data[1:59,12] <- pred_temp$y
plot.spl <- with(temp, smooth.spline(TOE, qI, df = 32))
pred_temp <- predict(plot.spl, hours)
spline_data[1:59,13] <- pred_temp$y
plot.spl <- with(temp, smooth.spline(TOE, phi.no, df = 32))
pred_temp <- predict(plot.spl, hours)
spline_data[1:59,14] <- pred_temp$y
plot.spl <- with(temp, smooth.spline(TOE, phi.npq, df = 32))
pred_temp <- predict(plot.spl, hours)
spline_data[1:59,15] <- pred_temp$y
plot.spl <- with(temp, smooth.spline(TOE, npq.t., df = 32))
pred_temp <- predict(plot.spl, hours)
spline_data[1:59,16] <- pred_temp$y
plot.spl <- with(temp, smooth.spline(TOE, ChlIdx, df = 32))
pred_temp <- predict(plot.spl, hours)
spline_data[1:59,17] <- pred_temp$y
plot.spl <- with(temp, smooth.spline(TOE, AriIdx, df = 32))
pred_temp <- predict(plot.spl, hours)
spline_data[1:59,18] <- pred_temp$y
plot.spl <- with(temp, smooth.spline(TOE, NDVI, df = 32))
pred_temp <- predict(plot.spl, hours)
spline_data[1:59,19] <- pred_temp$y
final_spline <- rbind(final_spline, spline_data)
} else {
spline_data[1:59,1] <- temp$Plant.ID[1]
spline_data[1:59,2] <- temp$Genotype_clean[1]
spline_data[1:59,3] <- temp$species[1]
spline_data[1:59,4] <- hours
spline_data[1:59,5] <- 0
spline_data[1:59,6] <- 0
spline_data[1:59,7] <- 0
spline_data[1:59,8] <- 0
spline_data[1:59,9] <- 0
spline_data[1:59,10] <- 0
spline_data[1:59,11] <- 0
spline_data[1:59,12] <- 0
spline_data[1:59,13] <- 0
spline_data[1:59,14] <- 0
spline_data[1:59,15] <- 0
spline_data[1:59,16] <- 0
spline_data[1:59,17] <- 0
spline_data[1:59,18] <- 0
spline_data[1:59,19] <- 0
final_spline <- rbind(final_spline, spline_data)
}}
final_spline
final_spline2 <- final_spline
final_spline2[4:19] <- sapply(final_spline2[4:19],as.numeric)
final_spline2
library(ggsci)
## Warning: package 'ggsci' was built under R version 4.3.3
C1_lgraph <- ggplot(data = final_spline2, aes(x = TOE, y = Fv.Fm, group = Plant.ID, color = Genotype))
C1_lgraph <- C1_lgraph + geom_line(alpha = 0.1) + facet_wrap(~ comp, ncol = 2)
C1_lgraph <- C1_lgraph + stat_summary(fun.data = mean_se, geom = "ribbon", linetype = 0, aes(group = Genotype), alpha = 0.3)
C1_lgraph <- C1_lgraph + stat_summary(fun = mean, aes(group = Genotype), size = 0.7, geom = "line", linetype = "dashed")
#C1_lgraph <- C1_lgraph + stat_compare_means(aes(group = Genotype), label = "p.signif", method = "t.test", hide.ns = F)
C1_lgraph <- C1_lgraph + labs(x = "", y = "Fv/Fm (a.u.)") + scale_color_d3("category10") + theme(legend.position = "top") + ggtitle("Maximum Quantum Yield of Photosystem II")
C1_lgraph
I think I lost my “compare” with multiple times wild type - let’s
re-instate it:
fs2 <- subset(final_spline2, final_spline2$Fv.Fm < 0.85)
fs2 <- subset(fs2, fs2$Fq.Fm < 0.4)
fs2 <- subset(fs2, fs2$Fv.Fm > 0.6)
fs2 <- subset(fs2, fs2$Fq.Fm > 0)
fs2 <- subset(fs2, fs2$NPQ > 0)
fs2 <- subset(fs2, fs2$TOE > 48)
unique(fs2$TOE)
## [1] 168 180 192 204 216 228 240 252 264 276 288 300 312 324 336 348 360 372 384
## [20] 396 408 420 432 444 456 468 480 492 504 516 528 540 552 564 576 588 600 612
## [39] 624 636 648 660 672 684 696 60 72 84 96 108 120 132 144 156
C1_lgraph <- ggplot(data = fs2, aes(x = TOE, y = Fv.Fm, group = Plant.ID, color = Genotype))
C1_lgraph <- C1_lgraph + geom_line(alpha = 0.1) + facet_wrap(~ comp, ncol = 2)
C1_lgraph <- C1_lgraph + stat_summary(fun.data = mean_se, geom = "ribbon", linetype = 0, aes(group = Genotype), alpha = 0.3)
C1_lgraph <- C1_lgraph + stat_summary(fun = mean, aes(group = Genotype), size = 0.7, geom = "line", linetype = "dashed")
#C1_lgraph <- C1_lgraph + stat_compare_means(aes(group = Genotype), label = "p.signif", method = "t.test", hide.ns = F)
C1_lgraph <- C1_lgraph + labs(x = "", y = "Fv/Fm (a.u.)") + scale_color_d3("category10") + theme(legend.position = "top") + ggtitle("Maximum Quantum Yield of Photosystem II")
C1_lgraph
OK - cool - let’s add the p-value plots to this graph:
library("dplyr")
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library("cowplot")
get_p_value <- function(fs2) {
t.test(Fv.Fm ~ Genotype, data = fs2)$p.value
}
p_values <- fs2 %>%
group_by(TOE, comp) %>%
summarise(p_value = get_p_value(cur_data())) %>%
ungroup()
## Warning: There was 1 warning in `summarise()`.
## ℹ In argument: `p_value = get_p_value(cur_data())`.
## ℹ In group 1: `TOE = 60` `comp = "Brachypodium"`.
## Caused by warning:
## ! `cur_data()` was deprecated in dplyr 1.1.0.
## ℹ Please use `pick()` instead.
## `summarise()` has grouped output by 'TOE'. You can override using the `.groups`
## argument.
p_values$LOD <- -log10(p_values$p_value)
C1_pplot <- ggplot(p_values, aes(x = TOE, y = LOD))
C1_pplot <- C1_pplot + geom_line() + geom_hline(yintercept = -log10(0.05), linetype = "dashed", color = "red") + facet_wrap(~ comp, ncol = 3)
C1_pplot <- C1_pplot + labs(x = "Hours Of Imaging", y = "-log10(p-value)")
C1_pplot <- C1_pplot + theme_minimal() + theme_bw() + theme(strip.text = element_blank(), strip.background = element_blank())
plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
OK - let’s save it and move on to the next trait:
pdf("FvFm_graph.pdf")
plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
dev.off()
## quartz_off_screen
## 2
fs2
C1_lgraph <- ggplot(data = fs2, aes(x = TOE, y = Fq.Fm, group = Plant.ID, color = Genotype))
C1_lgraph <- C1_lgraph + geom_line(alpha = 0.1) + facet_wrap(~ comp, ncol = 3)
C1_lgraph <- C1_lgraph + stat_summary(fun.data = mean_se, geom = "ribbon", linetype = 0, aes(group = Genotype), alpha = 0.3)
C1_lgraph <- C1_lgraph + stat_summary(fun = mean, aes(group = Genotype), size = 0.7, geom = "line", linetype = "dashed")
#C1_lgraph <- C1_lgraph + stat_compare_means(aes(group = Genotype), label = "p.signif", method = "t.test", hide.ns = F)
C1_lgraph <- C1_lgraph + labs(x = "", y = "Fq'/Fm' (a.u.)") + scale_color_d3("category10") + theme(legend.position = "top") + ggtitle("Operational Quantum Yield of Photosystem II")
C1_lgraph
get_p_value <- function(fs2) {
t.test(Fq.Fm ~ Genotype, data = fs2)$p.value
}
p_values <- fs2 %>%
group_by(TOE, comp) %>%
summarise(p_value = get_p_value(cur_data())) %>%
ungroup()
## `summarise()` has grouped output by 'TOE'. You can override using the `.groups`
## argument.
p_values$LOD <- -log10(p_values$p_value)
C1_pplot <- ggplot(p_values, aes(x = TOE, y = LOD))
C1_pplot <- C1_pplot + geom_line() + geom_hline(yintercept = -log10(0.05), linetype = "dashed", color = "red") + facet_wrap(~ comp, ncol = 3)
C1_pplot <- C1_pplot + labs(x = "Hours Of Imaging", y = "-log10(p-value)")
C1_pplot <- C1_pplot + theme_minimal() + theme_bw() + theme(strip.text = element_blank(), strip.background = element_blank())
plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
OK - let’s save it and move on to the next trait:
pdf("FqFm_graph.pdf")
plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
dev.off()
## quartz_off_screen
## 2
fs2
C1_lgraph <- ggplot(data = fs2, aes(x = TOE, y = NPQ, group = Plant.ID, color = Genotype))
C1_lgraph <- C1_lgraph + geom_line(alpha = 0.1) + facet_wrap(~ comp, ncol = 3)
C1_lgraph <- C1_lgraph + stat_summary(fun.data = mean_se, geom = "ribbon", linetype = 0, aes(group = Genotype), alpha = 0.3)
C1_lgraph <- C1_lgraph + stat_summary(fun = mean, aes(group = Genotype), size = 0.7, geom = "line", linetype = "dashed")
#C1_lgraph <- C1_lgraph + stat_compare_means(aes(group = Genotype), label = "p.signif", method = "t.test", hide.ns = F)
C1_lgraph <- C1_lgraph + labs(x = "", y = "NPQ (a.u.)") + scale_color_d3("category10") + theme(legend.position = "top") + ggtitle("Non-photochemical quenching ((Fm-Fm’)/Fm’)")
C1_lgraph
get_p_value <- function(fs2) {
t.test(NPQ ~ Genotype, data = fs2)$p.value
}
p_values <- fs2 %>%
group_by(TOE, comp) %>%
summarise(p_value = get_p_value(cur_data())) %>%
ungroup()
## `summarise()` has grouped output by 'TOE'. You can override using the `.groups`
## argument.
p_values$LOD <- -log10(p_values$p_value)
C1_pplot <- ggplot(p_values, aes(x = TOE, y = LOD))
C1_pplot <- C1_pplot + geom_line() + geom_hline(yintercept = -log10(0.05), linetype = "dashed", color = "red") + facet_wrap(~ comp, ncol = 3)
C1_pplot <- C1_pplot + labs(x = "Hours Of Imaging", y = "-log10(p-value)")
C1_pplot <- C1_pplot + theme_minimal() + theme_bw() + theme(strip.text = element_blank(), strip.background = element_blank())
plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
OK - let’s save it and move on to the next trait:
pdf("NPQ_graph.pdf")
plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Non-photochemical quenching ((Fm-Fm’)/Fm’)' in
## 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Non-photochemical quenching ((Fm-Fm’)/Fm’)' in
## 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Non-photochemical quenching ((Fm-Fm’)/Fm’)' in
## 'mbcsToSbcs': dot substituted for <99>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Non-photochemical quenching ((Fm-Fm’)/Fm’)' in
## 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Non-photochemical quenching ((Fm-Fm’)/Fm’)' in
## 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Non-photochemical quenching ((Fm-Fm’)/Fm’)' in
## 'mbcsToSbcs': dot substituted for <99>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Non-photochemical quenching ((Fm-Fm’)/Fm’)' in
## 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Non-photochemical quenching ((Fm-Fm’)/Fm’)' in
## 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Non-photochemical quenching ((Fm-Fm’)/Fm’)' in
## 'mbcsToSbcs': dot substituted for <99>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Non-photochemical quenching ((Fm-Fm’)/Fm’)' in
## 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Non-photochemical quenching ((Fm-Fm’)/Fm’)' in
## 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Non-photochemical quenching ((Fm-Fm’)/Fm’)' in
## 'mbcsToSbcs': dot substituted for <99>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Non-photochemical quenching ((Fm-Fm’)/Fm’)' in
## 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Non-photochemical quenching ((Fm-Fm’)/Fm’)' in
## 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Non-photochemical quenching ((Fm-Fm’)/Fm’)' in
## 'mbcsToSbcs': dot substituted for <99>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Non-photochemical quenching ((Fm-Fm’)/Fm’)' in
## 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Non-photochemical quenching ((Fm-Fm’)/Fm’)' in
## 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Non-photochemical quenching ((Fm-Fm’)/Fm’)' in
## 'mbcsToSbcs': dot substituted for <99>
dev.off()
## quartz_off_screen
## 2
fs2
C1_lgraph <- ggplot(data = fs2, aes(x = TOE, y = qP, group = Plant.ID, color = Genotype))
C1_lgraph <- C1_lgraph + geom_line(alpha = 0.1) + facet_wrap(~ comp, ncol = 3)
C1_lgraph <- C1_lgraph + stat_summary(fun.data = mean_se, geom = "ribbon", linetype = 0, aes(group = Genotype), alpha = 0.3)
C1_lgraph <- C1_lgraph + stat_summary(fun = mean, aes(group = Genotype), size = 0.7, geom = "line", linetype = "dashed")
#C1_lgraph <- C1_lgraph + stat_compare_means(aes(group = Genotype), label = "p.signif", method = "t.test", hide.ns = F)
C1_lgraph <- C1_lgraph + labs(x = "", y = "qP (a.u.)") + scale_color_d3("category10") + theme(legend.position = "top") + ggtitle("Fraction of Open Reaction Centers (puddle mode) / photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)")
C1_lgraph
get_p_value <- function(fs2) {
t.test(qP ~ Genotype, data = fs2)$p.value
}
p_values <- fs2 %>%
group_by(TOE, comp) %>%
summarise(p_value = get_p_value(cur_data())) %>%
ungroup()
## `summarise()` has grouped output by 'TOE'. You can override using the `.groups`
## argument.
p_values$LOD <- -log10(p_values$p_value)
C1_pplot <- ggplot(p_values, aes(x = TOE, y = LOD))
C1_pplot <- C1_pplot + geom_line() + geom_hline(yintercept = -log10(0.05), linetype = "dashed", color = "red") + facet_wrap(~ comp, ncol = 3)
C1_pplot <- C1_pplot + labs(x = "Hours Of Imaging", y = "-log10(p-value)")
C1_pplot <- C1_pplot + theme_minimal() + theme_bw() + theme(strip.text = element_blank(), strip.background = element_blank())
plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
OK - let’s save it and move on to the next trait:
pdf("qP_graph.pdf")
plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <e2>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <80>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <99>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <e2>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <80>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <93>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <e2>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <80>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <99>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <e2>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <80>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <99>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <e2>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <80>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <93>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <e2>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <80>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <99>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <99>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <93>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <99>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <99>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <93>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <99>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <99>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <93>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <99>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <99>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <93>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (puddle mode) /
## photochemical quenching (Fm’ – Fs’)/(Fm’ – F0’)' in 'mbcsToSbcs': dot
## substituted for <99>
dev.off()
## quartz_off_screen
## 2
fs2
C1_lgraph <- ggplot(data = fs2, aes(x = TOE, y = qN, group = Plant.ID, color = Genotype))
C1_lgraph <- C1_lgraph + geom_line(alpha = 0.1) + facet_wrap(~ comp, ncol = 3)
C1_lgraph <- C1_lgraph + stat_summary(fun.data = mean_se, geom = "ribbon", linetype = 0, aes(group = Genotype), alpha = 0.3)
C1_lgraph <- C1_lgraph + stat_summary(fun = mean, aes(group = Genotype), size = 0.7, geom = "line", linetype = "dashed")
#C1_lgraph <- C1_lgraph + stat_compare_means(aes(group = Genotype), label = "p.signif", method = "t.test", hide.ns = F)
C1_lgraph <- C1_lgraph + labs(x = "", y = "qN (a.u.)") + scale_color_d3("category10") + theme(legend.position = "top") + ggtitle("non-photochemical quenching (1 – (Fm’ – F0’)/(Fm-F0))")
get_p_value <- function(fs2) {
t.test(qN ~ Genotype, data = fs2)$p.value
}
p_values <- fs2 %>%
group_by(TOE, comp) %>%
summarise(p_value = get_p_value(cur_data())) %>%
ungroup()
## `summarise()` has grouped output by 'TOE'. You can override using the `.groups`
## argument.
p_values$LOD <- -log10(p_values$p_value)
C1_pplot <- ggplot(p_values, aes(x = TOE, y = LOD))
C1_pplot <- C1_pplot + geom_line() + geom_hline(yintercept = -log10(0.05), linetype = "dashed", color = "red") + facet_wrap(~ comp, ncol = 3)
C1_pplot <- C1_pplot + labs(x = "Hours Of Imaging", y = "-log10(p-value)")
C1_pplot <- C1_pplot + theme_minimal() + theme_bw() + theme(strip.text = element_blank(), strip.background = element_blank())
plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
OK - let’s save it and move on to the next trait:
pdf("qN_graph.pdf")
plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'non-photochemical quenching (1 – (Fm’ – F0’)/(Fm-F0))'
## in 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'non-photochemical quenching (1 – (Fm’ – F0’)/(Fm-F0))'
## in 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'non-photochemical quenching (1 – (Fm’ – F0’)/(Fm-F0))'
## in 'mbcsToSbcs': dot substituted for <93>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'non-photochemical quenching (1 – (Fm’ – F0’)/(Fm-F0))'
## in 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'non-photochemical quenching (1 – (Fm’ – F0’)/(Fm-F0))'
## in 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'non-photochemical quenching (1 – (Fm’ – F0’)/(Fm-F0))'
## in 'mbcsToSbcs': dot substituted for <99>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'non-photochemical quenching (1 – (Fm’ – F0’)/(Fm-F0))'
## in 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'non-photochemical quenching (1 – (Fm’ – F0’)/(Fm-F0))'
## in 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'non-photochemical quenching (1 – (Fm’ – F0’)/(Fm-F0))'
## in 'mbcsToSbcs': dot substituted for <93>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'non-photochemical quenching (1 – (Fm’ – F0’)/(Fm-F0))'
## in 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'non-photochemical quenching (1 – (Fm’ – F0’)/(Fm-F0))'
## in 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'non-photochemical quenching (1 – (Fm’ – F0’)/(Fm-F0))'
## in 'mbcsToSbcs': dot substituted for <99>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'non-photochemical quenching (1 – (Fm’ – F0’)/(Fm-F0))'
## in 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'non-photochemical quenching (1 – (Fm’ – F0’)/(Fm-F0))'
## in 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'non-photochemical quenching (1 – (Fm’ – F0’)/(Fm-F0))'
## in 'mbcsToSbcs': dot substituted for <93>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'non-photochemical quenching (1 – (Fm’ – F0’)/(Fm-F0))'
## in 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'non-photochemical quenching (1 – (Fm’ – F0’)/(Fm-F0))'
## in 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'non-photochemical quenching (1 – (Fm’ – F0’)/(Fm-F0))'
## in 'mbcsToSbcs': dot substituted for <99>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'non-photochemical quenching (1 – (Fm’ – F0’)/(Fm-F0))'
## in 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'non-photochemical quenching (1 – (Fm’ – F0’)/(Fm-F0))'
## in 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'non-photochemical quenching (1 – (Fm’ – F0’)/(Fm-F0))'
## in 'mbcsToSbcs': dot substituted for <93>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'non-photochemical quenching (1 – (Fm’ – F0’)/(Fm-F0))'
## in 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'non-photochemical quenching (1 – (Fm’ – F0’)/(Fm-F0))'
## in 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'non-photochemical quenching (1 – (Fm’ – F0’)/(Fm-F0))'
## in 'mbcsToSbcs': dot substituted for <99>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'non-photochemical quenching (1 – (Fm’ – F0’)/(Fm-F0))'
## in 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'non-photochemical quenching (1 – (Fm’ – F0’)/(Fm-F0))'
## in 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'non-photochemical quenching (1 – (Fm’ – F0’)/(Fm-F0))'
## in 'mbcsToSbcs': dot substituted for <93>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'non-photochemical quenching (1 – (Fm’ – F0’)/(Fm-F0))'
## in 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'non-photochemical quenching (1 – (Fm’ – F0’)/(Fm-F0))'
## in 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'non-photochemical quenching (1 – (Fm’ – F0’)/(Fm-F0))'
## in 'mbcsToSbcs': dot substituted for <99>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'non-photochemical quenching (1 – (Fm’ – F0’)/(Fm-F0))'
## in 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'non-photochemical quenching (1 – (Fm’ – F0’)/(Fm-F0))'
## in 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'non-photochemical quenching (1 – (Fm’ – F0’)/(Fm-F0))'
## in 'mbcsToSbcs': dot substituted for <93>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'non-photochemical quenching (1 – (Fm’ – F0’)/(Fm-F0))'
## in 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'non-photochemical quenching (1 – (Fm’ – F0’)/(Fm-F0))'
## in 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'non-photochemical quenching (1 – (Fm’ – F0’)/(Fm-F0))'
## in 'mbcsToSbcs': dot substituted for <99>
dev.off()
## quartz_off_screen
## 2
fs2
C1_lgraph <- ggplot(data = fs2, aes(x = TOE, y = qL, group = Plant.ID, color = Genotype))
C1_lgraph <- C1_lgraph + geom_line(alpha = 0.1) + facet_wrap(~ comp, ncol = 3)
C1_lgraph <- C1_lgraph + stat_summary(fun.data = mean_se, geom = "ribbon", linetype = 0, aes(group = Genotype), alpha = 0.3)
C1_lgraph <- C1_lgraph + stat_summary(fun = mean, aes(group = Genotype), size = 0.7, geom = "line", linetype = "dashed")
#C1_lgraph <- C1_lgraph + stat_compare_means(aes(group = Genotype), label = "p.signif", method = "t.test", hide.ns = F)
C1_lgraph <- C1_lgraph + labs(x = "", y = "qL (a.u.)") + scale_color_d3("category10") + theme(legend.position = "top") + ggtitle("Fraction of Open Reaction Centers (lake mode) / photochemical quenching (qP*F0’/Fs’)")
get_p_value <- function(fs2) {
t.test(qL ~ Genotype, data = fs2)$p.value
}
p_values <- fs2 %>%
group_by(TOE, comp) %>%
summarise(p_value = get_p_value(cur_data())) %>%
ungroup()
## `summarise()` has grouped output by 'TOE'. You can override using the `.groups`
## argument.
p_values$LOD <- -log10(p_values$p_value)
C1_pplot <- ggplot(p_values, aes(x = TOE, y = LOD))
C1_pplot <- C1_pplot + geom_line() + geom_hline(yintercept = -log10(0.05), linetype = "dashed", color = "red") + facet_wrap(~ comp, ncol = 3)
C1_pplot <- C1_pplot + labs(x = "Hours Of Imaging", y = "-log10(p-value)")
C1_pplot <- C1_pplot + theme_minimal() + theme_bw() + theme(strip.text = element_blank(), strip.background = element_blank())
plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
OK - let’s save it and move on to the next trait:
pdf("qL_graph.pdf")
plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (lake mode) /
## photochemical quenching (qP*F0’/Fs’)' in 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (lake mode) /
## photochemical quenching (qP*F0’/Fs’)' in 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (lake mode) /
## photochemical quenching (qP*F0’/Fs’)' in 'mbcsToSbcs': dot substituted for <99>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (lake mode) /
## photochemical quenching (qP*F0’/Fs’)' in 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (lake mode) /
## photochemical quenching (qP*F0’/Fs’)' in 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (lake mode) /
## photochemical quenching (qP*F0’/Fs’)' in 'mbcsToSbcs': dot substituted for <99>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (lake mode) /
## photochemical quenching (qP*F0’/Fs’)' in 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (lake mode) /
## photochemical quenching (qP*F0’/Fs’)' in 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (lake mode) /
## photochemical quenching (qP*F0’/Fs’)' in 'mbcsToSbcs': dot substituted for <99>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (lake mode) /
## photochemical quenching (qP*F0’/Fs’)' in 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (lake mode) /
## photochemical quenching (qP*F0’/Fs’)' in 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (lake mode) /
## photochemical quenching (qP*F0’/Fs’)' in 'mbcsToSbcs': dot substituted for <99>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (lake mode) /
## photochemical quenching (qP*F0’/Fs’)' in 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (lake mode) /
## photochemical quenching (qP*F0’/Fs’)' in 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (lake mode) /
## photochemical quenching (qP*F0’/Fs’)' in 'mbcsToSbcs': dot substituted for <99>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (lake mode) /
## photochemical quenching (qP*F0’/Fs’)' in 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (lake mode) /
## photochemical quenching (qP*F0’/Fs’)' in 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Fraction of Open Reaction Centers (lake mode) /
## photochemical quenching (qP*F0’/Fs’)' in 'mbcsToSbcs': dot substituted for <99>
dev.off()
## quartz_off_screen
## 2
fs2
C1_lgraph <- ggplot(data = fs2, aes(x = TOE, y = qI, group = Plant.ID, color = Genotype))
C1_lgraph <- C1_lgraph + geom_line(alpha = 0.1) + facet_wrap(~ comp, ncol = 3)
C1_lgraph <- C1_lgraph + stat_summary(fun.data = mean_se, geom = "ribbon", linetype = 0, aes(group = Genotype), alpha = 0.3)
C1_lgraph <- C1_lgraph + stat_summary(fun = mean, aes(group = Genotype), size = 0.7, geom = "line", linetype = "dashed")
#C1_lgraph <- C1_lgraph + stat_compare_means(aes(group = Genotype), label = "p.signif", method = "t.test", hide.ns = F)
C1_lgraph <- C1_lgraph + labs(x = "", y = "qI (a.u.)") + scale_color_d3("category10") + theme(legend.position = "top") + ggtitle("slow relaxing component of NPQ (Fm-Fm’’)/Fm’’")
get_p_value <- function(fs2) {
t.test(qI ~ Genotype, data = fs2)$p.value
}
p_values <- fs2 %>%
group_by(TOE, comp) %>%
summarise(p_value = get_p_value(cur_data())) %>%
ungroup()
## `summarise()` has grouped output by 'TOE'. You can override using the `.groups`
## argument.
p_values$LOD <- -log10(p_values$p_value)
C1_pplot <- ggplot(p_values, aes(x = TOE, y = LOD))
C1_pplot <- C1_pplot + geom_line() + geom_hline(yintercept = -log10(0.05), linetype = "dashed", color = "red") + facet_wrap(~ comp, ncol = 3)
C1_pplot <- C1_pplot + labs(x = "Hours Of Imaging", y = "-log10(p-value)")
C1_pplot <- C1_pplot + theme_minimal() + theme_bw() + theme(strip.text = element_blank(), strip.background = element_blank())
plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
OK - let’s save it and move on to the next trait:
pdf("qI_graph.pdf")
plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'slow relaxing component of NPQ (Fm-Fm’’)/Fm’’' in
## 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'slow relaxing component of NPQ (Fm-Fm’’)/Fm’’' in
## 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'slow relaxing component of NPQ (Fm-Fm’’)/Fm’’' in
## 'mbcsToSbcs': dot substituted for <99>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'slow relaxing component of NPQ (Fm-Fm’’)/Fm’’' in
## 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'slow relaxing component of NPQ (Fm-Fm’’)/Fm’’' in
## 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'slow relaxing component of NPQ (Fm-Fm’’)/Fm’’' in
## 'mbcsToSbcs': dot substituted for <99>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'slow relaxing component of NPQ (Fm-Fm’’)/Fm’’' in
## 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'slow relaxing component of NPQ (Fm-Fm’’)/Fm’’' in
## 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'slow relaxing component of NPQ (Fm-Fm’’)/Fm’’' in
## 'mbcsToSbcs': dot substituted for <99>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'slow relaxing component of NPQ (Fm-Fm’’)/Fm’’' in
## 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'slow relaxing component of NPQ (Fm-Fm’’)/Fm’’' in
## 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'slow relaxing component of NPQ (Fm-Fm’’)/Fm’’' in
## 'mbcsToSbcs': dot substituted for <99>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'slow relaxing component of NPQ (Fm-Fm’’)/Fm’’' in
## 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'slow relaxing component of NPQ (Fm-Fm’’)/Fm’’' in
## 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'slow relaxing component of NPQ (Fm-Fm’’)/Fm’’' in
## 'mbcsToSbcs': dot substituted for <99>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'slow relaxing component of NPQ (Fm-Fm’’)/Fm’’' in
## 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'slow relaxing component of NPQ (Fm-Fm’’)/Fm’’' in
## 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'slow relaxing component of NPQ (Fm-Fm’’)/Fm’’' in
## 'mbcsToSbcs': dot substituted for <99>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'slow relaxing component of NPQ (Fm-Fm’’)/Fm’’' in
## 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'slow relaxing component of NPQ (Fm-Fm’’)/Fm’’' in
## 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'slow relaxing component of NPQ (Fm-Fm’’)/Fm’’' in
## 'mbcsToSbcs': dot substituted for <99>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'slow relaxing component of NPQ (Fm-Fm’’)/Fm’’' in
## 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'slow relaxing component of NPQ (Fm-Fm’’)/Fm’’' in
## 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'slow relaxing component of NPQ (Fm-Fm’’)/Fm’’' in
## 'mbcsToSbcs': dot substituted for <99>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'slow relaxing component of NPQ (Fm-Fm’’)/Fm’’' in
## 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'slow relaxing component of NPQ (Fm-Fm’’)/Fm’’' in
## 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'slow relaxing component of NPQ (Fm-Fm’’)/Fm’’' in
## 'mbcsToSbcs': dot substituted for <99>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'slow relaxing component of NPQ (Fm-Fm’’)/Fm’’' in
## 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'slow relaxing component of NPQ (Fm-Fm’’)/Fm’’' in
## 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'slow relaxing component of NPQ (Fm-Fm’’)/Fm’’' in
## 'mbcsToSbcs': dot substituted for <99>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'slow relaxing component of NPQ (Fm-Fm’’)/Fm’’' in
## 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'slow relaxing component of NPQ (Fm-Fm’’)/Fm’’' in
## 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'slow relaxing component of NPQ (Fm-Fm’’)/Fm’’' in
## 'mbcsToSbcs': dot substituted for <99>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'slow relaxing component of NPQ (Fm-Fm’’)/Fm’’' in
## 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'slow relaxing component of NPQ (Fm-Fm’’)/Fm’’' in
## 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'slow relaxing component of NPQ (Fm-Fm’’)/Fm’’' in
## 'mbcsToSbcs': dot substituted for <99>
dev.off()
## quartz_off_screen
## 2
fs2
C1_lgraph <- ggplot(data = fs2, aes(x = TOE, y = phiNO, group = Plant.ID, color = Genotype))
C1_lgraph <- C1_lgraph + geom_line(alpha = 0.1) + facet_wrap(~ comp, ncol = 3)
C1_lgraph <- C1_lgraph + stat_summary(fun.data = mean_se, geom = "ribbon", linetype = 0, aes(group = Genotype), alpha = 0.3)
C1_lgraph <- C1_lgraph + stat_summary(fun = mean, aes(group = Genotype), size = 0.7, geom = "line", linetype = "dashed")
#C1_lgraph <- C1_lgraph + stat_compare_means(aes(group = Genotype), label = "p.signif", method = "t.test", hide.ns = F)
C1_lgraph <- C1_lgraph + labs(x = "", y = "ɸNO (a.u.)") + scale_color_d3("category10") + theme(legend.position = "top") + ggtitle("ɸNO – QY of non-regulated energy dissipation = 1/(NPQ+1+qI*Fm/F0)")
get_p_value <- function(fs2) {
t.test(phiNO ~ Genotype, data = fs2)$p.value
}
p_values <- fs2 %>%
group_by(TOE, comp) %>%
summarise(p_value = get_p_value(cur_data())) %>%
ungroup()
## `summarise()` has grouped output by 'TOE'. You can override using the `.groups`
## argument.
p_values$LOD <- -log10(p_values$p_value)
C1_pplot <- ggplot(p_values, aes(x = TOE, y = LOD))
C1_pplot <- C1_pplot + geom_line() + geom_hline(yintercept = -log10(0.05), linetype = "dashed", color = "red") + facet_wrap(~ comp, ncol = 3)
C1_pplot <- C1_pplot + labs(x = "Hours Of Imaging", y = "-log10(p-value)")
C1_pplot <- C1_pplot + theme_minimal() + theme_bw() + theme(strip.text = element_blank(), strip.background = element_blank())
plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
OK - let’s save it and move on to the next trait:
pdf("phiNO_graph.pdf")
plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNO (a.u.)' in 'mbcsToSbcs': dot substituted for <c9>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNO (a.u.)' in 'mbcsToSbcs': dot substituted for <b8>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNO (a.u.)' in 'mbcsToSbcs': dot substituted for <c9>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNO (a.u.)' in 'mbcsToSbcs': dot substituted for <b8>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNO (a.u.)' in 'mbcsToSbcs': dot substituted for <c9>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNO (a.u.)' in 'mbcsToSbcs': dot substituted for <b8>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNO – QY of non-regulated energy dissipation =
## 1/(NPQ+1+qI*Fm/F0)' in 'mbcsToSbcs': dot substituted for <c9>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNO – QY of non-regulated energy dissipation =
## 1/(NPQ+1+qI*Fm/F0)' in 'mbcsToSbcs': dot substituted for <b8>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNO – QY of non-regulated energy dissipation =
## 1/(NPQ+1+qI*Fm/F0)' in 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNO – QY of non-regulated energy dissipation =
## 1/(NPQ+1+qI*Fm/F0)' in 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNO – QY of non-regulated energy dissipation =
## 1/(NPQ+1+qI*Fm/F0)' in 'mbcsToSbcs': dot substituted for <93>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNO (a.u.)' in 'mbcsToSbcs': dot substituted for <c9>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNO (a.u.)' in 'mbcsToSbcs': dot substituted for <b8>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNO (a.u.)' in 'mbcsToSbcs': dot substituted for <c9>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNO (a.u.)' in 'mbcsToSbcs': dot substituted for <b8>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNO – QY of non-regulated energy dissipation =
## 1/(NPQ+1+qI*Fm/F0)' in 'mbcsToSbcs': dot substituted for <c9>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNO – QY of non-regulated energy dissipation =
## 1/(NPQ+1+qI*Fm/F0)' in 'mbcsToSbcs': dot substituted for <b8>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNO – QY of non-regulated energy dissipation =
## 1/(NPQ+1+qI*Fm/F0)' in 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNO – QY of non-regulated energy dissipation =
## 1/(NPQ+1+qI*Fm/F0)' in 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNO – QY of non-regulated energy dissipation =
## 1/(NPQ+1+qI*Fm/F0)' in 'mbcsToSbcs': dot substituted for <93>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNO – QY of non-regulated energy dissipation =
## 1/(NPQ+1+qI*Fm/F0)' in 'mbcsToSbcs': dot substituted for <c9>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNO – QY of non-regulated energy dissipation =
## 1/(NPQ+1+qI*Fm/F0)' in 'mbcsToSbcs': dot substituted for <b8>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNO – QY of non-regulated energy dissipation =
## 1/(NPQ+1+qI*Fm/F0)' in 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNO – QY of non-regulated energy dissipation =
## 1/(NPQ+1+qI*Fm/F0)' in 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNO – QY of non-regulated energy dissipation =
## 1/(NPQ+1+qI*Fm/F0)' in 'mbcsToSbcs': dot substituted for <93>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNO (a.u.)' in 'mbcsToSbcs': dot substituted for <c9>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNO (a.u.)' in 'mbcsToSbcs': dot substituted for <b8>
dev.off()
## quartz_off_screen
## 2
fs2
C1_lgraph <- ggplot(data = fs2, aes(x = TOE, y = phiNPQ, group = Plant.ID, color = Genotype))
C1_lgraph <- C1_lgraph + geom_line(alpha = 0.1) + facet_wrap(~ comp, ncol = 3)
C1_lgraph <- C1_lgraph + stat_summary(fun.data = mean_se, geom = "ribbon", linetype = 0, aes(group = Genotype), alpha = 0.3)
C1_lgraph <- C1_lgraph + stat_summary(fun = mean, aes(group = Genotype), size = 0.7, geom = "line", linetype = "dashed")
#C1_lgraph <- C1_lgraph + stat_compare_means(aes(group = Genotype), label = "p.signif", method = "t.test", hide.ns = F)
C1_lgraph <- C1_lgraph + labs(x = "", y = "ɸNPQ (a.u.)") + scale_color_d3("category10") + theme(legend.position = "top") + ggtitle("ɸNPQ – QY of NPQ (regulated energy dissipation) = 1-Fq’/Fm’- ɸNO")
get_p_value <- function(fs2) {
t.test(phiNPQ ~ Genotype, data = fs2)$p.value
}
p_values <- fs2 %>%
group_by(TOE, comp) %>%
summarise(p_value = get_p_value(cur_data())) %>%
ungroup()
## `summarise()` has grouped output by 'TOE'. You can override using the `.groups`
## argument.
p_values$LOD <- -log10(p_values$p_value)
C1_pplot <- ggplot(p_values, aes(x = TOE, y = LOD))
C1_pplot <- C1_pplot + geom_line() + geom_hline(yintercept = -log10(0.05), linetype = "dashed", color = "red") + facet_wrap(~ comp, ncol = 3)
C1_pplot <- C1_pplot + labs(x = "Hours Of Imaging", y = "-log10(p-value)")
C1_pplot <- C1_pplot + theme_minimal() + theme_bw() + theme(strip.text = element_blank(), strip.background = element_blank())
plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
OK - let’s save it and move on to the next trait:
pdf("phiNPQ_graph.pdf")
plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ (a.u.)' in 'mbcsToSbcs': dot substituted for <c9>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ (a.u.)' in 'mbcsToSbcs': dot substituted for <b8>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ (a.u.)' in 'mbcsToSbcs': dot substituted for <c9>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ (a.u.)' in 'mbcsToSbcs': dot substituted for <b8>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ (a.u.)' in 'mbcsToSbcs': dot substituted for <c9>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ (a.u.)' in 'mbcsToSbcs': dot substituted for <b8>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ – QY of NPQ (regulated energy dissipation) =
## 1-Fq’/Fm’- ɸNO' in 'mbcsToSbcs': dot substituted for <c9>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ – QY of NPQ (regulated energy dissipation) =
## 1-Fq’/Fm’- ɸNO' in 'mbcsToSbcs': dot substituted for <b8>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ – QY of NPQ (regulated energy dissipation) =
## 1-Fq’/Fm’- ɸNO' in 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ – QY of NPQ (regulated energy dissipation) =
## 1-Fq’/Fm’- ɸNO' in 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ – QY of NPQ (regulated energy dissipation) =
## 1-Fq’/Fm’- ɸNO' in 'mbcsToSbcs': dot substituted for <93>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ – QY of NPQ (regulated energy dissipation) =
## 1-Fq’/Fm’- ɸNO' in 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ – QY of NPQ (regulated energy dissipation) =
## 1-Fq’/Fm’- ɸNO' in 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ – QY of NPQ (regulated energy dissipation) =
## 1-Fq’/Fm’- ɸNO' in 'mbcsToSbcs': dot substituted for <99>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ – QY of NPQ (regulated energy dissipation) =
## 1-Fq’/Fm’- ɸNO' in 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ – QY of NPQ (regulated energy dissipation) =
## 1-Fq’/Fm’- ɸNO' in 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ – QY of NPQ (regulated energy dissipation) =
## 1-Fq’/Fm’- ɸNO' in 'mbcsToSbcs': dot substituted for <99>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ – QY of NPQ (regulated energy dissipation) =
## 1-Fq’/Fm’- ɸNO' in 'mbcsToSbcs': dot substituted for <c9>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ – QY of NPQ (regulated energy dissipation) =
## 1-Fq’/Fm’- ɸNO' in 'mbcsToSbcs': dot substituted for <b8>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ (a.u.)' in 'mbcsToSbcs': dot substituted for <c9>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ (a.u.)' in 'mbcsToSbcs': dot substituted for <b8>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ (a.u.)' in 'mbcsToSbcs': dot substituted for <c9>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ (a.u.)' in 'mbcsToSbcs': dot substituted for <b8>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ – QY of NPQ (regulated energy dissipation) =
## 1-Fq’/Fm’- ɸNO' in 'mbcsToSbcs': dot substituted for <c9>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ – QY of NPQ (regulated energy dissipation) =
## 1-Fq’/Fm’- ɸNO' in 'mbcsToSbcs': dot substituted for <b8>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ – QY of NPQ (regulated energy dissipation) =
## 1-Fq’/Fm’- ɸNO' in 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ – QY of NPQ (regulated energy dissipation) =
## 1-Fq’/Fm’- ɸNO' in 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ – QY of NPQ (regulated energy dissipation) =
## 1-Fq’/Fm’- ɸNO' in 'mbcsToSbcs': dot substituted for <93>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ – QY of NPQ (regulated energy dissipation) =
## 1-Fq’/Fm’- ɸNO' in 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ – QY of NPQ (regulated energy dissipation) =
## 1-Fq’/Fm’- ɸNO' in 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ – QY of NPQ (regulated energy dissipation) =
## 1-Fq’/Fm’- ɸNO' in 'mbcsToSbcs': dot substituted for <99>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ – QY of NPQ (regulated energy dissipation) =
## 1-Fq’/Fm’- ɸNO' in 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ – QY of NPQ (regulated energy dissipation) =
## 1-Fq’/Fm’- ɸNO' in 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ – QY of NPQ (regulated energy dissipation) =
## 1-Fq’/Fm’- ɸNO' in 'mbcsToSbcs': dot substituted for <99>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ – QY of NPQ (regulated energy dissipation) =
## 1-Fq’/Fm’- ɸNO' in 'mbcsToSbcs': dot substituted for <c9>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ – QY of NPQ (regulated energy dissipation) =
## 1-Fq’/Fm’- ɸNO' in 'mbcsToSbcs': dot substituted for <b8>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ – QY of NPQ (regulated energy dissipation) =
## 1-Fq’/Fm’- ɸNO' in 'mbcsToSbcs': dot substituted for <c9>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ – QY of NPQ (regulated energy dissipation) =
## 1-Fq’/Fm’- ɸNO' in 'mbcsToSbcs': dot substituted for <b8>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ – QY of NPQ (regulated energy dissipation) =
## 1-Fq’/Fm’- ɸNO' in 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ – QY of NPQ (regulated energy dissipation) =
## 1-Fq’/Fm’- ɸNO' in 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ – QY of NPQ (regulated energy dissipation) =
## 1-Fq’/Fm’- ɸNO' in 'mbcsToSbcs': dot substituted for <93>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ – QY of NPQ (regulated energy dissipation) =
## 1-Fq’/Fm’- ɸNO' in 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ – QY of NPQ (regulated energy dissipation) =
## 1-Fq’/Fm’- ɸNO' in 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ – QY of NPQ (regulated energy dissipation) =
## 1-Fq’/Fm’- ɸNO' in 'mbcsToSbcs': dot substituted for <99>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ – QY of NPQ (regulated energy dissipation) =
## 1-Fq’/Fm’- ɸNO' in 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ – QY of NPQ (regulated energy dissipation) =
## 1-Fq’/Fm’- ɸNO' in 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ – QY of NPQ (regulated energy dissipation) =
## 1-Fq’/Fm’- ɸNO' in 'mbcsToSbcs': dot substituted for <99>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ – QY of NPQ (regulated energy dissipation) =
## 1-Fq’/Fm’- ɸNO' in 'mbcsToSbcs': dot substituted for <c9>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ – QY of NPQ (regulated energy dissipation) =
## 1-Fq’/Fm’- ɸNO' in 'mbcsToSbcs': dot substituted for <b8>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ (a.u.)' in 'mbcsToSbcs': dot substituted for <c9>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'ɸNPQ (a.u.)' in 'mbcsToSbcs': dot substituted for <b8>
dev.off()
## quartz_off_screen
## 2
fs2
C1_lgraph <- ggplot(data = fs2, aes(x = TOE, y = npq.t, group = Plant.ID, color = Genotype))
C1_lgraph <- C1_lgraph + geom_line(alpha = 0.1) + facet_wrap(~ comp, ncol = 3)
C1_lgraph <- C1_lgraph + stat_summary(fun.data = mean_se, geom = "ribbon", linetype = 0, aes(group = Genotype), alpha = 0.3)
C1_lgraph <- C1_lgraph + stat_summary(fun = mean, aes(group = Genotype), size = 0.7, geom = "line", linetype = "dashed")
#C1_lgraph <- C1_lgraph + stat_compare_means(aes(group = Genotype), label = "p.signif", method = "t.test", hide.ns = F)
C1_lgraph <- C1_lgraph + labs(x = "", y = "NPQ(t) (a.u.)") + scale_color_d3("category10") + theme(legend.position = "top") + ggtitle("NPQ(t) – fast NPQ = 4.88/(Fm’/F0’-1)-1")
get_p_value <- function(fs2) {
t.test(npq.t ~ Genotype, data = fs2)$p.value
}
p_values <- fs2 %>%
group_by(TOE, comp) %>%
summarise(p_value = get_p_value(cur_data())) %>%
ungroup()
## `summarise()` has grouped output by 'TOE'. You can override using the `.groups`
## argument.
p_values$LOD <- -log10(p_values$p_value)
C1_pplot <- ggplot(p_values, aes(x = TOE, y = LOD))
C1_pplot <- C1_pplot + geom_line() + geom_hline(yintercept = -log10(0.05), linetype = "dashed", color = "red") + facet_wrap(~ comp, ncol = 3)
C1_pplot <- C1_pplot + labs(x = "Hours Of Imaging", y = "-log10(p-value)")
C1_pplot <- C1_pplot + theme_minimal() + theme_bw() + theme(strip.text = element_blank(), strip.background = element_blank())
plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
OK - let’s save it and move on to the next trait:
pdf("NPQ(t)_graph.pdf")
plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'NPQ(t) – fast NPQ = 4.88/(Fm’/F0’-1)-1' in 'mbcsToSbcs':
## dot substituted for <e2>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'NPQ(t) – fast NPQ = 4.88/(Fm’/F0’-1)-1' in 'mbcsToSbcs':
## dot substituted for <80>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'NPQ(t) – fast NPQ = 4.88/(Fm’/F0’-1)-1' in 'mbcsToSbcs':
## dot substituted for <93>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'NPQ(t) – fast NPQ = 4.88/(Fm’/F0’-1)-1' in 'mbcsToSbcs':
## dot substituted for <e2>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'NPQ(t) – fast NPQ = 4.88/(Fm’/F0’-1)-1' in 'mbcsToSbcs':
## dot substituted for <80>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'NPQ(t) – fast NPQ = 4.88/(Fm’/F0’-1)-1' in 'mbcsToSbcs':
## dot substituted for <99>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'NPQ(t) – fast NPQ = 4.88/(Fm’/F0’-1)-1' in 'mbcsToSbcs':
## dot substituted for <e2>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'NPQ(t) – fast NPQ = 4.88/(Fm’/F0’-1)-1' in 'mbcsToSbcs':
## dot substituted for <80>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'NPQ(t) – fast NPQ = 4.88/(Fm’/F0’-1)-1' in 'mbcsToSbcs':
## dot substituted for <99>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'NPQ(t) – fast NPQ = 4.88/(Fm’/F0’-1)-1' in 'mbcsToSbcs':
## dot substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'NPQ(t) – fast NPQ = 4.88/(Fm’/F0’-1)-1' in 'mbcsToSbcs':
## dot substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'NPQ(t) – fast NPQ = 4.88/(Fm’/F0’-1)-1' in 'mbcsToSbcs':
## dot substituted for <93>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'NPQ(t) – fast NPQ = 4.88/(Fm’/F0’-1)-1' in 'mbcsToSbcs':
## dot substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'NPQ(t) – fast NPQ = 4.88/(Fm’/F0’-1)-1' in 'mbcsToSbcs':
## dot substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'NPQ(t) – fast NPQ = 4.88/(Fm’/F0’-1)-1' in 'mbcsToSbcs':
## dot substituted for <99>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'NPQ(t) – fast NPQ = 4.88/(Fm’/F0’-1)-1' in 'mbcsToSbcs':
## dot substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'NPQ(t) – fast NPQ = 4.88/(Fm’/F0’-1)-1' in 'mbcsToSbcs':
## dot substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'NPQ(t) – fast NPQ = 4.88/(Fm’/F0’-1)-1' in 'mbcsToSbcs':
## dot substituted for <99>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'NPQ(t) – fast NPQ = 4.88/(Fm’/F0’-1)-1' in 'mbcsToSbcs':
## dot substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'NPQ(t) – fast NPQ = 4.88/(Fm’/F0’-1)-1' in 'mbcsToSbcs':
## dot substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'NPQ(t) – fast NPQ = 4.88/(Fm’/F0’-1)-1' in 'mbcsToSbcs':
## dot substituted for <93>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'NPQ(t) – fast NPQ = 4.88/(Fm’/F0’-1)-1' in 'mbcsToSbcs':
## dot substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'NPQ(t) – fast NPQ = 4.88/(Fm’/F0’-1)-1' in 'mbcsToSbcs':
## dot substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'NPQ(t) – fast NPQ = 4.88/(Fm’/F0’-1)-1' in 'mbcsToSbcs':
## dot substituted for <99>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'NPQ(t) – fast NPQ = 4.88/(Fm’/F0’-1)-1' in 'mbcsToSbcs':
## dot substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'NPQ(t) – fast NPQ = 4.88/(Fm’/F0’-1)-1' in 'mbcsToSbcs':
## dot substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'NPQ(t) – fast NPQ = 4.88/(Fm’/F0’-1)-1' in 'mbcsToSbcs':
## dot substituted for <99>
dev.off()
## quartz_off_screen
## 2
fs2
C1_lgraph <- ggplot(data = fs2, aes(x = TOE, y = ChlIdx, group = Plant.ID, color = Genotype))
C1_lgraph <- C1_lgraph + geom_line(alpha = 0.1) + facet_wrap(~ comp, ncol = 3)
C1_lgraph <- C1_lgraph + stat_summary(fun.data = mean_se, geom = "ribbon", linetype = 0, aes(group = Genotype), alpha = 0.3)
C1_lgraph <- C1_lgraph + stat_summary(fun = mean, aes(group = Genotype), size = 0.7, geom = "line", linetype = "dashed")
#C1_lgraph <- C1_lgraph + stat_compare_means(aes(group = Genotype), label = "p.signif", method = "t.test", hide.ns = F)
C1_lgraph <- C1_lgraph + labs(x = "", y = "ChlIdx (a.u.)") + scale_color_d3("category10") + theme(legend.position = "top") + ggtitle("Chlorophyll Index = (R769 – R710)/(R769 + R710)")
get_p_value <- function(fs2) {
t.test(ChlIdx ~ Genotype, data = fs2)$p.value
}
p_values <- fs2 %>%
group_by(TOE, comp) %>%
summarise(p_value = get_p_value(cur_data())) %>%
ungroup()
## `summarise()` has grouped output by 'TOE'. You can override using the `.groups`
## argument.
p_values$LOD <- -log10(p_values$p_value)
C1_pplot <- ggplot(p_values, aes(x = TOE, y = LOD))
C1_pplot <- C1_pplot + geom_line() + geom_hline(yintercept = -log10(0.05), linetype = "dashed", color = "red") + facet_wrap(~ comp, ncol = 3)
C1_pplot <- C1_pplot + labs(x = "Hours Of Imaging", y = "-log10(p-value)")
C1_pplot <- C1_pplot + theme_minimal() + theme_bw() + theme(strip.text = element_blank(), strip.background = element_blank())
plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
OK - let’s save it and move on to the next trait:
pdf("ChlIdx_graph.pdf")
plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Chlorophyll Index = (R769 – R710)/(R769 + R710)' in
## 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Chlorophyll Index = (R769 – R710)/(R769 + R710)' in
## 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Chlorophyll Index = (R769 – R710)/(R769 + R710)' in
## 'mbcsToSbcs': dot substituted for <93>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Chlorophyll Index = (R769 – R710)/(R769 + R710)' in
## 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Chlorophyll Index = (R769 – R710)/(R769 + R710)' in
## 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Chlorophyll Index = (R769 – R710)/(R769 + R710)' in
## 'mbcsToSbcs': dot substituted for <93>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Chlorophyll Index = (R769 – R710)/(R769 + R710)' in
## 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Chlorophyll Index = (R769 – R710)/(R769 + R710)' in
## 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Chlorophyll Index = (R769 – R710)/(R769 + R710)' in
## 'mbcsToSbcs': dot substituted for <93>
dev.off()
## quartz_off_screen
## 2
fs2
C1_lgraph <- ggplot(data = fs2, aes(x = TOE, y = AriIdx, group = Plant.ID, color = Genotype))
C1_lgraph <- C1_lgraph + geom_line(alpha = 0.1) + facet_wrap(~ comp, ncol = 3)
C1_lgraph <- C1_lgraph + stat_summary(fun.data = mean_se, geom = "ribbon", linetype = 0, aes(group = Genotype), alpha = 0.3)
C1_lgraph <- C1_lgraph + stat_summary(fun = mean, aes(group = Genotype), size = 0.7, geom = "line", linetype = "dashed")
#C1_lgraph <- C1_lgraph + stat_compare_means(aes(group = Genotype), label = "p.signif", method = "t.test", hide.ns = F)
C1_lgraph <- C1_lgraph + labs(x = "", y = "AriIdx (a.u.)") + scale_color_d3("category10") + theme(legend.position = "top") + ggtitle("Anthocyanin Index = R769*((1/R540) – 1(R710))")
get_p_value <- function(fs2) {
t.test(AriIdx ~ Genotype, data = fs2)$p.value
}
p_values <- fs2 %>%
group_by(TOE, comp) %>%
summarise(p_value = get_p_value(cur_data())) %>%
ungroup()
## `summarise()` has grouped output by 'TOE'. You can override using the `.groups`
## argument.
p_values$LOD <- -log10(p_values$p_value)
C1_pplot <- ggplot(p_values, aes(x = TOE, y = LOD))
C1_pplot <- C1_pplot + geom_line() + geom_hline(yintercept = -log10(0.05), linetype = "dashed", color = "red") + facet_wrap(~ comp, ncol = 3)
C1_pplot <- C1_pplot + labs(x = "Hours Of Imaging", y = "-log10(p-value)")
C1_pplot <- C1_pplot + theme_minimal() + theme_bw() + theme(strip.text = element_blank(), strip.background = element_blank())
plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
OK - let’s save it and move on to the next trait:
pdf("AriIdx_graph.pdf")
plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Anthocyanin Index = R769*((1/R540) – 1(R710))' in
## 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Anthocyanin Index = R769*((1/R540) – 1(R710))' in
## 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Anthocyanin Index = R769*((1/R540) – 1(R710))' in
## 'mbcsToSbcs': dot substituted for <93>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Anthocyanin Index = R769*((1/R540) – 1(R710))' in
## 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Anthocyanin Index = R769*((1/R540) – 1(R710))' in
## 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Anthocyanin Index = R769*((1/R540) – 1(R710))' in
## 'mbcsToSbcs': dot substituted for <93>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Anthocyanin Index = R769*((1/R540) – 1(R710))' in
## 'mbcsToSbcs': dot substituted for <e2>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Anthocyanin Index = R769*((1/R540) – 1(R710))' in
## 'mbcsToSbcs': dot substituted for <80>
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## conversion failure on 'Anthocyanin Index = R769*((1/R540) – 1(R710))' in
## 'mbcsToSbcs': dot substituted for <93>
dev.off()
## quartz_off_screen
## 2
fs2
C1_lgraph <- ggplot(data = fs2, aes(x = TOE, y = NDVI, group = Plant.ID, color = Genotype))
C1_lgraph <- C1_lgraph + geom_line(alpha = 0.1) + facet_wrap(~ comp, ncol = 3)
C1_lgraph <- C1_lgraph + stat_summary(fun.data = mean_se, geom = "ribbon", linetype = 0, aes(group = Genotype), alpha = 0.3)
C1_lgraph <- C1_lgraph + stat_summary(fun = mean, aes(group = Genotype), size = 0.7, geom = "line", linetype = "dashed")
#C1_lgraph <- C1_lgraph + stat_compare_means(aes(group = Genotype), label = "p.signif", method = "t.test", hide.ns = F)
C1_lgraph <- C1_lgraph + labs(x = "", y = "NDVI (a.u.)") + scale_color_d3("category10") + theme(legend.position = "top") + ggtitle("Normalized Difference Vegetation Index (NDVI)")
get_p_value <- function(fs2) {
t.test(NDVI ~ Genotype, data = fs2)$p.value
}
p_values <- fs2 %>%
group_by(TOE, comp) %>%
summarise(p_value = get_p_value(cur_data())) %>%
ungroup()
## `summarise()` has grouped output by 'TOE'. You can override using the `.groups`
## argument.
p_values$LOD <- -log10(p_values$p_value)
C1_pplot <- ggplot(p_values, aes(x = TOE, y = LOD))
C1_pplot <- C1_pplot + geom_line() + geom_hline(yintercept = -log10(0.05), linetype = "dashed", color = "red") + facet_wrap(~ comp, ncol = 3)
C1_pplot <- C1_pplot + labs(x = "Hours Of Imaging", y = "-log10(p-value)")
C1_pplot <- C1_pplot + theme_minimal() + theme_bw() + theme(strip.text = element_blank(), strip.background = element_blank())
plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
OK - let’s save it and move on to the next trait:
pdf("NDVI_graph.pdf")
plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
dev.off()
## quartz_off_screen
## 2
C1_lgraph <- ggplot(data = fs2, aes(x = TOE, y = Roi.Mask, group = Plant.ID, color = Genotype))
C1_lgraph <- C1_lgraph + geom_line(alpha = 0.1) + facet_wrap(~ comp, ncol = 3)
C1_lgraph <- C1_lgraph + stat_summary(fun.data = mean_se, geom = "ribbon", linetype = 0, aes(group = Genotype), alpha = 0.3)
C1_lgraph <- C1_lgraph + stat_summary(fun = mean, aes(group = Genotype), size = 0.7, geom = "line", linetype = "dashed")
#C1_lgraph <- C1_lgraph + stat_compare_means(aes(group = Genotype), label = "p.signif", method = "t.test", hide.ns = F)
C1_lgraph <- C1_lgraph + labs(x = "", y = "Digital Biomass (a.u.)") + scale_color_d3("category10") + theme(legend.position = "top") + ggtitle("Projected Rosette Area")
get_p_value <- function(fs2) {
t.test(Roi.Mask ~ Genotype, data = fs2)$p.value
}
p_values <- fs2 %>%
group_by(TOE, comp) %>%
summarise(p_value = get_p_value(cur_data())) %>%
ungroup()
## `summarise()` has grouped output by 'TOE'. You can override using the `.groups`
## argument.
p_values$LOD <- -log10(p_values$p_value)
C1_pplot <- ggplot(p_values, aes(x = TOE, y = LOD))
C1_pplot <- C1_pplot + geom_line() + geom_hline(yintercept = -log10(0.05), linetype = "dashed", color = "red") + facet_wrap(~ comp, ncol = 3)
C1_pplot <- C1_pplot + labs(x = "Hours Of Imaging", y = "-log10(p-value)")
C1_pplot <- C1_pplot + theme_minimal() + theme_bw() + theme(strip.text = element_blank(), strip.background = element_blank())
plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
OK - let’s save it and move on to the next trait:
pdf("RosetteArea_graph.pdf")
plot_grid(C1_lgraph, C1_pplot, rel_heights = c(4,1), ncol = 1, align = "v", axis = "l")
dev.off()
## quartz_off_screen
## 2