build_me_dashboard: Run main ME dashboard interface from supplied data

Description Usage Arguments Value Examples

View source: R/app_build_me_dashboard.R

Description

Takes as input the three basic components of an ME app and either runs an ME app immediately or returns a list containing the ui and server parts of an entire app. This makes it easy to deploy a custom app with a few lines of code.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
build_me_dashboard(
  phewas_results,
  genotypes,
  phenotypes,
  max_allowed_codes = 45,
  auto_run = FALSE,
  debug_mode = FALSE,
  snp_colors = c("#bdbdbd", "#fecc5c", "#a50f15"),
  multiple_comparisons_adjustment = "none"
)

Arguments

phewas_results

Dataframe containing the results of the phewas study. Needs columns p_val, id, category(along with accompanying color), tooltip.

max_allowed_codes

How many codes can the app show at any given time. Defaults to 40. (Too many and app may get slow.)

auto_run

Do you want the app to run immediately or do you want the ui and server components of the app to run later? Defaults to TRUE.

debug_mode

Boolean controlling if changes in app state should be recorded in logs. Defaults to off.

snp_colors

Array of valid css color codes for 0, 1, and 2 copies of the minor allele in network plot.

multiple_comparisons_adjustment

What type of multiple comparisons adjustment should be done to the phewas results? Options include "None", "Bonferroni", and "Benjamini-Hochberg". Note that the correction is performed before filtering of codes to those contained in individual data. Aka for as many tests as were passed in raw phewas results. If different behavior is desired, the user must provide results pre-adjusted.

Value

If auto_run = TRUE, starts an ME app with your data, otherwise returns a list containing elements: ui for the shiny app ui function, and server for the server component of app.

Examples

1
2
3
4
5
6
my_ME_app <- build_me_dashboard(
  phewas_table,
  id_to_snp,
  phenotype_id_pairs
)
shinyApp(my_ME_app$ui, my_ME_app$server)

tbilab/meToolkit documentation built on June 23, 2020, 9:55 a.m.