Skip to contents

This function generates a stacked bar plot showing the count of features in each group categorized by NPC_pathway. It uses the mmo object with sirius annotation and normalized data. Make sure you don't run ReplaceZero() before using this function, as it may remove presence/absence information.

Usage

PlotNPCStackedBar(mmo, group_col, output_file, width = 6, height = 3)

Arguments

mmo

The mmo object with sirius annotation and normalized data

group_col

The column name in metadata to use for grouping samples

output_file

The output file path for the stacked bar plot (e.g., 'NPC_stacked_bar.png')

width

The width of the output plot

height

The height of the output plot

Examples

if (FALSE) {
PlotNPCStackedBar(
 mmo, group_col = 'treatment', 
 output_file = 'NPC_stacked_bar.png', width = 6, height = 3
)
}