-
Notifications
You must be signed in to change notification settings - Fork 0
Home
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 Arguments. Most commonly would be to store the results in a binary 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
- Enumerate the frequency of each subgraph (size k) of the input network
- Generate random networks (based on the input network). For each random graph, enumerate the frequency of each subgraph
- Test for a statistical significance of each subgraph
Each step is implemented in one of the Main Classes, and the logic is glued together in main.py.
All parts of the software (as well as later analysis) use common Data structures, these are the core parts of the software and help explain what is later saved in the binary result files.
To detect large motifs (i.e.: K>=5) one needs to turn off the use_isomorphic_mapping flag. In this case the enumeration algorithm will be notified that the isomorphic mapping is not available. Every time the algorithm will increment the canonical counter of a new subgraph (i.e., the isomorphic counter), it will find the canonical id of that subgraph, iterating on the frequency list.
If the isomorphic mapping was available, finding the canonical id is an O(1) operation by searching the dictionary. Why not use isomorphic mapping all the time? In short: the process of creating these mappings is exponentially long and described in Isomorphic mapping.
These utilities are mostly jupyter notebook (python code) located under /post-motif-analysis folder. They require a binary output file(s) to work: