diff --git a/PopPUNK/network.py b/PopPUNK/network.py index c3e68fb7..4a128aa7 100644 --- a/PopPUNK/network.py +++ b/PopPUNK/network.py @@ -1425,7 +1425,7 @@ def printClusters(G, rlist, outPrefix=None, oldClusterFile=None, if use_gpu: component_assignments = cugraph.components.connectivity.connected_components(G) component_frequencies = component_assignments['labels'].value_counts(sort = True, ascending = False) - newClusters = [set() for rank in range(component_frequencies.size)] + newClusters = [set() for _ in range(component_frequencies.size)] for isolate_index, isolate_name in enumerate(rlist): # assume sorted at the moment component = component_assignments['labels'].iloc[isolate_index].item() component_rank_bool = component_frequencies.index == component