Tries six different clustering methods and chooses the one with the best results. This is a helper function in prepareAdjMat
and should not be called by the user.
obtainClusters(A, order, cluster)
Named numeric vector of membership. The name of each element is the corresponding gene and the value is the cluster it belongs to.
A 0-1 adjacency matrix
Final ordering of genes/metabs to be consistent with order you passed data in
Whether or not to cluster (TRUE/FALSE). We always cluster connected components, but if cluster = TRUE we cluster further
Michael Hellstern
This function tries the six different clustering methods in igraph and chooses the best one. As stated in prepareAdjMat
the six methods evaluated are: cluster_walktrap
, cluster_leading_eigen
, cluster_fast_greedy
, cluster_label_prop
, cluster_infomap
, and cluster_louvain
. See prepareAdjMat
for how the best is chosen. Even if cluster = FALSE
, connected components of the 0-1 adjacency matrix are used as clusters.
It is essential that the order of the returned named numeric vector must be in the same order as the rows of the data matrix.
Ma, J., Shojaie, A. & Michailidis, G. (2016) Network-based pathway enrichment analysis with incomplete network information. Bioinformatics 32(20):165--3174.
prepareAdjMat