Skip to content

Commit

Permalink
Update DRomicsInterpreter-shiny: enlarge texts in plots
Browse files Browse the repository at this point in the history
  • Loading branch information
aursiber committed Dec 14, 2023
1 parent 123f912 commit f0129b7
Showing 1 changed file with 29 additions and 34 deletions.
63 changes: 29 additions & 34 deletions inst/DRomicsInterpreter-shiny/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -344,19 +344,19 @@ server <- function(input, output, session) {
colorby = "experimental_level",
ECDF_plot = FALSE,
BMDsummary = BMDsummarysensitivityPlot(),
BMD_log_transfo = BMDlogtransfoSensitivityplot()) +
ggplot2::theme_bw()
BMD_log_transfo = BMDlogtransfoSensitivityplot())
} else {
myECDFplot <- if(orderingOnelev() == "BMDorder_onelev") {TRUE} else {FALSE}
mysensitivityplot <- DRomics::sensitivityplot(myextendedmergeddata,
BMDtype = BMDtype(),
group = mypathclasslabel,
ECDF_plot = myECDFplot,
BMDsummary = BMDsummarysensitivityPlot(),
BMD_log_transfo = BMDlogtransfoSensitivityplot()) +
ggplot2::theme_bw()
BMD_log_transfo = BMDlogtransfoSensitivityplot())
}

mysensitivityplot <- mysensitivityplot + ggplot2::theme_bw() + theme(text = element_text(size = 18))

output$buttonDownloadSensitivityplot <- downloadHandler(
filename = function(){
"sensitivityplot.pdf"
Expand All @@ -379,14 +379,15 @@ server <- function(input, output, session) {
mytrendplot <- DRomics::trendplot(myextendedmergeddata,
group = mypathclasslabel,
facetby = "experimental_level",
add.color = TRUE) +
ggplot2::theme_bw()
add.color = TRUE)
} else {
mytrendplot <- DRomics::trendplot(myextendedmergeddata,
group = mypathclasslabel,
add.color = TRUE) +
ggplot2::theme_bw()
add.color = TRUE)
}

mytrendplot <- mytrendplot + ggplot2::theme_bw() + theme(text = element_text(size = 18))

output$buttonDownloadTrendplot <- downloadHandler(
filename = function(){
"trendplot.pdf"
Expand Down Expand Up @@ -550,17 +551,15 @@ server <- function(input, output, session) {
colorby = "trend",
add.CI = addciBMDplot(),
add.label = addlabelBMDplot(),
BMD_log_transfo = BMDlogtransfoBMDplot()) +
ggplot2::theme_bw()
BMD_log_transfo = BMDlogtransfoBMDplot())
} else {
mybmdplot <- DRomics::bmdplot(myextendedresforBMD$myextendedresforBMD,
facetby = myfacetbycolumnsBMDplot,
shapeby = "trend",
colorby = "trend",
add.CI = addciBMDplot(),
add.label = addlabelBMDplot(),
BMD_log_transfo = BMDlogtransfoBMDplot()) +
ggplot2::theme_bw()
BMD_log_transfo = BMDlogtransfoBMDplot())
}
} else {
if(input$nbLevel > 1) {
Expand All @@ -570,17 +569,15 @@ server <- function(input, output, session) {
shapeby = "trend",
add.CI = addciBMDplot(),
add.label = addlabelBMDplot(),
BMD_log_transfo = BMDlogtransfoBMDplot()) +
ggplot2::theme_bw()
BMD_log_transfo = BMDlogtransfoBMDplot())

} else {
mybmdplot <- DRomics::bmdplot(myextendedresforBMD$myextendedresforBMD,
facetby = myfacetbycolumnsBMDplot,
shapeby = "trend",
add.CI = addciBMDplot(),
add.label = addlabelBMDplot(),
BMD_log_transfo = BMDlogtransfoBMDplot()) +
ggplot2::theme_bw()
BMD_log_transfo = BMDlogtransfoBMDplot())
}
}
} else {
Expand Down Expand Up @@ -610,16 +607,14 @@ server <- function(input, output, session) {
colorby = "trend",
add.CI = addciBMDplot(),
add.label = addlabelBMDplot(),
BMD_log_transfo = BMDlogtransfoBMDplot()) +
ggplot2::theme_bw()
BMD_log_transfo = BMDlogtransfoBMDplot())
} else {
mybmdplot <- DRomics::bmdplot(myextendedresforBMD$myextendedresforBMD,
facetby = myfacetbycolumnsBMDplot,
colorby = "trend",
add.CI = addciBMDplot(),
add.label = addlabelBMDplot(),
BMD_log_transfo = BMDlogtransfoBMDplot()) +
ggplot2::theme_bw()
BMD_log_transfo = BMDlogtransfoBMDplot())
}
} else {
if(input$nbLevel > 1) {
Expand All @@ -628,19 +623,20 @@ server <- function(input, output, session) {
facetby2 = myfacetbyrowsBMDplot,
add.CI = addciBMDplot(),
add.label = addlabelBMDplot(),
BMD_log_transfo = BMDlogtransfoBMDplot()) +
ggplot2::theme_bw()
BMD_log_transfo = BMDlogtransfoBMDplot())
} else {
mybmdplot <- DRomics::bmdplot(myextendedresforBMD$myextendedresforBMD,
facetby = myfacetbycolumnsBMDplot,
add.CI = addciBMDplot(),
add.label = addlabelBMDplot(),
BMD_log_transfo = BMDlogtransfoBMDplot()) +
ggplot2::theme_bw()
BMD_log_transfo = BMDlogtransfoBMDplot())
}
}
}

