SetMo is a tool for enumerating and counting subgraphs (motifs) in networks. It uses two types of g-tries concurrently to both count and prevent-from-counting subgraphs.
- Directed and undirected networks: Supports both directed and undirected graph analysis
- Forbidden subgraphs support: Filter out induced subgraphs, allowing to find exculively some subgraph families (e.g. trees, planar graphs, bipartite graphs, etc.)
- Property checking: Filter subgraphs by properties like average degree, vertex degree, articulation points
- Example networks: Some networks are provided for testing.
- C++ compiler (g++ with C++17 support)
- make
- Standard build tools
cd SetMo
make./SetMo -s <size> -i <input_network>-s <size>: Subgraph size (motif size), must be at least 3-i <input_network>: Path to input network file
-o <output_file>: Path to output file (default: results.html)-d: Network is directed (default: undirected)-q: Skip output file generation-fa <familiy>: Use forbidden subgraphs to search only specific subgraph families (details below)-fs <filename>: Use your own list of forbidden subgraphs (details below)-fsu <filename>: Use your own list of forbidden underlying subgraphs (details below)-<propertyChecker> <propertyValue>: Define values for subgraph properties (details below)
Find subgraphs of specific graph families using the -fa option:
./SetMo -s 4 -i Networks/power.txt -fa triangleFreeAvailable graph-family options:
triangleFreetreeplanarbipartiteclawFreeclusterchordal
You can use -fs to define forbidden subgraphs with custom files:
./SetMo -s 4 -i Networks/power.txt -fs Subgraphs/custom_forbidden_file.txtFor custom underlying forbidden subgraphs (i.e. forbidding an undirected subgraph on a directed network), you should use the -fsu argument.
./SetMo -s 4 -d -i Networks/kemail.txt -fsu Subgraphs/custom_underlying_forbidden_file.txtThe files should contain one adjacency matrix per line, for example:
0100101001010010
0100101101010110Filter subgraphs by graph properties:
-maxAvgDegree <value>: Maximum average degree-minAvgDegree <value>: Minimum average degree-maxVertDegree <value>: Maximum vertex degree-minVertDegree <value>: Minimum vertex degree-maxArtPoints <value>: Maximum number of articulation points-minArtPoints <value>: Minimum number of articulation points
Example:
./SetMo -s 5 -i Networks/power.txt -maxVertDegree 3Explicitly enumerate the subgraphs you want to search by using the -gt <filepath> argument. The file should contain one adjacency matrix per line:
./SetMo -s 6 -i Networks/power.txt -gt Subgraphs/Sample/Power/order6.txtIf not specified, SetMo will assume all subgraphs are searchable, and filter from the set of all subgraphs.
./SetMo -s 4 -i Networks/power.txt./SetMo -s 5 -d -i Networks/neural.txt./SetMo -s 6 -i Networks/power.txt -fa tree./SetMo -s 7 -i Networks/power.txt -maxVertDegree 4./SetMo -s 8 -i Networks/power.txt -gt Subgraphs/Sample/Power/order8.txt -fa clawFreeNetworks should be in adjacency list format, 1 edge per line. Example networks are provided.
Example:
1 2
2 3
4 5
4 6
4 7
6 7
SetMo generates a html file containing:
- Network statistics
- Subgraph enumeration results
- Frequency counts for each subgraph type
- Timing information