sourmash icon indicating copy to clipboard operation
sourmash copied to clipboard

[WIP] fix containment direction for ANI calculation

Open ctb opened this issue 1 year ago • 2 comments

Fixes https://github.com/sourmash-bio/sourmash/issues/2193 Fixes https://github.com/sourmash-bio/sourmash/issues/2194

This PR fixes the direction of containment for the ANI calculation, per #2193.

TODO:

  • [ ] rename containment_ani to contained_by_as_ani
  • [ ] write more tests
  • [ ] update compare documentation

ctb avatar Aug 16 '22 14:08 ctb

Codecov Report

Merging #2215 (53a8c0f) into latest (536d39d) will not change coverage. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           latest    #2215   +/-   ##
=======================================
  Coverage   84.66%   84.66%           
=======================================
  Files         131      131           
  Lines       15512    15512           
  Branches     2210     2210           
=======================================
  Hits        13134    13134           
  Misses       2085     2085           
  Partials      293      293           
Flag Coverage Δ
python 92.04% <100.00%> (ø)
rust 65.29% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/sourmash/search.py 97.93% <100.00%> (ø)
src/sourmash/sketchcomparison.py 97.12% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov[bot] avatar Aug 16 '22 14:08 codecov[bot]

so @bluegenes I was struck by the fact that only one test, tests/test_sourmash.py::test_search_ani_containment_estimate_ci, was broken by this fix, and that the actual ANI estimate didn't change, just the CI. It's fantastic that a test broke, but I'd like a clearer example of where this matters ;).

I was thinking that I could write a few more tests - specifically,

  • one where the containment ANI is quite asymmetric
  • one for the compare matrix to verify the values

If this seems like a bad idea, speak ~now-ish or forever hold your peace :)

ctb avatar Aug 17 '22 13:08 ctb

ready for review & merge @bluegenes!

ctb avatar Aug 19 '22 15:08 ctb