Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bagueneau Mathias
Shiny SChnurR
Commits
0187367c
Commit
0187367c
authored
May 27, 2019
by
Bagueneau Mathias
Browse files
- Texte indiquant si les données doivent être recalculées ou non
parent
62861858
Changes
1
Hide whitespace changes
Inline
Side-by-side
app.R
View file @
0187367c
...
...
@@ -74,6 +74,7 @@ sidebar <- dashboardSidebar(
uiOutput
(
"group"
),
br
(),
radioButtons
(
"gographtype"
,
label
=
"Choose a graph type :"
,
choices
=
c
(
"Dotplot"
=
"dplot"
,
"Barplot"
=
"bplot"
,
"Emapplot"
=
"eplot"
)),
br
(),
radioButtons
(
"ontology"
,
label
=
"Choose an ontology :"
,
choices
=
c
(
"Biological Process"
=
"BP"
,
"Molecular Function"
=
"MF"
,
"Cellular Component"
=
"CC"
)),
br
(),
textOutput
(
"genesstatut"
),
actionButton
(
"gogo"
,
icon
=
icon
(
"far fa-arrow-alt-circle-right"
),
label
=
"Do Gene Ontology"
)
)
)
...
...
@@ -107,7 +108,8 @@ sidebar <- dashboardSidebar(
conditionalPanel
(
condition
=
"input.choice_compare == 'f_compare'"
,
checkboxInput
(
inputId
=
"show_clusters_compare"
,
label
=
"Clusters information"
,
value
=
FALSE
)
),
radioButtons
(
"ontology2"
,
label
=
"Choose an ontology :"
,
choices
=
c
(
"Biological Process"
=
"BP"
,
"Molecular Function"
=
"MF"
,
"Cellular Component"
=
"CC"
))
radioButtons
(
"ontology2"
,
label
=
"Choose an ontology :"
,
choices
=
c
(
"Biological Process"
=
"BP"
,
"Molecular Function"
=
"MF"
,
"Cellular Component"
=
"CC"
)),
textOutput
(
"comparestatut"
)
)
)
)
...
...
@@ -122,6 +124,7 @@ sidebar <- dashboardSidebar(
conditionalPanel
(
condition
=
"output.fileUploaded"
,
align
=
"center"
,
uiOutput
(
"fchoice3"
),
br
(),
uiOutput
(
"heat_numb"
),
br
(),
textOutput
(
"heatmapstatut"
),
actionButton
(
"goheatmap"
,
icon
=
icon
(
"far fa-arrow-alt-circle-right"
),
label
=
"Do Heatmap"
)
)
)
...
...
@@ -424,9 +427,11 @@ server <- function(input, output, session) {
output
$
heat_numb
<-
renderUI
({
sliderInput
(
"top_number"
,
label
=
"Choose the number of top genes :"
,
min
=
1
,
max
=
10
,
step
=
1
,
value
=
3
)
})
observeEvent
(
in
put
$
go
heatmap
,
{
observeEvent
({
list
(
input
$
fsel3
,
input
$
top_number
)},
{
out
put
$
heatmap
statut
<-
renderText
({
"Needs recalculation"
})})
observeEvent
(
input
$
goheatmap
,
{
output
$
heatmapstatut
<-
renderText
({
""
})
if
(
is.null
(
wrfile
()
@
misc
$
markers
[[
input
$
fsel3
]]))
{
showModal
(
modalDialog
(
"The markers may have not been calculated for this factor yet."
,
title
=
strong
(
"Warning !"
),
easyClose
=
TRUE
,
footer
=
NULL
))
tempfile
<-
wrfile
()
...
...
@@ -463,12 +468,15 @@ server <- function(input, output, session) {
})
## Genes Page --------
observeEvent
({
list
(
input
$
fsel4
,
input
$
group_genepage
,
input
$
gographtype
,
input
$
ontology
)},
{
output
$
genesstatut
<-
renderText
({
"Needs recalculation"
})})
observeEvent
(
input
$
gogo
,
{
if
(
is.null
(
input
$
group_genepage
))
{
showModal
(
modalDialog
(
"You must choose at least one group to do the Gene Ontology."
,
title
=
strong
(
"Warning !"
),
easyClose
=
TRUE
,
footer
=
NULL
))
}
else
{
output
$
genesstatut
<-
renderText
({
""
})
if
(
is.null
(
wrfile
()
@
misc
$
markers
[[
input
$
fsel4
]]))
{
showModal
(
modalDialog
(
"The markers may have not been calculated for this factor yet."
,
title
=
strong
(
"Warning !"
),
easyClose
=
TRUE
,
footer
=
NULL
))
tempfile
<-
wrfile
()
...
...
@@ -838,9 +846,12 @@ server <- function(input, output, session) {
)
})
## Compare Page - Graphs generations, outputs and downloads --------
observeEvent
({
list
(
input
$
library1_compare
,
input
$
library2_compare
,
input
$
add_group1
,
input
$
add_group2
,
input
$
fsel2
,
input
$
add_factor
,
input
$
graph_compare
,
input
$
ptsize_compare
,
input
$
choice_compare
,
input
$
featuresel2
,
input
$
nsel2
,
input
$
genes2
,
input
$
ontology2
,
input
$
top1
,
input
$
top2
)},
{
output
$
comparestatut
<-
renderText
({
"Needs recalculation"
})})
observeEvent
(
input
$
gographs
,
{
output
$
comparestatut
<-
renderText
({
""
})
# Data for Compare Left Graph
if
(
input
$
add
%%
2
!=
0
)
{
subset1
<-
SubsetData
(
object
=
wrfile
(),
cells
=
rownames
(
wrfile
()
@
meta.data
)[
which
(
eval
(
parse
(
text
=
paste0
(
"wrfile()@meta.data$"
,
input
$
fsel2
)))
%in%
input
$
library1_compare
)]
)
...
...
@@ -850,7 +861,6 @@ server <- function(input, output, session) {
}
# Left Graph Compare page
scalex1
<-
scale_x_continuous
(
limits
=
c
(
min
(
wrfile
()
@
reductions
[[
input
$
graph_compare
]]
@
cell.embeddings
[,
1
]),
max
(
wrfile
()
@
reductions
[[
input
$
graph_compare
]]
@
cell.embeddings
[,
1
])))
scaley1
<-
scale_y_continuous
(
limits
=
c
(
min
(
wrfile
()
@
reductions
[[
input
$
graph_compare
]]
@
cell.embeddings
[,
2
]),
max
(
wrfile
()
@
reductions
[[
input
$
graph_compare
]]
@
cell.embeddings
[,
2
])))
...
...
@@ -871,8 +881,7 @@ server <- function(input, output, session) {
}
}
# Data for Compare Right Graph
if
(
input
$
add
%%
2
!=
0
)
{
subset2
<-
SubsetData
(
object
=
wrfile
(),
cells
=
rownames
(
wrfile
()
@
meta.data
)[
which
(
eval
(
parse
(
text
=
paste0
(
"wrfile()@meta.data$"
,
input
$
fsel2
)))
%in%
input
$
library2_compare
)]
)
...
...
@@ -902,10 +911,6 @@ server <- function(input, output, session) {
}
}
output
$
plot1_compare
<-
renderPlotly
({
# Output Graph 1
req
(
wrfile
())
if
(
input
$
choice_compare
==
"features_compare"
)
{
...
...
@@ -924,12 +929,7 @@ server <- function(input, output, session) {
}
})
output
$
dl_compare1
<-
downloadHandler
(
# Download Graph 1
filename
=
function
()
{
if
(
input
$
choice_compare
==
"f_compare"
)
{
...
...
@@ -981,8 +981,6 @@ server <- function(input, output, session) {
return
(
barcodes2
)
})
output
$
dl_comparebarcodes1
<-
downloadHandler
(
# Download Barcodes 1
filename
=
function
()
{
paste0
(
file_path_sans_ext
(
filedata
$
name
),
"_selectedbarcodes.csv"
)
...
...
@@ -1001,18 +999,10 @@ server <- function(input, output, session) {
}
)
})
## Compare Page - FindMarkers --------
output
$
markbutton
<-
renderUI
({
req
(
wrfile
())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment