Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MRG] fix some bugs in lca rankinfo. #797

Merged
merged 2 commits into from
Dec 14, 2019
Merged

[MRG] fix some bugs in lca rankinfo. #797

merged 2 commits into from
Dec 14, 2019

Conversation

ctb
Copy link
Contributor

@ctb ctb commented Dec 14, 2019

This fixes two bugs in rankinfo caused by the revised LCA database format in #537, which now permits hashes with no lineage ID.

Bug 1: rankinfo wasn't properly ignoring hashvals with no lineage ID!
Bug 2: if no hashvals were found, rankinfo was failing with a divide-by-zero error.

This also adds an (in-testing) option, --minimum-num, to only count hashvals that occur that many times (or more).

  • Is it mergeable?
  • make test Did it pass the tests?
  • make coverage Is the new code covered?
  • Did it change the command-line interface? Only additions are allowed
    without a major version increment. Changing file formats also requires a
    major version number increment.
  • Was a spellchecker run on the source code and documentation after
    changes were made?

@codecov
Copy link

codecov bot commented Dec 14, 2019

Codecov Report

Merging #797 into master will decrease coverage by 0.14%.
The diff coverage is 93.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #797      +/-   ##
==========================================
- Coverage   89.38%   89.24%   -0.15%     
==========================================
  Files          29       29              
  Lines        4608     4613       +5     
  Branches       49       49              
==========================================
- Hits         4119     4117       -2     
- Misses        485      492       +7     
  Partials        4        4
Impacted Files Coverage Δ
sourmash/lca/command_rankinfo.py 90.74% <93.33%> (-0.93%) ⬇️
sourmash/signature_json.py 96.21% <0%> (-1.09%) ⬇️
sourmash/lca/lca_utils.py 95.21% <0%> (-0.8%) ⬇️
sourmash/lca/command_index.py 90.26% <0%> (-0.45%) ⬇️
sourmash/sbt.py 85.21% <0%> (-0.32%) ⬇️
sourmash/sbt_storage.py 86.36% <0%> (+0.97%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f7987a5...6eba5b5. Read the comment docs.

@luizirber luizirber merged commit 03e5269 into master Dec 14, 2019
@luizirber luizirber deleted the fix/rankinfo branch December 14, 2019 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants