mcode(g_original: object, weights: str = None, weight_threshold: float = 0.2) → cdlib.classes.node_clustering.NodeClustering¶
MCODE is the earliest seed-growth method for predicting protein complexes from PPI networks. MCODE works in two steps:
- vertex weighting, and
- molecular complex prediction.
In the vertex weighting step, the weight of a vertex v in the PPI network is calculated from the highest k-core of v’s neighborhood, including v. The k-core of a graph is a subgraph where every node is of degree k or greater; the highest k-core is simply the k-core with the highest value of k. The weight of v is deﬁned as this maximum k times the density of the corresponding k-core.
Supported Graph Types
Undirected Directed Weighted Yes No Yes Parameters:
- g_original – a networkx/igraph object
- weights – label used for the edge weights. Default, None.
- weight_threshold – Threshold for similarity weighs
>>> from cdlib import algorithms >>> import networkx as nx >>> G = nx.karate_club_graph() >>> coms = algorithms.mcode(G)
Bader, G.D., Hogue, C.W. 2003. An automated method for ﬁnding molecular complexes in large protein interaction networks. BMC Bioinformatics 4, 2.
Reference Implementation: https://github.com/trueprice/python-graph-clustering