Skip to content

Commit

Permalink
Print network labels
Browse files Browse the repository at this point in the history
  • Loading branch information
nickjcroucher committed Nov 15, 2024
1 parent e4f3290 commit 86257c6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions PopPUNK/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 86257c6

Please sign in to comment.