-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path03d-bootstrapped-p-summary.R
76 lines (62 loc) · 2.04 KB
/
03d-bootstrapped-p-summary.R
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
## Henry Linder 2020 [email protected]
library(magrittr)
library(dplyr)
innames <- load("bootstrapped-p.Rdata")
p <- list()
for (cancer in names(all.p)) {
p[[cancer]] <- rbind("Observed p-value"=all.p[[cancer]],
"95%"=all.bs.p[[cancer]])
}
lapply(p, function(pp) pp < .05)
## $BLCA
## miEMC miE EMC E
## Observed p-value TRUE TRUE TRUE FALSE
## 5% TRUE TRUE TRUE TRUE
## 95% TRUE TRUE FALSE FALSE
## $BRCA
## miEMC miE EMC E
## Observed p-value TRUE TRUE FALSE TRUE
## 5% TRUE TRUE TRUE TRUE
## 95% TRUE TRUE FALSE TRUE
## $HNSC
## miEMC miE EMC E
## Observed p-value TRUE TRUE FALSE FALSE
## 5% TRUE TRUE TRUE FALSE
## 95% TRUE TRUE FALSE FALSE
## $KIRC
## miEMC miE EMC E
## Observed p-value TRUE TRUE TRUE TRUE
## 5% TRUE TRUE TRUE TRUE
## 95% TRUE TRUE TRUE TRUE
## $KIRP
## miEMC miE EMC E
## Observed p-value TRUE TRUE TRUE TRUE
## 5% TRUE TRUE TRUE TRUE
## 95% TRUE TRUE TRUE TRUE
## $LIHC
## miEMC miE EMC E
## Observed p-value TRUE TRUE TRUE TRUE
## 5% TRUE TRUE TRUE TRUE
## 95% TRUE TRUE FALSE TRUE
## $THCA
## miEMC miE EMC E
## Observed p-value TRUE TRUE TRUE FALSE
## 5% TRUE TRUE TRUE TRUE
## 95% TRUE TRUE FALSE FALSE
do.call(rbind, lapply(p, function(pp) {
apply(pp < .05, 2, function(x) {
if (x["Observed p-value"]) {
length(unique(x[c("Observed p-value", "95%")])) == 1
} else {
length(unique(x[c("Observed p-value", "5%")])) == 1
}
})
}))
## miEMC miE EMC E
## BLCA TRUE TRUE FALSE FALSE
## BRCA TRUE TRUE FALSE TRUE
## HNSC TRUE TRUE FALSE TRUE
## KIRC TRUE TRUE TRUE TRUE
## KIRP TRUE TRUE TRUE TRUE
## LIHC TRUE TRUE FALSE TRUE
## THCA TRUE TRUE FALSE FALSE