bacpop / ska.rust

Split k-mer analysis – version 2
https://docs.rs/ska/latest/ska/
Apache License 2.0
56 stars 4 forks source link

Add support for up to k=63 using u128 #13

Closed johnlees closed 1 year ago

johnlees commented 1 year ago

Adds generics over u64 to allow use of u128 when 31 < k <= 63. More fiddly than I expected, but main parts are:

TODO:

codecov[bot] commented 1 year ago

Codecov Report

Base: 82.78% // Head: 82.53% // Decreases project coverage by -0.25% :warning:

Coverage data is based on head (a244364) compared to base (d83ac94). Patch coverage: 82.18% of modified lines in pull request are covered.

:exclamation: Current head a244364 differs from pull request most recent head dda5bd8. Consider uploading reports for the commit dda5bd8 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #13 +/- ## ========================================== - Coverage 82.78% 82.53% -0.25% ========================================== Files 13 15 +2 Lines 1342 1466 +124 Branches 211 258 +47 ========================================== + Hits 1111 1210 +99 + Misses 126 102 -24 - Partials 105 154 +49 ``` | [Impacted Files](https://codecov.io/gh/bacpop/ska.rust/pull/13?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bacpop) | Coverage Δ | | |---|---|---| | [src/cli.rs](https://codecov.io/gh/bacpop/ska.rust/pull/13?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bacpop#diff-c3JjL2NsaS5ycw==) | `67.76% <50.00%> (+1.65%)` | :arrow_up: | | [src/io\_utils.rs](https://codecov.io/gh/bacpop/ska.rust/pull/13?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bacpop#diff-c3JjL2lvX3V0aWxzLnJz) | `84.61% <66.66%> (-1.93%)` | :arrow_down: | | [src/lib.rs](https://codecov.io/gh/bacpop/ska.rust/pull/13?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bacpop#diff-c3JjL2xpYi5ycw==) | `73.23% <70.00%> (-4.87%)` | :arrow_down: | | [src/ska\_dict/nthash.rs](https://codecov.io/gh/bacpop/ska.rust/pull/13?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bacpop#diff-c3JjL3NrYV9kaWN0L250aGFzaC5ycw==) | `72.22% <72.22%> (ø)` | | | [src/generic\_modes.rs](https://codecov.io/gh/bacpop/ska.rust/pull/13?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bacpop#diff-c3JjL2dlbmVyaWNfbW9kZXMucnM=) | `72.30% <72.30%> (ø)` | | | [src/ska\_ref.rs](https://codecov.io/gh/bacpop/ska.rust/pull/13?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bacpop#diff-c3JjL3NrYV9yZWYucnM=) | `85.36% <75.00%> (+2.42%)` | :arrow_up: | | [src/ska\_dict.rs](https://codecov.io/gh/bacpop/ska.rust/pull/13?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bacpop#diff-c3JjL3NrYV9kaWN0LnJz) | `89.06% <81.81%> (+7.63%)` | :arrow_up: | | [src/ska\_dict/split\_kmer.rs](https://codecov.io/gh/bacpop/ska.rust/pull/13?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bacpop#diff-c3JjL3NrYV9kaWN0L3NwbGl0X2ttZXIucnM=) | `90.40% <95.00%> (+7.33%)` | :arrow_up: | | [src/merge\_ska\_array.rs](https://codecov.io/gh/bacpop/ska.rust/pull/13?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bacpop#diff-c3JjL21lcmdlX3NrYV9hcnJheS5ycw==) | `91.08% <100.00%> (-1.42%)` | :arrow_down: | | [src/merge\_ska\_dict.rs](https://codecov.io/gh/bacpop/ska.rust/pull/13?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bacpop#diff-c3JjL21lcmdlX3NrYV9kaWN0LnJz) | `77.63% <100.00%> (-4.61%)` | :arrow_down: | | ... and [9 more](https://codecov.io/gh/bacpop/ska.rust/pull/13?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bacpop) | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bacpop). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bacpop)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

johnlees commented 1 year ago

Note this also fixes the countmin table -- only one hash was being used rather than four