create_report: Create visualization HTML

View source: R/save.R

create_reportR Documentation

Create visualization HTML

Description

Saves the results of a Wilcoxon comparison for the Hipathia pathway values into a folder, and creates a HTML from which to visualize the results on top of the pathways. The results are stored into the specified folder. If this folder does not exist, it will be created. The parent folder must exist.

Usage

create_report(
  comp,
  metaginfo,
  output_folder = NULL,
  path = NULL,
  node_colors = NULL,
  group_by = "pathway",
  conf = 0.05,
  verbose = FALSE
)

Arguments

comp

Comparison object as given by the do_wilcoxon function

metaginfo

Pathways object as returned by the load_pathways function

output_folder

Name of the folder in which the report will be stored.

path

Absolute path to the parent directory in which 'output_folder' will be saved. If it is not provided, it will be created in a temp folder.

node_colors

List of colors with which to paint the nodes of the pathways, as returned by the node_color_per_de function. Default is white.

group_by

How to group the subpathways to be visualized. By default they are grouped by the pathway to which they belong. Available groupings include "uniprot", to group subpathways by their annotated Uniprot functions, "GO", to group subpathways by their annotated GO terms, and "genes", to group subpathways by the genes they include. Default is set to "pathway".

conf

Level of significance. By default 0.05.

verbose

Boolean, whether to show details about the results of the execution

Value

Saves the results and creates a report to visualize them through a server in the specified output_folder. Returns the folder where the report has been stored.

Examples

data(comp)
pathways <- load_pathways(species = "hsa", pathways_list = c("hsa03320",
"hsa04012"))
report <- create_report(comp, pathways, "save_results")

## Not run: 
data(results)
data(brca)
sample_group <- colData(brca)[,1]
colors_de <- node_color_per_de(results, pathways,
sample_group, "Tumor", "Normal")
report_colors <- create_report(comp, pathways, "save_results",
node_colors = colors_de)

## End(Not run)


martahidalgo/hipathia documentation built on Jan. 12, 2023, 1:44 p.m.