cdlib.algorithms.mcode

cdlib.algorithms.mcode(g_original: object, weights: str | None = None, weight_threshold: float = 0.2) NodeClustering

MCODE is the earliest seed-growth method for predicting protein complexes from PPI networks. MCODE works in two steps:

  1. vertex weighting, and

  2. 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 defined 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

Returns:

NodeClustering object

Example:

>>> from cdlib import algorithms
>>> import networkx as nx
>>> G = nx.karate_club_graph()
>>> coms = algorithms.mcode(G)
References:

Bader, G.D., Hogue, C.W. 2003. An automated method for finding molecular complexes in large protein interaction networks. BMC Bioinformatics 4, 2.