Launches a local Shiny application to visualize and explore variant scores interactively.
This is a lower-level function; most users should use av_explore instead.
Arguments
- obj
Optional. An
AlphaVarSetobject to pre-load into the app. If NULL (default), users must upload a CSV file through the UI.- max_upload_mb
Numeric. Maximum file upload size in megabytes (default 500). This sets
shiny.maxRequestSizefor the session and restores the original value when the function exits.
Examples
example_file <- system.file(
"extdata", "bcl11a_rs1427407_example.csv",
package = "AlphaVaR"
)
# Pre-computing enrichment before the launch means the Dashboard and the
# Single-Group Enrichment tab render without a recalculation wait.
obj <- av_import_csv(example_file)
#> Reading bcl11a_rs1427407_example.csv ...
obj <- av_calc_enrichment(obj)
print(head(obj$stats$comparisons$enrichment$fisher_tidy, 3))
#> # A tibble: 3 × 8
#> group n_obs n_hits or log2OR p_raw p_adj neg_log10_fdr
#> <fct> <int> <int> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 ATAC 320 60 11.6 3.53 5.12e-30 5.63e-29 28.2
#> 2 RNA_SEQ 320 0 0 -4.92 1.83e- 6 6.70e- 6 5.17
#> 3 SPLICE_JUNCTIONS 320 0 0 -4.92 1.83e- 6 6.70e- 6 5.17
# runApp() blocks the session until the browser window is closed.
if (interactive()) {
av_run_shiny(obj)
av_run_shiny()
av_run_shiny(obj, max_upload_mb = 1000)
}