Learn R Programming

WGCNA (version 0.95)

adjacency: Calculate network adjacency

Description

Calculates network adjacency from given expression data.

Usage

adjacency(datExpr, selectCols = NULL, power = 6, type = "unsigned", corFnc = "cor", corOptions = "use = 'p'")

Arguments

datExpr
data frame containing expression data. Columns correspond to genes and rows to samples.
selectCols
can be used to select genes whose adjacencies will be calculated. Should be either a numeric vector giving the indices of the genes to be used, or a boolean vector indicating which genes are to be used.
power
soft thresholding power.
type
network type. Allowed values are (unique abbreviations of) "unsigned", "signed", "signed hybrid".
corFnc
character string specifying the function to be used to calculate co-expression similarity. 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.

Value

  • Adjacency matrix of dimensions nrow(datExpr) times nrow(datExpr). If selectCols was given, the number of columns will be the length (if numeric) or sum (if boolean) of selectCols.

Details

The function calculates the similarity of columns (genes) in datExpr by calling the function given in corFnc, transforms the similarity according to type and raises it to power, resulting in a weighted network adjacency matrix. If selectCols is given, the corFnc function will be given arguments (datExpr, datExpr[selectCols], ...); hence the returned adjacency will have rows corresponding to all genes and columns corresponding to genes selected by selectCols.

References

Bin Zhang and Steve Horvath (2005) A General Framework for Weighted Gene Co-Expression Network Analysis, Statistical Applications in Genetics and Molecular Biology, Vol. 4 No. 1, Article 17 Langfelder P, Horvath S (2007) Eigengene networks for studying the relationships between co-expression modules. BMC Systems Biology 2007, 1:54