View source: R/utility_functions.R
getConnectivity | R Documentation |
Computes gene connectivity from adjaceny/topological overlap matix. Part of WCGNA network analysis workflow.
getConnectivity(w.mat, gene.names, flag.top.n = 20)
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. |
Dataframe with gene connectivity, rank and label flag.
Nicholas Mikolajewicz
# 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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.