identifyModules: Module Identification

Description Usage Arguments Value References Examples

View source: R/identifyModules.R

Description

Module Identification

Usage

1
2
3
4
identifyModules(graph, data, phenotype, covars = NULL, annotations,
merge.overlapping=FALSE, better.than.components= TRUE, alpha=0.05,
level=NULL, representative.method="average", correction.method="bonferroni",
BPPARAM = SerialParam(progressbar = TRUE))

Arguments

graph

an igraph object, which can be generated with generateNetwork. The ID of the nodes must correspond to the name of the variables.

data

either a matrix, where the columns correspond to the variables and the rows to the observations. Or a data.table with three columns: name, sampleID and value.

phenotype

a vector with the values for a phenotype of interest. It must have the same number of observations as data.

covars

a data.table containing the covariates to correct for. The rows for the samples must be in the same order as in the phenotype vector.

annotations

a data.table containing annotations for the variables. The columns correspond to the different annotations, the rows to the variables.

merge.overlapping

if TRUE, overlapping modules will be merged.

better.than.components

if TRUE, modules will only be enlarged and accepted, if they are better than all of their components.

alpha

significance level for accepting the modules.

level

Must be set to the name of the column to be used, if modules should be calculated for pathways.

representative.method

the method, that is used for the calculation of the module representation. Currently implemented: "eigenmetabolite" and "average"

correction.method

the method that used for multiple testing correction ("bonferroni", "BH", "BY", "fdr", "holm", "hochberg", "hommel", "none"). Default is set to bonferroni. See p.adjust.

BPPARAM

An instance of the BiocParallelParam-class that determines how to parallelisation of the functions will be evaluated.

scoringFunction

a scoring function accepting parameters moduleRepresentatives, phenotype and covars. See linearScoring

Value

a list consisting of four elements.

References

\insertRef

Do2017MoDentify

\insertRef

Chuang2007MoDentify

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
data(qmdiab.data)
data(qmdiab.annos)
data(qmdiab.phenos)

data <- qmdiab.data[, 1:75]
annotations <- qmdiab.annos[1:75]

net.graph <- generateNetwork(data = data, annotations = annotations)
mods <- identifyModules(
  graph = net.graph, data = data, annotations =
    annotations, phenotype = qmdiab.phenos$T2D, alpha = 0.05
)

pathway.graph <- generatePathwaysNetwork(data = data, annotations = annotations)

pathway.modules <- identifyModules(
  graph = pathway.graph$network, data = data,
  phenotype = qmdiab.phenos$T2D, level = pathway.graph$level, annotations = annotations,
  alpha = 0.05
)

krumsiek/MoDentify documentation built on March 25, 2021, 8:32 a.m.