Motif significance Runtime error
When I try to run the clustering.motif_significance() method on a graph with a random rewire input of "erdos"
it returns the following error:
RuntimeError: invalid bin size of zero!
However, when I run the clustering.motifs() method with the random rewire graph, it works fine. The code to reproduce the error is here:
from numpy import random
import pickle
import graph_tool.all as gt
random.seed(10)
g = pickle.load(open('sample_graph.pickle', 'rb'))
motifs, motifs_count = gt.motifs(g, 5) # This works fine
g_copy = g.copy()
ret = gt.random_rewire(g, "erdos")
motifs, motifs_count = gt.motifs(g, 5) # This works fine
motifs_rw, motifs_count_rw = gt.motif_significance(g_copy, shuffle_model='erdos', k=5) # THIS RETURNS AN ERROR
I think the issue might be that all motif patterns in the original graph might not be present in the rewired graph. Can you please help on this? The sample pickled graph is attached.