Skip to contents

This function generates a plot for enrichment analysis of Canopus-predicted terms at a specific level, showing fold enrichment, p-value, and subset count for each term.

Usage

CanopusLevelEnrichmentPlot(
  mmo = mmo,
  comp.list,
  term_level = "NPC_pathway",
  pthr = 0.1,
  representation = "greater",
  prefix = "enrichment",
  height = 5,
  width = 5
)

Arguments

mmo

The mmo object with sirius annotation and normalized data

comp.list

A list to analyze, where each element is a vector of feature names

term_level

The level of term to use for enrichment analysis. Options are 'NPC_pathway', 'NPC_superclass', 'NPC_class', 'ClassyFire_superclass', 'ClassyFire_class', 'ClassyFire_subclass', 'ClassyFire_level5', or 'ClassyFire_most_specific' (default: 'NPC_pathway')

pthr

The threshold for adjusted p-value to be considered significant (default: 0.1)

representation

The representation type for enrichment analysis. Options are 'greater' for overrepresentation (default: 'greater')

prefix

The prefix for output files (default: 'enrichment')

height

The height of the output plot in inches (default: 5)

width

The width of the output plot in inches (default: 5)

Examples

if (FALSE) {
# Perform enrichment analysis for multiple comparisons using NPC_pathway level
comp.list <- list(
  comparison1 = DAMs_up$control_vs_treatment1.up,
  comparison2 = DAMs_up$control_vs_treatment2.up
)
CanopusLevelEnrichmentPlot(
 mmo, comp.list = comp.list, term_level = 'NPC_pathway', 
 pthr = 0.1, representation = 'greater', prefix = 'enrichment_plot', 
 height = 5, width = 5
)
}