library(readxl)
## Warning: package 'readxl' was built under R version 4.2.3
IL6 <- read_excel("G:/.shortcut-targets-by-id/1Ia6gmOB3PQwXHACB7yK7MXCXwjf-D_xk/Shared PCDHA/experiments/MTT cholometric/IL6_ABscrAB.xlsx", sheet = "IL624t1")
AB <- read_excel("G:/.shortcut-targets-by-id/1Ia6gmOB3PQwXHACB7yK7MXCXwjf-D_xk/Shared PCDHA/experiments/MTT cholometric/IL6_ABscrAB.xlsx", sheet = "ABscrAB24ht1")
IL6graph <- read_excel("G:/.shortcut-targets-by-id/1Ia6gmOB3PQwXHACB7yK7MXCXwjf-D_xk/Shared PCDHA/experiments/MTT cholometric/IL6_ABscrAB.xlsx", sheet = "IL6graph")
ABgraph <- read_excel("G:/.shortcut-targets-by-id/1Ia6gmOB3PQwXHACB7yK7MXCXwjf-D_xk/Shared PCDHA/experiments/MTT cholometric/IL6_ABscrAB.xlsx", sheet = "ABgraph")
AB$dose <- as.factor(AB$dose)
AB$treatment <- as.factor(AB$treatment)
str(AB)
## tibble [64 × 4] (S3: tbl_df/tbl/data.frame)
## $ sample : num [1:64] 1 2 3 4 5 6 7 8 9 10 ...
## $ dose : Factor w/ 5 levels "5","10","15",..: 1 1 1 1 1 1 2 2 2 2 ...
## $ treatment: Factor w/ 3 levels "AB","DMSO","scrAB": 1 1 1 1 1 1 1 1 1 1 ...
## $ viability: num [1:64] 116.5 106.1 69.7 104.8 78.8 ...
IL6$dose <- as.factor(IL6$dose)
IL6$treatment <- as.factor(IL6$treatment)
str(IL6)
## tibble [28 × 4] (S3: tbl_df/tbl/data.frame)
## $ sample : num [1:28] 1 2 3 4 5 6 7 8 9 10 ...
## $ dose : Factor w/ 4 levels "5","10","20",..: 1 1 1 1 1 1 2 2 2 2 ...
## $ treatment: Factor w/ 2 levels "controls","IL6": 2 2 2 2 2 2 2 2 2 2 ...
## $ viability: num [1:28] 105.9 112.9 68.2 118.8 157.6 ...
ABgraph$dose <- as.factor(ABgraph$dose)
ABgraph$treatment <- as.factor(ABgraph$treatment)
IL6graph$dose <- as.factor(IL6graph$dose)
IL6graph$treatment <- as.factor(IL6graph$treatment)
res.aov2 <- aov(viability ~ dose * treatment, data = AB)
summary(res.aov2)
## Df Sum Sq Mean Sq F value Pr(>F)
## dose 4 34793 8698 7.143 0.000125 ***
## treatment 2 10052 5026 4.127 0.021932 *
## dose:treatment 7 12316 1759 1.445 0.208810
## Residuals 50 60887 1218
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
require("dplyr")
## Loading required package: dplyr
## Warning: package 'dplyr' was built under R version 4.2.3
##
## 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
group_by(AB, treatment, dose) %>%
summarise(
count = n(),
mean = mean(viability, na.rm = TRUE),
sd = sd(viability, na.rm = TRUE)
)
## `summarise()` has grouped output by 'treatment'. You can override using the
## `.groups` argument.
## # A tibble: 14 × 5
## # Groups: treatment [3]
## treatment dose count mean sd
## <fct> <fct> <int> <dbl> <dbl>
## 1 AB 5 6 93.7 18.1
## 2 AB 10 6 66.6 15.9
## 3 AB 15 6 70.0 15.7
## 4 AB 20 6 54.3 13.9
## 5 AB 30 6 65.3 19.8
## 6 DMSO 5 1 100 NA
## 7 DMSO 10 1 100 NA
## 8 DMSO 20 1 100 NA
## 9 DMSO 30 1 100 NA
## 10 scrAB 5 6 165. 86.2
## 11 scrAB 10 6 94.3 15.4
## 12 scrAB 15 6 85.5 8.08
## 13 scrAB 20 6 60.9 31.0
## 14 scrAB 30 6 66.8 45.5
TukeyHSD(res.aov2)
## Tukey multiple comparisons of means
## 95% family-wise confidence level
##
## Fit: aov(formula = viability ~ dose * treatment, data = AB)
##
## $dose
## diff lwr upr p adj
## 10-5 -45.243871 -83.97661 -6.511134 0.0144978
## 15-5 -49.452906 -88.98434 -9.921472 0.0074742
## 20-5 -66.352354 -105.08509 -27.619617 0.0001187
## 30-5 -58.557578 -97.29032 -19.824841 0.0007789
## 15-10 -4.209035 -43.74047 35.322399 0.9981446
## 20-10 -21.108482 -59.84122 17.624255 0.5406663
## 30-10 -13.313707 -52.04644 25.419030 0.8661498
## 20-15 -16.899447 -56.43088 22.631987 0.7457805
## 30-15 -9.104672 -48.63611 30.426762 0.9655237
## 30-20 7.794775 -30.93796 46.527512 0.9788987
##
## $treatment
## diff lwr upr p adj
## DMSO-AB 28.628007 -16.238227 73.49424 0.2807004
## scrAB-AB 24.538822 2.775502 46.30214 0.0236978
## scrAB-DMSO -4.089185 -48.955419 40.77705 0.9736508
##
## $`dose:treatment`
## diff lwr upr p adj
## 10:AB-5:AB -2.707756e+01 -98.917815 44.7626985 0.9886010
## 15:AB-5:AB -2.372467e+01 -95.564925 48.1155886 0.9967956
## 20:AB-5:AB -3.940784e+01 -111.248099 32.4324142 0.8130409
## 30:AB-5:AB -2.842514e+01 -100.265395 43.4151191 0.9824205
## 5:DMSO-5:AB 6.283857e+00 -128.116957 140.6846707 1.0000000
## 10:DMSO-5:AB 6.283857e+00 -128.116957 140.6846707 1.0000000
## 15:DMSO-5:AB NA NA NA NA
## 20:DMSO-5:AB 6.283857e+00 -128.116957 140.6846707 1.0000000
## 30:DMSO-5:AB 6.283857e+00 -128.116957 140.6846707 1.0000000
## 5:scrAB-5:AB 7.150596e+01 -0.334298 143.3462156 0.0522026
## 10:scrAB-5:AB 5.551291e-01 -71.285128 72.3953859 1.0000000
## 15:scrAB-5:AB -8.208897e+00 -80.049153 63.6313602 1.0000000
## 20:scrAB-5:AB -3.284963e+01 -104.689888 38.9906253 0.9432616
## 30:scrAB-5:AB -2.694366e+01 -98.783913 44.8966006 0.9891055
## 15:AB-10:AB 3.352890e+00 -68.487367 75.1931470 1.0000000
## 20:AB-10:AB -1.233028e+01 -84.170541 59.5099725 0.9999984
## 30:AB-10:AB -1.347579e+00 -73.187836 70.4926774 1.0000000
## 5:DMSO-10:AB 3.336142e+01 -101.039398 167.7622291 0.9998569
## 10:DMSO-10:AB 3.336142e+01 -101.039398 167.7622291 0.9998569
## 15:DMSO-10:AB NA NA NA NA
## 20:DMSO-10:AB 3.336142e+01 -101.039398 167.7622291 0.9998569
## 30:DMSO-10:AB 3.336142e+01 -101.039398 167.7622291 0.9998569
## 5:scrAB-10:AB 9.858352e+01 26.743260 170.4237740 0.0009298
## 10:scrAB-10:AB 2.763269e+01 -44.207569 99.4729442 0.9863078
## 15:scrAB-10:AB 1.886866e+01 -52.971595 90.7089185 0.9997262
## 20:scrAB-10:AB -5.772073e+00 -77.612330 66.0681836 1.0000000
## 30:scrAB-10:AB 1.339021e-01 -71.706355 71.9741589 1.0000000
## 20:AB-15:AB -1.568317e+01 -87.523431 56.1570823 0.9999688
## 30:AB-15:AB -4.700470e+00 -76.540726 67.1397872 1.0000000
## 5:DMSO-15:AB 3.000853e+01 -104.392289 164.4093389 0.9999591
## 10:DMSO-15:AB 3.000853e+01 -104.392289 164.4093389 0.9999591
## 15:DMSO-15:AB NA NA NA NA
## 20:DMSO-15:AB 3.000853e+01 -104.392289 164.4093389 0.9999591
## 30:DMSO-15:AB 3.000853e+01 -104.392289 164.4093389 0.9999591
## 5:scrAB-15:AB 9.523063e+01 23.390370 167.0708838 0.0016018
## 10:scrAB-15:AB 2.427980e+01 -47.560460 96.1200541 0.9959632
## 15:scrAB-15:AB 1.551577e+01 -56.324485 87.3560283 0.9999726
## 20:scrAB-15:AB -9.124963e+00 -80.965220 62.7152935 1.0000000
## 30:scrAB-15:AB -3.218988e+00 -75.059245 68.6212687 1.0000000
## 30:AB-20:AB 1.098270e+01 -60.857552 82.8229617 0.9999997
## 5:DMSO-20:AB 4.569170e+01 -88.709114 180.0925134 0.9957211
## 10:DMSO-20:AB 4.569170e+01 -88.709114 180.0925134 0.9957211
## 15:DMSO-20:AB NA NA NA NA
## 20:DMSO-20:AB 4.569170e+01 -88.709114 180.0925134 0.9957211
## 30:DMSO-20:AB 4.569170e+01 -88.709114 180.0925134 0.9957211
## 5:scrAB-20:AB 1.109138e+02 39.073545 182.7540582 0.0001176
## 10:scrAB-20:AB 3.996297e+01 -31.877285 111.8032285 0.7979458
## 15:scrAB-20:AB 3.119895e+01 -40.641311 103.0392028 0.9618234
## 20:scrAB-20:AB 6.558211e+00 -65.282046 78.3984679 1.0000000
## 30:scrAB-20:AB 1.246419e+01 -59.376070 84.3044432 0.9999982
## 5:DMSO-30:AB 3.470899e+01 -99.691819 169.1098085 0.9997741
## 10:DMSO-30:AB 3.470899e+01 -99.691819 169.1098085 0.9997741
## 15:DMSO-30:AB NA NA NA NA
## 20:DMSO-30:AB 3.470899e+01 -99.691819 169.1098085 0.9997741
## 30:DMSO-30:AB 3.470899e+01 -99.691819 169.1098085 0.9997741
## 5:scrAB-30:AB 9.993110e+01 28.090840 171.7713533 0.0007453
## 10:scrAB-30:AB 2.898027e+01 -42.859990 100.8205236 0.9792216
## 15:scrAB-30:AB 2.021624e+01 -51.624016 92.0564979 0.9994079
## 20:scrAB-30:AB -4.424494e+00 -76.264751 67.4157630 1.0000000
## 30:scrAB-30:AB 1.481481e+00 -70.358775 73.3217383 1.0000000
## 10:DMSO-5:DMSO 1.421085e-14 -175.971972 175.9719721 1.0000000
## 15:DMSO-5:DMSO NA NA NA NA
## 20:DMSO-5:DMSO 4.263256e-14 -175.971972 175.9719721 1.0000000
## 30:DMSO-5:DMSO 1.421085e-14 -175.971972 175.9719721 1.0000000
## 5:scrAB-5:DMSO 6.522210e+01 -69.178712 199.6229156 0.9131325
## 10:scrAB-5:DMSO -5.728728e+00 -140.129542 128.6720859 1.0000000
## 15:scrAB-5:DMSO -1.449275e+01 -148.893567 119.9080601 1.0000000
## 20:scrAB-5:DMSO -3.913349e+01 -173.534302 95.2673253 0.9991408
## 30:scrAB-5:DMSO -3.322751e+01 -167.628327 101.1733005 0.9998634
## 15:DMSO-10:DMSO NA NA NA NA
## 20:DMSO-10:DMSO 2.842171e-14 -175.971972 175.9719721 1.0000000
## 30:DMSO-10:DMSO 0.000000e+00 -175.971972 175.9719721 1.0000000
## 5:scrAB-10:DMSO 6.522210e+01 -69.178712 199.6229156 0.9131325
## 10:scrAB-10:DMSO -5.728728e+00 -140.129542 128.6720859 1.0000000
## 15:scrAB-10:DMSO -1.449275e+01 -148.893567 119.9080601 1.0000000
## 20:scrAB-10:DMSO -3.913349e+01 -173.534302 95.2673253 0.9991408
## 30:scrAB-10:DMSO -3.322751e+01 -167.628327 101.1733005 0.9998634
## 20:DMSO-15:DMSO NA NA NA NA
## 30:DMSO-15:DMSO NA NA NA NA
## 5:scrAB-15:DMSO NA NA NA NA
## 10:scrAB-15:DMSO NA NA NA NA
## 15:scrAB-15:DMSO NA NA NA NA
## 20:scrAB-15:DMSO NA NA NA NA
## 30:scrAB-15:DMSO NA NA NA NA
## 30:DMSO-20:DMSO -2.842171e-14 -175.971972 175.9719721 1.0000000
## 5:scrAB-20:DMSO 6.522210e+01 -69.178712 199.6229156 0.9131325
## 10:scrAB-20:DMSO -5.728728e+00 -140.129542 128.6720859 1.0000000
## 15:scrAB-20:DMSO -1.449275e+01 -148.893567 119.9080601 1.0000000
## 20:scrAB-20:DMSO -3.913349e+01 -173.534302 95.2673253 0.9991408
## 30:scrAB-20:DMSO -3.322751e+01 -167.628327 101.1733005 0.9998634
## 5:scrAB-30:DMSO 6.522210e+01 -69.178712 199.6229156 0.9131325
## 10:scrAB-30:DMSO -5.728728e+00 -140.129542 128.6720859 1.0000000
## 15:scrAB-30:DMSO -1.449275e+01 -148.893567 119.9080601 1.0000000
## 20:scrAB-30:DMSO -3.913349e+01 -173.534302 95.2673253 0.9991408
## 30:scrAB-30:DMSO -3.322751e+01 -167.628327 101.1733005 0.9998634
## 10:scrAB-5:scrAB -7.095083e+01 -142.791087 0.8894271 0.0560495
## 15:scrAB-5:scrAB -7.971486e+01 -151.555112 -7.8745987 0.0170939
## 20:scrAB-5:scrAB -1.043556e+02 -176.195847 -32.5153335 0.0003574
## 30:scrAB-5:scrAB -9.844962e+01 -170.289872 -26.6093583 0.0009504
## 15:scrAB-10:scrAB -8.764026e+00 -80.604283 63.0762311 1.0000000
## 20:scrAB-10:scrAB -3.340476e+01 -105.245017 38.4354962 0.9358066
## 30:scrAB-10:scrAB -2.749879e+01 -99.339042 44.3414715 0.9868916
## 20:scrAB-15:scrAB -2.464073e+01 -96.480992 47.1995219 0.9953312
## 30:scrAB-15:scrAB -1.873476e+01 -90.575016 53.1054972 0.9997475
## 30:scrAB-20:scrAB 5.905975e+00 -65.934282 77.7462321 1.0000000
plot(res.aov2,1)
sample 55, 35 and 36 are outliers
AB_outlier <- AB[-c(55, 35, 36),]
res.aov2 <- aov(viability ~ dose * treatment, data = AB_outlier)
summary(res.aov2)
## Df Sum Sq Mean Sq F value Pr(>F)
## dose 4 18030 4507 10.479 3.76e-06 ***
## treatment 2 5402 2701 6.279 0.00383 **
## dose:treatment 7 6333 905 2.103 0.06161 .
## Residuals 47 20217 430
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
require("dplyr")
group_by(AB_outlier, treatment, dose) %>%
summarise(
count = n(),
mean = mean(viability, na.rm = TRUE),
sd = sd(viability, na.rm = TRUE)
)
## `summarise()` has grouped output by 'treatment'. You can override using the
## `.groups` argument.
## # A tibble: 14 × 5
## # Groups: treatment [3]
## treatment dose count mean sd
## <fct> <fct> <int> <dbl> <dbl>
## 1 AB 5 6 93.7 18.1
## 2 AB 10 6 66.6 15.9
## 3 AB 15 6 70.0 15.7
## 4 AB 20 6 54.3 13.9
## 5 AB 30 6 65.3 19.8
## 6 DMSO 5 1 100 NA
## 7 DMSO 10 1 100 NA
## 8 DMSO 20 1 100 NA
## 9 DMSO 30 1 100 NA
## 10 scrAB 5 4 138. 19.5
## 11 scrAB 10 6 94.3 15.4
## 12 scrAB 15 6 85.5 8.08
## 13 scrAB 20 6 60.9 31.0
## 14 scrAB 30 5 54.3 37.7
TukeyHSD(res.aov2)
## Tukey multiple comparisons of means
## 95% family-wise confidence level
##
## Fit: aov(formula = viability ~ dose * treatment, data = AB_outlier)
##
## $dose
## diff lwr upr p adj
## 10-5 -28.403074 -52.50377 -4.302378 0.0134839
## 15-5 -32.612109 -57.16875 -8.055469 0.0040143
## 20-5 -49.511556 -73.61225 -25.410860 0.0000048
## 30-5 -46.745949 -71.30259 -22.189310 0.0000207
## 15-10 -4.209035 -27.75951 19.341441 0.9862799
## 20-10 -21.108482 -44.18314 1.966177 0.0877035
## 30-10 -18.342875 -41.89335 5.207601 0.1941975
## 20-15 -16.899447 -40.44992 6.651029 0.2655092
## 30-15 -14.133840 -38.15071 9.883027 0.4623159
## 30-20 2.765607 -20.78487 26.316083 0.9972502
##
## $treatment
## diff lwr upr p adj
## DMSO-AB 29.72151 3.003929 56.43908 0.0260491
## scrAB-AB 15.74450 2.429444 29.05956 0.0169439
## scrAB-DMSO -13.97700 -40.868635 12.91463 0.4258125
##
## $`dose:treatment`
## diff lwr upr p adj
## 10:AB-5:AB -2.707756e+01 -69.910388 15.755271 0.6218782
## 15:AB-5:AB -2.372467e+01 -66.557497 19.108161 0.7986014
## 20:AB-5:AB -3.940784e+01 -82.240672 3.424987 0.1010268
## 30:AB-5:AB -2.842514e+01 -71.257967 14.407692 0.5448226
## 5:DMSO-5:AB 6.283857e+00 -73.849029 86.416743 1.0000000
## 10:DMSO-5:AB 6.283857e+00 -73.849029 86.416743 1.0000000
## 15:DMSO-5:AB NA NA NA NA
## 20:DMSO-5:AB 6.283857e+00 -73.849029 86.416743 1.0000000
## 30:DMSO-5:AB 6.283857e+00 -73.849029 86.416743 1.0000000
## 5:scrAB-5:AB 4.420368e+01 -3.684875 92.092243 0.0985074
## 10:scrAB-5:AB 5.551291e-01 -42.277700 43.387958 1.0000000
## 15:scrAB-5:AB -8.208897e+00 -51.041726 34.623933 0.9999932
## 20:scrAB-5:AB -3.284963e+01 -75.682461 9.983198 0.3120001
## 30:scrAB-5:AB -3.938810e+01 -84.311551 5.535350 0.1434179
## 15:AB-10:AB 3.352890e+00 -39.479939 46.185719 1.0000000
## 20:AB-10:AB -1.233028e+01 -55.163114 30.502545 0.9991936
## 30:AB-10:AB -1.347579e+00 -44.180409 41.485250 1.0000000
## 5:DMSO-10:AB 3.336142e+01 -46.771471 113.494301 0.9718105
## 10:DMSO-10:AB 3.336142e+01 -46.771471 113.494301 0.9718105
## 15:DMSO-10:AB NA NA NA NA
## 20:DMSO-10:AB 3.336142e+01 -46.771471 113.494301 0.9718105
## 30:DMSO-10:AB 3.336142e+01 -46.771471 113.494301 0.9718105
## 5:scrAB-10:AB 7.128124e+01 23.392683 119.169801 0.0002508
## 10:scrAB-10:AB 2.763269e+01 -15.200142 70.465517 0.5901934
## 15:scrAB-10:AB 1.886866e+01 -23.964168 61.701491 0.9557581
## 20:scrAB-10:AB -5.772073e+00 -48.604902 37.060756 0.9999999
## 30:scrAB-10:AB -1.231054e+01 -57.233993 32.612908 0.9995302
## 20:AB-15:AB -1.568317e+01 -58.516004 27.149655 0.9908524
## 30:AB-15:AB -4.700470e+00 -47.533299 38.132360 1.0000000
## 5:DMSO-15:AB 3.000853e+01 -50.124361 110.141411 0.9887506
## 10:DMSO-15:AB 3.000853e+01 -50.124361 110.141411 0.9887506
## 15:DMSO-15:AB NA NA NA NA
## 20:DMSO-15:AB 3.000853e+01 -50.124361 110.141411 0.9887506
## 30:DMSO-15:AB 3.000853e+01 -50.124361 110.141411 0.9887506
## 5:scrAB-15:AB 6.792835e+01 20.039793 115.816911 0.0005732
## 10:scrAB-15:AB 2.427980e+01 -18.553032 67.112627 0.7721315
## 15:scrAB-15:AB 1.551577e+01 -27.317058 58.348601 0.9917224
## 20:scrAB-15:AB -9.124963e+00 -51.957793 33.707866 0.9999751
## 30:scrAB-15:AB -1.566343e+01 -60.586883 29.260018 0.9942394
## 30:AB-20:AB 1.098270e+01 -31.850124 53.815534 0.9997778
## 5:DMSO-20:AB 4.569170e+01 -34.441186 125.824586 0.7650622
## 10:DMSO-20:AB 4.569170e+01 -34.441186 125.824586 0.7650622
## 15:DMSO-20:AB NA NA NA NA
## 20:DMSO-20:AB 4.569170e+01 -34.441186 125.824586 0.7650622
## 30:DMSO-20:AB 4.569170e+01 -34.441186 125.824586 0.7650622
## 5:scrAB-20:AB 8.361153e+01 35.722967 131.500085 0.0000110
## 10:scrAB-20:AB 3.996297e+01 -2.869858 82.795801 0.0905662
## 15:scrAB-20:AB 3.119895e+01 -11.633883 74.031775 0.3923877
## 20:scrAB-20:AB 6.558211e+00 -36.274618 49.391040 0.9999996
## 30:scrAB-20:AB 1.974193e-02 -44.903708 44.943192 1.0000000
## 5:DMSO-30:AB 3.470899e+01 -45.423891 114.841881 0.9612192
## 10:DMSO-30:AB 3.470899e+01 -45.423891 114.841881 0.9612192
## 15:DMSO-30:AB NA NA NA NA
## 20:DMSO-30:AB 3.470899e+01 -45.423891 114.841881 0.9612192
## 30:DMSO-30:AB 3.470899e+01 -45.423891 114.841881 0.9612192
## 5:scrAB-30:AB 7.262882e+01 24.740262 120.517380 0.0001792
## 10:scrAB-30:AB 2.898027e+01 -13.852562 71.813096 0.5132274
## 15:scrAB-30:AB 2.021624e+01 -22.616588 63.049070 0.9262673
## 20:scrAB-30:AB -4.424494e+00 -47.257323 38.408336 1.0000000
## 30:scrAB-30:AB -1.096296e+01 -55.886413 33.960487 0.9998744
## 10:DMSO-5:DMSO -1.421085e-14 -104.918576 104.918576 1.0000000
## 15:DMSO-5:DMSO NA NA NA NA
## 20:DMSO-5:DMSO 0.000000e+00 -104.918576 104.918576 1.0000000
## 30:DMSO-5:DMSO -2.842171e-14 -104.918576 104.918576 1.0000000
## 5:scrAB-5:DMSO 3.791983e+01 -45.025591 120.865244 0.9414495
## 10:scrAB-5:DMSO -5.728728e+00 -85.861614 74.404158 1.0000000
## 15:scrAB-5:DMSO -1.449275e+01 -94.625640 65.640132 0.9999967
## 20:scrAB-5:DMSO -3.913349e+01 -119.266375 40.999398 0.9066657
## 30:scrAB-5:DMSO -4.567196e+01 -126.941537 35.597622 0.7822460
## 15:DMSO-10:DMSO NA NA NA NA
## 20:DMSO-10:DMSO 1.421085e-14 -104.918576 104.918576 1.0000000
## 30:DMSO-10:DMSO -1.421085e-14 -104.918576 104.918576 1.0000000
## 5:scrAB-10:DMSO 3.791983e+01 -45.025591 120.865244 0.9414495
## 10:scrAB-10:DMSO -5.728728e+00 -85.861614 74.404158 1.0000000
## 15:scrAB-10:DMSO -1.449275e+01 -94.625640 65.640132 0.9999967
## 20:scrAB-10:DMSO -3.913349e+01 -119.266375 40.999398 0.9066657
## 30:scrAB-10:DMSO -4.567196e+01 -126.941537 35.597622 0.7822460
## 20:DMSO-15:DMSO NA NA NA NA
## 30:DMSO-15:DMSO NA NA NA NA
## 5:scrAB-15:DMSO NA NA NA NA
## 10:scrAB-15:DMSO NA NA NA NA
## 15:scrAB-15:DMSO NA NA NA NA
## 20:scrAB-15:DMSO NA NA NA NA
## 30:scrAB-15:DMSO NA NA NA NA
## 30:DMSO-20:DMSO -2.842171e-14 -104.918576 104.918576 1.0000000
## 5:scrAB-20:DMSO 3.791983e+01 -45.025591 120.865244 0.9414495
## 10:scrAB-20:DMSO -5.728728e+00 -85.861614 74.404158 1.0000000
## 15:scrAB-20:DMSO -1.449275e+01 -94.625640 65.640132 0.9999967
## 20:scrAB-20:DMSO -3.913349e+01 -119.266375 40.999398 0.9066657
## 30:scrAB-20:DMSO -4.567196e+01 -126.941537 35.597622 0.7822460
## 5:scrAB-30:DMSO 3.791983e+01 -45.025591 120.865244 0.9414495
## 10:scrAB-30:DMSO -5.728728e+00 -85.861614 74.404158 1.0000000
## 15:scrAB-30:DMSO -1.449275e+01 -94.625640 65.640132 0.9999967
## 20:scrAB-30:DMSO -3.913349e+01 -119.266375 40.999398 0.9066657
## 30:scrAB-30:DMSO -4.567196e+01 -126.941537 35.597622 0.7822460
## 10:scrAB-5:scrAB -4.364855e+01 -91.537114 4.240004 0.1084899
## 15:scrAB-5:scrAB -5.241258e+01 -100.301139 -4.524021 0.0201307
## 20:scrAB-5:scrAB -7.705332e+01 -124.941874 -29.164756 0.0000588
## 30:scrAB-5:scrAB -8.359178e+01 -133.359035 -33.824534 0.0000248
## 15:scrAB-10:scrAB -8.764026e+00 -51.596855 34.068804 0.9999848
## 20:scrAB-10:scrAB -3.340476e+01 -76.237590 9.428069 0.2873039
## 30:scrAB-10:scrAB -3.994323e+01 -84.866680 4.980221 0.1300616
## 20:scrAB-15:scrAB -2.464073e+01 -67.473564 18.192094 0.7541757
## 30:scrAB-15:scrAB -3.117920e+01 -76.102654 13.744246 0.4712863
## 30:scrAB-20:scrAB -6.538469e+00 -51.461920 38.384981 0.9999998
res.aov2 <- aov(viability ~ dose * treatment, data = IL6)
summary(res.aov2)
## Df Sum Sq Mean Sq F value Pr(>F)
## dose 3 24087 8029 1.480 0.250
## treatment 1 6718 6718 1.238 0.279
## dose:treatment 3 4014 1338 0.247 0.863
## Residuals 20 108535 5427
require("dplyr")
group_by(IL6, treatment, dose) %>%
summarise(
count = n(),
mean = mean(viability, na.rm = TRUE),
sd = sd(viability, na.rm = TRUE)
)
## `summarise()` has grouped output by 'treatment'. You can override using the
## `.groups` argument.
## # A tibble: 8 × 5
## # Groups: treatment [2]
## treatment dose count mean sd
## <fct> <fct> <int> <dbl> <dbl>
## 1 controls 5 1 100 NA
## 2 controls 10 1 100 NA
## 3 controls 20 1 100 NA
## 4 controls 30 1 100 NA
## 5 IL6 5 6 119. 32.0
## 6 IL6 10 6 117. 15.6
## 7 IL6 20 6 139. 24.6
## 8 IL6 30 6 202. 141.
TukeyHSD(res.aov2)
## Tukey multiple comparisons of means
## 95% family-wise confidence level
##
## Fit: aov(formula = viability ~ dose * treatment, data = IL6)
##
## $dose
## diff lwr upr p adj
## 10-5 -1.008403 -111.22038 109.2036 0.9999937
## 20-5 17.815126 -92.39685 128.0271 0.9683826
## 30-5 71.092437 -39.11953 181.3044 0.2999863
## 20-10 18.823529 -91.38844 129.0355 0.9630741
## 30-10 72.100840 -38.11113 182.3128 0.2886448
## 30-20 53.277311 -56.93466 163.4893 0.5416743
##
## $treatment
## diff lwr upr p adj
## IL6-controls 44.26471 -38.72417 127.2536 0.2790694
##
## $`dose:treatment`
## diff lwr upr p adj
## 10:controls-5:controls 5.684342e-14 -351.21105 351.2111 1.0000000
## 20:controls-5:controls 4.263256e-14 -351.21105 351.2111 1.0000000
## 30:controls-5:controls 5.684342e-14 -351.21105 351.2111 1.0000000
## 5:IL6-5:controls 1.862745e+01 -249.61442 286.8693 0.9999972
## 10:IL6-5:controls 1.745098e+01 -250.79089 285.6929 0.9999982
## 20:IL6-5:controls 3.941176e+01 -228.83011 307.6536 0.9995571
## 30:IL6-5:controls 1.015686e+02 -166.67325 369.8105 0.8971621
## 20:controls-10:controls -1.421085e-14 -351.21105 351.2111 1.0000000
## 30:controls-10:controls 0.000000e+00 -351.21105 351.2111 1.0000000
## 5:IL6-10:controls 1.862745e+01 -249.61442 286.8693 0.9999972
## 10:IL6-10:controls 1.745098e+01 -250.79089 285.6929 0.9999982
## 20:IL6-10:controls 3.941176e+01 -228.83011 307.6536 0.9995571
## 30:IL6-10:controls 1.015686e+02 -166.67325 369.8105 0.8971621
## 30:controls-20:controls 1.421085e-14 -351.21105 351.2111 1.0000000
## 5:IL6-20:controls 1.862745e+01 -249.61442 286.8693 0.9999972
## 10:IL6-20:controls 1.745098e+01 -250.79089 285.6929 0.9999982
## 20:IL6-20:controls 3.941176e+01 -228.83011 307.6536 0.9995571
## 30:IL6-20:controls 1.015686e+02 -166.67325 369.8105 0.8971621
## 5:IL6-30:controls 1.862745e+01 -249.61442 286.8693 0.9999972
## 10:IL6-30:controls 1.745098e+01 -250.79089 285.6929 0.9999982
## 20:IL6-30:controls 3.941176e+01 -228.83011 307.6536 0.9995571
## 30:IL6-30:controls 1.015686e+02 -166.67325 369.8105 0.8971621
## 10:IL6-5:IL6 -1.176471e+00 -144.55778 142.2048 1.0000000
## 20:IL6-5:IL6 2.078431e+01 -122.59700 164.1656 0.9995945
## 30:IL6-5:IL6 8.294118e+01 -60.44014 226.3225 0.5356110
## 20:IL6-10:IL6 2.196078e+01 -121.42053 165.3421 0.9994193
## 30:IL6-10:IL6 8.411765e+01 -59.26367 227.4990 0.5189503
## 30:IL6-20:IL6 6.215686e+01 -81.22445 205.5382 0.8180596
plot(res.aov2,1)
### delete outliers
IL6_outlier <- IL6[-c(24, 21, 19),]
res.aov2 <- aov(viability ~ dose * treatment, data = IL6_outlier)
summary(res.aov2)
## Df Sum Sq Mean Sq F value Pr(>F)
## dose 3 8080 2693 4.063 0.0240 *
## treatment 1 5111 5111 7.711 0.0129 *
## dose:treatment 3 2514 838 1.264 0.3181
## Residuals 17 11269 663
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
require("dplyr")
group_by(IL6_outlier, treatment, dose) %>%
summarise(
count = n(),
mean = mean(viability, na.rm = TRUE),
sd = sd(viability, na.rm = TRUE)
)
## `summarise()` has grouped output by 'treatment'. You can override using the
## `.groups` argument.
## # A tibble: 8 × 5
## # Groups: treatment [2]
## treatment dose count mean sd
## <fct> <fct> <int> <dbl> <dbl>
## 1 controls 5 1 100 NA
## 2 controls 10 1 100 NA
## 3 controls 20 1 100 NA
## 4 controls 30 1 100 NA
## 5 IL6 5 6 119. 32.0
## 6 IL6 10 6 117. 15.6
## 7 IL6 20 6 139. 24.6
## 8 IL6 30 3 187. 30.8
TukeyHSD(res.aov2)
## Tukey multiple comparisons of means
## 95% family-wise confidence level
##
## Fit: aov(formula = viability ~ dose * treatment, data = IL6_outlier)
##
## $dose
## diff lwr upr p adj
## 10-5 -1.008403 -40.127886 38.11108 0.9998529
## 20-5 17.815126 -21.304357 56.93461 0.5785472
## 30-5 49.621849 3.750189 95.49351 0.0315415
## 20-10 18.823529 -20.295953 57.94301 0.5350705
## 30-10 50.630252 4.758593 96.50191 0.0278093
## 30-20 31.806723 -14.064937 77.67838 0.2372203
##
## $treatment
## diff lwr upr p adj
## IL6-controls 38.77801 9.143855 68.41217 0.0133615
##
## $`dose:treatment`
## diff lwr upr p adj
## 10:controls-5:controls 1.421085e-14 -125.076875 125.07688 1.0000000
## 20:controls-5:controls -2.842171e-14 -125.076875 125.07688 1.0000000
## 30:controls-5:controls -4.263256e-14 -125.076875 125.07688 1.0000000
## 5:IL6-5:controls 1.862745e+01 -76.901591 114.15649 0.9968259
## 10:IL6-5:controls 1.745098e+01 -78.078061 112.98002 0.9978815
## 20:IL6-5:controls 3.941176e+01 -56.117277 134.94081 0.8375315
## 30:IL6-5:controls 8.745098e+01 -14.673861 189.57582 0.1245512
## 20:controls-10:controls -4.263256e-14 -125.076875 125.07688 1.0000000
## 30:controls-10:controls -5.684342e-14 -125.076875 125.07688 1.0000000
## 5:IL6-10:controls 1.862745e+01 -76.901591 114.15649 0.9968259
## 10:IL6-10:controls 1.745098e+01 -78.078061 112.98002 0.9978815
## 20:IL6-10:controls 3.941176e+01 -56.117277 134.94081 0.8375315
## 30:IL6-10:controls 8.745098e+01 -14.673861 189.57582 0.1245512
## 30:controls-20:controls -1.421085e-14 -125.076875 125.07688 1.0000000
## 5:IL6-20:controls 1.862745e+01 -76.901591 114.15649 0.9968259
## 10:IL6-20:controls 1.745098e+01 -78.078061 112.98002 0.9978815
## 20:IL6-20:controls 3.941176e+01 -56.117277 134.94081 0.8375315
## 30:IL6-20:controls 8.745098e+01 -14.673861 189.57582 0.1245512
## 5:IL6-30:controls 1.862745e+01 -76.901591 114.15649 0.9968259
## 10:IL6-30:controls 1.745098e+01 -78.078061 112.98002 0.9978815
## 20:IL6-30:controls 3.941176e+01 -56.117277 134.94081 0.8375315
## 30:IL6-30:controls 8.745098e+01 -14.673861 189.57582 0.1245512
## 10:IL6-5:IL6 -1.176471e+00 -52.238891 49.88595 1.0000000
## 20:IL6-5:IL6 2.078431e+01 -30.278107 71.84673 0.8461318
## 30:IL6-5:IL6 6.882353e+01 6.285092 131.36197 0.0254889
## 20:IL6-10:IL6 2.196078e+01 -29.101636 73.02320 0.8088192
## 30:IL6-10:IL6 7.000000e+01 7.461562 132.53844 0.0224230
## 30:IL6-20:IL6 4.803922e+01 -14.499222 110.57765 0.2080849
library("ggpubr")
## Warning: package 'ggpubr' was built under R version 4.2.3
## Loading required package: ggplot2
## Warning: package 'ggplot2' was built under R version 4.2.3
na.omit(ABgraph)
## # A tibble: 60 × 4
## sample dose treatment viability
## <dbl> <fct> <fct> <dbl>
## 1 1 5 AB 116.
## 2 2 5 AB 106.
## 3 3 5 AB 69.7
## 4 4 5 AB 105.
## 5 5 5 AB 78.8
## 6 6 5 AB 86.6
## 7 7 10 AB 68.3
## 8 8 10 AB 74.4
## 9 9 10 AB 37.0
## 10 10 10 AB 66.3
## # ℹ 50 more rows
ggline(ABgraph, x = "dose", y = "viability", color = "treatment",
add = c("mean_se", "dotplot"),
palette = c("skyblue", "lightsalmon", "blue"))+
ggtitle("Cell viability at different doses of Aβ1-42 and scrAβ1-42")+
theme(legend.position="right")+
xlab("Dose (µM)") +
ylab("Viability (%)")+
annotate("text", x=2, y=215, label="*", size=5, colour="lightsalmon") +
geom_segment(aes(x=1,y=213, xend=3, yend=213), colour="lightsalmon")+
annotate("text", x=2.5, y=235, label="***", size=5, colour="lightsalmon") +
geom_segment(aes(x=1,y=233, xend=4, yend=233), colour="lightsalmon")+
annotate("text", x=3, y=255, label="***", size=5, colour="lightsalmon") +
geom_segment(aes(x=1,y=253, xend=5, yend=253), colour="lightsalmon")
## Bin width defaults to 1/30 of the range of the data. Pick better value with
## `binwidth`.
library("ggpubr")
na.omit(IL6graph)
## # A tibble: 24 × 4
## sample dose treatment viability
## <dbl> <fct> <fct> <dbl>
## 1 1 5 IL6 106.
## 2 2 5 IL6 113.
## 3 3 5 IL6 68.2
## 4 4 5 IL6 119.
## 5 5 5 IL6 158.
## 6 6 5 IL6 148.
## 7 7 10 IL6 107.
## 8 8 10 IL6 119.
## 9 9 10 IL6 122.
## 10 10 10 IL6 138.
## # ℹ 14 more rows
ggline(IL6graph, x = "dose", y = "viability", color = "treatment",
add = c("mean_se", "dotplot"),
palette = c("skyblue", "lightsalmon", "blue"))+
ggtitle("Cell viability at different doses of IL-6 after 24h treatment")+
theme(legend.position="right")+
xlab("Dose (ng/mL)") +
ylab("Viability (%)")+
annotate("text", x=2.5, y=300, label="*", size=5, colour="skyblue") +
geom_segment(aes(x=1,y=298, xend=4, yend=298), colour="skyblue")+
annotate("text", x=2.5, y=320, label="*", size=5, colour="skyblue") +
geom_segment(aes(x=2,y=318, xend=4, yend=318), colour="skyblue")
## Bin width defaults to 1/30 of the range of the data. Pick better value with
## `binwidth`.