Skip to contents

[Experimental]

This module provides an interactive principal components plot and an interactive heatmap with correlation of principal components with sample variables.

Usage

tm_g_pca(
  label,
  mae_name,
  exclude_assays = character(),
  pre_output = NULL,
  post_output = NULL,
  .test = FALSE
)

ui_g_pca(id, mae_name, pre_output, post_output, .test = FALSE)

srv_g_pca(
  id,
  data,
  filter_panel_api,
  reporter,
  mae_name,
  exclude_assays,
  .test = FALSE
)

sample_tm_g_pca(.test = FALSE)

Arguments

label

(string)
menu item label of the module in the teal app.

mae_name

(string)
name of the MAE data used in the teal module.

exclude_assays

(character)
names of the assays which should not be included in choices in the teal module.

pre_output

(shiny.tag or NULL)
placed before the output to put the output into context (for example a title).

post_output

(shiny.tag or NULL)
placed after the output to put the output into context (for example the shiny::helpText() elements can be useful).

.test

(flag)
whether to display the internal structure of the plot for testing purposes.

id

(string) the shiny module id.

data

(reactive)
reactive(<teal_data>) holding all the data sets provided during app initialization after going through the filters.

filter_panel_api

(FilterPanelAPI)
object describing the actual filter panel API.

reporter

(Reporter) object

Value

Shiny module to be used in the teal app.

Functions

  • ui_g_pca(): sets up the user interface.

  • srv_g_pca(): sets up the server with reactive graph.

  • sample_tm_g_pca(): sample module function.

Examples

data <- teal_data(MAE = hermes::multi_assay_experiment)
app <- init(
  data = data,
  modules = modules(
    tm_g_pca(
      label = "PCA plot",
      mae_name = "MAE"
    )
  )
)
#> Initializing tm_g_pca
if (interactive()) {
  shinyApp(app$ui, app$server)
}

# Alternatively you can run the sample module with this function call:
if (interactive()) {
  sample_tm_g_pca()
}