Skip to contents

Calculate network statistics

Usage

net_stats(
  adj_matrix = NULL,
  net_type = c("gcn", "ppi", "grn"),
  calculate_additional = FALSE
)

Arguments

adj_matrix

Adjacency matrix that represents the network.

net_type

One of "gcn" (gene coexpression network), "ppi" (protein-protein interaction), or "grn" (gene regulatory network).

calculate_additional

Logical indicating whether to calculate additional network statistics (betweenness and closeness). Default is FALSE.

Value

A list containing the following elements:

  • Connectivity

  • ScaledConnectivity

  • ClusterCoef

  • MAR (for gcn only)

  • Density

  • Centralization

  • Heterogeneity (gcn only)

  • Diameter

  • Betweenness

  • Closeness

Examples

# \donttest{
data(filt.se)
set.seed(12)
filt.se <- exp_preprocess(
    filt.se, Zk_filtering = FALSE, variance_filter = TRUE, n = 200
)
gcn <- exp2gcn(
    filt.se, SFTpower = 7, cor_method = "pearson", net_type = "signed hybrid"
)
#> ..connectivity..
#> ..matrix multiplication (system BLAS)..
#> ..normalization..
#> ..done.
stats <- net_stats(gcn$adjacency_matrix, net_type = "gcn")
# }