From 49d2e0c5de41f49d200b9798a68b83e38cfaf3e7 Mon Sep 17 00:00:00 2001 From: Nick Croucher Date: Fri, 15 Nov 2024 10:05:14 +0000 Subject: [PATCH] Print network information --- PopPUNK/plot.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/PopPUNK/plot.py b/PopPUNK/plot.py index 26663c62..ab7e580f 100644 --- a/PopPUNK/plot.py +++ b/PopPUNK/plot.py @@ -560,9 +560,13 @@ def outputsForCytoscape(G, G_mst, isolate_names, clustering, outPrefix, epiCsv, # Save each component too (useful for very large graphs) component_assignments, component_hist = gt.label_components(G) + print("All assignments: " + str(component_assignments)) for component_idx in range(len(component_hist)): remove_list = [] for vidx, v_component in enumerate(component_assignments.a): + print("Index: " + str(vidx)) + print("Component: " + str(v_component)) + print("Name: " + str(isolate_labels[vidx])) if v_component != component_idx: remove_list.append(vidx) G.remove_vertex(remove_list)