Package 'BIOSZEN'

Title: Biological Data Analysis and Visualization with Shiny
Description: App for data analysis and visualization from an Excel file. It can generate boxplot, barplot, violin plot, stacked plots, heatmaps, correlation plots between parameters, and concentration-response curves with IC50 estimates. It includes metadata-based reproducibility, normalized-data workflows, downloadable graphics and workbooks, normality tests such as Shapiro-Wilk, Kolmogorov-Smirnov, and Anderson-Darling, and significance tests such as ANOVA, Kruskal-Wallis, t-test, and Wilcoxon. It also extracts microbial growth curve parameters (uMax, max_percap_time, doub_time, lag_time, ODmax, max_time, AUC, OD0) from fixed-interval or irregular/discontinuous numeric time points.
Authors: Benjamín Szenfeld [aut, cre] (ORCID: <https://orcid.org/0009-0003-4702-4149>)
Maintainer: Benjamín Szenfeld <[email protected]>
License: GPL-3
Version: 2.1.2
Built: 2026-09-25 12:04:43 UTC
Source: https://github.com/bioszen/BIOSZEN

Help Index


Launch BIOSZEN

Description

Starts the interactive BIOSZEN Shiny application. BIOSZEN() is the concise public launcher; run_app() remains available for backward compatibility.

Usage

BIOSZEN(
  host = getOption("shiny.host", "127.0.0.1"),
  port = getOption("shiny.port", 4321),
  launch.browser = TRUE,
  app_window = FALSE
)

run_app(
  host = getOption("shiny.host", "127.0.0.1"),
  port = getOption("shiny.port", 4321),
  launch.browser = getOption("shiny.launch.browser", TRUE)
)

Arguments

host

Host interface for the local Shiny server.

port

Port for the local Shiny server.

launch.browser

Browser launcher passed to shiny::runApp(). The default, TRUE, opens the app automatically. Supply FALSE to disable automatic opening or a function to use a custom launcher.

app_window

Logical. When FALSE (the default), BIOSZEN() opens the operating system's configured default browser. Set it to TRUE to prefer a dedicated Chromium app window and fall back to the default browser. This argument is used by BIOSZEN(); run_app() retains its original browser-launch interface.

Value

The value returned by shiny::runApp(), invisibly when appropriate.


Cite BIOSZEN

Description

Returns the official BIOSZEN citation from the package's centralized metadata. The concept DOI always resolves to the current Zenodo record.

Usage

bioszen_citation(format = c("text", "bibentry", "bibtex", "doi"))

Arguments

format

Citation format: plain "text", a "bibentry", BibTeX, or the DOI alone.

Value

A character value, except for format = "bibentry", which returns a bibentry object.


Update BIOSZEN

Description

Checks R-universe for a newer BIOSZEN version, requests consent, and installs it into the library containing the current package. BIOSZEN never updates while its Shiny application is running.

Usage

bioszen_update(
  ask = TRUE,
  repos = .bioszen_default_repositories()
)

Arguments

ask

Whether to ask for interactive confirmation before installation. Set to FALSE only when prior user consent has already been obtained.

repos

Package repositories used for the check and installation.

Value

TRUE when an update was installed and FALSE when no installation was needed or the user declined.


Check for a BIOSZEN Update

Description

Checks the BIOSZEN R-universe repository without installing anything.

Usage

bioszen_update_available(
  repos = .bioszen_default_repositories(),
  quiet = FALSE
)

Arguments

repos

Package repositories to query. The BIOSZEN R-universe and CRAN are used by default.

quiet

Whether connection or repository errors should be returned silently as NA.

Value

A logical scalar. Attributes contain the installed and available versions. NA means that the check could not be completed.


Calculate BIOSZEN Growth Parameters

Description

Calculates microbial growth parameters with the same combined method used by the BIOSZEN Shiny application. The robust exponential-phase detector is run first; the permissive detector fills only values that the robust method could not calculate.

Usage

growth_parameters(
  input,
  output_dir = NULL,
  sheet = NULL,
  overwrite = FALSE,
  max_time = 48,
  time_interval = 0.5,
  time_mode = c("fixed", "irregular"),
  time_column = NULL
)

Arguments

input

A data frame, a supported growth file (.xlsx, .xls, or .csv), a vector of supported files, or a directory containing supported files. Data frames may be wide (Time plus well columns) or tidy (Well, Time, and Measurements).

output_dir

Optional directory for generated parameter workbooks. No files are written when this is NULL. A missing directory is created.

sheet

Optional Excel sheet name or index. The first sheet is used by default. Ignored for data frames and CSV files.

overwrite

Whether existing result workbooks may be replaced.

max_time

Maximum time used when converting the raw reader-export format supported by the Shiny growth module.

time_interval

Time interval used when converting the raw reader-export format supported by the Shiny growth module.

time_mode

Time handling mode. "fixed" preserves the historical maximum-time and interval conversion. "irregular" reads numeric time values from the input file.

time_column

Optional time-column name for irregular mode. When NULL or blank, common English and Spanish names are detected automatically.

Value

For one input, the same parameter table produced by the Shiny growth workflow, with class bioszen_growth_parameters. For multiple files, a named list with class bioszen_growth_parameters_list. Generated file paths are stored in the output_file attribute of each result.

Examples

time <- seq(0, 12, by = 0.5)
curves <- data.frame(
  Time = time,
  A1 = 0.05 + 0.9 / (1 + exp(-0.8 * (time - 5)))
)
result <- growth_parameters(curves)

Calculate BIOSZEN Growth Parameters from Irregular Time Points

Description

A convenience variant of growth_parameters() for curve tables whose recorded time points are uneven or discontinuous. Numeric time values are read directly from the selected column and must be finite, unique, and strictly increasing within each well.

Usage

growth_parameters_irregular(
  input,
  output_dir = NULL,
  sheet = NULL,
  overwrite = FALSE,
  time_column = NULL
)

Arguments

input

A data frame, a supported growth file (.xlsx, .xls, or .csv), a vector of supported files, or a directory containing supported files. Data frames may be wide or tidy.

output_dir

Optional directory for generated parameter workbooks. No files are written when this is NULL.

sheet

Optional Excel sheet name or index. The first sheet is used by default. Ignored for data frames and CSV files.

overwrite

Whether existing result workbooks may be replaced.

time_column

Optional time-column name. When NULL or blank, common English and Spanish names such as Time, Tiempo, Hour, and Hora are detected automatically.

Value

The same result type and parameter columns as growth_parameters().

See Also

growth_parameters()

Examples

irregular <- data.frame(
  Time = c(0, 0.08, 0.17, 0.5, 1, 2),
  A1 = c(0.05, 0.051, 0.053, 0.06, 0.08, 0.16)
)
result <- growth_parameters_irregular(irregular)