From 0b0ed6849073c8af61672172adeb51ea04b52bfd Mon Sep 17 00:00:00 2001 From: Tooba Abbassi-Daloii <31986271+tabbassidaloii@users.noreply.github.com> Date: Thu, 30 Jan 2025 10:55:30 +0100 Subject: [PATCH 1/3] Update generator.py @jmillanacosta could you check if the issue with Cytoscape and Neo4j is being solved now? On the muscle_usecase branch, it works with no issues. --- src/pyBiodatafuse/graph/generator.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pyBiodatafuse/graph/generator.py b/src/pyBiodatafuse/graph/generator.py index 78126602..03131178 100644 --- a/src/pyBiodatafuse/graph/generator.py +++ b/src/pyBiodatafuse/graph/generator.py @@ -965,3 +965,5 @@ def save_graph( pickle.dump(g, f) nx.write_gml(g, graph_path_gml) logger.warning(f"Graph saved in {graph_path_pickle} and {graph_path_gml}") + + return g From 3bfd4e68c92446cbe756915c84c62c8f2c9ab205 Mon Sep 17 00:00:00 2001 From: Tooba Abbassi-Daloii <31986271+tabbassidaloii@users.noreply.github.com> Date: Thu, 30 Jan 2025 11:03:29 +0100 Subject: [PATCH 2/3] Update generator.py --- src/pyBiodatafuse/graph/generator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pyBiodatafuse/graph/generator.py b/src/pyBiodatafuse/graph/generator.py index 03131178..44ae2b5c 100644 --- a/src/pyBiodatafuse/graph/generator.py +++ b/src/pyBiodatafuse/graph/generator.py @@ -965,5 +965,5 @@ def save_graph( pickle.dump(g, f) nx.write_gml(g, graph_path_gml) logger.warning(f"Graph saved in {graph_path_pickle} and {graph_path_gml}") - + return g From 5972c2f07d05d2345a3f84671e98bd33019fb4c5 Mon Sep 17 00:00:00 2001 From: Tooba Abbassi-Daloii <31986271+tabbassidaloii@users.noreply.github.com> Date: Thu, 30 Jan 2025 11:06:49 +0100 Subject: [PATCH 3/3] Update generator.py --- src/pyBiodatafuse/graph/generator.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pyBiodatafuse/graph/generator.py b/src/pyBiodatafuse/graph/generator.py index 44ae2b5c..1e4f10b9 100644 --- a/src/pyBiodatafuse/graph/generator.py +++ b/src/pyBiodatafuse/graph/generator.py @@ -939,6 +939,8 @@ def save_graph( :param disease_compound: the input DataFrame containing disease-compound relationships. :param graph_name: the name of the graph. :param graph_dir: the directory to save the graph. + :returns: a NetworkX MultiDiGraph + """ graph_path = f"{graph_dir}/{graph_name}" os.makedirs(graph_path, exist_ok=True)