getConnectivity.Rd
Computes gene connectivity from adjaceny/topological overlap matix. Part of WCGNA network analysis workflow.
getConnectivity(w.mat, gene.names, flag.top.n = 20)
Adjaceny or toplogoical overlap matrix. Symmetrical matrix, with row and column-wise gene entries.
Vector of gene names corresponding to genes in coloumns/rows of w.mat.
Numerical specifying top N genes to flag (for subsequent plotting). Default is 20.
Dataframe with gene connectivity, rank and label flag.
# run WCGNA
output.all <- runWCGNA(datExpr.noz, cor.metric = "rho_p", soft.power = 2, use.TOM = T)
#> Error in runWCGNA(datExpr.noz, cor.metric = "rho_p", soft.power = 2, use.TOM = T): could not find function "runWCGNA"
# unpack output
s.mat <- output.all[["s.mat"]] # similar matrix
#> Error in eval(expr, envir, enclos): object 'output.all' not found
a.mat <- output.all[["a.mat"]] # adjacency matrix
#> Error in eval(expr, envir, enclos): object 'output.all' not found
w.mat <- output.all[["w.mat"]] # topological overlap matix
#> Error in eval(expr, envir, enclos): object 'output.all' not found
d.mat <- output.all[["d.mat"]] # disimilarity matix
#> Error in eval(expr, envir, enclos): object 'output.all' not found
# get connectivity
df.con <- getConnectivity(w.mat, gene.names = colnames(a.mat))
#> Error in is.data.frame(x): object 'a.mat' not found