Commit a83ec463 authored by dmattek's avatar dmattek
Browse files

Added option to set the height of displayed heatmap.

parent 573617da
...@@ -79,7 +79,7 @@ clustBayUI <- function(id, label = "Sparse Hierarchical CLustering") { ...@@ -79,7 +79,7 @@ clustBayUI <- function(id, label = "Sparse Hierarchical CLustering") {
fluidRow( fluidRow(
column( column(
3, 2,
numericInput( numericInput(
ns('inPlotBayHmMarginX'), ns('inPlotBayHmMarginX'),
'Margin below x-axis', 'Margin below x-axis',
...@@ -89,7 +89,7 @@ clustBayUI <- function(id, label = "Sparse Hierarchical CLustering") { ...@@ -89,7 +89,7 @@ clustBayUI <- function(id, label = "Sparse Hierarchical CLustering") {
) )
), ),
column( column(
3, 2,
numericInput( numericInput(
ns('inPlotBayHmMarginY'), ns('inPlotBayHmMarginY'),
'Margin right of y-axis', 'Margin right of y-axis',
...@@ -99,7 +99,7 @@ clustBayUI <- function(id, label = "Sparse Hierarchical CLustering") { ...@@ -99,7 +99,7 @@ clustBayUI <- function(id, label = "Sparse Hierarchical CLustering") {
) )
), ),
column( column(
3, 2,
numericInput( numericInput(
ns('inPlotBayHmFontX'), ns('inPlotBayHmFontX'),
'Font size row labels', 'Font size row labels',
...@@ -110,7 +110,7 @@ clustBayUI <- function(id, label = "Sparse Hierarchical CLustering") { ...@@ -110,7 +110,7 @@ clustBayUI <- function(id, label = "Sparse Hierarchical CLustering") {
) )
), ),
column( column(
3, 2,
numericInput( numericInput(
ns('inPlotBayHmFontY'), ns('inPlotBayHmFontY'),
'Font size column labels', 'Font size column labels',
...@@ -119,6 +119,15 @@ clustBayUI <- function(id, label = "Sparse Hierarchical CLustering") { ...@@ -119,6 +119,15 @@ clustBayUI <- function(id, label = "Sparse Hierarchical CLustering") {
width = 100, width = 100,
step = 0.1 step = 0.1
) )
),
column(2,
numericInput(
ns('inPlotHeight'),
'Display plot height',
value = 1000,
min = 100,
step = 100
)
) )
), ),
br(), br(),
...@@ -290,14 +299,11 @@ clustBay <- function(input, output, session, dataMod) { ...@@ -290,14 +299,11 @@ clustBay <- function(input, output, session, dataMod) {
) )
} }
output$outPlotBayHm <- renderPlot({ output$outPlotBayHm <- renderPlot({
plotBayHm() plotBayHm()
}, height = 800) })
output$outPlotBayImp <- renderPlot({
plotBayImp()
}, height = 800)
output$plotBayInt <- renderD3heatmap({ output$plotBayInt <- renderD3heatmap({
cat(file = stderr(), 'plotBayInt \n') cat(file = stderr(), 'plotBayInt \n')
...@@ -362,9 +368,9 @@ clustBay <- function(input, output, session, dataMod) { ...@@ -362,9 +368,9 @@ clustBay <- function(input, output, session, dataMod) {
ns <- session$ns ns <- session$ns
if (input$inPlotBayInteractive) if (input$inPlotBayInteractive)
d3heatmapOutput(ns("plotBayInt")) d3heatmapOutput(ns("plotBayInt"), height = paste0(input$inPlotHeight, "px"))
else { else {
plotOutput(ns('outPlotBayHm')) plotOutput(ns('outPlotBayHm'), height = paste0(input$inPlotHeight, "px"))
} }
}) })
......
...@@ -127,7 +127,7 @@ clustHierUI <- function(id, label = "Hierarchical CLustering") { ...@@ -127,7 +127,7 @@ clustHierUI <- function(id, label = "Hierarchical CLustering") {
br(), br(),
fluidRow( fluidRow(
column(3, column(2,
numericInput( numericInput(
ns('inMarginX'), ns('inMarginX'),
'Margin below x-axis', 'Margin below x-axis',
...@@ -136,7 +136,7 @@ clustHierUI <- function(id, label = "Hierarchical CLustering") { ...@@ -136,7 +136,7 @@ clustHierUI <- function(id, label = "Hierarchical CLustering") {
width = 100 width = 100
) )
), ),
column(3, column(2,
numericInput( numericInput(
ns('inMarginY'), ns('inMarginY'),
'Margin right of y-axis', 'Margin right of y-axis',
...@@ -145,7 +145,7 @@ clustHierUI <- function(id, label = "Hierarchical CLustering") { ...@@ -145,7 +145,7 @@ clustHierUI <- function(id, label = "Hierarchical CLustering") {
width = 100 width = 100
) )
), ),
column(3, column(2,
numericInput( numericInput(
ns('inFontX'), ns('inFontX'),
'Font size row labels', 'Font size row labels',
...@@ -155,7 +155,7 @@ clustHierUI <- function(id, label = "Hierarchical CLustering") { ...@@ -155,7 +155,7 @@ clustHierUI <- function(id, label = "Hierarchical CLustering") {
step = 0.1 step = 0.1
) )
), ),
column(3, column(2,
numericInput( numericInput(
ns('inFontY'), ns('inFontY'),
'Font size column labels', 'Font size column labels',
...@@ -164,6 +164,15 @@ clustHierUI <- function(id, label = "Hierarchical CLustering") { ...@@ -164,6 +164,15 @@ clustHierUI <- function(id, label = "Hierarchical CLustering") {
width = 100, width = 100,
step = 0.1 step = 0.1
) )
),
column(2,
numericInput(
ns('inPlotHeight'),
'Display plot height',
value = 1000,
min = 100,
step = 100
)
) )
), ),
br(), br(),
...@@ -266,7 +275,7 @@ clustHier <- function(input, output, session, dataMod) { ...@@ -266,7 +275,7 @@ clustHier <- function(input, output, session, dataMod) {
# Hierarchical - display plot # Hierarchical - display plot
output$outPlotHier <- renderPlot({ output$outPlotHier <- renderPlot({
plotHier() plotHier()
}, height = 800) })
# Hierarchical - download pdf # Hierarchical - download pdf
callModule(downPlot, "downPlotHier", paste0('clust_hierch_', callModule(downPlot, "downPlotHier", paste0('clust_hierch_',
...@@ -327,9 +336,9 @@ clustHier <- function(input, output, session, dataMod) { ...@@ -327,9 +336,9 @@ clustHier <- function(input, output, session, dataMod) {
output$plotInt_ui <- renderUI({ output$plotInt_ui <- renderUI({
ns <- session$ns ns <- session$ns
if (input$plotInt) if (input$plotInt)
tagList(d3heatmapOutput(ns("outPlotInt"))) tagList(d3heatmapOutput(ns("outPlotInt"), height = paste0(input$inPlotHeight, "px")))
else else
tagList(plotOutput(ns('outPlotHier'))) tagList(plotOutput(ns('outPlotHier'), height = paste0(input$inPlotHeight, "px")))
}) })
......
...@@ -136,7 +136,7 @@ clustHierSparUI <- function(id, label = "Sparse Hierarchical CLustering") { ...@@ -136,7 +136,7 @@ clustHierSparUI <- function(id, label = "Sparse Hierarchical CLustering") {
fluidRow( fluidRow(
column( column(
3, 2,
numericInput( numericInput(
ns('inPlotHierSparMarginX'), ns('inPlotHierSparMarginX'),
'Margin below x-axis', 'Margin below x-axis',
...@@ -146,7 +146,7 @@ clustHierSparUI <- function(id, label = "Sparse Hierarchical CLustering") { ...@@ -146,7 +146,7 @@ clustHierSparUI <- function(id, label = "Sparse Hierarchical CLustering") {
) )
), ),
column( column(
3, 2,
numericInput( numericInput(
ns('inPlotHierSparMarginY'), ns('inPlotHierSparMarginY'),
'Margin right of y-axis', 'Margin right of y-axis',
...@@ -156,7 +156,7 @@ clustHierSparUI <- function(id, label = "Sparse Hierarchical CLustering") { ...@@ -156,7 +156,7 @@ clustHierSparUI <- function(id, label = "Sparse Hierarchical CLustering") {
) )
), ),
column( column(
3, 2,
numericInput( numericInput(
ns('inPlotHierSparFontX'), ns('inPlotHierSparFontX'),
'Font size row labels', 'Font size row labels',
...@@ -167,7 +167,7 @@ clustHierSparUI <- function(id, label = "Sparse Hierarchical CLustering") { ...@@ -167,7 +167,7 @@ clustHierSparUI <- function(id, label = "Sparse Hierarchical CLustering") {
) )
), ),
column( column(
3, 2,
numericInput( numericInput(
ns('inPlotHierSparFontY'), ns('inPlotHierSparFontY'),
'Font size column labels', 'Font size column labels',
...@@ -176,6 +176,15 @@ clustHierSparUI <- function(id, label = "Sparse Hierarchical CLustering") { ...@@ -176,6 +176,15 @@ clustHierSparUI <- function(id, label = "Sparse Hierarchical CLustering") {
width = 100, width = 100,
step = 0.1 step = 0.1
) )
),
column(2,
numericInput(
ns('inPlotHeight'),
'Display plot height',
value = 1000,
min = 100,
step = 100
)
) )
), ),
br(), br(),
...@@ -355,7 +364,7 @@ clustHierSpar <- function(input, output, session, dataMod) { ...@@ -355,7 +364,7 @@ clustHierSpar <- function(input, output, session, dataMod) {
# Sparse Hierarchical - display plot # Sparse Hierarchical - display plot
output$outPlotHierSpar <- renderPlot({ output$outPlotHierSpar <- renderPlot({
plotHierSpar() plotHierSpar()
}, height = 800) })
# Sparse Hierarchical - download pdf # Sparse Hierarchical - download pdf
callModule(downPlot, "downPlotHierSpar", paste0('clust_hierchSparse_', callModule(downPlot, "downPlotHierSpar", paste0('clust_hierchSparse_',
...@@ -433,9 +442,9 @@ clustHierSpar <- function(input, output, session, dataMod) { ...@@ -433,9 +442,9 @@ clustHierSpar <- function(input, output, session, dataMod) {
ns <- session$ns ns <- session$ns
if (input$inPlotHierSparInteractive) if (input$inPlotHierSparInteractive)
d3heatmapOutput(ns("plotHierSparInt")) d3heatmapOutput(ns("plotHierSparInt"), height = paste0(input$inPlotHeight, "px"))
else else
plotOutput(ns('outPlotHierSpar')) plotOutput(ns('outPlotHierSpar'), height = paste0(input$inPlotHeight, "px"))
}) })
} }
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment