Skip to content

Commit

Permalink
added check for the number of core genes to prevent a crash if no clu…
Browse files Browse the repository at this point in the history
…sters passed the core frequency threshold
  • Loading branch information
gtonkinhill committed Sep 21, 2023
1 parent 27044cb commit 6dc9998
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions panaroo/generate_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,10 @@ def generate_core_genome_alignment(
None
# Get core nodes
core_genes = get_core_gene_nodes(G, threshold, num_isolates)
if len(core_genes) < 1:
print("No gene clusters were present above the core frequency"
" threshold! Try adjusting the '--core_threshold' parameter")

core_gene_names = [G.nodes[x]["name"] for x in core_genes]

if codons == True:
Expand Down

0 comments on commit 6dc9998

Please sign in to comment.