Skip to content

WIP: Add Oligomer#51

Draft
jakobnissen wants to merge 32 commits intoBioJulia:masterfrom
jakobnissen:dynamic
Draft

WIP: Add Oligomer#51
jakobnissen wants to merge 32 commits intoBioJulia:masterfrom
jakobnissen:dynamic

Conversation

@jakobnissen
Copy link
Copy Markdown
Member

@jakobnissen jakobnissen commented Jun 20, 2025

This type adds Oligomer, a kmer backed by a single unsigned integer. The length is encoded in parts of the integer's bits.
This is useful for code using a small range of kmer lengths, which would other- wise cause type instability.
One user could be to represent primers, or immunogenic peptides.

I tried to back oligos with an NTuple like kmers are, but it's very hard to made the code efficient and type stable, so I had to resort to backing it by a single unsigned integer.

TODO

Make Oligomer on level with Kmer.

  • Restructure files, such that Oligomer is not in its own little file
  • Go through all non-iterator code and check if Oligomer also needs this
  • Implement construction utils for Oligos
  • Make kmer iterators generic over Kmer / Oligomer

@codecov
Copy link
Copy Markdown

codecov bot commented Jun 20, 2025

Codecov Report

❌ Patch coverage is 93.56322% with 28 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.83%. Comparing base (c6754be) to head (3e9f591).

Files with missing lines Patch % Lines
src/dynamic.jl 93.58% 25 Missing ⚠️
ext/BitIntegersExt.jl 62.50% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #51      +/-   ##
==========================================
- Coverage   98.49%   96.83%   -1.67%     
==========================================
  Files          16       18       +2     
  Lines         865     1294     +429     
==========================================
+ Hits          852     1253     +401     
- Misses         13       41      +28     
Flag Coverage Δ
unittests 96.83% <93.56%> (-1.67%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This type is variable length, but backed by a single unsigned integer. The length
is encoded in parts of the integer's bits.
This is useful for code using a small range of kmer lengths, which would other-
wise cause type instability.
@jakobnissen jakobnissen changed the title WIP: Add DynamicKmer WIP: Add Oligomer Jan 8, 2026
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.

1 participant