Skip to content

Commit

Permalink
Faster graph processing
Browse files Browse the repository at this point in the history
  • Loading branch information
nickjcroucher committed Nov 4, 2024
1 parent 42b1c20 commit 8897960
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions PopPUNK/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,10 +565,9 @@ def outputsForCytoscape(G, G_mst, isolate_names, clustering, outPrefix, epiCsv,
for vidx, v_component in enumerate(component_assignments.a):
if v_component != component_idx:
remove_list.append(vidx)
G_copy = G.copy()
G_copy.remove_vertex(remove_list)
save_network(G_copy, prefix = outPrefix, suffix = "_component_" + str(component_idx + 1), use_graphml = True)
del G_copy
G.remove_vertex(remove_list)
G.purge_vertices()
save_network(G, prefix = outPrefix, suffix = "_component_" + str(component_idx + 1), use_graphml = True)

if G_mst != None:
isolate_labels = isolateNameToLabel(G_mst.vp.id)
Expand Down

0 comments on commit 8897960

Please sign in to comment.