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)
## Warning: package 'ggpubr' was built under R version 4.0.3
## Loading required package: ggplot2
## Warning: package 'ggplot2' was built under R version 4.0.3
library(prettydoc)
## Warning: package 'prettydoc' was built under R version 4.0.3
library(gridExtra)
## Warning: package 'gridExtra' was built under R version 4.0.3
##
## Attaching package: 'gridExtra'
## The following object is masked from 'package:dplyr':
##
## combine
WB<- read_excel("Z:/TSever/Western Blot/WB_YBOX1_YBOX2_ImageJ.xlsx",
sheet = "combined")
WB$liver_inverted<-c(255-WB$Liver_YBOX1_spodnji_band)
WB$liver_YBOX1_background_inverted<-c(255-WB$liver_YBOX1_background)
WB$kidney_inverted<-c(255-WB$Kidney_YBOX1)
WB$kidney_YBOX1_background_inverted<-c(255-WB$kidney_YBOX1_background)
WB$spleen_inverted<-c(255-WB$spleen_YBOX1)
WB$spleen_YBOX1_background_inverted<-c(255-WB$spleen_YBOX1_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_YBOX1_background_inverted)
WB[,27]<-c(WB$kidney_inverted - WB$kidney_YBOX1_background_inverted)
WB[,28]<-c(WB$spleen_inverted - WB$spleen_YBOX1_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 = 1.423, num df = 2, denom df = 2, p-value = 0.8254
## alternative hypothesis: true ratio of variances is not equal to 1
## 95 percent confidence interval:
## 0.03648628 55.49562932
## sample estimates:
## ratio of variances
## 1.422965
the p-value of F test is p=0.5687, 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.81653, p-value = 0.1546
with(WBt, shapiro.test(ratio_liver [Sample == 'KO']))
##
## Shapiro-Wilk normality test
##
## data: ratio_liver[Sample == "KO"]
## W = 0.8965, p-value = 0.3745
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 = 1.7572, df = 4, p-value = 0.1537
## alternative hypothesis: true difference in means is not equal to 0
## 99 percent confidence interval:
## -0.5026408 1.1231287
## sample estimates:
## mean in group KO mean in group WT
## 0.9440906 0.6338466
p-value of the t-test is 0.03744, which is less than alpha 0.05. the means are 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 = 0.95969, num df = 2, denom df = 2, p-value = 0.9794
## alternative hypothesis: true ratio of variances is not equal to 1
## 95 percent confidence interval:
## 0.02460735 37.42777322
## sample estimates:
## ratio of variances
## 0.9596865
the p-value of F test is p=0.5687, 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.9982, p-value = 0.9189
with(WBt, shapiro.test(ratio_kidney [Sample == 'KO']))
##
## Shapiro-Wilk normality test
##
## data: ratio_kidney[Sample == "KO"]
## W = 0.89843, p-value = 0.3805
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 = 1.2555, df = 4, p-value = 0.2776
## alternative hypothesis: true difference in means is not equal to 0
## 99 percent confidence interval:
## -0.2583785 0.4521312
## sample estimates:
## mean in group KO mean in group WT
## 0.4020525 0.3051761
p-value is greather than alpha 0.05, the samples are not 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.020021, num df = 2, denom df = 2, p-value = 0.03926
## alternative hypothesis: true ratio of variances is not equal to 1
## 95 percent confidence interval:
## 0.0005133585 0.7808182822
## sample estimates:
## ratio of variances
## 0.02002098
the p-value of F test is p=0.5687, 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.83145, p-value = 0.192
with(WBt, shapiro.test(ratio_spleen [Sample == 'KO']))
##
## Shapiro-Wilk normality test
##
## data: ratio_spleen[Sample == "KO"]
## W = 0.90229, p-value = 0.3928
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 = 2.5813, df = 4, p-value = 0.06124
## alternative hypothesis: true difference in means is not equal to 0
## 99 percent confidence interval:
## -0.7300973 2.5935171
## sample estimates:
## mean in group KO mean in group WT
## 1.8820764 0.9503665
p-value is of the test is greater than alpha = 0.05, the means of the samples are not 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 YBOX1, from left to right : kidney, liver, 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. All but sample 58 are males.
| Sample | different with \(\alpha .\) = 0.05 ? |
|---|---|
| Liver | Yes p = 0.03744 |
| Kidney | No p = 0.2776 |
| Spleen | No p = 0.06124 |
grid.arrange(liv, kid, spl, ncol = 3)