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 = "Sheet2")
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 = 0.03082, num df = 2, denom df = 2, p-value = 0.0598
## alternative hypothesis: true ratio of variances is not equal to 1
## 95 percent confidence interval:
## 0.0007902477 1.2019666912
## sample estimates:
## ratio of variances
## 0.03081966
the p-value of F test is p=0598, 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.9457, p-value = 0.5508
with(WBt, shapiro.test(ratio_liver [Sample == 'KO']))
##
## Shapiro-Wilk normality test
##
## data: ratio_liver[Sample == "KO"]
## W = 0.95893, p-value = 0.6103
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 = 2.3976, df = 4, p-value = 0.07455
## alternative hypothesis: true difference in means between group KO and group WT is not equal to 0
## 99 percent confidence interval:
## -0.3177797 1.0083612
## sample estimates:
## mean in group KO mean in group WT
## 0.8859008 0.5406100
p-value of the t-test is 0.07455, 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 = 3.839, num df = 2, denom df = 2, p-value = 0.4133
## alternative hypothesis: true ratio of variances is not equal to 1
## 95 percent confidence interval:
## 0.09843587 149.72095726
## sample estimates:
## ratio of variances
## 3.838999
the p-value of F test is p=0.4133, 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.90078, p-value = 0.388
with(WBt, shapiro.test(ratio_kidney [Sample == 'KO']))
##
## Shapiro-Wilk normality test
##
## data: ratio_kidney[Sample == "KO"]
## W = 0.96367, p-value = 0.6337
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 = 4.5825, df = 4, p-value = 0.01016
## alternative hypothesis: true difference in means between group KO and group WT is not equal to 0
## 99 percent confidence interval:
## -0.001384777 0.588611751
## sample estimates:
## mean in group KO mean in group WT
## 0.5218556 0.2282421
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 = 4.104, num df = 2, denom df = 2, p-value = 0.3918
## alternative hypothesis: true ratio of variances is not equal to 1
## 95 percent confidence interval:
## 0.1052319 160.0577316
## sample estimates:
## ratio of variances
## 4.104044
the p-value of F test is p= 0.3918, 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.99995, p-value = 0.9861
with(WBt, shapiro.test(ratio_spleen [Sample == 'KO']))
##
## Shapiro-Wilk normality test
##
## data: ratio_spleen[Sample == "KO"]
## W = 0.99998, p-value = 0.9925
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 = -1.5671, df = 4, p-value = 0.1922
## alternative hypothesis: true difference in means between group KO and group WT is not equal to 0
## 99 percent confidence interval:
## -0.10429880 0.05132806
## sample estimates:
## mean in group KO mean in group WT
## 0.05120234 0.07768772
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)
WB<- read_excel("Z:/TSever/Western Blot/IL-10_ImageJ.xlsx",
sheet = "Sheet3")
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','WT','WT','KO','KO','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 = 1.8668, num df = 4, denom df = 4, p-value = 0.5603
## alternative hypothesis: true ratio of variances is not equal to 1
## 95 percent confidence interval:
## 0.1943699 17.9300363
## sample estimates:
## ratio of variances
## 1.866831
the p-value of F test is p=0.5603, 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.94778, p-value = 0.7213
with(WBt, shapiro.test(ratio_liver [Sample == 'KO']))
##
## Shapiro-Wilk normality test
##
## data: ratio_liver[Sample == "KO"]
## W = 0.86343, p-value = 0.2408
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 = 3.9772, df = 8, p-value = 0.004078
## alternative hypothesis: true difference in means between group KO and group WT is not equal to 0
## 99 percent confidence interval:
## 0.0527556 0.6221326
## sample estimates:
## mean in group KO mean in group WT
## 0.7544394 0.4169953
p-value of the t-test is 0.004078, 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 = 17.007, num df = 4, denom df = 4, p-value = 0.01782
## alternative hypothesis: true ratio of variances is not equal to 1
## 95 percent confidence interval:
## 1.770675 163.339473
## sample estimates:
## ratio of variances
## 17.0065
the p-value of F test is p=0.01782, not 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.61746, p-value = 0.00106
with(WBt, shapiro.test(ratio_kidney [Sample == 'KO']))
##
## Shapiro-Wilk normality test
##
## data: ratio_kidney[Sample == "KO"]
## W = 0.8849, p-value = 0.3321
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 = 6.9172, df = 8, p-value = 0.0001224
## alternative hypothesis: true difference in means between group KO and group WT is not equal to 0
## 99 percent confidence interval:
## 0.08099417 0.23359468
## sample estimates:
## mean in group KO mean in group WT
## 0.23772537 0.08043094
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
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 2 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 |
grid.arrange(liv, kid, ncol = 2)