obtainClusters {netgsa} | R Documentation |
Estimate optimal gene clustering structure
Description
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.
Usage
obtainClusters(A, order, cluster)
Arguments
A |
A 0-1 adjacency matrix |
order |
Final ordering of genes/metabs to be consistent with order you passed data in |
cluster |
Whether or not to cluster (TRUE/FALSE). We always cluster connected components, but if cluster = TRUE we cluster further |
Details
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.
Value
Named numeric vector of membership. The name of each element is the corresponding gene and the value is the cluster it belongs to.
Author(s)
Michael Hellstern
References
Ma, J., Shojaie, A. & Michailidis, G. (2016) Network-based pathway enrichment analysis with incomplete network information. Bioinformatics 32(20):165–3174.