Skip to contents

Visualisation of Set Enrichment Analysis Results from SpaMTP::FindRegionalPathways().

Usage

PlotRegionalPathways(
  regpathway,
  ident.column = "Cluster_id",
  selected_pathways = NULL,
  sig_cutoff = NULL,
  num_display = NULL,
  text_size = NULL,
  verbose = TRUE,
  database = NULL,
  database_version = "latest",
  database_source = c("auto", "bundled", "local"),
  database_local_dir = NULL
)

Arguments

regpathway

A dataframe generated by the SpaMTP::FindRegionalPathways() function, containing identified regional pathways.

ident.column

A character string specifying the column name of the regpathway dataframe containing the idents or clusters to compare (default = "Cluster_id").

selected_pathways

A character vector specifying the names or IDs of pathways to be included in the analysis (e.g., c("Amino acid metabolism", "WP1902", "Aspartate and asparagine metabolism")). This argument is not case-sensitive (default = NULL).

sig_cutoff

A numeric value defining the p-value cutoff for classifying significant pathways. If NULL the p-value cutoff will be = 0.05 (default = NULL).

num_display

An integer specifying the number of pathways to display in the plot. If set to null will plot the smaller of either 10 pathways or the number of unique pathways provided in 'regpathway' (default = NULL).

text_size

A numeric value controlling the size of the text elements in the plot. If NULL the default text size is 12 (default = NULL).

verbose

Boolean indicating whether to show the message. If TRUE the message will be show, else the message will be suppressed (default = TRUE).

database

Optional named list of database resources, normally created by LoadSpaMTPDatabase().

database_version

Database snapshot version used for pathway lookup.

database_source

Database source; see LoadSpaMTPDatabase().

database_local_dir

Optional local RDS resource directory.

Value

A ggplot object representing the set enrichment analysis results.

Examples

utils::str(formals(PlotRegionalPathways))
#> Dotted pair list of 11
#>  $ regpathway        : symbol 
#>  $ ident.column      : chr "Cluster_id"
#>  $ selected_pathways : NULL
#>  $ sig_cutoff        : NULL
#>  $ num_display       : NULL
#>  $ text_size         : NULL
#>  $ verbose           : logi TRUE
#>  $ database          : NULL
#>  $ database_version  : chr "latest"
#>  $ database_source   : language c("auto", "bundled", "local")
#>  $ database_local_dir: NULL
# PlotRegionalPathways(SpaMTP, ident = "clusters", regpathway = pathway_df)