Package 'PAVER'

Title: PAVER: Pathway Analysis Visualization with Embedding Representations
Description: Summary visualization using embedding representations to reveal underlying themes within sets of pathway terms.
Authors: William G Ryan V [aut, cre] (ORCID: <https://orcid.org/0000-0003-4868-4002>)
Maintainer: William G Ryan V <[email protected]>
License: GPL (>= 3)
Version: 0.0.0.9000
Built: 2026-05-14 06:13:53 UTC
Source: https://github.com/CogDisResLab/PAVER

Help Index


Compute Cosine Dissimilarity Matrix

Description

This function computes the cosine dissimilarity matrix based on the input matrix. The cosine dissimilarity between two vectors is defined as 1 minus the cosine similarity.

Usage

cosine_dissimilarity(mat, root = FALSE)

Arguments

mat

A numeric matrix or data frame.

root

A logical value indicating whether to take the square root of the cosine dissimilarity matrix. Default is FALSE.

Value

A dissimilarity matrix of class "dist" containing the cosine dissimilarity between each pair of rows.

Examples

TRUE

Cluster pathway embeddings and generate themes

Description

This function clusters pathway embeddings using cosine similarity and generates themes for the clusters.

Usage

generate_themes(PAVER_result, hclust_method = "ward.D2", ...)

Arguments

PAVER_result

A list containing the result of running prepare_data

hclust_method

The agglomeration method to be used in hierarchical clustering. Default is "ward.D2".

...

Additional arguments to be passed to dynamicTreeCut

Value

A list containing the updated PAVER_result

Examples

TRUE

An example of GSEA results

Description

A wide data frame with Normalized Enrichment Scores from Gene-Set Enrichment Analysis of three different comparisons.

Usage

gsea_example

Format

A data frame with 1080 rows and 4 columns:

GOID

Gene Ontology Term IDs

SCZvsCtrl

NES of GO terms

SCZvsCtrlD

NES of GO terms

SCZvsCtrlS

NES of GO terms

Source

https://doi.org/10.1038/s41380-021-01205-y


An example of KEGG results

Description

A wide data frame with enrichment scores (log10 FDR) from MetaboAnalyst of one comparison.

Usage

kegg_example

Format

A data frame with 183 rows and 2 columns:

MAP

KEGG Pathway IDS

MA

Enrichment Scores of KEGG pathways

Source

https://doi.org/10.1101/2023.10.13.562226


PAVER_combined_plot

Description

This function takes a PAVER result object and generates a combined ggplot2 figure consisting of the PAVER_cluster_plot, PAVER_regulation_plot, PAVER_interpretation_plot, and PAVER_hunter_plot.

Usage

PAVER_combined_plot(PAVER_result, unit = NULL)

Arguments

PAVER_result

a list containing the output of PAVER analysis

unit

optionally, the unit of enrichment analysis for the figure legend title.

Value

A combined ggplot2 figure consisting of the PAVER_cluster_plot, PAVER_regulation_plot, PAVER_interpretation_plot, and PAVER_hunter_plot.

Examples

TRUE

Export PAVER results to a formatted data frame

Description

This function takes a PAVER result object and prepares it for export as a wide format data frame. The resulting data frame will have GO Term IDs, Definitions, generated themes, and columns for each of the groups in the PAVER result, with values representing the original input value of each GO term for that group.

Usage

PAVER_export(PAVER_result)

Arguments

PAVER_result

A PAVER result object generated by the generate_themes function.

Value

A wide format data frame with GO Term IDs, Definitions, generated themes, and columns for each of the groups in the PAVER result, with values representing the original input value of each GO term for that group.

Examples

TRUE

PAVER_hunter_plot

Description

This function takes a PAVER result object and generates a heatmap of the enrichment analysis with clustering and color-coded values based on the direction of regulation.

Usage

PAVER_hunter_plot(PAVER_result, unit = NULL, show_row_titles = TRUE)

Arguments

PAVER_result

a list containing the output of PAVER analysis

unit

optionally, the unit of enrichment analysis for the figure legend title.

show_row_titles

a logical indicating whether to show row titles in the heatmap.

Value

A heatmap of the expression data with clustering and color-coded values based on the direction of regulation.

Examples

TRUE

PAVER_interpretation_plot

Description

This function takes a PAVER result object and generates a ggplot2 scatterplot of the MDS layout with labeled points colored by group.

Usage

PAVER_interpretation_plot(PAVER_result)

Arguments

PAVER_result

a list containing the output of PAVER analysis

Value

A ggplot2 scatterplot of the MDS layout with labeled points colored by group.

Examples

TRUE

PAVER_regulation_plot

Description

This function takes a PAVER result object and generates a ggplot2 scatterplot of the UMAP layout colored by direction of regulation (up or down) for each group.

Usage

PAVER_regulation_plot(PAVER_result)

Arguments

PAVER_result

a list containing the output of PAVER analysis

Value

A ggplot2 scatterplot of the UMAP layout colored by direction of regulation (up or down) and faceted for each group.

Examples

TRUE

PAVER_theme_plot

Description

This function takes a PAVER result object and generates a ggplot2 scatterplot of the UMAP layout colored by cluster assignments.

Usage

PAVER_theme_plot(PAVER_result, show_cluster_legend = TRUE)

Arguments

PAVER_result

a list containing the output of PAVER analysis

show_cluster_legend

a logical indicating whether to show the cluster legend.

Value

A ggplot2 scatterplot of the UMAP layout colored by cluster assignments

Examples

TRUE

Prepare pathway analysis results for downstream theme generation and summary visualization

Description

This function prepares the results of pathway analysis for downstream theme generation and visualization using precomputed embeddings.

Usage

prepare_data(input, embeddings, term2name)

Arguments

input

A data frame in wide format containing the pathway analysis results. The first column is expected to be term IDs, e.g. GO:0000001, while the remaining columns are expected to be numeric values representing the enrichment of each term in each group.

embeddings

A matrix containing the precomputed embeddings of the input terms.

term2name

A data frame containing two columns that map pathway term IDs to pathway term names.

Value

A PAVER_result list with the prepared data ready for theme generation

Examples

TRUE