network_reduction_by_pickHardThreshold function

[INTERNAL] Reduces network based on WGCNA::pickHardThreshold function

[INTERNAL] Reduces network based on WGCNA::pickHardThreshold function

[INTERNAL] This function uses pickHardThreshold.fromSimilarity to analyze scale free topology for multiple hard thresholds. A cutoff is estimated, if no cutoff is found the function terminates with an error message. All values below the cutoff will be set to NA and the reduced adjacency is returned.

Source

The original implementation of pickHardThreshold is used from pickHardThreshold.fromSimilarity

network_reduction_by_pickHardThreshold( adjacency_matrix, r_squared_cutoff = 0.85, cut_vector = seq(0.2, 0.8, by = 0.01), mean_number_edges = NULL, edge_density = NULL )

Arguments

  • adjacency_matrix: [matrix] Adjacency matrix of correlations computed using cor in compute_correlation_matrices
  • r_squared_cutoff: [float] A number indicating the desired minimum scale free topology fitting index R^2 for reduction using pickHardThreshold. (default: 0.85)
  • cut_vector: [sequence of float] A vector of hard threshold cuts for which the scale free topology fit indices are to be calculated during reduction with pickHardThreshold. (default: seq(0.2, 0.8, by = 0.01))
  • mean_number_edges: [int] Find a suitable edge weight cutoff employing pickHardThreshold to reduce the network to at most the specified mean number of edges. Attention: This parameter overwrites the 'r_squared_cutoff' and 'edge_density' parameters if not set to NULL. (default: NULL)
  • edge_density: [float] Find a suitable edge weight cutoff employing pickHardThreshold to reduce the network to at most the specified edge density. Attention: This parameter overwrites the 'r_squared_cutoff' parameter if not set to NULL. (default: NULL)

Returns

A reduced adjacency matrix of correlations with NA's inserted at positions below estimated cutoff.

  • Maintainer: Katharina Baum
  • License: MIT + file LICENSE
  • Last published: 2022-09-23

Useful links