Skip to main content

AutoMotif: Automated Motif Detection in Network Graphs

What is it?

AutoMotif streamlines the identification and cataloging of motifs within network graphs. Utilizing NetworkX for graph manipulation, dotmotif for detecting motifs, and pandas for data management, it simplifies the process of uncovering patterns across both directed and undirected networks. Users can customize searches based on motif size, directionality, executors and the treatment of automorphisms, as well as even having the option to save the results for further analysis.

Installation

pip install automotifs

If you have an NVIDIA GPU and want to use GPU acceleration, ensure your system meets the requirements for CUDA 11 or CUDA 12, and then install the appropriate package: For CUDA 11:

pip install nx-cugraph-cu11 --extra-index-url https://pypi.nvidia.com

For CUDA 12:

pip install nx-cugraph-cu12 --extra-index-url https://pypi.nvidia.com

Quick Start

from automotif import AutoMotif
from dotmotif import executors
import networkx as nx

# Example: A random directed graph
G = nx.gnp_random_graph(100, 0.5, directed=True)

# Set up AutoMotif for GPU accelerated motif finding
motif_finder = AutoMotif(Graph=G, size=3, directed=True, verbose=True, use_GPU=True)

# Start finding motifs
motifs = motif_finder.find_all_motifs()

# Calculate the Z-Score for the motifs
z_scores = motif_finder.calculate_zscore(num_random_graphs = 30, Executor = executors.NetworkXExecutor)

# Display the motifs found
motif_finder.display_all_motifs()

Features

  • Automated Detection: AutoMotif automates the detection of motifs, eliminating the need for manual parameter adjustments. It's designed to be efficient and user-friendly, allowing users to focus more on analysis and less on setup.
  • Flexible and Powerful: Capable of handling both directed and undirected graphs, AutoMotif provides flexibility in defining motifs, including size and whether to consider automorphisms, ensuring a broad applicability across different types of network analyses. Additionally, AutoMotif supports GPU acceleration, allowing users to leverage the power of NVIDIA GPUs by setting use_GPU=True to accelerate motif detection.
  • Data Organization and Export: Directly save your motifs to CSV files for easy access, further analysis, or sharing with your team or research community.
  • Z-Score Calculation: Assess the statistical significance of detected motifs by calculating their Z-scores, providing insights into the rarity or commonality of patterns within your network compared to random expectations.
  • Visual Representation: AutoMotif includes features for visualizing network motifs, allowing users to display them as graphs within the application. This aids in the qualitative analysis of motifs, offering a graphical representation of network patterns and their connections for easier interpretation and presentation.

Contributions

We encourage contributions to AutoMotif! If you have ideas for improvements or new features, don't hesitate to open an issue or submit a pull request on our repository.

License

AutoMotif is made available under the MIT License. See the LICENSE file for more details.


Who made this?

AutoMotif was developed by Giorgio Micaletto under the guidance of Professor Marta Zava at Bocconi University. This tool is designed to simplify and facilitate the complex process of network motif analysis. Contacts:

Metadata

Release files for automotifs 1.6

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

Source distribution (sdist)

Source distribution for automotifs 1.6
File Size Uploaded Provenance Actions
automotifs-1.6.tar.gz 14.3 kB Without provenance Details for automotifs-1.6.tar.gz

Built distribution (wheel)

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

Total release size: 27.3 kB

Release files / automotifs-1.6.tar.gz

Download URL automotifs-1.6.tar.gz
Size 14.3 kB
Tags Source
SHA-256 checksum
How to use checksums
7dedc19b4cf5ba7f90c0816fe9cbc50bdc2692fca443b147b6131d5e9fa54240
BLAKE2b-256 checksum
How to use checksums
2810718a6ea5912866c7552596b377d9f5df75aa5f1e0417c81a245dc3ffa768
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.9.19

Release files / automotifs-1.6-py3-none-any.whl

Download URL automotifs-1.6-py3-none-any.whl
Size 13.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6efcd790b5cea755223f26f9416f88daa41801dce183035421785c96e0082794
BLAKE2b-256 checksum
How to use checksums
f9808f2be577cdcb08b89919dae2b03f3aeb5a4798905ca214d6c547a408ef4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.9.19

Security for automotifs 1.6

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.

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