From 86257c608ca465ac085eabe09345cb976b914a10 Mon Sep 17 00:00:00 2001 From: Nick Croucher Date: Fri, 15 Nov 2024 10:13:23 +0000 Subject: [PATCH] Print network labels --- PopPUNK/plot.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/PopPUNK/plot.py b/PopPUNK/plot.py index 9c68b7db..828b7308 100644 --- a/PopPUNK/plot.py +++ b/PopPUNK/plot.py @@ -561,13 +561,12 @@ 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)) - isolate_labels = isolateNameToLabel(G_mst.vp.id) 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])) + print("Name: " + str(seqLabels[vidx])) if v_component != component_idx: remove_list.append(vidx) G.remove_vertex(remove_list)