20220818_Suberin_quantification_duf-5_col_roots this is the suberin quantification based on Fluorol yellow staining of the roots of duf-5 and col under control and 75 mM salt stress for two days.The seedlings were grown together for a total 4 days, and then 2 days at 75 mM salt. They were fixed and stained 24 hr prior to imaging (no anillin blue counter staining).

Before analyzing the images, we need the following steps: 1.First start convert image to HSB using Image> Type>HSB…and then quantify the Brightness signals. 2.Quantification of suberin seedlings were done by using one rectangular per each root section in FIJI, and then extract data points by ANALYZE>PLOT PROFILE>LIST to get the distance and gray value intensity for each section or ctrl+K to copy and past all data corresponding to each replicate in one excel sheet. With this method, we get gray value and distance in pixel however, we do not need distance here.we only need gray value. 3.Use same zoom-in option when analyzing the images, (30% magnification)no change in zoom setting in this case, just opened the image in Fiji and quantified it with one rectangular section.

in total, I have 3 replicates for col-control, 4 R for duf-control, 5 R for col-salt, and 5 for duf-salt.

getwd()
## [1] "C:/Users/Julkowska Lab/Desktop/R codes by Maryam/20220809_suberin_quantification_col_duf-5_root"
my_root<- list.files(pattern = ".csv")
my_root
##  [1] "cc.csv"  "cc2.csv" "cc3.csv" "cs.csv"  "cs2.csv" "cs3.csv" "cs4.csv"
##  [8] "cs5.csv" "dc.csv"  "dc2.csv" "dc3.csv" "dc4.csv" "ds.csv"  "ds2.csv"
## [15] "ds3.csv" "ds4.csv" "ds5.csv"

let’s read in one image before looping:

temp_root <- read.csv(my_root[1])
temp_root2 <- temp_root[,c(4:8)]
temp_root2$root.ID <- gsub(".csv", "", my_root[1])
temp_root2
all_roots <- temp_root2

Then - let’s loop our roots to be included in all_roots

for(i in 2:17){
  temp_root <- read.csv(my_root[i])
  temp_root2 <- temp_root[,c(4:8)]
  temp_root2$root.ID <- gsub(".csv", "", my_root[i])
  all_roots <- rbind(all_roots, temp_root2)
}
i
## [1] 17
temp_root
all_roots
unique(all_roots$root.ID)
##  [1] "cc"  "cc2" "cc3" "cs"  "cs2" "cs3" "cs4" "cs5" "dc"  "dc2" "dc3" "dc4"
## [13] "ds"  "ds2" "ds3" "ds4" "ds5"

now let’s extract treatment and genotype information:

all_roots$genotype <- substr(all_roots$root.ID, 1,1)
all_roots
unique(all_roots$genotype)
## [1] "c" "d"
all_roots$treatment <- substr(all_roots$root.ID, 2,2)
all_roots
unique(all_roots$treatment)
## [1] "c" "s"
all_roots$genotype <- gsub("c", "Col", all_roots$genotype)
all_roots$genotype <- gsub("d", "duf-5", all_roots$genotype)
all_roots$treatment <- gsub("c", "Control", all_roots$treatment)
all_roots$treatment <- gsub("s", "Salt", all_roots$treatment)
all_roots
unique(all_roots$treatment)
## [1] "Control" "Salt"
unique(all_roots$genotype)
## [1] "Col"   "duf-5"
library(ggplot2)
library(ggpubr)
library(plotly)
## 
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
## 
##     last_plot
## The following object is masked from 'package:stats':
## 
##     filter
## The following object is masked from 'package:graphics':
## 
##     layout
colnames(all_roots)
## [1] "Grey.value.all4" "Grey.value.b"    "Grey.value.j"    "Grey.value.m"   
## [5] "Grey.value.t"    "root.ID"         "genotype"        "treatment"
library(doBy)
sum_intens <- summaryBy(Grey.value.all4 ~ root.ID + treatment + genotype, data = all_roots, na.rm=TRUE)
sum_intens
root_suberin_ave2 <- ggplot(data=sum_intens, aes(x= genotype, y=Grey.value.all4.mean, color = genotype)) 
root_suberin_ave2 <- root_suberin_ave2 +  geom_boxplot(alpha=0.2) + geom_jitter(width=0.1,alpha=0.2)
root_suberin_ave2 <- root_suberin_ave2 + facet_grid(~ treatment )
root_suberin_ave2 <- root_suberin_ave2 + scale_color_manual(values = c("blue","red")) + stat_compare_means(method = "t.test")
root_suberin_ave2 <- root_suberin_ave2 + ylab("Average fluorol yellow signal (a.u.)") + xlab("") + theme(legend.position='none') + ggtitle("All sections")
root_suberin_ave2

