getConnectivity: Gene connectivity within network.

View source: R/utility_functions.R

getConnectivityR Documentation

Gene connectivity within network.

Description

Computes gene connectivity from adjaceny/topological overlap matix. Part of WCGNA network analysis workflow.

Usage

getConnectivity(w.mat, gene.names, flag.top.n = 20)

Arguments

w.mat

Adjaceny or toplogoical overlap matrix. Symmetrical matrix, with row and column-wise gene entries.

gene.names

Vector of gene names corresponding to genes in coloumns/rows of w.mat.

flag.top.n

Numerical specifying top N genes to flag (for subsequent plotting). Default is 20.

Value

Dataframe with gene connectivity, rank and label flag.

Author(s)

Nicholas Mikolajewicz

Examples


# run WCGNA
output.all <- runWCGNA(datExpr.noz, cor.metric = "rho_p", soft.power = 2, use.TOM = T)

# unpack output
s.mat <- output.all[["s.mat"]] # similar matrix
a.mat <- output.all[["a.mat"]] # adjacency matrix
w.mat <- output.all[["w.mat"]] # topological overlap matix
d.mat <- output.all[["d.mat"]] # disimilarity matix

# get connectivity
df.con <- getConnectivity(w.mat, gene.names = colnames(a.mat))


NMikolajewicz/scMiko documentation built on June 28, 2023, 1:41 p.m.