diff --git a/Overlap/extract_component.py b/Overlap/extract_component.py index 4452979e96267c986d0556e7c37dbef5418d621b..46957ea3203b54272eb87587244204e907d5bfc4 100755 --- a/Overlap/extract_component.py +++ b/Overlap/extract_component.py @@ -11,6 +11,7 @@ each vertex of the graph. import csv import pathlib import sys +from os import path import graph_tool from graph_tool import topology @@ -32,6 +33,12 @@ if input_suffix == ".csv": hash_type="int", csv_options = {'delimiter': ' ', 'skipinitialspace': True}) + dir_edgelist = path.dirname(sys.argv[1]) + e_overestim_file = path.join(dir_edgelist, "e_overestim.txt") + g.graph_properties["e_overestim"] = g.new_graph_property("int") + + with open(e_overestim_file) as f_obj: + g.graph_properties["e_overestim"] = int(f_obj.read()) else: # assert input_suffix in {".gt", ".graphml"} g = graph_tool.load_graph(sys.argv[1])