This notebook describes an analysis of tomato hydroponics experiment, aimed to examine differences between Solanum pimpinellifolium lines in salinity tolerance due to differences observed in root system architecture.
The tomato seeds were sterilized in 50% bleach on 24th of December 2019
Seedlings were germinated on agar plates (1/4 MS, 0.1% MES buffer, pH 5.8 with KOH, 1% agar - autoclaved and poured into 12x12cm square petridishes - dried for 1-2h) on 25th of December 2019 >> in Growth Chamber with 12h/12h light/dark cycle at 24/22C and 60% humidity for germination
Seedlings were transplanted into hydroponics (30min/30min flood/drain cycle) on 1st of January 2020 - per 100L we used 33 ml of each FloraGro, FloraMicro and FloraBloom supplements. The settings of the room 16 in the KAUST GH for this period were ????
The salt stress (75 mM NaCl - as 1.5 L of 5 M NaCl solution per 100L of media) was added on 8th of January 2020 together with Ca2Cl (1.5 mM - as 120 ml of 1 M solution)
The growth medium was replaced on 1st of January, 8th of January and 15th of January 2020
Thanks #1 and #2 were harvested on 22nd of January 2020, while tanks #3 and #4 were harvested on 23rd of January.
The FW was measured immediately, while DW was measured after a full weekend of drying at 65C oven.
Flame measurements were done after adding 5ml of 1% Nitric Acid to each sample - incubating the samples in 65C oven over the weekend - and dilluting the samples to 1/10 or 1/20 (sometimes 1/40) depending on the specific samples
Person in charge of experimental design and main experiment: Magdalena Julkowska
Helping people with experiment harvest: Kayode & Rameesha
library(cowplot)
##
## ********************************************************
## Note: As of version 1.0.0, cowplot does not change the
## default ggplot2 theme anymore. To recover the previous
## behavior, execute:
## theme_set(theme_cowplot())
## ********************************************************
library(reshape2)
library(reshape)
##
## Attaching package: 'reshape'
## The following objects are masked from 'package:reshape2':
##
## colsplit, melt, recast
## The following object is masked from 'package:cowplot':
##
## stamp
library(ggplot2)
library(ggpubr)
## Loading required package: magrittr
##
## Attaching package: 'ggpubr'
## The following object is masked from 'package:cowplot':
##
## get_legend
library(ggbeeswarm)
#install.packages("wesanderson")
library(wesanderson)
The fresh weight and dry weight data upload
setwd("/Users/magdalena/Dropbox/DataAndAnalysis/Tomato/Hydroponics/")
list.files(pattern="20200122")
## [1] "20200122 Tomato harvest - 3L flame.csv"
## [2] "20200122 Tomato harvest - DW.csv"
## [3] "20200122 Tomato harvest - FW.csv"
## [4] "20200122 Tomato harvest - ML flame.csv"
## [5] "20200122 Tomato harvest - RL flame.csv"
## [6] "20200122 Tomato harvest - RU flame.csv"
Let’s load up the individual datasets:
FW <- read.csv("20200122 Tomato harvest - FW.csv")
DW <- read.csv("20200122 Tomato harvest - DW.csv")
flame_3L <- read.csv("20200122 Tomato harvest - 3L flame.csv")
flame_ML <- read.csv("20200122 Tomato harvest - ML flame.csv")
flame_RU <- read.csv("20200122 Tomato harvest - RU flame.csv")
flame_RL <- read.csv("20200122 Tomato harvest - RL flame.csv")
First - let’s figure out the FW file - as we still need to clean it up:
head(FW)
FW_2 <- FW[,c(1:2,11:14)]
head(FW_2)
Then - let’s melt this file - as we will need this to add other data files:
FW_m <- melt(FW_2, id.vars = "Sample")
head(FW_m)
colnames(FW_m)[2] <- "tissue"
colnames(FW_m)[3] <- "FW"
FW_m$tissue <- gsub("_FW", "", FW_m$tissue)
FW_m$tissue <- gsub("FW_", "", FW_m$tissue)
head(FW_m)
OK - so like this the data is ready to be merged with the DW data - let’s have a look at that data structure
head(DW)
length(unique(DW$Sample))
## [1] 152
Oeps - I realized that we still need to substract the tube weight from DW - let’s do this first
Let’s get all the tube weight from FW file first
head(FW)
FW_tube <- FW[,c(1,3,5,7,9)]
head(FW_tube)
mtube <- melt(FW_tube, id.vars = "Sample")
colnames(mtube)[2] <- "tissue"
colnames(mtube)[3] <- "tube"
mtube$tissue <- gsub("_tube", "", mtube$tissue)
mtube$tissue <- gsub("X3L", "3L", mtube$tissue)
head(mtube)
Let’s merge it with the DW samples and calculate REAL DW:
rDW <- merge(DW, mtube, id=c("Sample", "tissue"), all=T)
head(rDW)
rDW$rDW <- rDW$DW - rDW$tube
head(rDW)
DW <- rDW[,c(1:2,5)]
head(DW)
Now - let’s fuse the REAL DW with the REAL FW :)
length(unique(FW_m$Sample))
## [1] 151
unique(DW$Sample)
## [1] 1-10D 1-10F 1-10H 1-1B 1-1D 1-1F 1-1H 1-2C 1-2E 1-2G 1-2I 1-3B
## [13] 1-3D 1-3F 1-3H 1-4A 1-4E 1-4G 1-4I 1-5A 1-5B 1-5D 1-5F 1-5H
## [25] 1-6B 1-6D 1-6F 1-6H 1-7A 1-7C 1-7E 1-7G 1-7I 1-8B 1-8D 1-8F
## [37] 1-8H 1-9A 1-9C 1-9E 1-9G 1-9I 2-10D 2-10F 2-1B 2-1D 2-1F 2-1H
## [49] 2-2A 2-2C 2-2E 2-2G 2-2I 2-3B 2-3D 2-3F 2-3H 2-4A 2-4C 2-4E
## [61] 2-4G 2-4I 2-5D 2-5F 2-5H 2-6B 2-6D 2-6F 2-6H 2-7A 2-7C 2-7E
## [73] 2-7G 2-7I 2-8B 2-8D 2-8F 2-8H 2-9A 2-9C 2-9E 2-9G 2-9I 3-10F
## [85] 3-1B 3-1F 3-1H 3-2A 3-2C 3-2E 3-2G 3-2I 3-3D 3-3H 3-4C 3-4E
## [97] 3-4G 3-4I 3-5F 3-5H 3-6D 3-6H 3-7A 3-7C 3-7G 3-7I 3-8D 3-9A
## [109] 3-9C 3-9E 3-9G 3-9I 4-10B 4-10H 4-1B 4-1D 4-1F 4-1H 4-2A 4-2C
## [121] 4-2E 4-2G 4-2I 4-3D 4-3F 4-3H 4-4A 4-4C 4-4E 4-4G 4-4I 4-5B
## [133] 4-5D 4-5F 4-5H 4-6B 4-6D 4-6H 4-7A 4-7C 4-7E 4-7G 4-7I 4-8B
## [145] 4-8D 4-8F 4-9A 4-9C 4-9E 4-9G 4-9I 4.10F 4-10F
## 153 Levels: 1-10D 1-10F 1-10H 1-1B 1-1D 1-1F 1-1H 1-2C 1-2E 1-2G 1-2I ... 4-10F
unique(FW_m$Sample)
## [1] 1-1B 1-4A 1-1D 1-2C 1-3B 1-5F 1-5B 1-6H 1-4I 1-2I 2-4I 2-3H
## [13] 2-3D 2-5D 2-5F 2-1B 2-4C 2-8D 2-6F 2-10D 2-6H 2-5H 2-2G 2-4G
## [25] 2-9I 1-10D 1-9I 1-4G 1-5D 1-4E 1-2G 1-7G 1-1H 1-3H 1-7I 1-8H
## [37] 1-3F 1-10H 1-9G 1-5H 1-6D 1-7C 1-9C 1-6F 1-7E 1-8B 1-8F 1-10F
## [49] 1-8D 1-9E 1-2E 2-7E 2-6D 1-9A 1-7A 1-1F 1-6B 1-3D 2-3F 2-1H
## [61] 2-8H 2-9G 2-3B 2-9C 2-8F 2-8B 2-7G 2-1F 2-7I 2-10F 2-4A 2-7A
## [73] 2-6B 2-7C 2-2I 2-9A 2-4E 2-1D 2-2C 2-2A 2-2E 2-9E 3-2I 3-3H
## [85] 4-5H 4-1H 4-4I 3-4G 3-5H 4-2I 4-3H 3-4I 3-6H 4-6H 4-4G 4-7I
## [97] 3-10F 3-9I 3-7I 3-7G 4-5F 4-9I 4-2G 4-1F 4-3F 4-7G 4-10H 4-9G
## [109] 3-1H 3-5F 3-9G 3-2G 3-2E 4-4E 3-9E 4-8F 3-4E 4-2E 3-8D 3-1F
## [121] 4-10F 4-7E 4-1D 4-5D 3-7C 3-9C 3-2C 3-3D 3-6D 4-3D 4-8D 4-6D
## [133] 4-9E 4-9C 3-1B 3-4C 4-6B 3-7A 4-10B 4-5B 3-2A 4-4C 4-2C 4-1B
## [145] 4-9A 4-2A 4-8B 4-7A 4-7C 4-4A 3-9A
## 151 Levels: 1-10D 1-10F 1-10H 1-1B 1-1D 1-1F 1-1H 1-2C 1-2E 1-2G 1-2I ... 4-9I
FW_DW <- merge(FW_m, DW, id=c("Sample", "tissue"), all=T)
head(FW_DW)
Great - now - before we merge all this data with flame - I would like to add all of flame measurements into one file
head(flame_3L)
flame_all <- rbind(flame_3L, flame_ML)
head(flame_all)
flame_all <- rbind(flame_all, flame_RL)
flame_all <- rbind(flame_all, flame_RU)
dim(flame_all)
## [1] 600 7
colnames(flame_all)[1] <- "Sample"
Now - we are ready to merge all together:
tru_all <- merge(FW_DW, flame_all, id=c("Sample", "tissue"), all=T)
head(tru_all)
dim(tru_all)
## [1] 771 9
OK - so now we have all the measurements together - we can calculate how much Na and K we actually have in each sample - so
tru_all$Na.uMoles.in.5ml.sol <- ((tru_all$measured.Na/100)*tru_all$Standard.Na..uM.)*tru_all$dillution..1.X.*0.05
tru_all$K.uMoles.in.5ml.sol <- ((tru_all$measured.K/100)*tru_all$Standard.K..uM.)*tru_all$dillution..1.X.*0.05
head(tru_all)
Cool - so now let’s calculate the MOLARITY of our Na and K ions per FW or DW or WC (which we still need to calculate)
tru_all$WC <- tru_all$FW - tru_all$rDW
tru_all$Na.uM.per.FW <- tru_all$Na.uMoles.in.5ml.sol / tru_all$FW
tru_all$K.uM.per.FW <- tru_all$K.uMoles.in.5ml.sol / tru_all$FW
tru_all$Na.uM.per.DW <- tru_all$Na.uMoles.in.5ml.sol / tru_all$rDW
tru_all$K.uM.per.DW <- tru_all$K.uMoles.in.5ml.sol / tru_all$rDW
tru_all$Na.uM.per.WC <- tru_all$Na.uMoles.in.5ml.sol / tru_all$WC
tru_all$K.uM.per.WC <- tru_all$K.uMoles.in.5ml.sol / tru_all$WC
Before we start to re-code and visualize the data - maybe let’s re-shape it - as in cast the data so we dont have that many missing values for “shoot” (which wasnt used for flame - but is just as interesting to look at)
First - let’s select most informative collumns:
all_imp <- tru_all[,c(1:4, 12:18)]
head(all_imp)
Then - first - melt the data before casting and then cast the data - so we combine the measurement with the tissue
mall <- melt(all_imp, id=c("Sample", "tissue"))
head(mall)
mc_all <- cast(mall, Sample ~ tissue + variable, mean)
head(mc_all)
Get rid of all the last collumn with Shoot total data stuff:
all4real <- mc_all[,c(1:38)]
head(all4real)
So I made a separate file containing all the genotype information and RSA characteristics which - now that I have all my data organized - I would like to fuse it into the existing dataset:
coding <- read.csv("Coding.csv")
head(coding)
colnames(coding)[8] <- "Sample"
my_data <- merge(all4real, coding, id="Sample")
head(my_data)
colnames(my_data) <- gsub("3L", "L3", colnames(my_data))
head(my_data)
Before doing anything - let’s filter the data for absurd numbers of Na+ accumulation:
dim(my_data)
## [1] 151 45
my_data_nona <- na.omit(my_data)
dim(my_data_nona)
## [1] 137 45
max(my_data_nona$L3_Na.uM.per.FW)
## [1] 14500
my_data_nona <- subset(my_data_nona, my_data_nona$L3_Na.uM.per.FW < 14000)
my_data_nona <- subset(my_data_nona, my_data_nona$L3_K.uM.per.FW < 2000)
my_data_nona <- subset(my_data_nona, my_data_nona$ML_K.uM.per.FW < 2000)
my_data_nona <- subset(my_data_nona, my_data_nona$RU_K.uM.per.FW < 2000)
my_data_nona <- subset(my_data_nona, my_data_nona$RL_K.uM.per.FW < 2000)
my_data_nona <- subset(my_data_nona, my_data_nona$RL_FW > 0)
my_data_nona <- subset(my_data_nona, my_data_nona$RU_FW > 0)
my_data_nona <- subset(my_data_nona, my_data_nona$ML_Na.uM.per.FW > 0)
dim(my_data_nona)
## [1] 126 45
First of all - let’s have a look at the effect of the tanks on the data - especially as I have a feeling that Tanks 3 and 4 were bigger - as exposed to light a bit more than Tanks 1 and 2
tank_plot <- ggerrorplot(my_data_nona, y = "Shoot_FW", x = "TANK", color="TANK",
desc_stat = "mean_sd", add = "jitter",
xlab="Tank", ylab="weight (g)", title = "Shoot Fresh Weight")
tank_plot <- tank_plot + rremove("legend")
tank_plot <- tank_plot + stat_compare_means(method="t.test", ref.group = ".all.", label = "p.signif", hide.ns = T)
tank_plot
Oeps - it means that there is a HUGE effect of tank on the shoot weight
Do we also have a tank effect on Na accumulation?
Na_3L_plot <- ggerrorplot(my_data_nona, y = "L3_Na.uM.per.FW", x = "TANK", color="TANK",
desc_stat = "mean_sd", add = "jitter",
xlab="Tank", title = "Sodium Accumulation in 3rd leaf")
Na_3L_plot <- Na_3L_plot + rremove("legend")
Na_3L_plot <- Na_3L_plot + stat_compare_means(method="t.test", ref.group = ".all.", label = "p.signif", hide.ns = T)
Na_3L_plot <- Na_3L_plot + ylab(expression(paste("[Na "^"+", " ] (umole / g FW)", sep = "")))
Na_3L_plot
Na_ML_plot <- ggerrorplot(my_data_nona, y = "ML_Na.uM.per.FW", x = "TANK", color="TANK",
desc_stat = "mean_sd", add = "jitter",
xlab="Tank", title = "Sodium Accumulation in youngest leaf")
Na_ML_plot <- Na_ML_plot + rremove("legend")
Na_ML_plot <- Na_ML_plot + stat_compare_means(method="t.test", ref.group = ".all.", label = "p.signif", hide.ns = T)
Na_ML_plot <- Na_ML_plot + ylab(expression(paste("[Na "^"+", " ] (umole / g FW)", sep = "")))
Na_ML_plot
Na_RU_plot <- ggerrorplot(my_data_nona, y = "RU_Na.uM.per.FW", x = "TANK", color="TANK",
desc_stat = "mean_sd", add = "jitter",
xlab="Tank", title = "Sodium Accumulation in upper root")
Na_RU_plot <- Na_RU_plot + rremove("legend")
Na_RU_plot <- Na_RU_plot + stat_compare_means(method="t.test", ref.group = ".all.", label = "p.signif", hide.ns = T)
Na_RU_plot <- Na_RU_plot + ylab(expression(paste("[Na "^"+", " ] (umole / g FW)", sep = "")))
Na_RU_plot
Na_RL_plot <- ggerrorplot(my_data_nona, y = "RL_Na.uM.per.FW", x = "TANK", color="TANK",
desc_stat = "mean_sd", add = "jitter",
xlab="Tank", title = "Sodium Accumulation in lower root")
Na_RL_plot <- Na_RL_plot + rremove("legend")
Na_RL_plot <- Na_RL_plot + stat_compare_means(method="t.test", ref.group = ".all.", label = "p.signif", hide.ns = T)
Na_RL_plot <- Na_RL_plot + ylab(expression(paste("[Na "^"+", " ] (umole / g FW)", sep = "")))
Na_RL_plot
That doesnt seem to be that striking
OK - maybe just keep it in mind to separate these two groups of tanks when calculating the SIIT
For now - let’s just go on - because otherwise I wont have time to wrap it all up - so
Shoot FW:
grand.means <- aggregate(Shoot_FW ~ treatment, data = my_data_nona, FUN = mean)
grand.means
FW_plot <- ggerrorplot(my_data_nona, y = "Shoot_FW", x = "uncoded", color="ideotype",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter",
xlab="", ylab="weight (g)", title = "Shoot Fresh Weight")
FW_plot <- FW_plot + geom_hline(
data = grand.means, aes(yintercept = Shoot_FW),
linetype = 2,
group = "Treatment")
FW_plot <- FW_plot + stat_compare_means(method="t.test", ref.group = ".all.", label = "p.signif", hide.ns = T)
FW_plot <- FW_plot + rotate_x_text() + font("xy.text", size = 8)
FW_plot
FW 3rd leaf:
colnames(my_data)
## [1] "Sample" "L3_FW" "L3_rDW" "L3_WC"
## [5] "L3_Na.uM.per.FW" "L3_K.uM.per.FW" "L3_Na.uM.per.DW" "L3_K.uM.per.DW"
## [9] "L3_Na.uM.per.WC" "L3_K.uM.per.WC" "ML_FW" "ML_rDW"
## [13] "ML_WC" "ML_Na.uM.per.FW" "ML_K.uM.per.FW" "ML_Na.uM.per.DW"
## [17] "ML_K.uM.per.DW" "ML_Na.uM.per.WC" "ML_K.uM.per.WC" "RL_FW"
## [21] "RL_rDW" "RL_WC" "RL_Na.uM.per.FW" "RL_K.uM.per.FW"
## [25] "RL_Na.uM.per.DW" "RL_K.uM.per.DW" "RL_Na.uM.per.WC" "RL_K.uM.per.WC"
## [29] "RU_FW" "RU_rDW" "RU_WC" "RU_Na.uM.per.FW"
## [33] "RU_K.uM.per.FW" "RU_Na.uM.per.DW" "RU_K.uM.per.DW" "RU_Na.uM.per.WC"
## [37] "RU_K.uM.per.WC" "Shoot_FW" "TANK" "POSITION"
## [41] "treatment" "Genotype" "uncoded" "ideotype"
## [45] "sodium.gap"
grand.means <- aggregate(L3_FW ~ treatment, data = my_data_nona, FUN = mean)
grand.means
FW_3L_plot <- ggerrorplot(my_data_nona, y = "L3_FW", x = "uncoded", color="ideotype",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter",
xlab="", ylab="weight (g)", title = expression(paste("3"^"rd"," leaf Fresh Weight", sep="")))
FW_3L_plot <- FW_3L_plot + geom_hline(
data = grand.means, aes(yintercept = L3_FW),
linetype = 2,
group = "Treatment")
FW_3L_plot <- FW_3L_plot + stat_compare_means(method="t.test", ref.group = ".all.", label = "p.signif", hide.ns = T)
FW_3L_plot <- FW_3L_plot + rotate_x_text() + font("xy.text", size = 8)
FW_3L_plot
FW Root Upper:
colnames(my_data)
## [1] "Sample" "L3_FW" "L3_rDW" "L3_WC"
## [5] "L3_Na.uM.per.FW" "L3_K.uM.per.FW" "L3_Na.uM.per.DW" "L3_K.uM.per.DW"
## [9] "L3_Na.uM.per.WC" "L3_K.uM.per.WC" "ML_FW" "ML_rDW"
## [13] "ML_WC" "ML_Na.uM.per.FW" "ML_K.uM.per.FW" "ML_Na.uM.per.DW"
## [17] "ML_K.uM.per.DW" "ML_Na.uM.per.WC" "ML_K.uM.per.WC" "RL_FW"
## [21] "RL_rDW" "RL_WC" "RL_Na.uM.per.FW" "RL_K.uM.per.FW"
## [25] "RL_Na.uM.per.DW" "RL_K.uM.per.DW" "RL_Na.uM.per.WC" "RL_K.uM.per.WC"
## [29] "RU_FW" "RU_rDW" "RU_WC" "RU_Na.uM.per.FW"
## [33] "RU_K.uM.per.FW" "RU_Na.uM.per.DW" "RU_K.uM.per.DW" "RU_Na.uM.per.WC"
## [37] "RU_K.uM.per.WC" "Shoot_FW" "TANK" "POSITION"
## [41] "treatment" "Genotype" "uncoded" "ideotype"
## [45] "sodium.gap"
grand.means <- aggregate(RU_FW ~ treatment, data = my_data_nona, FUN = mean)
grand.means
FW_RU_plot <- ggerrorplot(my_data_nona, y = "RU_FW", x = "uncoded", color="ideotype",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter",
xlab="", ylab="weight (g)", title = "Upper Root Fresh Weight")
FW_RU_plot <- FW_RU_plot + geom_hline(
data = grand.means, aes(yintercept = RU_FW),
linetype = 2,
group = "Treatment")
FW_RU_plot <- FW_RU_plot + stat_compare_means(method="t.test", ref.group = ".all.", label = "p.signif", hide.ns = T)
FW_RU_plot <- FW_RU_plot + rotate_x_text() + font("xy.text", size = 8)
FW_RU_plot
FW Root Lower:
colnames(my_data_nona)
## [1] "Sample" "L3_FW" "L3_rDW" "L3_WC"
## [5] "L3_Na.uM.per.FW" "L3_K.uM.per.FW" "L3_Na.uM.per.DW" "L3_K.uM.per.DW"
## [9] "L3_Na.uM.per.WC" "L3_K.uM.per.WC" "ML_FW" "ML_rDW"
## [13] "ML_WC" "ML_Na.uM.per.FW" "ML_K.uM.per.FW" "ML_Na.uM.per.DW"
## [17] "ML_K.uM.per.DW" "ML_Na.uM.per.WC" "ML_K.uM.per.WC" "RL_FW"
## [21] "RL_rDW" "RL_WC" "RL_Na.uM.per.FW" "RL_K.uM.per.FW"
## [25] "RL_Na.uM.per.DW" "RL_K.uM.per.DW" "RL_Na.uM.per.WC" "RL_K.uM.per.WC"
## [29] "RU_FW" "RU_rDW" "RU_WC" "RU_Na.uM.per.FW"
## [33] "RU_K.uM.per.FW" "RU_Na.uM.per.DW" "RU_K.uM.per.DW" "RU_Na.uM.per.WC"
## [37] "RU_K.uM.per.WC" "Shoot_FW" "TANK" "POSITION"
## [41] "treatment" "Genotype" "uncoded" "ideotype"
## [45] "sodium.gap"
grand.means <- aggregate(RL_FW ~ treatment, data = my_data_nona, FUN = mean)
grand.means
FW_RU_plot <- ggerrorplot(my_data_nona, y = "RL_FW", x = "uncoded", color="ideotype",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter",
xlab="", ylab="weight (g)", title = "Lower Root Fresh Weight")
FW_RU_plot <- FW_RU_plot + geom_hline(
data = grand.means, aes(yintercept = RL_FW),
linetype = 2,
group = "Treatment")
FW_RU_plot <- FW_RU_plot + stat_compare_means(method="t.test", ref.group = ".all.", label = "p.signif", hide.ns = T)
FW_RU_plot <- FW_RU_plot + rotate_x_text() + font("xy.text", size = 8)
FW_RU_plot
How about we check the root-to-shoot ratio in these plants:
my_data_nona$R_FW <- my_data_nona$RU_FW + my_data_nona$RL_FW
my_data_nona$RpS_FW <- my_data_nona$R_FW / my_data_nona$Shoot_FW
grand.means <- aggregate(RpS_FW ~ treatment, data = my_data_nona, FUN = mean)
grand.means
FW_RpS_plot <- ggerrorplot(my_data_nona, y = "RpS_FW", x = "uncoded", color="ideotype",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter",
xlab="", ylab="ratio", title = "Root per Shoot ratio (FW)")
FW_RpS_plot <- FW_RpS_plot + geom_hline(
data = grand.means, aes(yintercept = RpS_FW),
linetype = 2,
group = "Treatment")
FW_RpS_plot <- FW_RpS_plot + stat_compare_means(method="t.test", ref.group = ".all.", label = "p.signif", hide.ns = T)
FW_RpS_plot <- FW_RpS_plot + rotate_x_text() + font("xy.text", size = 8)
FW_RpS_plot
Now we have all the root FW lets see how that behaves too:
grand.means <- aggregate(R_FW ~ treatment, data = my_data_nona, FUN = mean)
grand.means
FW_R_plot <- ggerrorplot(my_data_nona, y = "R_FW", x = "uncoded", color="ideotype",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter",
xlab="", ylab="weight (g)", title = "Root Fresh Weight")
FW_R_plot <- FW_R_plot + geom_hline(
data = grand.means, aes(yintercept = R_FW),
linetype = 2,
group = "Treatment")
FW_R_plot <- FW_R_plot + stat_compare_means(method="t.test", ref.group = ".all.", label = "p.signif", hide.ns = T)
FW_R_plot <- FW_R_plot + rotate_x_text() + font("xy.text", size = 8)
FW_R_plot
Before I forget - let’s combine these results into one figure
pdf("Fig.1.Fresh_weight_per_genotype.pdf", width=15, height=10)
FW_plot <- FW_plot + rremove("legend")
FW_3L_plot <- FW_3L_plot + rremove("legend")
FW_R_plot <- FW_R_plot + rremove("legend")
FW_RpS_plot <- FW_RpS_plot + rremove("legend")
plot_grid(FW_plot, FW_3L_plot, FW_R_plot, FW_RpS_plot,
ncol = 2, align = "hv", labels="AUTO",
label_size = 14)
dev.off()
## quartz_off_screen
## 2
Now - lets have a look at the sodium accumulation in the four different tissues that we have collected - we do it only per FW as I dont have time before the lab presentation to do more:
colnames(my_data_nona)
## [1] "Sample" "L3_FW" "L3_rDW" "L3_WC"
## [5] "L3_Na.uM.per.FW" "L3_K.uM.per.FW" "L3_Na.uM.per.DW" "L3_K.uM.per.DW"
## [9] "L3_Na.uM.per.WC" "L3_K.uM.per.WC" "ML_FW" "ML_rDW"
## [13] "ML_WC" "ML_Na.uM.per.FW" "ML_K.uM.per.FW" "ML_Na.uM.per.DW"
## [17] "ML_K.uM.per.DW" "ML_Na.uM.per.WC" "ML_K.uM.per.WC" "RL_FW"
## [21] "RL_rDW" "RL_WC" "RL_Na.uM.per.FW" "RL_K.uM.per.FW"
## [25] "RL_Na.uM.per.DW" "RL_K.uM.per.DW" "RL_Na.uM.per.WC" "RL_K.uM.per.WC"
## [29] "RU_FW" "RU_rDW" "RU_WC" "RU_Na.uM.per.FW"
## [33] "RU_K.uM.per.FW" "RU_Na.uM.per.DW" "RU_K.uM.per.DW" "RU_Na.uM.per.WC"
## [37] "RU_K.uM.per.WC" "Shoot_FW" "TANK" "POSITION"
## [41] "treatment" "Genotype" "uncoded" "ideotype"
## [45] "sodium.gap" "R_FW" "RpS_FW"
grand.means <- aggregate(L3_Na.uM.per.FW ~ treatment, data = my_data_nona, FUN = mean)
grand.means
Na_3L_plot <- ggerrorplot(my_data_nona, y = "L3_Na.uM.per.FW", x = "uncoded", color="ideotype",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter",
xlab="", ylab=expression(paste("[Na"^"+","] (uMole / g FW)", sep="")),
title = expression(paste("3"^"rd"," leaf sodium content", sep="")))
Na_3L_plot <- Na_3L_plot + geom_hline(
data = grand.means, aes(yintercept = L3_Na.uM.per.FW),
linetype = 2,
group = "Treatment")
Na_3L_plot <- Na_3L_plot + stat_compare_means(method="t.test", ref.group = ".all.", label = "p.signif", hide.ns = T)
Na_3L_plot <- Na_3L_plot + rotate_x_text() + font("xy.text", size = 8)
Na_3L_plot
grand.means <- aggregate(ML_Na.uM.per.FW ~ treatment, data = my_data_nona, FUN = mean)
grand.means
Na_ML_plot <- ggerrorplot(my_data_nona, y = "ML_Na.uM.per.FW", x = "uncoded", color="ideotype",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter",
xlab="", ylab=expression(paste("[Na"^"+","] (uMole / g FW)", sep="")),
title = expression(paste("Youngest leaf sodium content", sep="")))
Na_ML_plot <- Na_ML_plot + geom_hline(
data = grand.means, aes(yintercept = ML_Na.uM.per.FW),
linetype = 2,
group = "Treatment")
Na_ML_plot <- Na_ML_plot + stat_compare_means(method="t.test", ref.group = ".all.", label = "p.signif", hide.ns = T)
Na_ML_plot <- Na_ML_plot + rotate_x_text() + font("xy.text", size = 8)
Na_ML_plot
grand.means <- aggregate(RU_Na.uM.per.FW ~ treatment, data = my_data_nona, FUN = mean)
grand.means
Na_RU_plot <- ggerrorplot(my_data_nona, y = "RU_Na.uM.per.FW", x = "uncoded", color="ideotype",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter",
xlab="", ylab=expression(paste("[Na"^"+","] (uMole / g FW)", sep="")),
title = expression(paste("Upper root sodium content", sep="")))
Na_RU_plot <- Na_RU_plot + geom_hline(
data = grand.means, aes(yintercept = RU_Na.uM.per.FW),
linetype = 2,
group = "Treatment")
Na_RU_plot <- Na_RU_plot + stat_compare_means(method="t.test", ref.group = ".all.", label = "p.signif", hide.ns = T)
Na_RU_plot <- Na_RU_plot + rotate_x_text() + font("xy.text", size = 8)
Na_RU_plot
grand.means <- aggregate(RL_Na.uM.per.FW ~ treatment, data = my_data_nona, FUN = mean)
grand.means
Na_RL_plot <- ggerrorplot(my_data_nona, y = "RL_Na.uM.per.FW", x = "uncoded", color="ideotype",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter",
xlab="", ylab=expression(paste("[Na"^"+","] (uMole / g FW)", sep="")),
title = expression(paste("Lower root sodium content", sep="")))
Na_RL_plot <- Na_RL_plot + geom_hline(
data = grand.means, aes(yintercept = RL_Na.uM.per.FW),
linetype = 2,
group = "Treatment")
Na_RL_plot <- Na_RL_plot + stat_compare_means(method="t.test", ref.group = ".all.", label = "p.signif", hide.ns = T)
Na_RL_plot <- Na_RL_plot + rotate_x_text() + font("xy.text", size = 8)
Na_RL_plot
Let’s combine all of this also into one figure:
pdf("Fig.2.Sodium_per_fresh_weight_per_genotype.pdf", width=15, height=10)
Na_3L_plot <- Na_3L_plot + rremove("legend")
Na_ML_plot <- Na_ML_plot + rremove("legend")
Na_RU_plot <- Na_RU_plot + rremove("legend")
Na_RL_plot <- Na_RL_plot + rremove("legend")
plot_grid(Na_3L_plot, Na_ML_plot, Na_RU_plot, Na_RL_plot,
ncol = 2, align = "hv", labels="AUTO",
label_size = 14)
dev.off()
## quartz_off_screen
## 2
For the completeness of things - lets do the same for K+
grand.means <- aggregate(L3_K.uM.per.FW ~ treatment, data = my_data_nona, FUN = mean)
grand.means
K_3L_plot <- ggerrorplot(my_data_nona, y = "L3_K.uM.per.FW", x = "uncoded", color="ideotype",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter",
xlab="", ylab=expression(paste("[K"^"+","] (uMole / g FW)", sep="")),
title = expression(paste("3"^"rd"," leaf potassium content", sep="")))
K_3L_plot <- K_3L_plot + geom_hline(
data = grand.means, aes(yintercept = L3_K.uM.per.FW),
linetype = 2,
group = "Treatment")
K_3L_plot <- K_3L_plot + stat_compare_means(method="t.test", ref.group = ".all.", label = "p.signif", hide.ns = T)
K_3L_plot <- K_3L_plot + rotate_x_text() + font("xy.text", size = 8)
K_3L_plot
grand.means <- aggregate(ML_K.uM.per.FW ~ treatment, data = my_data_nona, FUN = mean)
grand.means
K_ML_plot <- ggerrorplot(my_data_nona, y = "ML_K.uM.per.FW", x = "uncoded", color="ideotype",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter",
xlab="", ylab=expression(paste("[K"^"+","] (uMole / g FW)", sep="")),
title = expression(paste("Youngest leaf potassium content", sep="")))
K_ML_plot <- K_ML_plot + geom_hline(
data = grand.means, aes(yintercept = ML_K.uM.per.FW),
linetype = 2,
group = "Treatment")
K_ML_plot <- K_ML_plot + stat_compare_means(method="t.test", ref.group = ".all.", label = "p.signif", hide.ns = T)
K_ML_plot <- K_ML_plot + rotate_x_text() + font("xy.text", size = 8)
K_ML_plot
grand.means <- aggregate(RU_K.uM.per.FW ~ treatment, data = my_data_nona, FUN = mean)
grand.means
K_RU_plot <- ggerrorplot(my_data_nona, y = "RU_K.uM.per.FW", x = "uncoded", color="ideotype",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter",
xlab="", ylab=expression(paste("[K"^"+","] (uMole / g FW)", sep="")),
title = expression(paste("Upper root potassium content", sep="")))
K_RU_plot <- K_RU_plot + geom_hline(
data = grand.means, aes(yintercept = RU_K.uM.per.FW),
linetype = 2,
group = "Treatment")
K_RU_plot <- K_RU_plot + stat_compare_means(method="t.test", ref.group = ".all.", label = "p.signif", hide.ns = T)
K_RU_plot <- K_RU_plot + rotate_x_text() + font("xy.text", size = 8)
K_RU_plot
grand.means <- aggregate(RL_K.uM.per.FW ~ treatment, data = my_data_nona, FUN = mean)
grand.means
K_RL_plot <- ggerrorplot(my_data_nona, y = "RL_K.uM.per.FW", x = "uncoded", color="ideotype",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter",
xlab="", ylab=expression(paste("[K"^"+","] (uMole / g FW)", sep="")),
title = expression(paste("Lower root potassium content", sep="")))
K_RL_plot <- K_RL_plot + geom_hline(
data = grand.means, aes(yintercept = RL_K.uM.per.FW),
linetype = 2,
group = "Treatment")
K_RL_plot <- K_RL_plot + stat_compare_means(method="t.test", ref.group = ".all.", label = "p.signif", hide.ns = T)
K_RL_plot <- K_RL_plot + rotate_x_text() + font("xy.text", size = 8)
K_RL_plot
pdf("Fig.3.Potassium_per_fresh_weight_per_genotype.pdf", width=15, height=10)
Na_3L_plot <- Na_3L_plot + rremove("legend")
Na_ML_plot <- Na_ML_plot + rremove("legend")
Na_RU_plot <- Na_RU_plot + rremove("legend")
Na_RL_plot <- Na_RL_plot + rremove("legend")
plot_grid(Na_3L_plot, Na_ML_plot, Na_RU_plot, Na_RL_plot,
ncol = 2, align = "hv", labels="AUTO",
label_size = 14)
dev.off()
## quartz_off_screen
## 2
Cool - now let’s see if we see any differences between ideotypes
FW_plot <- ggerrorplot(my_data_nona, y = "Shoot_FW", x = "ideotype", color="ideotype",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter", palette = "jco",
xlab="", ylab="weight (g)", title = "Shoot Fresh Weight")
FW_plot <- FW_plot + stat_compare_means(method="t.test", ref.group = "Broomstick", label = "p.signif", hide.ns = T)
FW_plot <- FW_plot + rotate_x_text() + font("xy.text", size = 8)
FW_plot
FW_3L_plot <- ggerrorplot(my_data_nona, y = "L3_FW", x = "ideotype", color="ideotype",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter", palette = "jco",
xlab="", ylab="weight (g)", title = expression(paste("3"^"rd"," leaf Fresh Weight", sep="")))
FW_3L_plot <- FW_3L_plot + stat_compare_means(method="t.test", ref.group = "Broomstick", label = "p.signif", hide.ns = T)
FW_3L_plot <- FW_3L_plot + rotate_x_text() + font("xy.text", size = 8)
FW_3L_plot
FW_R_plot <- ggerrorplot(my_data_nona, y = "R_FW", x = "ideotype", color="ideotype",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter", palette = "jco",
xlab="", ylab="weight (g)", title = "Root Fresh Weight")
FW_R_plot <- FW_R_plot + stat_compare_means(method="t.test", ref.group = "Broomstick", label = "p.signif", hide.ns = T)
FW_R_plot <- FW_R_plot + rotate_x_text() + font("xy.text", size = 8)
FW_R_plot
FW_RpS_plot <- ggerrorplot(my_data_nona, y = "RpS_FW", x = "ideotype", color="ideotype",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter", palette = "jco",
xlab="", ylab="ratio", title = "Root per Shoot ratio (FW)")
FW_RpS_plot <- FW_RpS_plot + stat_compare_means(method="t.test", ref.group = "Broomstick", label = "p.signif", hide.ns = T)
FW_RpS_plot <- FW_RpS_plot + rotate_x_text() + font("xy.text", size = 8)
FW_RpS_plot
pdf("Fig.4.Fresh_weight_per_ideotype.pdf", width=15, height=10)
FW_plot <- FW_plot + rremove("legend")
FW_3L_plot <- FW_3L_plot + rremove("legend")
FW_R_plot <- FW_R_plot + rremove("legend")
FW_RpS_plot <- FW_RpS_plot + rremove("legend")
plot_grid(FW_plot, FW_3L_plot, FW_R_plot, FW_RpS_plot,
ncol = 2, align = "hv", labels="AUTO",
label_size = 14)
dev.off()
## quartz_off_screen
## 2
Now - let’s do exactly the same if we compare per “sodium.gap”
colnames(my_data_nona)
## [1] "Sample" "L3_FW" "L3_rDW" "L3_WC"
## [5] "L3_Na.uM.per.FW" "L3_K.uM.per.FW" "L3_Na.uM.per.DW" "L3_K.uM.per.DW"
## [9] "L3_Na.uM.per.WC" "L3_K.uM.per.WC" "ML_FW" "ML_rDW"
## [13] "ML_WC" "ML_Na.uM.per.FW" "ML_K.uM.per.FW" "ML_Na.uM.per.DW"
## [17] "ML_K.uM.per.DW" "ML_Na.uM.per.WC" "ML_K.uM.per.WC" "RL_FW"
## [21] "RL_rDW" "RL_WC" "RL_Na.uM.per.FW" "RL_K.uM.per.FW"
## [25] "RL_Na.uM.per.DW" "RL_K.uM.per.DW" "RL_Na.uM.per.WC" "RL_K.uM.per.WC"
## [29] "RU_FW" "RU_rDW" "RU_WC" "RU_Na.uM.per.FW"
## [33] "RU_K.uM.per.FW" "RU_Na.uM.per.DW" "RU_K.uM.per.DW" "RU_Na.uM.per.WC"
## [37] "RU_K.uM.per.WC" "Shoot_FW" "TANK" "POSITION"
## [41] "treatment" "Genotype" "uncoded" "ideotype"
## [45] "sodium.gap" "R_FW" "RpS_FW"
FW_plot <- ggerrorplot(my_data_nona, y = "Shoot_FW", x = "sodium.gap", color="sodium.gap",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter", palette = "uchicago",
xlab="", ylab="weight (g)", title = "Shoot Fresh Weight")
FW_plot <- FW_plot + stat_compare_means(method="t.test", ref.group = "delayed", label = "p.signif", hide.ns = T)
FW_plot <- FW_plot + rotate_x_text() + font("xy.text", size = 8)
FW_plot
FW_3L_plot <- ggerrorplot(my_data_nona, y = "L3_FW", x = "sodium.gap", color="sodium.gap",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter", palette = "uchicago",
xlab="", ylab="weight (g)", title = expression(paste("3"^"rd"," leaf Fresh Weight", sep="")))
FW_3L_plot <- FW_3L_plot + stat_compare_means(method="t.test", ref.group = "delayed", label = "p.signif", hide.ns = T)
FW_3L_plot <- FW_3L_plot + rotate_x_text() + font("xy.text", size = 8)
FW_3L_plot
FW_R_plot <- ggerrorplot(my_data_nona, y = "R_FW", x = "sodium.gap", color="sodium.gap",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter", palette = "uchicago",
xlab="", ylab="weight (g)", title = "Root Fresh Weight")
FW_R_plot <- FW_R_plot + stat_compare_means(method="t.test", ref.group = "delayed", label = "p.signif", hide.ns = T)
FW_R_plot <- FW_R_plot + rotate_x_text() + font("xy.text", size = 8)
FW_R_plot
FW_RpS_plot <- ggerrorplot(my_data_nona, y = "RpS_FW", x = "sodium.gap", color="sodium.gap",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter", palette = "uchicago",
xlab="", ylab="ratio", title = "Root per Shoot ratio (FW)")
FW_RpS_plot <- FW_RpS_plot + stat_compare_means(method="t.test", ref.group = "delayed", label = "p.signif", hide.ns = T)
FW_RpS_plot <- FW_RpS_plot + rotate_x_text() + font("xy.text", size = 8)
FW_RpS_plot
pdf("Fig.5.Fresh_weight_per_sodium.gap.pdf", width=15, height=10)
FW_plot <- FW_plot + rremove("legend")
FW_3L_plot <- FW_3L_plot + rremove("legend")
FW_R_plot <- FW_R_plot + rremove("legend")
FW_RpS_plot <- FW_RpS_plot + rremove("legend")
plot_grid(FW_plot, FW_3L_plot, FW_R_plot, FW_RpS_plot,
ncol = 2, align = "hv", labels="AUTO",
label_size = 14)
dev.off()
## quartz_off_screen
## 2
OK - now let’s do the same type of figures for sodium accumulation:
Na_3L_plot <- ggerrorplot(my_data_nona, y = "L3_Na.uM.per.FW", x = "ideotype", color="ideotype",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter", palette = "jco",
xlab="", ylab=expression(paste("[Na"^"+","] (uMole / g FW)", sep="")),
title = expression(paste("3"^"rd"," leaf sodium content", sep="")))
Na_3L_plot <- Na_3L_plot + stat_compare_means(method="t.test", ref.group = "Broomstick", label = "p.signif", hide.ns = T)
Na_3L_plot <- Na_3L_plot + rotate_x_text() + font("xy.text", size = 8)
Na_3L_plot
Na_ML_plot <- ggerrorplot(my_data_nona, y = "ML_Na.uM.per.FW", x = "ideotype", color="ideotype",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter", palette = "jco",
xlab="", ylab=expression(paste("[Na"^"+","] (uMole / g FW)", sep="")),
title = expression(paste("Youngest leaf sodium content", sep="")))
Na_ML_plot <- Na_ML_plot + stat_compare_means(method="t.test", ref.group = "Broomstick", label = "p.signif", hide.ns = T)
Na_ML_plot <- Na_ML_plot + rotate_x_text() + font("xy.text", size = 8)
Na_ML_plot
Na_RU_plot <- ggerrorplot(my_data_nona, y = "RU_Na.uM.per.FW", x = "ideotype", color="ideotype",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter", palette = "jco",
xlab="", ylab=expression(paste("[Na"^"+","] (uMole / g FW)", sep="")),
title = expression(paste("Upper root sodium content", sep="")))
Na_RU_plot <- Na_RU_plot + stat_compare_means(method="t.test", ref.group = "Broomstick", label = "p.signif", hide.ns = T)
Na_RU_plot <- Na_RU_plot + rotate_x_text() + font("xy.text", size = 8)
Na_RU_plot
Na_RL_plot <- ggerrorplot(my_data_nona, y = "RL_Na.uM.per.FW", x = "ideotype", color="ideotype",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter", palette = "jco",
xlab="", ylab=expression(paste("[Na"^"+","] (uMole / g FW)", sep="")),
title = expression(paste("Lower root sodium content", sep="")))
Na_RL_plot <- Na_RL_plot + stat_compare_means(method="t.test", ref.group = "Broomstick", label = "p.signif", hide.ns = T)
Na_RL_plot <- Na_RL_plot + rotate_x_text() + font("xy.text", size = 8)
Na_RL_plot
pdf("Fig.6.Sodium_acc_per_ideotype.pdf", width=15, height=10)
Na_3L_plot <- Na_3L_plot + rremove("legend")
Na_ML_plot <- Na_ML_plot + rremove("legend")
Na_RU_plot <- Na_RU_plot + rremove("legend")
Na_RL_plot <- Na_RL_plot + rremove("legend")
plot_grid(Na_3L_plot, Na_ML_plot, Na_RU_plot, Na_RL_plot,
ncol = 2, align = "hv", labels="AUTO",
label_size = 14)
dev.off()
## quartz_off_screen
## 2
Na_3L_plot <- ggerrorplot(my_data_nona, y = "L3_Na.uM.per.FW", x = "sodium.gap", color="sodium.gap",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter", palette = "uchicago",
xlab="", ylab=expression(paste("[Na"^"+","] (uMole / g FW)", sep="")),
title = expression(paste("3"^"rd"," leaf sodium content", sep="")))
Na_3L_plot <- Na_3L_plot + stat_compare_means(method="t.test", ref.group = "delayed", label = "p.signif", hide.ns = T)
Na_3L_plot <- Na_3L_plot + rotate_x_text() + font("xy.text", size = 8)
Na_3L_plot
Na_ML_plot <- ggerrorplot(my_data_nona, y = "ML_Na.uM.per.FW", x = "sodium.gap", color="sodium.gap",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter", palette = "uchicago",
xlab="", ylab=expression(paste("[Na"^"+","] (uMole / g FW)", sep="")),
title = expression(paste("Youngest leaf sodium content", sep="")))
Na_ML_plot <- Na_ML_plot + stat_compare_means(method="t.test", ref.group = "delayed", label = "p.signif", hide.ns = T)
Na_ML_plot <- Na_ML_plot + rotate_x_text() + font("xy.text", size = 8)
Na_ML_plot
Na_RU_plot <- ggerrorplot(my_data_nona, y = "RU_Na.uM.per.FW", x = "sodium.gap", color="sodium.gap",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter", palette = "uchicago",
xlab="", ylab=expression(paste("[Na"^"+","] (uMole / g FW)", sep="")),
title = expression(paste("Upper root sodium content", sep="")))
Na_RU_plot <- Na_RU_plot + stat_compare_means(method="t.test", ref.group = "delayed", label = "p.signif", hide.ns = T)
Na_RU_plot <- Na_RU_plot + rotate_x_text() + font("xy.text", size = 8)
Na_RU_plot
Na_RL_plot <- ggerrorplot(my_data_nona, y = "RL_Na.uM.per.FW", x = "sodium.gap", color="sodium.gap",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter", palette = "uchicago",
xlab="", ylab=expression(paste("[Na"^"+","] (uMole / g FW)", sep="")),
title = expression(paste("Lower root sodium content", sep="")))
Na_RL_plot <- Na_RL_plot + stat_compare_means(method="t.test", ref.group = "delayed", label = "p.signif", hide.ns = T)
Na_RL_plot <- Na_RL_plot + rotate_x_text() + font("xy.text", size = 8)
Na_RL_plot
pdf("Fig.7.Sodium_acc_per_sodium.gap.pdf", width=15, height=10)
Na_3L_plot <- Na_3L_plot + rremove("legend")
Na_ML_plot <- Na_ML_plot + rremove("legend")
Na_RU_plot <- Na_RU_plot + rremove("legend")
Na_RL_plot <- Na_RL_plot + rremove("legend")
plot_grid(Na_3L_plot, Na_ML_plot, Na_RU_plot, Na_RL_plot,
ncol = 2, align = "hv", labels="AUTO",
label_size = 14)
dev.off()
## quartz_off_screen
## 2
And same for potassium accumulation
K_3L_plot <- ggerrorplot(my_data_nona, y = "L3_K.uM.per.FW", x = "ideotype", color="ideotype",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter", palette = "jco",
xlab="", ylab=expression(paste("[K"^"+","] (uMole / g FW)", sep="")),
title = expression(paste("3"^"rd"," leaf potassium content", sep="")))
K_3L_plot <- K_3L_plot + stat_compare_means(method="t.test", ref.group = "Broomstick", label = "p.signif", hide.ns = T)
K_3L_plot <- K_3L_plot + rotate_x_text() + font("xy.text", size = 8)
K_3L_plot
K_ML_plot <- ggerrorplot(my_data_nona, y = "ML_K.uM.per.FW", x = "ideotype", color="ideotype",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter", palette = "jco",
xlab="", ylab=expression(paste("[K"^"+","] (uMole / g FW)", sep="")),
title = expression(paste("Youngest leaf potassium content", sep="")))
K_ML_plot <- K_ML_plot + stat_compare_means(method="t.test", ref.group = "Broomstick", label = "p.signif", hide.ns = T)
K_ML_plot <- K_ML_plot + rotate_x_text() + font("xy.text", size = 8)
K_ML_plot
K_RU_plot <- ggerrorplot(my_data_nona, y = "RU_K.uM.per.FW", x = "ideotype", color="ideotype",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter", palette = "jco",
xlab="", ylab=expression(paste("[K"^"+","] (uMole / g FW)", sep="")),
title = expression(paste("Upper root potassium content", sep="")))
K_RU_plot <- K_RU_plot + stat_compare_means(method="t.test", ref.group = "Broomstick", label = "p.signif", hide.ns = T)
K_RU_plot <- K_RU_plot + rotate_x_text() + font("xy.text", size = 8)
K_RU_plot
K_RL_plot <- ggerrorplot(my_data_nona, y = "RL_K.uM.per.FW", x = "ideotype", color="ideotype",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter", palette = "jco",
xlab="", ylab=expression(paste("[K"^"+","] (uMole / g FW)", sep="")),
title = expression(paste("Lower root potassium content", sep="")))
K_RL_plot <- K_RL_plot + stat_compare_means(method="t.test", ref.group = "Broomstick", label = "p.signif", hide.ns = T)
K_RL_plot <- K_RL_plot + rotate_x_text() + font("xy.text", size = 8)
K_RL_plot
pdf("Fig.8.Potassium_acc_per_ideotype.pdf", width=15, height=10)
K_3L_plot <- K_3L_plot + rremove("legend")
K_ML_plot <- K_ML_plot + rremove("legend")
K_RU_plot <- K_RU_plot + rremove("legend")
K_RL_plot <- K_RL_plot + rremove("legend")
plot_grid(K_3L_plot, K_ML_plot, K_RU_plot, K_RL_plot,
ncol = 2, align = "hv", labels="AUTO",
label_size = 14)
dev.off()
## quartz_off_screen
## 2
K_3L_plot <- ggerrorplot(my_data_nona, y = "L3_K.uM.per.FW", x = "sodium.gap", color="sodium.gap",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter", palette = "uchicago",
xlab="", ylab=expression(paste("[K"^"+","] (uMole / g FW)", sep="")),
title = expression(paste("3"^"rd"," leaf potassium content", sep="")))
K_3L_plot <- K_3L_plot + stat_compare_means(method="t.test", ref.group = "delayed", label = "p.signif", hide.ns = T)
K_3L_plot <- K_3L_plot + rotate_x_text() + font("xy.text", size = 8)
K_3L_plot
K_ML_plot <- ggerrorplot(my_data_nona, y = "ML_K.uM.per.FW", x = "sodium.gap", color="sodium.gap",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter", palette = "uchicago",
xlab="", ylab=expression(paste("[K"^"+","] (uMole / g FW)", sep="")),
title = expression(paste("Youngest leaf potassium content", sep="")))
K_ML_plot <- K_ML_plot + stat_compare_means(method="t.test", ref.group = "delayed", label = "p.signif", hide.ns = T)
K_ML_plot <- K_ML_plot + rotate_x_text() + font("xy.text", size = 8)
K_ML_plot
K_RU_plot <- ggerrorplot(my_data_nona, y = "RU_K.uM.per.FW", x = "sodium.gap", color="sodium.gap",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter", palette = "uchicago",
xlab="", ylab=expression(paste("[K"^"+","] (uMole / g FW)", sep="")),
title = expression(paste("Upper root potassium content", sep="")))
K_RU_plot <- K_RU_plot + stat_compare_means(method="t.test", ref.group = "delayed", label = "p.signif", hide.ns = T)
K_RU_plot <- K_RU_plot + rotate_x_text() + font("xy.text", size = 8)
K_RU_plot
K_RL_plot <- ggerrorplot(my_data_nona, y = "RL_K.uM.per.FW", x = "sodium.gap", color="sodium.gap",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter", palette = "uchicago",
xlab="", ylab=expression(paste("[K"^"+","] (uMole / g FW)", sep="")),
title = expression(paste("Lower root potassium content", sep="")))
K_RL_plot <- K_RL_plot + stat_compare_means(method="t.test", ref.group = "delayed", label = "p.signif", hide.ns = T)
K_RL_plot <- K_RL_plot + rotate_x_text() + font("xy.text", size = 8)
K_RL_plot
pdf("Fig.8.Potassium_acc_per_sodium.gap.pdf", width=15, height=10)
K_3L_plot <- K_3L_plot + rremove("legend")
K_ML_plot <- K_ML_plot + rremove("legend")
K_RU_plot <- K_RU_plot + rremove("legend")
K_RL_plot <- K_RL_plot + rremove("legend")
plot_grid(K_3L_plot, K_ML_plot, K_RU_plot, K_RL_plot,
ncol = 2, align = "hv", labels="AUTO",
label_size = 14)
dev.off()
## quartz_off_screen
## 2
Before I close for the day - I also need to quantify the Salt Tolerance Index - aiks!
Let’s do it!:
library(doBy)
head(my_data_nona)
all_sum <- summaryBy(Shoot_FW + R_FW + RU_Na.uM.per.FW + RL_Na.uM.per.FW + ML_Na.uM.per.FW + L3_Na.uM.per.FW ~ uncoded + TANK, data = my_data_nona)
head(all_sum)
all_sum <- subset(all_sum, all_sum$TANK == 1 | all_sum$TANK == 3 )
colnames(all_sum) <- gsub(".mean", ".Control", colnames(all_sum))
head(all_sum)
all_sum_2 <- all_sum
all_sum_2$TANK <- gsub("1", "2", all_sum_2$TANK)
all_sum_2$TANK <- gsub("3", "4", all_sum_2$TANK)
head(all_sum_2)
all_sum3 <- rbind(all_sum, all_sum_2)
all2 <- merge(my_data_nona, all_sum3, by=c("uncoded", "TANK"))
head(all2)
dim(all2)
## [1] 121 53
all2$STI.Shoot.FW <- all2$Shoot_FW / all2$Shoot_FW.Control
all2$STI.Root.FW <- all2$R_FW / all2$R_FW.Control
all2$STI.RU_Na.per.FW <- all2$RU_Na.uM.per.FW / all2$RU_Na.uM.per.FW.Control
all2$STI.RL_Na.per.FW <- all2$RL_Na.uM.per.FW / all2$RL_Na.uM.per.FW.Control
all2$STI.L3_Na.per.FW <- all2$L3_Na.uM.per.FW / all2$L3_Na.uM.per.FW.Control
all2$STI.ML_Na.per.FW <- all2$ML_Na.uM.per.FW / all2$ML_Na.uM.per.FW.Control
all2 <- subset(all2, all2$treatment == "Salt")
FW_plot <- ggerrorplot(all2, y = "STI.Shoot.FW", x = "sodium.gap", color="sodium.gap",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter", palette = "uchicago",
xlab="", ylab="Fraction of FW @ control",
title = "Salt Tolerance Index based on Shoot Fresh Weight")
FW_plot <- FW_plot + stat_compare_means(method="t.test", ref.group = "delayed", label = "p.signif", hide.ns = T)
FW_plot <- FW_plot + rotate_x_text() + font("xy.text", size = 8)
FW_plot
FW_R_plot <- ggerrorplot(all2, y = "R_FW", x = "sodium.gap", color="sodium.gap",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter", palette = "uchicago",
xlab="", ylab="Fraction of FW @ control",
title = "Salt Tolerance Index based on Root Fresh Weight")
FW_R_plot <- FW_R_plot + stat_compare_means(method="t.test", ref.group = "delayed", label = "p.signif", hide.ns = T)
FW_R_plot <- FW_R_plot + rotate_x_text() + font("xy.text", size = 8)
FW_R_plot
Na_RU_plot <- ggerrorplot(all2, y = "STI.RU_Na.per.FW", x = "sodium.gap", color="sodium.gap",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter", palette = "uchicago",
xlab="", ylab=expression(paste("Fraction of Na"^"+"," @ control", sep="")),
title = expression(paste("Salt Tolerance Index based on Na"^"+", " in the Upper Root", sep="")))
Na_RU_plot <- Na_RU_plot + stat_compare_means(method="t.test", ref.group = "delayed", label = "p.signif", hide.ns = T)
Na_RU_plot <- Na_RU_plot + rotate_x_text() + font("xy.text", size = 8)
Na_RU_plot
Na_RL_plot <- ggerrorplot(all2, y = "STI.RL_Na.per.FW", x = "sodium.gap", color="sodium.gap",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter", palette = "uchicago",
xlab="", ylab=expression(paste("Fraction of Na"^"+"," @ control", sep="")),
title = expression(paste("Salt Tolerance Index based on Na"^"+", " in the Lower Root", sep="")))
Na_RL_plot <- Na_RL_plot + stat_compare_means(method="t.test", ref.group = "delayed", label = "p.signif", hide.ns = T)
Na_RL_plot <- Na_RL_plot + rotate_x_text() + font("xy.text", size = 8)
Na_RL_plot
Na_ML_plot <- ggerrorplot(all2, y = "STI.ML_Na.per.FW", x = "sodium.gap", color="sodium.gap",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter", palette = "uchicago",
xlab="", ylab=expression(paste("Fraction of Na"^"+"," @ control", sep="")),
title = expression(paste("Salt Tolerance Index based on Na"^"+", " in the Youngest Leaf", sep="")))
Na_ML_plot <- Na_ML_plot + stat_compare_means(method="t.test", ref.group = "delayed", label = "p.signif", hide.ns = T)
Na_ML_plot <- Na_ML_plot + rotate_x_text() + font("xy.text", size = 8)
Na_ML_plot
Na_3L_plot <- ggerrorplot(all2, y = "STI.L3_Na.per.FW", x = "sodium.gap", color="sodium.gap",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter", palette = "uchicago",
xlab="", ylab=expression(paste("Fraction of Na"^"+"," @ control", sep="")),
title = expression(paste("Salt Tolerance Index based on Na"^"+", " in the Youngest Leaf", sep="")))
Na_3L_plot <- Na_3L_plot + stat_compare_means(method="t.test", ref.group = "delayed", label = "p.signif", hide.ns = T)
Na_3L_plot <- Na_3L_plot + rotate_x_text() + font("xy.text", size = 8)
Na_3L_plot
pdf("Fig.9.Salt_Tolerance_Index_per_sodium.gap.pdf", width=15, height=25)
FW_plot <- FW_plot + rremove("legend")
FW_R_plot <- FW_R_plot + rremove("legend")
Na_RU_plot <- Na_RU_plot + rremove("legend")
Na_RL_plot <- Na_RL_plot + rremove("legend")
Na_ML_plot <- Na_ML_plot + rremove("legend")
Na_3L_plot <- Na_3L_plot + rremove("legend")
plot_grid(FW_plot, FW_R_plot, Na_RU_plot, Na_RL_plot, Na_ML_plot, Na_3L_plot,
ncol = 2, align = "hv", labels="AUTO",
label_size = 14)
dev.off()
## quartz_off_screen
## 2
FW_plot <- ggerrorplot(all2, y = "STI.Shoot.FW", x = "ideotype", color="ideotype",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter", palette = "jco",
xlab="", ylab="Fraction of FW @ control",
title = "Salt Tolerance Index based on Shoot Fresh Weight")
FW_plot <- FW_plot + stat_compare_means(method="t.test", ref.group = "Broomstick", label = "p.signif", hide.ns = T)
FW_plot <- FW_plot + rotate_x_text() + font("xy.text", size = 8)
FW_plot
FW_R_plot <- ggerrorplot(all2, y = "R_FW", x = "ideotype", color="ideotype",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter", palette = "jco",
xlab="", ylab="Fraction of FW @ control",
title = "Salt Tolerance Index based on Root Fresh Weight")
FW_R_plot <- FW_R_plot + stat_compare_means(method="t.test", ref.group = "Broomstick", label = "p.signif", hide.ns = T)
FW_R_plot <- FW_R_plot + rotate_x_text() + font("xy.text", size = 8)
FW_R_plot
Na_RU_plot <- ggerrorplot(all2, y = "STI.RU_Na.per.FW", x = "ideotype", color="ideotype",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter", palette = "jco",
xlab="", ylab=expression(paste("Fraction of Na"^"+"," @ control", sep="")),
title = expression(paste("Salt Tolerance Index based on Na"^"+", " in the Upper Root", sep="")))
Na_RU_plot <- Na_RU_plot + stat_compare_means(method="t.test", ref.group = "Broomstick", label = "p.signif", hide.ns = T)
Na_RU_plot <- Na_RU_plot + rotate_x_text() + font("xy.text", size = 8)
Na_RU_plot
Na_RL_plot <- ggerrorplot(all2, y = "STI.RL_Na.per.FW", x = "ideotype", color="ideotype",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter", palette = "jco",
xlab="", ylab=expression(paste("Fraction of Na"^"+"," @ control", sep="")),
title = expression(paste("Salt Tolerance Index based on Na"^"+", " in the Lower Root", sep="")))
Na_RL_plot <- Na_RL_plot + stat_compare_means(method="t.test", ref.group = "Broomstick", label = "p.signif", hide.ns = T)
Na_RL_plot <- Na_RL_plot + rotate_x_text() + font("xy.text", size = 8)
Na_RL_plot
Na_ML_plot <- ggerrorplot(all2, y = "STI.ML_Na.per.FW", x = "ideotype", color="ideotype",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter", palette = "jco",
xlab="", ylab=expression(paste("Fraction of Na"^"+"," @ control", sep="")),
title = expression(paste("Salt Tolerance Index based on Na"^"+", " in the Youngest Leaf", sep="")))
Na_ML_plot <- Na_ML_plot + stat_compare_means(method="t.test", ref.group = "Broomstick", label = "p.signif", hide.ns = T)
Na_ML_plot <- Na_ML_plot + rotate_x_text() + font("xy.text", size = 8)
Na_ML_plot
Na_3L_plot <- ggerrorplot(all2, y = "STI.L3_Na.per.FW", x = "ideotype", color="ideotype",
facet.by ="treatment", desc_stat = "mean_sd", add = "jitter", palette = "jco",
xlab="", ylab=expression(paste("Fraction of Na"^"+"," @ control", sep="")),
title = expression(paste("Salt Tolerance Index based on Na"^"+", " in the Youngest Leaf", sep="")))
Na_3L_plot <- Na_3L_plot + stat_compare_means(method="t.test", ref.group = "Broomstick", label = "p.signif", hide.ns = T)
Na_3L_plot <- Na_3L_plot + rotate_x_text() + font("xy.text", size = 8)
Na_3L_plot
pdf("Fig.10.Salt_Tolerance_Index_per_ideotype.pdf", width=15, height=25)
FW_plot <- FW_plot + rremove("legend")
FW_R_plot <- FW_R_plot + rremove("legend")
Na_RU_plot <- Na_RU_plot + rremove("legend")
Na_RL_plot <- Na_RL_plot + rremove("legend")
Na_ML_plot <- Na_ML_plot + rremove("legend")
Na_3L_plot <- Na_3L_plot + rremove("legend")
plot_grid(FW_plot, FW_R_plot, Na_RU_plot, Na_RL_plot, Na_ML_plot, Na_3L_plot,
ncol = 2, align = "hv", labels="AUTO",
label_size = 14)
dev.off()
## quartz_off_screen
## 2