network_reduction_by_pickHardThreshold: Reduces network based on WGCNA::pickHardThreshold function

Description Usage Arguments Value Source Examples

View source: R/network_reduction.R

Description

(INTERNAL) This function uses pickHardThreshold.fromSimilarity or an alternative implementation pickHardThreshold_alternative contained in this package to analyze scale free topology for multiple hard thresholds. Within the first iteration a 'coarse' cutoff is estimated. If no cutoff is found the function terminates with an error message. The second iteration determines a 'fine-grained' cutoff based on the first iterations cut estimate (+/- 0.25) in sequence steps of 0.01. All values below the cutoff will be set to NA and the reduced adjacency is returned.

Usage

1
2
3
4
5
6
network_reduction_by_pickHardThreshold(
  adjacency_matrix,
  RsquaredCut = 0.85,
  cutVector = seq(0.2, 0.8, by = 0.05),
  method = "pickHardThreshold"
)

Arguments

adjacency_matrix

Adjacency matrix of correlation values.

RsquaredCut

A number indicating the desired minimum scale free topology fitting index R^2.

cutVector

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

method

String. Determines whether the original implementation of pickHardThreshold.fromSimilarity is used ("pickHardThreshold") or the alternative implementation contained in this package pickHardThreshold_alternative ("pickHardThreshold_alternative").

Value

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

Source

The original implementation of pickHardThreshold is used from pickHardThreshold.fromSimilarity

Examples

1
2
3
4
data(mrna_data)
adj_mat <- WGCNA::cor(mrna_data$group1$data)
reduced_by_PHT <- network_reduction_by_pickHardThreshold(adj_mat,
RsquaredCut = 0.1, cutVector = seq(0.2, 0.8, by = 0.05))

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