mybmdplot <- mybmdplot + ggplot2::theme_bw() + theme(text = element_text(size = 18))
mybmdplotwithgradient <- mybmdplotwithgradient + theme(text = element_text(size = 18))

output$buttonDownloadBMDplot <- downloadHandler(
filename = function(){
"bmdplot.pdf"
Expand Down Expand Up @@ -802,9 +798,7 @@ server <- function(input, output, session) {
addBMD = addBMDCurvesplot(),
facetby = myfacetbycolumnsCurvesplot,
facetby2 = myfacetbyrowsCurvesplot,
colorby = "trend") +
ggplot2::labs(col = "trend") +
ggplot2::theme_bw()
colorby = "trend")
} else {
mycurvesplot <- DRomics::curvesplot(myextendedresforCurvesplot$myextendedresforCurvesplot,
free.y.scales = TRUE, scaling = TRUE,
Expand All @@ -813,10 +807,10 @@ server <- function(input, output, session) {
dose_log_transfo = doselogtransfoCurvesplot(),
addBMD = addBMDCurvesplot(),
facetby = myfacetbycolumnsCurvesplot,
colorby = "trend") +
ggplot2::labs(col = "trend") +
ggplot2::theme_bw()
colorby = "trend")
}
mycurvesplot <- mycurvesplot + ggplot2::labs(col = "trend")

} else {
if(input$nbLevel > 1) {
mycurvesplot <- DRomics::curvesplot(myextendedresforCurvesplot$myextendedresforCurvesplot,
Expand All @@ -826,19 +820,20 @@ server <- function(input, output, session) {
dose_log_transfo = doselogtransfoCurvesplot(),
addBMD = addBMDCurvesplot(),
facetby = myfacetbycolumnsCurvesplot,
facetby2 = myfacetbyrowsCurvesplot) +
ggplot2::theme_bw()
facetby2 = myfacetbyrowsCurvesplot)
} else {
mycurvesplot <- DRomics::curvesplot(myextendedresforCurvesplot$myextendedresforCurvesplot,
free.y.scales = TRUE, scaling = TRUE,
xmin = mindoseCurvesplot(),
xmax = maxDoseXScale(),
dose_log_transfo = doselogtransfoCurvesplot(),
addBMD = addBMDCurvesplot(),
facetby = myfacetbycolumnsCurvesplot) +
ggplot2::theme_bw()
facetby = myfacetbycolumnsCurvesplot)
}
}

mycurvesplot <- mycurvesplot + ggplot2::theme_bw()

output$buttonDownloadCurvesplot <- downloadHandler(
filename = function(){
"curvesplot.pdf"
Expand Down

0 comments on commit f0129b7

Please sign in to comment.