Skip to content

Commit

Permalink
Fixes issue with clusters being incorrect
Browse files Browse the repository at this point in the history
  • Loading branch information
samhorsfield96 committed Oct 18, 2024
1 parent 415c0aa commit 4a4a8a4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions panaroo_runner/generate_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,10 @@ def generate_network(DBG, overlap, ORF_file_paths, Edge_file_paths, cluster_file
colour_to_nodes[genome_id].add(cluster_to_add)
else:
# check if ORF_id already added to the cluster
if ORF_id not in G.nodes[cluster_to_add]['seqIDs']:
G.nodes[cluster_to_add]['size'] += 1
G.nodes[cluster_to_add]['members'].add(genome_id)
G.nodes[cluster_to_add]['seqIDs'].add(ORF_id)
if ORF_id not in G.nodes[current_cluster]['seqIDs']:
G.nodes[current_cluster]['size'] += 1
G.nodes[current_cluster]['members'].add(genome_id)
G.nodes[current_cluster]['seqIDs'].add(ORF_id)


# iterative over each colour, adding edges between nodes with genes of that colour
Expand Down

0 comments on commit 4a4a8a4

Please sign in to comment.