Skip to content

Commit

Permalink
Merge pull request #246 from bacpop/graph-err-msg
Browse files Browse the repository at this point in the history
Fix a broken error message in assign
  • Loading branch information
johnlees authored Nov 18, 2022
2 parents 4b9818d + 25d8c25 commit 81d2017
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion PopPUNK/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

'''PopPUNK (POPulation Partitioning Using Nucleotide Kmers)'''

__version__ = '2.6.0'
__version__ = '2.6.1'

# Minimum sketchlib version
SKETCHLIB_MAJOR = 2
Expand Down
6 changes: 3 additions & 3 deletions PopPUNK/assign.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,9 +507,9 @@ def assign_query_hdf5(dbFuncs,
accessory_only = (fit_type == 'accessory_refined'),
use_gpu = gpu_graph)

if max(get_vertex_list(genomeNetwork, use_gpu = gpu_graph)) != (len(rNames) - 1):
sys.stderr.write("There are " + str(max(get_vertex_list(genomeNetwork, use_gpu = gpu_graph)) + 1) + \
" vertices in the network but " + str(len(rNames)) + " reference names supplied; " + \
n_vertices = len(get_vertex_list(genomeNetwork, use_gpu = gpu_graph))
if n_vertices != len(rNames):
sys.stderr.write(f"There are {n_vertices} vertices in the network but {len(rNames)} reference names supplied; " + \
"please check the '--model-dir' variable is pointing to the correct directory\n")

if model.type == 'lineage':
Expand Down

0 comments on commit 81d2017

Please sign in to comment.