Learn R Programming

WGCNA (version 1.61)

intramodularConnectivity: Calculation of intramodular connectivity

Description

Calculates intramodular connectivity, i.e., connectivity of nodes to other nodes within the same module.

Usage

intramodularConnectivity(adjMat, colors, scaleByMax = FALSE)

intramodularConnectivity.fromExpr(datExpr, colors, corFnc = "cor", corOptions = "use = 'p'", distFnc = "dist", distOptions = "method = 'euclidean'", networkType = "unsigned", power = if (networkType=="distance") 1 else 6, scaleByMax = FALSE, ignoreColors = if (is.numeric(colors)) 0 else "grey", getWholeNetworkConnectivity = TRUE)

Arguments

adjMat

adjacency matrix, a square, symmetric matrix with entries between 0 and 1.

colors

module labels. A vector of length ncol(adjMat) giving a module label for each gene (node) of the network.

scaleByMax

logical: should intramodular connectivities be scaled by the maximum IM connectivity in each module?

datExpr

data frame containing expression data. Columns correspond to genes and rows to samples.

corFnc

character string specifying the function to be used to calculate co-expression similarity for correlation networks. Defaults to Pearson correlation. Any function returning values between -1 and 1 can be used.

corOptions

character string specifying additional arguments to be passed to the function given by corFnc. Use "use = 'p', method = 'spearman'" to obtain Spearman correlation.

distFnc

character string specifying the function to be used to calculate co-expression similarity for distance networks. Defaults to the function dist. Any function returning non-negative values can be used.

distOptions

character string specifying additional arguments to be passed to the function given by distFnc. For example, when the function dist is used, the argument method can be used to specify various ways of computing the distance.

networkType

network type. Allowed values are (unique abbreviations of) "unsigned", "signed", "signed hybrid", "distance".

power

soft thresholding power.

ignoreColors

level(s) of colors that identifies unassigned genes. The intramodular connectivity in this "module" will not be calculated.

getWholeNetworkConnectivity

logical: should whole-network connectivity be computed as well? For large networks, this can be quite time-consuming.

Value

If input getWholeNetworkConnectivity is TRUE, a data frame with 4 columns giving the total connectivity, intramodular connectivity, extra-modular connectivity, and the difference of the intra- and extra-modular connectivities for all genes; otherwise a vector of intramodular connectivities,

Details

The module labels can be numeric or character. For each node (gene), the function sums adjacency entries (excluding the diagonal) to other nodes within the same module. Optionally, the connectivities can be scaled by the maximum connectivy in each module.

References

Dong J, Horvath S (2007) Understanding Network Concepts in Modules, BMC Systems Biology 2007, 1:24

See Also

adjacency