Skip to content

WIP: Add Oligomer - #51

Draft
jakobnissen wants to merge 55 commits into
BioJulia:masterfrom
jakobnissen:dynamic
Draft

jakobnissen wants to merge 55 commits into
BioJulia:masterfrom
jakobnissen:dynamic

Conversation

@jakobnissen

@jakobnissen jakobnissen commented Jun 20, 2025 •

Copy link
Copy Markdown
Member

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

codecov Bot commented Jun 20, 2025 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.66667% with 36 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.02%. Comparing base (c6754be) to head (0e85f71).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/dynamic.jl 94.95% 23 Missing ⚠️
ext/RandomExt.jl 85.93% 9 Missing ⚠️
ext/BitIntegersExt.jl 72.72% 3 Missing ⚠️
src/construction_utils.jl 98.97% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #51      +/-   ##
==========================================
- Coverage   98.49%   97.02%   -1.48%     
==========================================
  Files          16       18       +2     
  Lines         865     1480     +615     
==========================================
+ Hits          852     1436     +584     
- Misses         13       44      +31     
Flag Coverage Δ
unittests 97.02% <94.66%> (-1.48%) ⬇️

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

☔ View full report in Codecov by Harness.
📢 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

@kescobo kescobo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed the docs, not the code, but this looks good to me!

I wonder if it would be worth cherry-picking or otherwise separating out all of the typo fixes that are recorded here from the actual Oligo work - it's a big PR all by itself without adding that noise. But I don't feel super strongly about this.

This branch has not been deployed

No deployments
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