Skip to content

Commit

Permalink
add test for 'bug' - only one sketch loaded from each sigfile
Browse files Browse the repository at this point in the history
  • Loading branch information
ctb committed Aug 19, 2023
1 parent cabf179 commit a8f134a
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/python/tests/test_gather.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,3 +198,27 @@ def test_bad_against_2(runtmp, capfd):
print(captured.err)

# @CTB: should be some kind of error message here.


def test_against_multisigfile(runtmp):
# test against a sigfile that contains multiple sketches
query = get_test_data('SRR606249.sig.gz')
against_list = runtmp.output('against.txt')

sig2 = get_test_data('2.fa.sig.gz')
sig47 = get_test_data('47.fa.sig.gz')
sig63 = get_test_data('63.fa.sig.gz')

combined = runtmp.output('combined.sig.gz')
runtmp.sourmash('sig', 'cat', sig2, sig47, sig63, '-o', combined)
make_file_list(against_list, [combined])

g_output = runtmp.output('gather.csv')
p_output = runtmp.output('prefetch.csv')

runtmp.sourmash('scripts', 'fastgather', query, against_list,
'-o', g_output, '--output-prefetch', p_output,
'-s', '100000')
df = pandas.read_csv(g_output)
assert len(df) == 1
# @CTB this is a bug :(. It should load multiple sketches properly!

0 comments on commit a8f134a

Please sign in to comment.