-
Notifications
You must be signed in to change notification settings - Fork 0
/
6_Upset.R
51 lines (46 loc) · 2.1 KB
/
6_Upset.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
# # # # # # # # # # # # # # # # # # # # # # # # # # #
#
#
# Rafaella Sousa Ferraz <rafaellaferraz.16@hotmail.com>
#
# This script is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# This script is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
# # # # # # # # # # # # # # # # # # # # # # # # # # #
#Packages used in this analysis:
library(UpSetR)
#List of all MRs
lista_crpc <- list("Primary x\nNormal" = row.names(mra_crpc_prim_norm),
"Metastatic x\nPrimary" = row.names(mra_crpc_prim_met),
"Metastatic x\nNormal" = row.names(mra_crpc_norm_met))
#List of MRs from MetPri and MetNorm
names(lista_crpc) <- c("PriNorm", "MetPri", "MetNorm")
lista_met <- lista_crpc[c(2,3)]
lista_met[["MetPri"]] <- lista_met[["MetPri"]][c(2,4,5,6,9,10)]
lista_met[["MetNorm"]] <- lista_met[["MetNorm"]][2:16]
#Upset of all MRs
upset(fromList(lista_crpc), order.by = "freq",
mainbar.y.label = "Intersection Size", sets.x.label = "MRs by Signature",
text.scale = 1.5,
# sets.bar.color = c("turquoise4","dodgerblue2","hotpink3"),
main.bar.color = c("turquoise4","dodgerblue2","hotpink3","sienna3", "gold","red4"),
line.size = 1,
shade.alpha = 0.25)
#Upset of MRs from MetPri and MetNorm
upset(fromList(lista_met), order.by = "freq",
mainbar.y.label = "Intersection Size", sets.x.label = "MRs by Signature",
text.scale = 1.5,
# sets.bar.color = c("turquoise4","#c83153"),
main.bar.color = c("turquoise4","#c83153", "gold"),
line.size = 1,
shade.alpha = 0.25)