Skip to content

Commit

Permalink
Merge branch 'main' into olgabot/multisearch-evalue
Browse files Browse the repository at this point in the history
  • Loading branch information
olgabot authored Oct 29, 2024
2 parents 8627397 + 31d3056 commit 6e474e8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/python/tests/test_multisearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def float_round(string: str, ndigits=None):
return round(float(string), ndigits)



def test_installed(runtmp):
with pytest.raises(utils.SourmashCommandFailed):
runtmp.sourmash("scripts", "multisearch")
Expand Down Expand Up @@ -73,6 +74,7 @@ def test_simple_no_ani(runtmp, zip_query, zip_db):
cont = float_round(row["containment"], 4)
jaccard = float_round(row["jaccard"], 4)
maxcont = float_round(row["max_containment"], 4)

intersect_hashes = int(row["intersect_hashes"])

print(q, m, f"{jaccard:.04}", f"{cont:.04}", f"{maxcont:.04}")
Expand Down Expand Up @@ -106,6 +108,7 @@ def test_simple_prob_overlap(runtmp, zip_query, zip_db, indexed_query, indexed_a

if zip_db:
against_list = zip_siglist(runtmp, against_list, runtmp.output("db.zip"))

if zip_query:
query_list = zip_siglist(runtmp, query_list, runtmp.output("query.zip"))

Expand Down Expand Up @@ -1000,6 +1003,7 @@ def test_simple_prot(runtmp):
avg_ani = float_round(row["average_containment_ani"], 4)
max_ani = float_round(row["max_containment_ani"], 4)


print(
q,
m,
Expand Down Expand Up @@ -1161,6 +1165,7 @@ def test_prob_overlap_prot_with_abundance(runtmp):
assert tf_idf_score == 1.2663



def test_simple_dayhoff(runtmp):
# test basic execution with dayhoff sigs
sigs = get_test_data("dayhoff.zip")
Expand Down
2 changes: 1 addition & 1 deletion src/python/tests/test_sketch.py
Original file line number Diff line number Diff line change
Expand Up @@ -1042,7 +1042,7 @@ def test_manysketch_prefix2(runtmp, capfd):
for sig in sigs:
assert sig.name in expected_signames
if sig.name == "short":
# minhash is not defined? How does this test work?
# minhash is not defined? How does this test work? - @olgabot
assert sig, minhash.hashes == sig1.minhash.hashes
if sig.name == "short_protein":
assert sig == sig2
Expand Down

0 comments on commit 6e474e8

Please sign in to comment.