Skip to contents

Converts the module assignments from run_WGCNA() output into two-column data.frame with Feature and Module columns, expected by plot_modules_v(), plot_modules_h(), summarise_module_pattern(), and all enrichment functions.

Usage

WGCNA_module(net, exclude_grey = FALSE)

Arguments

net

The output of run_WGCNA() (a list containing $colors)

exclude_grey

Logical. If TRUE, features assigned to module 0 (grey / unassigned) are removed. Default: FALSE

Value

A data.frame with columns Feature (character) and Module (factor ordered by decreasing module size). When exclude_grey = TRUE, grey/unassigned features are excluded.

Examples

data(example_net)
module <- WGCNA_module(example_net)