Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Amine GHOZLANE
shaman
Commits
207eaa82
Commit
207eaa82
authored
Jul 02, 2021
by
Amine GHOZLANE
Browse files
Let's try to solve upset plots
parent
b8c7ca67
Pipeline
#60460
passed with stages
in 89 minutes and 12 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Rfunctions/CompPlot.R
View file @
207eaa82
...
...
@@ -285,8 +285,10 @@ Plot_UpSet <- function(input,BaseContrast, resDiff, ContrastListDebounce, export
maxRow
=
max
(
apply
(
df
,
2
,
FUN
=
function
(
x
)
length
(
which
(
!
is.na
(
x
)))))
df
=
df
[
1
:
max
(
maxRow
,
1
),]
df
=
df
[,
which
(
apply
(
!
is.na
(
df
),
2
,
any
))]
}}
return
(
list
(
plot
=
plot
,
table
=
df
,
contrasts_without_diff
=
contrasts_without_diff
))
}}
if
(
export
)
res
=
list
(
plot
=
plot
,
table
=
df
,
contrasts_without_diff
=
contrasts_without_diff
)
else
res
=
list
(
table
=
df
,
contrasts_without_diff
=
contrasts_without_diff
)
return
(
res
)
}
...
...
server.R
View file @
207eaa82
...
...
@@ -3425,7 +3425,7 @@ shinyServer(function(input, output,session) {
if
(
filesize
!=
0
)
print
(
Plot_MultipleVenn
(
input
,
BaseContrast
,
ResDiffAnal
(),
ContrastListDebounce
)
$
plot
)
}
if
(
input
$
PlotVisuSelectComp
==
"UpSet"
){
if
(
filesize
!=
0
)
print
(
Plot_UpSet
(
input
,
BaseContrast
,
ResDiffAnal
(),
ContrastListDebounce
)
$
plot
)
if
(
filesize
!=
0
)
print
(
Plot_UpSet
(
input
,
BaseContrast
,
ResDiffAnal
(),
ContrastListDebounce
,
export
=
TRUE
)
$
plot
)
}
if
(
input
$
PlotVisuSelectComp
==
"LogitPlot"
){
if
(
filesize
!=
0
)
print
(
Plot_Comp_Logit
(
input
,
BaseContrast
,
ResDiffAnal
(),
SelectTaxoPlotCompDebounce
,
export
=
TRUE
))
...
...
@@ -3825,7 +3825,7 @@ shinyServer(function(input, output,session) {
if
(
is.na
(
filesize
)){
filesize
=
0
}
if
(
filesize
!=
0
){
BaseContrast
=
read.table
(
namesfile
,
header
=
TRUE
)
if
(
!
is.null
(
resDiff
$
dds
))
withProgress
(
message
=
"Loading..."
,
Plot_UpSet
(
input
,
BaseContrast
,
resDiff
,
ContrastListDebounce
)
$
plot
)
if
(
!
is.null
(
resDiff
$
dds
))
withProgress
(
message
=
"Loading..."
,
Plot_UpSet
(
input
,
BaseContrast
,
resDiff
,
ContrastListDebounce
,
export
=
TRUE
)
$
plot
)
}
})
...
...
ui.R
View file @
207eaa82
...
...
@@ -1392,14 +1392,16 @@ function(request) {
column
(
width
=
6
,
numericInput
(
"widthVisuExportComp"
,
"Width (in px)"
,
min
=
100
,
max
=
NA
,
value
=
800
,
step
=
1
))
),
downloadButton
(
"exportVisuComp"
,
"Export plot"
),
conditionalPanel
(
condition
=
"input.PlotVisuSelectComp=='UpSet'"
,
br
(),
h5
(
strong
(
"Export table"
)),
fluidRow
(
column
(
width
=
7
,
br
(),
downloadButton
(
"exportVisuCompTableUpSet"
,
"Export table"
)),
column
(
width
=
5
,
selectInput
(
"sepTabUpset"
,
h6
(
strong
(
"Separator:"
)),
c
(
"Tab"
=
"\t"
,
"Comma"
=
","
,
"Semicolon"
=
";"
)))))
conditionalPanel
(
condition
=
"input.PlotVisuSelectComp=='UpSet'"
,
br
(),
h5
(
strong
(
"Export table"
)),
fluidRow
(
column
(
width
=
7
,
selectInput
(
"sepTabUpset"
,
h6
(
strong
(
"Separator:"
)),
c
(
"Tab"
=
"\t"
,
"Comma"
=
","
,
"Semicolon"
=
";"
)),
br
(),
downloadButton
(
"exportVisuCompTableUpSet"
,
"Export table"
))
))
)
),
conditionalPanel
(
condition
=
"input.PlotVisuSelectComp=='Venn'"
,
box
(
title
=
"Export table"
,
width
=
NULL
,
status
=
"primary"
,
solidHeader
=
TRUE
,
collapsible
=
TRUE
,
collapsed
=
TRUE
,
fluidRow
(
column
(
width
=
7
,
br
(),
downloadButton
(
"exportVisuCompTableVenn"
,
"Export table"
)),
column
(
width
=
5
,
selectInput
(
"sepTabVenn"
,
h6
(
strong
(
"Separator:"
)),
c
(
"Tab"
=
"\t"
,
"Comma"
=
","
,
"Semicolon"
=
";"
))))))
fluidRow
(
column
(
width
=
7
,
selectInput
(
"sepTabVenn"
,
h6
(
strong
(
"Separator:"
)),
c
(
"Tab"
=
"\t"
,
"Comma"
=
","
,
"Semicolon"
=
";"
)),
br
(),
downloadButton
(
"exportVisuCompTableVenn"
,
"Export table"
))
)))
)
)
),
...
...
Write
Preview
Supports
Markdown
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