pickHardThreshold_alternative: Alternative implementation of WGCNA::pickHardThreshold

Description Usage Arguments Value Source Examples

Description

(INTERNAL) Alternative implementation of pickHardThreshold to fit to the needs of this package. Most importantly the function was simplified to only apply to the use case of finding a cut-off value to reduce a correlation matrix. The following changes were applied in comparison to the original function: * The function __always__ assumes similarity matrices (i.e. correlation matrices) as input * Additional settings have been removed ('dataIsExpr', 'moreNetworkConcepts', 'removeFirst', 'corFnc', 'corOptions', 'nBreaks') * The function uses scaleFreeFitIndex_alternative for fit index calculation * Print prompts and additional metrics were removed * An error message that reports the lowest R-squared computed in case this value did not satisfy the RsquaredCut value was added.

Description by pickHardThreshold:Analysis of scale free topology for multiple hard thresholds. The aim is to help the user pick an appropriate threshold for network construction.

Usage

1
2
3
4
5
pickHardThreshold_alternative(
  data,
  RsquaredCut = 0.85,
  cutVector = seq(0.1, 0.9, by = 0.05)
)

Arguments

data

Similarity (correlation) matrix. With entries between 0 and 1 (i.e. absolute values of correlation matrix)

RsquaredCut

desired minimum scale free topology fitting index

cutVector

a vector of hard threshold cuts for which the scale free topology fit indices are to be calculated.

Value

estimate of an appropriate hard-thresholding cut: the lowest cut for which the scale free topology fit exceeds RsquaredCut. If is below RsquaredCut for all cuts, an error is thrown.

Source

pickHardThreshold and scaleFreeFitIndex

Examples

1
2
3
4
5
6
7
adjacency_matrix <- matrix(rnorm(36),nrow=6)
diag(adjacency_matrix) <- 1
RsquaredCut <- 0.001
cutVector <- seq(0.2, 0.8, by = 0.05)

cutEstimate_coarse <- pickHardThreshold_alternative(abs(adjacency_matrix), RsquaredCut,
cutVector)

molnet-org/molnet documentation built on Dec. 21, 2021, 8:59 p.m.