Skip to content

Commit

Permalink
Fix nondeterministic warning message in query results
Browse files Browse the repository at this point in the history
  • Loading branch information
jlumpe committed Aug 4, 2024
1 parent 719e0a9 commit 45a93f3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/gambit/classify.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ def classify(ref_genomes: Sequence[AnnotatedGenome],
# Warn of inconsistent matches
if others:
msg = f'Query matched {len(others)} inconsistent taxa: '
msg += ', '.join(other.short_repr() for other in others)
msg += ', '.join(sorted(other.short_repr() for other in others))
msg += '. Reporting lowest common ancestor of this set.'
result.warnings.append(msg)

Expand Down
2 changes: 1 addition & 1 deletion tests/data/testdb_210818/results/strict.json
Original file line number Diff line number Diff line change
Expand Up @@ -6339,7 +6339,7 @@
},
"success": true,
"warnings": [
"Query matched 2 inconsistent taxa: 8:A2_B2, 7:A2_B1. Reporting lowest common ancestor of this set."
"Query matched 2 inconsistent taxa: 7:A2_B1, 8:A2_B2. Reporting lowest common ancestor of this set."
]
},
"closest_genomes": [
Expand Down

0 comments on commit 45a93f3

Please sign in to comment.