consensus_modules {BioNERO} | R Documentation

## Identify consensus modules across independent data sets

### Description

Identify consensus modules across independent data sets

### Usage

    consensus_modules(
      exp_list,
      metadata,
      power,
      cor_method = "spearman",
      net_type = "signed hybrid",
      module_merging_threshold = 0.8,
      verbose = FALSE
    )

### Arguments

`exp_list` | A list containing the expression data frames with genes in row names and samples in column names or 'SummarizedExperiment' objects. The list can be created by using `list(exp1, exp2, ..., expn)`.
`metadata` | A data frame containing sample names in row names and sample annotation in the first column. Ignored if 'exp_list' is a list of 'SummarizedExperiment' objects, since the function will extract colData.
`power` | Numeric vector of beta power for each expression set as calculated by `consensus_SFT_fit`.
`cor_method` | Correlation method used for network reconstruction. One of "spearman" (default), "biweight", or "pearson".
`net_type` | Network type. One of "signed hybrid" (default), "signed" or "unsigned".
`module_merging_threshold` | Correlation threshold to merge similar modules into a single one. Default: 0.8.
`verbose` | Logical indicating whether to display progress messages or not. Default: FALSE.

### Value

A list containing 4 elements:

consModules

  Consensus module assignments

consMEs

  Consensus module eigengenes

exprSize

  Description of the multi-set object returned by the function `WGCNA::checkSets`

sampleInfo

  Metadata for each expression set

genes_cmodules

  Data frame of genes and consensus modules

dendro_plot_objects

  Objects to be used in dendrogram plotting

### See Also

`cutreeDynamic`

### Examples

    set.seed(12)
    data(zma.se)
    filt.zma <- filter_by_variance(zma.se, n=500)
    zma.set1 <- filt.zma[, sample(colnames(filt.zma), size=20, replace=FALSE)]
    zma.set2 <- filt.zma[, sample(colnames(filt.zma), size=20, replace=FALSE)]
    list.sets <- list(zma.set1, zma.set2)
    # SFT power previously identified with consensus_SFT_fit()
    cons_mod <- consensus_modules(list.sets, power = c(11, 13),
                                  cor_method = "pearson")

[Package BioNERO version 1.0.4 Index]