-
Notifications
You must be signed in to change notification settings - Fork 0
/
LDH_analysis.Rmd
149 lines (125 loc) · 6.46 KB
/
LDH_analysis.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
---
title: "LDH_analysis"
author: "ERM"
date: "`r Sys.Date()`"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## R Markdown
```{r setup}
knitr::opts_chunk$set(warning = FALSE, message = FALSE)
library(readxl)
library(ggpubr)
library(rstatix)
library(tidyverse)
library(zoo)
```
## Including Plots
```{r ldh input, echo=FALSE}
norm_LDH <- read.csv("data/norm_LDH.csv")
norm_LDH <- norm_LDH[,-1]##get rid of line numbers
norm_LDH$Drug <- factor(norm_LDH$Drug, levels = c( "Daunorubicin", "Doxorubicin", "Epirubicin", "Mitoxantrone", "Trastuzumab","Control"))
ggplot(norm_LDH, aes(x = as.factor(Conc), y = norm_val, group = Conc)) +
geom_boxplot(aes(fill = as.factor(Conc))) +
#geom_point(aes(color= indv))+
# stat_compare_means(method="t.test", ref.group=6, label="p",angle = 75,hide.ns = TRUE, label.y=c(4.5),label.x= c(1.5,2.5,3.5,4.5,5.5,6.5,7.5),aes(angle=90))+
scale_fill_manual(values = c("#F3BABD","#EAA2A5","#E28A8E",
"#DA7277","#CF5157","#C43138","#982124","#6B1210" ),
aesthetics = c("Conc", "fill")) +
guides(fill = "none") +
geom_hline(yintercept = 1,lty =3) +
theme_bw() +
xlab(expression(paste("Drug [", mu, "M]"
))) +
ylab("Relative LDH release") +
labs(fill = "Individual") +
facet_wrap("Drug",) +
ylim(0, 5)+
theme(strip.background = element_rect(fill = "transparent")) +
theme(
axis.title = element_text(size = 15, color = "black"),
axis.ticks = element_line(size = 1.5),
axis.text = element_text(size = 9, color = "black", angle = 20),
strip.text.x = element_text(size = 15, color = "black", face = "bold"))
```
```{r ldh 24h results, echo=FALSE, message=FALSE, warning=FALSE}
ldh24means <- data.frame('',nrow=6)
DA_24_ldh <- matrix(c(1.188,1.222,1.195,1.030,1.074,1.064,1.298,1.282,1.262,
1.901,1.975,1.970,3.131,3.246,3.080,1.339,1.438,1.367),
ncol =3, nrow =6, byrow =TRUE,
dimnames=list(c('87_0.5','79_0.5','75_0.5','77_0.5','78_0.5','71_0.5')))
ldh24means$Daunorubicin <- rollmean(t(DA_24_ldh),3)
DX_24_ldh <-matrix(c(0.981,0.974,0.978,1.253,1.233,1.292,2.098,2.153,
2.114,2.214,2.244,2.239,3.808,3.825,3.735,1.037,1.030,1.030),
ncol =3, nrow =6, byrow =TRUE,
dimnames=list(c('87_0.5','79_0.5','75_0.5','77_0.5','78_0.5','71_0.5')))
ldh24means$Doxorubicin <- rollmean(t(DX_24_ldh),3)
EP_24_ldh <- matrix(c(1.504,1.320,1.469,1.536,1.301,1.531,1.562,1.541,1.558,
3.414,3.103,3.236,3.588,3.398,3.611,1.013,0.958,0.991),
ncol =3, nrow =6, byrow =TRUE,
dimnames=list(c('87_0.5','79_0.5','75_0.5','77_0.5','78_0.5','71_0.5')))
ldh24means$Epirubicin <- rollmean(t(EP_24_ldh),3)
MT_24_ldh <- matrix(c(1.508,1.467,1.391,1.493,1.468,1.483,2.010,1.820,1.911,
3.089,2.936,2.921,3.623,3.377,3.560,1.222,1.211,1.215),
ncol =3, nrow =6, byrow =TRUE,
dimnames=list(c('87_0.5','79_0.5','75_0.5','77_0.5','78_0.5','71_0.5')))
ldh24means$Mitoxantrone <- rollmean(t(MT_24_ldh),3)
TR_24_ldh<- matrix(c(0.941,0.891,0.953,0.743,0.774,0.812,1.514,1.225,1.252,
2.391,1.989,2.172,3.040,2.622,2.613,0.970,0.917,0.895),
ncol =3, nrow =6, byrow =TRUE,
dimnames=list(c('87_0.5','79_0.5','75_0.5','77_0.5','78_0.5','71_0.5')))
ldh24means$Trastuzumab <- rollmean(t(TR_24_ldh),3)
VE_24_ldh<- matrix(c(1.000,1.000,0.977,1.000,1.100,1.096,1.000,0.938,0.951,
1.000,1.027,1.038,1.000,1.058,1.062,1.000,1.011,0.975),
ncol =3, nrow =6, byrow =TRUE,
dimnames=list(c('87_0.5','79_0.5','75_0.5','77_0.5','78_0.5','71_0.5')))
ldh24means$Vehicle <- rollmean(t(VE_24_ldh),3)
LDH24hstat <- list('VDA'=t.test(VE_24_ldh,DA_24_ldh),
'VDX'=t.test(VE_24_ldh,DX_24_ldh),
'VEP'=t.test(VE_24_ldh,EP_24_ldh),
'VMT'=t.test(VE_24_ldh,MT_24_ldh),
'VTR'=t.test(VE_24_ldh,TR_24_ldh),
'VVEH'=t.test(VE_24_ldh,VE_24_ldh))
LDH24hstat
```
```{r TNNI using relative to vehicle information}
DA_24_TNNI <- matrix(c(0.790,0.783,1.855,1.693,1.009,1.071,0.736,0.771,
1.035,1.202,1.228,1.151),
ncol =2, nrow =6, byrow =TRUE,
dimnames=list(c('87_0.5','71_0.5','75_0.5','77_0.5','78_0.5','79_0.5')))
DX_24_TNNI <-matrix(c(1.006,1.006,1.295,1.179,1.464,1.493,1.319,1.236,
1.231,1.221,1.342,1.296),
ncol =2, nrow =6, byrow =TRUE,
dimnames=list(c('87_0.5','71_0.5','75_0.5','77_0.5','78_0.5','79_0.5')))
EP_24_TNNI <- matrix(c(0.955,0.822,1.220,1.092,1.459,1.425,1.076,1.222,
1.018,1.269,1.262,1.331),
ncol =2, nrow =6, byrow =TRUE,
dimnames=list(c('87_0.5','71_0.5','75_0.5','77_0.5','78_0.5','79_0.5')))
MT_24_TNNI <- matrix(c(1.529,1.682,1.205,1.138,1.436,1.521,1.694,
1.778,1.115,1.231,1.006,0.957),
ncol =2, nrow =6, byrow =TRUE,
dimnames=list(c('87_0.5','71_0.5','75_0.5','77_0.5','78_0.5','79_0.5')))
TR_24_TNNI<- matrix(c(2.089,1.911,1.245,0.968,1.180,1.168,1.118,
1.014,1.496,1.433,1.388,1.235),
ncol =2, nrow =6, byrow =TRUE,
dimnames=list(c('87_0.5','71_0.5','75_0.5','77_0.5','78_0.5','79_0.5')))
VE_24_TNNI<- matrix(c(1.000,0.783,1.000,1.000,0.917,1.031,1.000,
0.958,1.000,1.000,1.087,1.106),
ncol =3, nrow =6, byrow =TRUE,
dimnames=list(c('87_0.5','71_0.5','75_0.5','77_0.5','78_0.5','79_0.5')))
tnni24hstat <- list('VDAT'=t.test(VE_24_TNNI,DA_24_TNNI),
'VDXT'=t.test(VE_24_TNNI,DX_24_TNNI),
'VEPT'=t.test(VE_24_TNNI,EP_24_TNNI),
'VMTT'=t.test(VE_24_TNNI,MT_24_TNNI),
'VTRT'=t.test(VE_24_TNNI,TR_24_TNNI),
'VVEHT'=t.test(VE_24_TNNI,VE_24_TNNI))
tnni24hstat
library(Biobase)
apple.pv <- t(as.data.frame(subListExtract(tnni24hstat,'p.value')))##this pulls out a specific thing and puts into datafram as a vector for later manipulation (think pvalue or mean)
# lapply(apple, function(x)
# sapply(1:length(x),
# function(y)do.call("[[",list(x,y))))
colnames(apple.pv) <- 'p.value'
```