Title: | A Configurable 'shiny' Portal for Sharing Analysis of Molecular Expression Data |
---|---|
Description: | Enables deploying configuration file-based 'shiny' apps with minimal programming for interactive exploration and analysis showcase of molecular expression data. For exploration, supports visualization of correlations between rows of an expression matrix and a table of observations, such as clinical measures, and comparison of changes in expression over time. For showcase, enables visualizing the results of differential expression from package such as 'limma', co-expression modules from 'WGCNA' and lower dimensional projections. |
Authors: | Rafael Henkin [cre, aut, cph] |
Maintainer: | Rafael Henkin <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.2.1.9000 |
Built: | 2024-11-12 04:41:33 UTC |
Source: | https://github.com/c4tb/shinyexprportal |
The resulting file contain placeholder text in upper case for you to edit according to your needs. It also includes the three correlation modules by default.
create_config_template(target_dir, filename = "config.yaml")
create_config_template(target_dir, filename = "config.yaml")
target_dir |
location to create the configuration file |
filename |
optional file name, default is config.yaml |
Creates configuration file in target_dir
if (interactive()) { dir.create("newapp") create_config_template("newapp") }
if (interactive()) { dir.create("newapp") create_config_template("newapp") }
This function runs an interactive wizard that guides the user through the creation of a basic configuration file. The wizard will work with the simple case of expression data where one sample matches exactly to one subject.
create_config_wizard(target_dir)
create_config_wizard(target_dir)
target_dir |
location where the configuration will be saved |
Before you run the wizard, you should ensure that the target folder contains at least the expression matrix and measures data files. The expression matrix should follow the format of sample IDs in columns and genes in rows, with gene names in the first column of the table. The measures file should follow the format of subjects in rows and measures in columns, and you should ensure that all subjects have one sample and vice-versa.
Creates configuration file in target_dir
if (interactive()) { dir.create("newapp") create_config_wizard("newapp") }
if (interactive()) { dir.create("newapp") create_config_wizard("newapp") }
Create example files for measures, expression matrix and lookup table
create_example(target_dir)
create_example(target_dir)
target_dir |
location where to create the files |
Create examples files in target_dir
if (interactive()) { dir.create("newapp") create_example("newapp") }
if (interactive()) { dir.create("newapp") create_example("newapp") }
Creates a module code template in current working directory
create_module_template(module_name, target_dir = "")
create_module_template(module_name, target_dir = "")
module_name |
module name in camelCase |
target_dir |
Optional folder where to save the file. Saves in current folder otherwise. |
Create file for module_name
in current working directory
if (interactive()) { create_module_template("newModule") }
if (interactive()) { create_module_template("newModule") }
This function should be run only after you have created the configuration
file and placed all required files in the app folder. See
vignette("quickstart", package = "shinyExprPortal")
for help with setup or
vignette("fullguide", package = "shinyExprPortal")
for a complete
configuration guide.
run_app( config_file, data_folder = "", custom_modules = NULL, nthreads = 1L, ... )
run_app( config_file, data_folder = "", custom_modules = NULL, nthreads = 1L, ... )
config_file |
The name of the yaml configuration file |
data_folder |
Optional directory prefix for data files. Use this argument if you want to version your files across different folders |
custom_modules |
Optional list of available custom modules. See the 'Details' section. |
nthreads |
Optional number of threads/cores to speed up loading files and computing correlations on UNIX-based systems. Default is 1 |
... |
Further optional arguments. |
custom_modules
should contain a list of names for user-defined
modules that are loaded in the environment before calling run_app. Each
module should be accompanied by the corresponding mod_moduleName_ui,
mod_moduleName_server moduleName_config functions. These functions could be
placed in a custom_modules.R file, for example, and loaded using source
.
The package will then parse the configuration file, and if it contains one of
the custom module names, it will call the module configuration parsing
function and add it to the interface. See vignette("customization")
for a
complete example.
Please note that if running on Windows, nthreads will be always set to 1 due to limitations on the current implementation.
Runs the app
create_config_wizard()
to create a configuration using a wizard,
create_config_template()
to create a configuration file template.
if (interactive()) { run_app("config.yaml", nthreads = 4) }
if (interactive()) { run_app("config.yaml", nthreads = 4) }
See vignette("config", package = "shinyExprPortal")
for details on how
to configure each module.
show_available_modules()
show_available_modules()
list of available modules
show_available_modules()
show_available_modules()