Skip to content
dean geckt edited this page Sep 8, 2024 · 22 revisions

Network motif detection software

The main python entry is motif_search_main.py (will refer to as main.py) which can be ran via any shell / script in a command-line-argument fashion:

motif_search_main.py —help                    					

One can also run the software via a python IDE such as pycharm, or via a script (example is located under /scripts) for an automated process (e.g.; run on the same network with a different synapse threshold values in a loop fashion). In any case, it is mandatory to run from the root folder.

The output of the software depends on the flags, most commonly would be to store the results in a bin result file for later analysis. In any case, the software will print out logs describing the: input network’s properties (#nodes, #edges, #degrees, etc…), the motif-criteria parameters, the enumeration and randomizer algorithms used, and finally the motif table. Note that all logs can be extracted via the binary file at any time.

Detecting motifs includes the following steps

  1. Enumerate the frequency of each subgraph (size k) of the input network
  2. Generate random networks (based on the input network). For each random graph, enumerate the frequency of each subgraph
  3. Test for a statistical significance of each subgraph

image

Each step is implemented in a different python class (described below), and the logic is glued together inside main.py.

Data structures

The data structures (DS) are the core of the software and later affect the post processing analysis as well.

The software defines the DS either via python Enum or via Pydantic (an external python famous package), which can be thought of as a ‘class’ without function (like C structure).

They are located under /utils/types.py

Main classes

The abstract classes are

TODO: Using iso maps in advance vs not… Discuss large k mapping function.

Software flags

  • Random seed: a seed set once for the entire program, it mostly affects the random modules such as the randomizer.
  • Log file: an input path for a log file. The software will save all logs to this file.
  • Bin file: an input path for a bin ‘result’ file. The software will save all relevant results in the data structure conventions (details below).

Network motif post analysis:

These utilities are mostly jupyter notebook (python code) located under /post-motif-analysis folder. They require a binary output file(s) to work:

Clone this wiki locally