A wrapper for automatic Motif Detection
Project description
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:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file automotifs-1.6.tar.gz
.
File metadata
- Download URL: automotifs-1.6.tar.gz
- Upload date:
- Size: 14.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7dedc19b4cf5ba7f90c0816fe9cbc50bdc2692fca443b147b6131d5e9fa54240 |
|
MD5 | 5e965e6f9ccc2822d81da87c3d77d09c |
|
BLAKE2b-256 | 2810718a6ea5912866c7552596b377d9f5df75aa5f1e0417c81a245dc3ffa768 |
File details
Details for the file automotifs-1.6-py3-none-any.whl
.
File metadata
- Download URL: automotifs-1.6-py3-none-any.whl
- Upload date:
- Size: 13.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6efcd790b5cea755223f26f9416f88daa41801dce183035421785c96e0082794 |
|
MD5 | a112ba49d9e965f8171aa5059e0f5a7f |
|
BLAKE2b-256 | f9808f2be577cdcb08b89919dae2b03f3aeb5a4798905ca214d6c547a408ef4c |