This code is the PhotosynQ analysis for cowpea screen 4, performed from May 5th through May 19th 2022. Measurements were taken twice, May 11th and May 18th.
#load libraries
library("ggplot2")
library("cowplot")
library("ggpubr")
##
## Attaching package: 'ggpubr'
## The following object is masked from 'package:cowplot':
##
## get_legend
library("reshape2")
##Loading and organizing the data
getwd()
## [1] "C:/Users/J Lab/Box/Plant Architecture Lab/Hayley/Cowpea/Cowpea_screen_04_20220505-0519/Cowpea_phenotype_exp4_analysis"
list.files(pattern=".csv")
## [1] "cowpea_exp4_updated_targets_20220506.csv"
## [2] "exp4_EVT.csv"
## [3] "exp4_FW_DW_WC.csv"
## [4] "exp4_photosynq.csv"
## [5] "exp4_pot_geno.csv"
exp4_photo <- read.csv("exp4_photosynq.csv")
colnames(exp4_photo)
## [1] "ID" "Series"
## [3] "Repeat" "Pot.Number"
## [5] "Treatment" "air_temp_kinetics"
## [7] "Ambient.Humidity" "Ambient.Pressure"
## [9] "Ambient.Temperature" "data_raw_PAM"
## [11] "ECS_averaged_trace" "ECS_tau"
## [13] "ECSt.mAU" "fitinput"
## [15] "FmPrime" "FoPrime"
## [17] "Fs" "FvP_over_FmP"
## [19] "gH." "humidity2_K"
## [21] "humidity_K" "kP700"
## [23] "leaf.angle" "Leaf.Temperature"
## [25] "Leaf.Temperature.Differenial" "Leaf.Temperature.Differential"
## [27] "LEAF_temp" "leaf_thickness"
## [29] "LEF" "LEFd_trace"
## [31] "Light.Intensity..PAR." "NPQt"
## [33] "outdata" "P700_DIRK_ampl"
## [35] "P700_DIRK_averaged_trace" "P700_fitinput"
## [37] "P700_outdata" "Phi2"
## [39] "PhiNO" "PhiNPQ"
## [41] "PS1.Active.Centers" "PS1.Open.Centers"
## [43] "PS1.Over.Reduced.Centers" "PS1.Oxidized.Centers"
## [45] "PSI_data_absorbance" "pump"
## [47] "qL" "SPAD"
## [49] "test_data_raw_PAM" "time"
## [51] "tP700" "v_initial_P700"
## [53] "vH." "User"
## [55] "Device.ID" "Latitude"
## [57] "Longitude" "Issues"
pot_geno4 <- read.csv("exp4_pot_geno.csv")
pot_geno4
#we are interested in: Pot.Number, Treatment, time, FoPrime, PhiNPQ, FvP_over_FmP, FmPrime, PS1.Active.Centers, PS1.Open.Centers, PS1.Over.Reduced.Centers, PS1.Oxidized.Centers, leaf_thickness, Leaf.Temperature, SPAD
photo4_interest <- exp4_photo[,c(4:5, 15:16, 18, 24, 28, 40:44, 48, 50)]
photo_geno_4exp <- merge(photo4_interest, pot_geno4, all = TRUE)
photo_geno_4exp <- na.omit(photo_geno_4exp)
photo_geno_4exp
photo_geno_4exp$time <- as.factor(photo_geno_4exp$time)
photo_geno_4exp$day.of.stress <- photo_geno_4exp$time
photo_geno_4exp$day.of.stress <- gsub("5/18/2022 0:00", "14", photo_geno_4exp$day.of.stress)
photo_geno_4exp$day.of.stress <- gsub("5/11/2022 0:00", "7", photo_geno_4exp$day.of.stress)
colnames(photo_geno_4exp)
## [1] "Pot.Number" "Treatment"
## [3] "FmPrime" "FoPrime"
## [5] "FvP_over_FmP" "Leaf.Temperature"
## [7] "leaf_thickness" "PhiNPQ"
## [9] "PS1.Active.Centers" "PS1.Open.Centers"
## [11] "PS1.Over.Reduced.Centers" "PS1.Oxidized.Centers"
## [13] "SPAD" "time"
## [15] "Pot.number" "Genotype"
## [17] "Seed.stock.used" "day.of.stress"
photo_geno_4exp <- photo_geno_4exp[,c(1:2, 18, 15:16, 3:13)]
photo_geno_4exp$day.of.stress <- as.numeric(photo_geno_4exp$day.of.stress)
photo_geno_4exp
#write.csv(photo_geno_4exp, "photosynQ_geno_exp4.csv", row.names = TRUE)
###Histograms
FoPrime_exp4_h <- gghistogram(photo_geno_4exp, x = "FoPrime", binwidth = 20,
add = "mean", rug = TRUE,
color = "Treatment", fill = "Treatment", facet.by = "day.of.stress",
palette = c("blue", "orange")) + xlab("FoPrime (a.u)")
FoPrime_exp4_h
FmPrime_exp4_h <- gghistogram(photo_geno_4exp, x = "FmPrime", binwidth = 100,
add = "mean", rug = TRUE,
color = "Treatment", fill = "Treatment", facet.by = "day.of.stress",
palette = c("blue", "orange")) + xlab("FmPrime (a.u)")
FmPrime_exp4_h
FvP_over_FmP_exp4_h <- gghistogram(photo_geno_4exp, x = "FvP_over_FmP", binwidth = 0.01,
add = "mean", rug = TRUE,
color = "Treatment", fill = "Treatment", facet.by = "day.of.stress",
palette = c("blue", "orange")) + xlab("FvP over FmP (a.u)")
FvP_over_FmP_exp4_h
leaftemp_exp4_h <- gghistogram(photo_geno_4exp, x = "Leaf.Temperature", binwidth = 0.5,
add = "mean", rug = TRUE,
color = "Treatment", fill = "Treatment", facet.by = "day.of.stress",
palette = c("blue", "orange")) + xlab("Leaf Temperature (C)")
leaftemp_exp4_h
leafthickness_exp4_h <- gghistogram(photo_geno_4exp, x = "leaf_thickness", binwidth = 0.05,
add = "mean", rug = TRUE,
color = "Treatment", fill = "Treatment", facet.by = "day.of.stress",
palette = c("blue", "orange")) + xlab("Leaf Thickness (mm)")
leafthickness_exp4_h
PhiNPQ_exp4_h <- gghistogram(photo_geno_4exp, x = "PhiNPQ", binwidth = 0.01,
add = "mean", rug = TRUE,
color = "Treatment", fill = "Treatment", facet.by = "day.of.stress",
palette = c("blue", "orange")) + xlab("PhiNPQ (a.u.)")
PhiNPQ_exp4_h
PS1.Active.Centers_exp4_h <- gghistogram(photo_geno_4exp, x = "PS1.Active.Centers", binwidth = 1,
add = "mean", rug = TRUE,
color = "Treatment", fill = "Treatment", facet.by = "day.of.stress",
palette = c("blue", "orange")) + xlab("PS1.Active.Centers (a.u.)")
PS1.Active.Centers_exp4_h
PS1.Open.Centers_exp4_h <- gghistogram(photo_geno_4exp, x = "PS1.Open.Centers",
add = "mean", rug = TRUE,
color = "Treatment", fill = "Treatment", facet.by = "day.of.stress",
palette = c("blue", "orange")) + xlab("PS1.Open.Centers (a.u.)")
## Warning: Using `bins = 30` by default. Pick better value with the argument
## `bins`.
PS1.Open.Centers_exp4_h
PS1.Over.Reduced.Centers_exp4_h <- gghistogram(photo_geno_4exp, x = "PS1.Over.Reduced.Centers",
add = "mean", rug = TRUE,
color = "Treatment", fill = "Treatment", facet.by = "day.of.stress",
palette = c("blue", "orange")) + xlab("PS1.Over.Reduced.Centers (a.u.)")
## Warning: Using `bins = 30` by default. Pick better value with the argument
## `bins`.
PS1.Over.Reduced.Centers_exp4_h
PS1.Oxidized.Centers_exp4_h <- gghistogram(photo_geno_4exp, x = "PS1.Oxidized.Centers",
add = "mean", rug = TRUE,
color = "Treatment", fill = "Treatment", facet.by = "day.of.stress",
palette = c("blue", "orange")) + xlab("PS1.Oxidized.Centers (a.u.)")
## Warning: Using `bins = 30` by default. Pick better value with the argument
## `bins`.
PS1.Oxidized.Centers_exp4_h
SPAD_exp4_h <- gghistogram(photo_geno_4exp, x = "SPAD", binwidth = 2.5,
add = "mean", rug = TRUE,
color = "Treatment", fill = "Treatment", facet.by = "day.of.stress",
palette = c("blue", "orange")) + xlab("SPAD (a.u.)")
SPAD_exp4_h