Repository navigation
Completeness correction - #52
Merged
Merged
Conversation
added 2 commits
July 2, 2025 14:50
- Implement completeness correction in distance calculations - Add --completeness-file CLI parameter - Add comprehensive completeness test suite - Support tab-separated completeness input format Enables more accurate distances for Metagenome-Assembled Genomes (MAGs).
johnlees
requested changes
Aug 8, 2025
johnlees
left a comment
Member
There was a problem hiding this comment.
Mostly looks good. Main comments:
- Have you run
cargo clippyandcargo fmt? - With the change to
f64, was that just for precision while computing, then we still want to store asf32for the final values? In which case, ignore my comments about those types. - The completeness correction function would be better refactored a bit for performance reasons, and to make all the dist functions more readable. I can explain in my comment is unclear.
- Reading the completness file into a map should be a function in the io.rs file
Collaborator
Author
|
I should have written that in the commit message, but I changed how the completenesses are read in. I am now not using an intermediate HashMap anymore, as I thought it was not necessary, and immediately read in the genome names and save the completeness to their position in the completeness vector. |
johnlees
reviewed
Aug 12, 2025
johnlees
reviewed
Aug 12, 2025
…n, adjusted the test_result_correct files to work with new precision (f64).
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #52 +/- ##
==========================================
+ Coverage 85.37% 85.90% +0.53%
==========================================
Files 17 17
Lines 2735 2590 -145
==========================================
- Hits 2335 2225 -110
+ Misses 400 365 -35 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
johnlees
approved these changes
Aug 13, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: implement completeness correction for MAG distance calculations
This feature allows for more accurate distance calculations when working with
Metagenome-Assembled Genomes (MAGs) by correcting for genome completeness
values provided in a tab-separated file format.