Skip to content

Commit

Permalink
fix genus display if _ is present
Browse files Browse the repository at this point in the history
  • Loading branch information
ctb committed Feb 18, 2018
1 parent ef6cd39 commit 26b9d12
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion sourmash_lib/lca/command_gather.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ def format_lineage(lineage_tup):
name = d['strain']
elif 'species' in present:
species = d['species']
if species.startswith(genus + ' '):
if species.startswith(genus + ' ') or \
species.startswith(genus + '_'):
name = species
else:
name = '{} {}'.format(genus, species)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_lca.py
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ def test_single_gather():
print(out)
print(err)

assert '2.0 Mbp 100.0% 100.0% Alteromonas Alteromonas_macleodii' in out
assert '2.0 Mbp 100.0% 100.0% Alteromonas_macleodii' in out
assert 'Query is completely assigned.'


Expand Down

0 comments on commit 26b9d12

Please sign in to comment.