A tool for discovering and analyzing motifs in neural connectivity data
Motif Discovery is a project developed by APL Brain aimed at identifying recurring structural and functional patterns in neural networks. These motifs can provide insights into the organizational principles of brain connectivity and help understand the relationship between structure and function.
- Pattern detection in connectivity matrices
- Statistical analysis of motif occurrences
- Resources to enable cross-species or cross-dataset analysis
# Clone the repository
git clone https://github.com/aplbrain/motif-discovery.git
cd motif-discovery
uv sync# Search for four-vertex motifs in the C. elegans connectome; use the top 8
# most significant undirected motifs to search for directed motifs.
uv run python motif_discovery.py --xswap_samples 20 --vertices 4 --host_id Witvliet_8 --data_dir ./data/ --promote_top_n 8
# Search for four-vertex motifs in the C. elegans connectome; use the top 8
# most significant undirected motifs to search for directed motifs. Use the
# `excmod` variant to include only excitatory and modulatory synapses.
uv run python motif_discovery.py --xswap_samples 20 --vertices 4 --host_id Witvliet_8 --data_dir ./data/ --variant excmod --promote_top_n 8usage: motif_discovery.py [-h] [--xswap_samples XSWAP_SAMPLES] [--vertices {2,3,4,5,6}] [--host_id HOST_ID] [--data_dir DATA_DIR]
[--variant {excmod,inhmod,exc,inh,}] [--promote_top_n PROMOTE_TOP_N]
options:
-h, --help show this help message and exit
--xswap_samples XSWAP_SAMPLES
Number of random samples to use for xswap
--vertices {2,3,4,5,6}
Number of vertices in the motif
--host_id HOST_ID
Host ID of the connectome to use (from Motif Studio)
--data_dir DATA_DIR
Directory for outputs
--variant {excmod,inhmod,exc,inh,}
Variant to use for motif discovery:
`excmod` - excitatory and modulatory synapses
`inhmod` - inhibitory and modulatory synapses
`exc` - excitatory synapses only
`inh` - inhibitory synapses only
--promote_top_n PROMOTE_TOP_N
Number of top undirected motifs to promote for
a templated search.This project is licensed under the Apache 2.0 - see the LICENSE file for details.
