SPAC, the subgraph p-value calculator, analytically computes the pvalue of an injective colored motif on a target network. INPUTS: - A text file with the full specification of the colored out-degree distributions of the input network. The text file has a matrix structure, where rows index colors and columns index degrees (starting from degree 0). Here is a fully worked out example. - A text file with the full specification of the colored in-degree distributions of the input network. The text file has the same structure of the one for the specification of out-degree distributions. - A text file with the full specification of the topology and the colors of the query. At the moment there is no support for wildcards, so colors must be fully specified. If we include them we need to change a little bit the model (because now we are still not able to compute a single p-value for a partially defined motif). - The type of motif: induced or non-induced [default] - The number of occurrences of the motif in the target network - The EDD model type: color-topology dependent [default] or independent OUTPUT: - Mean and variance of the counts in the random EDD model and, of course, the analytical p-value for the motif. This can be returned as a text file and the format can be personalized in any way . Fully worked out example: Let's consider a directed network with 3 different node colors. INPUTS: 1) Colored out-degree distributions (outDegrees.txt) 0 4 1 5 2 3 4 2 3 3 8 1 1 6 2 7 3 5 5 2 3 1 2 4 3 1 1 0 2 0 0 0 0 0 1 0 0 1 1 0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 2 1 4 3 5 4 13 10 4 6 4 9 1 2 4 2 2 1 1 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 2 9 14 7 14 14 9 9 9 2 2 2 2 2 3 1 2 1 0 0 2 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2) Colored in-degree distributions (inDegrees.txt) 1 0 3 4 4 3 7 3 6 3 6 5 5 3 7 3 3 1 1 1 2 0 1 0 0 2 2 2 0 2 1 2 0 1 0 1 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 3 2 7 8 8 8 6 11 7 10 7 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 6 4 8 5 11 13 5 11 8 4 1 3 5 2 3 1 3 4 2 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3) Query specification (query.txt): the query is a directed graph with 3 nodes (with colors 1, 1 and 2, respectively) and 3 edges (1-0, 2-0, 2-1). directed 3 1 1 2 1 0 2 0 2 1 3) Type of motif: non-induced 4) Number of occurrences: 826 5) Type of EDD model: color-degree dependent OUTPUTS: MEAN: 376.11604592881525 VARIANCE: 25529.801184925338 P-VALUE: 0.009182512992337188