easygraph.functions.community.motif module#

easygraph.functions.community.motif.enumerate_subgraph(G, k: int)[source]#

Returns the motifs. Motifs are small weakly connected induced subgraphs of a given structure in a graph.

Parameters:
  • G (easygraph.Graph or easygraph.DiGraph.) –

  • k (int) – The size of the motifs to search for.

Returns:

k_subgraphs – The motifs.

Return type:

list

References

[1]

Wernicke, Sebastian. “Efficient detection of network motifs.” IEEE/ACM transactions on computational biology and bioinformatics 3.4 (2006): 347-359.

easygraph.functions.community.motif.random_enumerate_subgraph(G, k: int, cut_prob: list)[source]#

Returns the motifs. Motifs are small weakly connected induced subgraphs of a given structure in a graph.

Parameters:
  • G (easygraph.Graph or easygraph.DiGraph.) –

  • k (int) – The size of the motifs to search for.

  • cut_prob (list) – list of probabilities for cutting the search tree at a given level.

Returns:

k_subgraphs – The motifs.

Return type:

list

References

[1]

Wernicke, Sebastian. “A faster algorithm for detecting network motifs.”

International Workshop on Algorithms in Bioinformatics. Springer, Berlin, Heidelberg, 2005.