Skip to main content

PyMotifCounter

A unified Python interface to fast motif enumeration algorithms such as:

  • mfinder

  • fanmod

  • NetMODE

  • PGD

A typical usage example is as follows:

"""
Visualise the distribution of size-3 motifs.
"""

from pymotifcounter.concretecounters import PyMotifCounterMfinder
from matplotlib import pyplot as plt
from networkx import watts_strogatz_graph

if __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:

https://github.com/aanastasiou/pymotifcounter/blob/main/doc/source/resources/figures/fig_dist_motif_3.png?raw=true

Installation

Metadata

Release files for pymotifcounter 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for pymotifcounter 1.0.1
File Interpreter ABI Platform Actions
pymotifcounter-1.0.1-py3-none-any.whl Python 3 none any Details for pymotifcounter-1.0.1-py3-none-any.whl

Release files / pymotifcounter-1.0.1-py3-none-any.whl

Download URL pymotifcounter-1.0.1-py3-none-any.whl
Size 551.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5fa4d6f98eb1fcf6eabbfe93d856a6fa78b8c8a4429a7cb229f011581ee93d8e
BLAKE2b-256 checksum
How to use checksums
cea48dab1b8cb6debb74531c795636e8d57877d4232f08ad95a760ba49a40653
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.0

Security for pymotifcounter 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page