Allow changing the application title

This commit is contained in:
Elias Projahn 2022-05-19 16:28:59 +02:00
parent 74d7865389
commit 8f6ebc290f
3 changed files with 14 additions and 3 deletions

View file

@ -12,12 +12,14 @@
#' performing custom analyses. If this is set to `TRUE`, only the predefined #' performing custom analyses. If this is set to `TRUE`, only the predefined
#' gene and species sets are available for customizing the analysis. This may #' gene and species sets are available for customizing the analysis. This may
#' be useful to limit resource usage on a publicly available instance. #' be useful to limit resource usage on a publicly available instance.
#' @param title Set the title of the application.
#' @param port The port to serve the application on. #' @param port The port to serve the application on.
#' #'
#' @export #' @export
run_app <- function(gene_sets, run_app <- function(gene_sets,
species_sets = NULL, species_sets = NULL,
locked = FALSE, locked = FALSE,
title = "Gene Position Analysis",
port = 3464) { port = 3464) {
stopifnot(!is.null(gene_sets) & !is.null(gene_sets[[1]])) stopifnot(!is.null(gene_sets) & !is.null(gene_sets[[1]]))
@ -29,7 +31,8 @@ run_app <- function(gene_sets,
options <- list( options <- list(
gene_sets = gene_sets, gene_sets = gene_sets,
species_sets = species_sets, species_sets = species_sets,
locked = locked locked = locked,
title = title
) )
# Actually run the app. # Actually run the app.

2
R/ui.R
View file

@ -14,7 +14,7 @@ ui <- function(options) {
bootswatch = "united", bootswatch = "united",
primary = "#1964bf" primary = "#1964bf"
), ),
title = "TPE-OLD candidates", title = options$title,
selected = "Results", selected = "Results",
tabPanel( tabPanel(
"Input data", "Input data",

View file

@ -4,7 +4,13 @@
\alias{run_app} \alias{run_app}
\title{Run the application server.} \title{Run the application server.}
\usage{ \usage{
run_app(gene_sets, species_sets = NULL, locked = FALSE, port = 3464) run_app(
gene_sets,
species_sets = NULL,
locked = FALSE,
title = "Gene Position Analysis",
port = 3464
)
} }
\arguments{ \arguments{
\item{gene_sets}{A list of predefined gene sets. This should be a named list \item{gene_sets}{A list of predefined gene sets. This should be a named list
@ -22,6 +28,8 @@ performing custom analyses. If this is set to \code{TRUE}, only the predefined
gene and species sets are available for customizing the analysis. This may gene and species sets are available for customizing the analysis. This may
be useful to limit resource usage on a publicly available instance.} be useful to limit resource usage on a publicly available instance.}
\item{title}{Set the title of the application.}
\item{port}{The port to serve the application on.} \item{port}{The port to serve the application on.}
} }
\description{ \description{