-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathui.R
138 lines (135 loc) · 6.58 KB
/
ui.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
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
ui <- fluidPage(
headerPanel("Cellular Spatial Point Patterns Analysis"),
sidebarLayout(
sidebarPanel(
p("R Shiny App for analysis and visualizing cellular spatial point patterns."),
fileInput(inputId="datafile",
label=tags$span(style="color: royalblue;","Upload data"), #label="Upload data",
multiple=FALSE,
placeholder="No file selected",
accept="csv"
),
hr(style = "border-top: 1px solid #000000;"),
selectInput(inputId="analysis",
label=tags$span(style="color: royalblue;","Analysis"), #label="Analysis",
choices=c("initial_visualization", "3D_plots", "density_test_plots", "classification_plot"),
width=200
),
conditionalPanel(condition="input.analysis == 'initial_visualization'",
selectInput(inputId="plt1",
label=tags$span(style="color: royalblue;","Plot"), #"Plot",
choices=c("hexagonal_heatmap", "scatter_plot", "polygon", "density_contour"),
width=200
),
selectInput(inputId="var11",
label=tags$span(style="color: royalblue;","Marker"), #"Marker",
choices=c("Aldh1l1", "Gfap", "Colocalization"),
width=200
),
selectInput(inputId="var21",
label=tags$span(style="color: royalblue;","Diet"), #"Diet",
choices=c("Chow", "HFHS 5 days", "HFHS 15 days"),
width=200
),
hr(),
actionButton(inputId="update",
label="Run Analysis",
width=130,
hight=5
)
),
conditionalPanel(condition="input.analysis == 'density_test_plots'",
selectInput(inputId="plt",
label=tags$span(style="color: royalblue;","Plot"), #"Plot",
choices=c("square_plot", "density_plot", "test_plot"),
width=200
),
selectInput(inputId="var1",
label=tags$span(style="color: royalblue;","Marker"), #"Marker",
choices=c("Aldh1l1", "Gfap", "Colocalization"),
width=200
),
selectInput(inputId="var2",
label=tags$span(style="color: royalblue;","Diet"), #"Diet",
choices=c("Chow", "HFHS 5 days", "HFHS 15 days"),
width=200
),
selectInput(inputId="var3",
label=tags$span(style="color: royalblue;","Compare to"), #"Compare to",
choices=c("none", "Chow", "HFHS 5 days", "HFHS 15 days"),
width=200
),
numericInput(inputId="num_sqr_x",
label=tags$span(style="color: royalblue;","Plot"), #"Nr. of squares",
value=10, min=1,
max=20,
width=100
),
checkboxInput(inputId="contours",
label="Display contours",
value=FALSE
),
checkboxInput(inputId="ribbon",
label="Display a color bar",
value=FALSE
),
hr(),
actionButton(inputId="update",
label="Run Analysis",
width=130,
hight=5
)
),
conditionalPanel(condition="input.analysis == '3D_plots'",
selectInput(inputId="plt2",
label=tags$span(style="color: royalblue;","Plot"), #"Plot",
choices=c("3D_dens", "3D_scatter", "3D_dens_interactive"),
width=200
),
selectInput(inputId="var12",
label=tags$span(style="color: royalblue;","Marker"), #"Marker",
choices=c("Aldh1l1", "Gfap", "Colocalization"),
width=200
),
selectInput(inputId="var22",
label=tags$span(style="color: royalblue;","Diet"), #"Diet",
choices=c("Chow", "HFHS 5 days", "HFHS 15 days"),
width=200
),
hr(),
actionButton(inputId="update",
label="Run Analysis"
)
),
conditionalPanel(condition="input.analysis == 'classification_plot'",
selectInput(inputId="plt3",
label=tags$span(style="color: royalblue;","Plot"), #"Plot",
choices=c("random_forest", "knn_network"),
width=200
),
selectInput(inputId="var23",
label=tags$span(style="color: royalblue;","Diet"), #"Diet",
choices=c("Chow", "HFHS 5 days", "HFHS 15 days"),
width=200
),
hr(),
actionButton(inputId="update",
label="Run Analysis"
)
),
br(),
hr(style="border-top: 1px solid #000000;"),
downloadButton(
outputId="download_epicurve",
label="Download plot"
)
),
mainPanel(
h3("Figure", align="center"),
plotOutput(outputId="plot",
height="700px",
width="700px"
)
)
)
)