Higher-order organization of complex networks

Motif-based clustering code in SNAP

The code to run motif-based clustering is in the latest version of SNAP. See the examples/motifcluster directory for sample code.

You can also download the code directly, which comes with the C. elegans data. Once you have unzip the file, run the following to look at the bifan cluster for the C. elegans frontal neuronal network.

# Build the code
cd snap-higher-order/examples/motifcluster/
make
# Run the code
./motifcluster -i:C-elegans-frontal.txt -m:bifan
# Look at the cluster
cat C-elegans-frontal-bifan-cluster.txt
python get_names.py C-elegans-frontal-bifan-cluster.txt C-elegans-frontal-meta.csv


The code uses the following naming conventions for motifs (the -m parameter).
Motif naming conventions
M1 M8 bifan
M2 M9 edge
M3 M10
M4 M11
M5 M12
M6 M13
M7

Experimental Matlab code

Experimental Matlab code is available on GitHub. This code is not high-performance but can handle graphs of decent size. The repository contains examples that reproduce the results in Figure 2 and Section S7.1 of the paper.

Jupyter notebooks and Julia code

Examples from Figure 2 (neuronal network), Figure 3 (transportation reachability), and Figure S8 (food web) in the paper are available as Jupyter notebooks with Julia code. You can run them on the web with no installation of Julia using JuliaBox. Instructions are on located on the GitHub page. You can also take a look at static Jupyter networks here: