Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aanastasiou/pymotifcounter
Python interface to the motif counting algorithms mfinder, fanmod, pgd, NetMODE
https://github.com/aanastasiou/pymotifcounter
bioinformatics graph-algorithms graph-theory networks python3 scientific-computing
Last synced: 2 months ago
JSON representation
Python interface to the motif counting algorithms mfinder, fanmod, pgd, NetMODE
- Host: GitHub
- URL: https://github.com/aanastasiou/pymotifcounter
- Owner: aanastasiou
- License: apache-2.0
- Created: 2021-10-22T09:11:19.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-17T14:17:05.000Z (over 1 year ago)
- Last Synced: 2024-04-28T00:23:08.826Z (8 months ago)
- Topics: bioinformatics, graph-algorithms, graph-theory, networks, python3, scientific-computing
- Language: C
- Homepage:
- Size: 1010 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
==============
PyMotifCounter
==============A unified Python interface to fast motif enumeration algorithms such as:
* ``mfinder``
* ``fanmod``
* ``NetMODE``
* ``PGD``A typical usage example is as follows:
.. code-block:: Python
"""
Visualise the distribution of size-3 motifs.
"""from pymotifcounter.concretecounters import PyMotifCounterMfinder
from matplotlib import pyplot as plt
from networkx import watts_strogatz_graphif __name__ == "__main__":
# Create an example network
g = watts_strogatz_graph(100, 8, 0.2)
# Create a motif counter based on mfinder
motif_counter = PyMotifCounterMfinder()
# Enumerate motifs using the selected counter
g_mtf_count = motif_counter(g)
# Visualise the distribution
g_mtf_count.plot.bar("motif_id", "nreal")
plt.tight_layout()
plt.show()Which would produce the following distribution:
.. image:: https://github.com/aanastasiou/pymotifcounter/blob/main/doc/source/resources/figures/fig_dist_motif_3.png?raw=true
Installation
------------
* Latest release can be installed from pypi by ``> pip install pymotifcounter``.* Latest development version can be obtained by `cloning this repository `_
* For more details please see `the project's documentation on readthedocs `_