lets see how each individual section in the roots looks like…start with middle section

sum_intens <- summaryBy(Grey.value.m ~ root.ID + treatment + genotype, data = all_roots, na.rm=TRUE)
sum_intens
root_suberin_ave_m2 <- ggplot(data=sum_intens, aes(x= genotype, y=Grey.value.m.mean, color = genotype)) 
root_suberin_ave_m2 <- root_suberin_ave_m2 +  geom_boxplot(alpha=0.2) + geom_jitter(width=0.1,alpha=0.2)
root_suberin_ave_m2 <- root_suberin_ave_m2 + facet_grid(~ treatment )
root_suberin_ave_m2 <- root_suberin_ave_m2 + scale_color_manual(values = c("blue","red"))
root_suberin_ave_m2 <- root_suberin_ave_m2 + stat_compare_means(method = "t.test", ref.group = "Col")
root_suberin_ave_m2 <- root_suberin_ave_m2 + ylab("Average fluorol yellow signal (a.u.)") + xlab("") + theme(legend.position='none') + ggtitle("Section 2")
root_suberin_ave_m2

sum_intens <- summaryBy(Grey.value.j ~ root.ID + treatment + genotype, data = all_roots, na.rm=TRUE)
sum_intens
root_suberin_ave_j <- ggplot(data=sum_intens, aes(x= genotype, y=Grey.value.j.mean, color = genotype)) 
root_suberin_ave_j <- root_suberin_ave_j +  geom_boxplot(alpha=0.2) + geom_jitter(width=0.1,alpha=0.2)
root_suberin_ave_j <- root_suberin_ave_j + facet_grid(~ treatment )
root_suberin_ave_j <- root_suberin_ave_j + scale_color_manual(values = c("blue","red")) + stat_compare_means(method = "t.test", ref.group = "Col")
root_suberin_ave_j <- root_suberin_ave_j + ylab("Average fluorol yellow signal intensity (a.u.)") + xlab("") + theme(legend.position='none') + ggtitle("Section 3")
root_suberin_ave_j

sum_intens <- summaryBy(Grey.value.t ~ root.ID + treatment + genotype, data = all_roots, na.rm=TRUE)
sum_intens
root_suberin_ave_t <- ggplot(data=sum_intens, aes(x= genotype, y=Grey.value.t.mean, color = genotype)) 
root_suberin_ave_t <- root_suberin_ave_t +  geom_boxplot(alpha=0.2) + geom_jitter(width=0.1,alpha=0.2)
root_suberin_ave_t <- root_suberin_ave_t + facet_grid(~ treatment )
root_suberin_ave_t <- root_suberin_ave_t + scale_color_manual(values = c("blue","red")) + stat_compare_means(method = "t.test", ref.group = "Col")
root_suberin_ave_t <- root_suberin_ave_t + ylab("Average fluorol yellow signal intensity (a.u.)") + xlab("") + theme(legend.position='none') + ggtitle("Section 1")
root_suberin_ave_t

sum_intens <- summaryBy(Grey.value.b ~ root.ID + treatment + genotype, data = all_roots, na.rm=TRUE)
sum_intens
root_suberin_ave_b <- ggplot(data=sum_intens, aes(x= genotype, y=Grey.value.b.mean, color = genotype)) 
root_suberin_ave_b <- root_suberin_ave_b +  geom_boxplot(alpha=0.2) + geom_jitter(width=0.1,alpha=0.2)
root_suberin_ave_b <- root_suberin_ave_b + facet_grid(~ treatment )
root_suberin_ave_b <- root_suberin_ave_b + scale_color_manual(values = c("blue","red")) + stat_compare_means(method = "t.test", ref.group = "Col")
root_suberin_ave_b <- root_suberin_ave_b + ylab("Average fluorol yellow signal intensity (a.u.)") + xlab("") + theme(legend.position='none') + ggtitle("Section 4")
root_suberin_ave_b

library(cowplot)
## 
## Attaching package: 'cowplot'
## The following object is masked from 'package:ggpubr':
## 
##     get_legend
pdf("Suberin_root_sections.pdf", height = 4, width = 13)
plot_grid(root_suberin_ave_b, root_suberin_ave_j, root_suberin_ave_m2, root_suberin_ave_t, ncol = 4)
dev.off()
## png 
##   2