20220623_Gus-staining- quantification-GG013-14-_all_replicates_root_only this is the gus quantification signal for roots of transgenic lines expressing DUF247 promoter under control and 75 mM salt stress for three days.Before analyzing the images, we need the following steps: 1.First start convert image to HSB using Image> Type>HSB…and then quantify the signals. 2.Quantification of gus seedlings were done by using the rectangular option in FIJI, and then trace the root, and extract data points by ANALYZE>PLOT PROFILE>LIST to get the distance and gray value or ctrl+K to copy and past all data in excel sheet. With this method, we get gray value and distance in pixel. 3.Use same zoom-in option when analyzing the images, i.e. 200% magnification 4.then sum all gray values for each sample, and then divide each gray value by sum of all gray values to obtain real intensity. We also need to calculate the distance from 100% of main root length in each case to graph in order to have equal size of length for root under control and salt.I have 15 and 18 replicates for control and salt, respectively.
my_roots <- list.files(pattern=".csv")
my_roots
## [1] "c00-name.csv" "c00-name2.csv" "c00.csv" "c001_ch00 .csv"
## [5] "c002-name.csv" "c007.csv" "c010.csv" "c015.csv"
## [9] "c017.csv" "c020.csv" "c021.csv" "c022.csv"
## [13] "c028.csv" "c030.csv" "c041.csv" "s0.csv"
## [17] "s00.csv" "s001-name.csv" "s001.csv" "s001_name.csv"
## [21] "s002-name2.csv" "s002.csv" "s003.csv" "s005.csv"
## [25] "s006.csv" "s011.csv" "s014.csv" "s016.csv"
## [29] "s022.csv" "s022_name.csv" "s023.csv" "s027.csv"
## [33] "s034.csv"
let’s read in one image before looping:
temp_root <- read.csv(my_roots[1])
temp_root2 <- temp_root[,c(4,6)]
temp_root2$root.ID <- gsub(".csv", "", my_roots[1])
temp_root2
all_roots <- temp_root2
Then - let’s loop our roots to be included in all_roots
for(i in 2:33){
temp_root <- read.csv(my_roots[i])
temp_root2 <- temp_root[,c(4,6)]
temp_root2$root.ID <- gsub(".csv", "", my_roots[i])
all_roots <- rbind(all_roots, temp_root2)
}
i
## [1] 33
temp_root
all_roots
unique(all_roots$root.ID)
## [1] "c00-name" "c00-name2" "c00" "c001_ch00 " "c002-name"
## [6] "c007" "c010" "c015" "c017" "c020"
## [11] "c021" "c022" "c028" "c030" "c041"
## [16] "s0" "s00" "s001-name" "s001" "s001_name"
## [21] "s002-name2" "s002" "s003" "s005" "s006"
## [26] "s011" "s014" "s016" "s022" "s022_name"
## [31] "s023" "s027" "s034"
now let’s extract treatment information:
all_roots$treatment <- substr(all_roots$root.ID, 1,1)
all_roots
unique(all_roots$treatment)
## [1] "c" "s"
library(ggplot2)
## Warning: package 'ggplot2' was built under R version 4.0.5
library(ggpubr)
## Warning: package 'ggpubr' was built under R version 4.0.5
library(plotly)
## Warning: package 'plotly' was built under R version 4.0.5
##
## 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] "C.100....of.main.Root.Length." "rel.intensity"
## [3] "root.ID" "treatment"
colnames(all_roots)[1] <- "Percentage.of.MR.length"
all_roots
gus_root <- ggplot(data=all_roots, aes(x= Percentage.of.MR.length, y=rel.intensity, group = root.ID, color = treatment))
gus_root <- gus_root + geom_line(alpha = 0.1)
#gus_root <- gus_root + stat_summary(fun.data = mean_se, geom="ribbon", linetype=0, aes(group=treatment), alpha=0.3)+ stat_summary(fun.y=mean, aes(group= root.ID), size=0.7, geom="line", linetype = "dashed")
gus_root <- gus_root + stat_compare_means(aes(group = root.ID), label = "p.signif", method = "t.test", hide.ns = T)
gus_root <- gus_root + scale_colour_manual(values = c("blue", "red")) + facet_grid(~treatment)
gus_root <- gus_root + ylab("Signal intensity (a.u.)") + xlab("% of main root length") + theme(legend.position=c(0.2, 0.8))
gus_root
## Warning: Computation failed in `stat_compare_means()`:
## Problem with `mutate()` column `p`.
## i `p = purrr::map(...)`.
## x not enough 'x' observations
## Warning: Computation failed in `stat_compare_means()`:
## Problem with `mutate()` column `p`.
## i `p = purrr::map(...)`.
## x not enough 'x' observations
in order to report average for all replicates in each condition, we used function summaryBy from doBy library…see below
library(doBy)
## Warning: package 'doBy' was built under R version 4.0.5
sum_intens <- summaryBy(rel.intensity ~ root.ID + treatment, data = all_roots)
sum_intens
change control to blue line…….
gus_root_ave <- ggerrorplot(sum_intens, y = "rel.intensity.mean", x = "treatment", fill="treatment", color="treatment",
desc_stat = "mean_sd", add = "jitter",
add.params = list(color = "darkgray"),
xlab="", ylab="GUS Signal intensity (a.u.)")
gus_root_ave <- gus_root_ave + rremove("legend") + stat_compare_means(method="t.test", ref.group = "c",
label = "p.signif", hide.ns = T)
gus_root_ave
library(cowplot)
##
## Attaching package: 'cowplot'
## The following object is masked from 'package:ggpubr':
##
## get_legend
pdf("20220804_Gus_quantification_GG13line_root.pdf", width = 13, height = 5)
plot_grid(gus_root , gus_root_ave, labels = c("AUTO"), ncol = 2)
## Warning: Computation failed in `stat_compare_means()`:
## Problem with `mutate()` column `p`.
## i `p = purrr::map(...)`.
## x not enough 'x' observations
## Warning: Computation failed in `stat_compare_means()`:
## Problem with `mutate()` column `p`.
## i `p = purrr::map(...)`.
## x not enough 'x' observations
dev.off()
## png
## 2