library(readxl)
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(ggpubr)
## Loading required package: ggplot2
library(prettydoc)
## Warning: package 'prettydoc' was built under R version 4.1.2
library(gridExtra)
##
## Attaching package: 'gridExtra'
## The following object is masked from 'package:dplyr':
##
## combine
WB<- read_excel("Z:/TSever/Western Blot/IL-10_ImageJ.xlsx",
sheet = "Sheet1")
WB$liver_inverted<-c(255-WB$Liver_IL10)
WB$liver_IL10_background_inverted<-c(255-WB$liver_IL10_background)
WB$kidney_inverted<-c(255-WB$Kidney_IL10)
WB$kidney_IL10_background_inverted<-c(255-WB$kidney_IL10_background)
WB$spleen_inverted<-c(255-WB$spleen_IL10)
WB$spleen_IL10_background_inverted<-c(255-WB$spleen_IL10_background)
WB$liver_GAPDH_inverted<-c(255-WB$liver_GAPDH)
WB$liver_GAPDH_background_inverted<-c(255-WB$liver_GAPDH_background)
WB$kidney_GAPDH_inverted<-c(255-WB$kidney_GAPDH)
WB$kidney_GAPDH_background_inverted<-c(255-WB$kidney_GAPDH_background)
WB$spleen_GAPDH_inverted<-c(255-WB$spleen_GAPDH)
WB$spleen_GAPDH_background_inverted<-c(255-WB$spleen_GAPDH_background)
WB[,26]<-c(WB$liver_inverted - WB$liver_IL10_background_inverted)
WB[,27]<-c(WB$kidney_inverted - WB$kidney_IL10_background_inverted)
WB[,28]<-c(WB$spleen_inverted - WB$spleen_IL10_background_inverted)
WB[,29]<-c(WB$liver_GAPDH_inverted - WB$liver_GAPDH_background_inverted)
WB[,30]<-c(WB$kidney_GAPDH_inverted - WB$kidney_GAPDH_background_inverted)
WB[,31]<-c(WB$spleen_GAPDH_inverted - WB$spleen_GAPDH_background_inverted)
colnames(WB)[c(26,27,28,29,30,31)] <-c('net_liver','net_kidney','net_spleen','net_liver_GAPDH','net_kidney_GAPDH','net_spleen_GAPDH')
WB[,32]<-c(WB$net_liver / WB$net_liver_GAPDH)
WB[,33]<-c(WB$net_kidney / WB$net_kidney_GAPDH)
WB[,34]<-c(WB$net_spleen / WB$net_spleen_GAPDH)
colnames(WB)[c(32,33,34)]<-c('ratio_liver','ratio_kidney','ratio_spleen')
WBt<-WB
WBt[,1]<-c('WT','WT','WT','KO','KO','KO')
F test is used to check if variances of both sets of data are equal
var.test(ratio_liver ~ Sample, data=WBt )
##
## F test to compare two variances
##
## data: ratio_liver by Sample
## F = 3.6458, num df = 2, denom df = 2, p-value = 0.4305
## alternative hypothesis: true ratio of variances is not equal to 1
## 95 percent confidence interval:
## 0.0934823 142.1865734
## sample estimates:
## ratio of variances
## 3.64581
the p-value of F test is p=0.4305, greather than alpha=0.05, alternative hypothesis accepted -> thereis no significant difference between the variances of the two data sets
Shapiro-Wilk test is used to test if data has normal distribution
with(WBt, shapiro.test(ratio_liver [Sample == 'WT']))
##
## Shapiro-Wilk normality test
##
## data: ratio_liver[Sample == "WT"]
## W = 0.92377, p-value = 0.4658
with(WBt, shapiro.test(ratio_liver [Sample == 'KO']))
##
## Shapiro-Wilk normality test
##
## data: ratio_liver[Sample == "KO"]
## W = 0.99796, p-value = 0.9137
both groups have normal distribution (p-value greater than 0.05)
unpaired t-test is used to check wheter samples have different means
liver_test<-t.test(ratio_liver ~ Sample , data = WBt, var.equal = TRUE, conf.level = 0.99)
liver_test
##
## Two Sample t-test
##
## data: ratio_liver by Sample
## t = 0.036267, df = 4, p-value = 0.9728
## alternative hypothesis: true difference in means between group KO and group WT is not equal to 0
## 99 percent confidence interval:
## -0.3173167 0.3223554
## sample estimates:
## mean in group KO mean in group WT
## 0.6035606 0.6010413
p-value of the t-test is 0.9728, which is more than alpha 0.05. the means are NOT different
liv<-ggboxplot(WBt, x = "Sample", y = "ratio_liver",
color = "Sample", palette = c("#00AFBB", "#E7B800"),
ylab = "normalised band intensity", xlab = "Sample", main='Liver')+
theme(plot.title = element_text(hjust = 0.5))+
theme(legend.position = 'right')
liv
F test is used to check if variances of both sets of data are equal
var.test(ratio_kidney ~ Sample, data=WBt )
##
## F test to compare two variances
##
## data: ratio_kidney by Sample
## F = 2.3979, num df = 2, denom df = 2, p-value = 0.5886
## alternative hypothesis: true ratio of variances is not equal to 1
## 95 percent confidence interval:
## 0.06148569 93.51973850
## sample estimates:
## ratio of variances
## 2.397942
the p-value of F test is p=0.5886, greather than alpha=0.05, alternative hypothesis accepted -> thereis no significant difference between the variances of the two data sets
Shapiro-Wilk test is used to test if data has normal distribution
with(WBt, shapiro.test(ratio_kidney [Sample == 'WT']))
##
## Shapiro-Wilk normality test
##
## data: ratio_kidney[Sample == "WT"]
## W = 0.99592, p-value = 0.878
with(WBt, shapiro.test(ratio_kidney [Sample == 'KO']))
##
## Shapiro-Wilk normality test
##
## data: ratio_kidney[Sample == "KO"]
## W = 0.93226, p-value = 0.4971
both groups have normal distribution (p-value greater than 0.05)
kidney_test<-t.test(ratio_kidney ~ Sample , data = WBt, var.equal = TRUE, conf.level = 0.99)
kidney_test
##
## Two Sample t-test
##
## data: ratio_kidney by Sample
## t = 10.773, df = 4, p-value = 0.000421
## alternative hypothesis: true difference in means between group KO and group WT is not equal to 0
## 99 percent confidence interval:
## 0.2414418 0.6018381
## sample estimates:
## mean in group KO mean in group WT
## 0.7381442 0.3165042
p-value is 0.000421, less than alpha 0.05, the sample means are different
kid<-ggboxplot(WBt, x = "Sample", y = "ratio_kidney",
color = "Sample", palette = c("#00AFBB", "#E7B800"),
ylab = "normalised band intensity", xlab = "Sample", main='Kidney')+
theme(plot.title = element_text(hjust = 0.5))+
theme(legend.position = 'right')
kid
var.test(ratio_spleen ~ Sample, data=WBt )
##
## F test to compare two variances
##
## data: ratio_spleen by Sample
## F = 0.16149, num df = 2, denom df = 2, p-value = 0.2781
## alternative hypothesis: true ratio of variances is not equal to 1
## 95 percent confidence interval:
## 0.00414085 6.29823312
## sample estimates:
## ratio of variances
## 0.1614932
the p-value of F test is p= 0.2781, greather than alpha=0.05, alternative hypothesis accepted -> thereis no significant difference between the variances of the two data sets
with(WBt, shapiro.test(ratio_spleen [Sample == 'WT']))
##
## Shapiro-Wilk normality test
##
## data: ratio_spleen[Sample == "WT"]
## W = 0.99323, p-value = 0.8427
with(WBt, shapiro.test(ratio_spleen [Sample == 'KO']))
##
## Shapiro-Wilk normality test
##
## data: ratio_spleen[Sample == "KO"]
## W = 0.97862, p-value = 0.7198
both groups have normal distribution (p-value greater than 0.05)
spleen_test<-t.test(ratio_spleen ~ Sample , data = WBt, var.equal = TRUE, conf.level = 0.99)
spleen_test
##
## Two Sample t-test
##
## data: ratio_spleen by Sample
## t = 9.6442, df = 4, p-value = 0.0006465
## alternative hypothesis: true difference in means between group KO and group WT is not equal to 0
## 99 percent confidence interval:
## 0.2240379 0.6333522
## sample estimates:
## mean in group KO mean in group WT
## 0.8710953 0.4424002
p-value is of the test is 0.0006465, less than alpha = 0.05, the means of the sample means are different
spl<-ggboxplot(WBt, x = "Sample", y = "ratio_spleen",
color = "Sample", palette = c("#00AFBB", "#E7B800"),
ylab = "normalised band intensity", xlab = "Sample", main='Spleen')+
theme(plot.title = element_text(hjust = 0.5))+
theme(legend.position = 'right')
spl
picture of the blots for IL-10, from left to right :liver, kidney, liver, spleen. Samples are loaded from left to right : Protein ladder, 44, 45, 46, 58, 60, 68. Samples 44-46 are wild type, samples 58-68 are legumain knock outs.
next 3 pictures are of the same blots, this time with loading control GAPDH
| Sample | different with \(\alpha .\) = 0.05 ? |
|---|---|
| Liver | NO p = 0.9728 |
| Kidney | YES p = 0.000421 |
| Spleen | YES p = 0.0006465 |
grid.arrange(liv, kid, spl, ncol = 3)