Skip to content

Covbuildmerge - #89

Merged
johnlees merged 13 commits into
masterfrom
covbuildmerge
Jan 27, 2025
Merged

johnlees merged 13 commits into
masterfrom
covbuildmerge

Conversation

@jhellewell14

@jhellewell14 jhellewell14 commented Jan 22, 2025 •

Copy link
Copy Markdown
Collaborator

For the build command the user can now specify --min-count auto and the mixture model from the cov command will be fit to the first two fastq files provided by the user. This calculates a minimum kmer cutoff which is subsequently used in the build command.

  • The input for min-count is now a struct that can handle a mix of auto and u16 values. There is a parser in cli.rs called valid_min_kmer that goes from the user provided string to the required struct (ValidMinKmer, defined in cli.rs).
  • Added some utility functions that count the number of fastq files in a list of files and select the first 2 of those files in io_utils.rs. Also wrote an iterator version of the function any_fastq.
  • Fixed some clippy warning elided lifetimes and other warnings.
  • If the user provides a value for min-count it is used unless it is <1. If they specify auto an attempt is made to fit the mixture model. If this works the inferred value is used. If there are less than 2 fastq files passed by the user the default value of 5 is used. If no value is provided for min-count the default value of 5 is used. All activity regarding the value used is reported to the user via log::info!.

@jhellewell14
jhellewell14 requested a review from johnlees January 22, 2025 16:46
@jhellewell14
jhellewell14 marked this pull request as draft January 22, 2025 16:47

@johnlees johnlees 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.

Looks good! One question about whether we can use a generic

And I guess we should merge in master which will hopefully fix codecov

Comment thread src/io_utils.rs Resolved
@codecov

codecov Bot commented Jan 27, 2025 •

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 92.42424% with 5 lines in your changes missing coverage. Please review.

Project coverage is 96.07%. Comparing base (d66b021) to head (394edf1).
Report is 18 commits behind head on master.

Files with missing lines Patch % Lines
src/io_utils.rs 90.90% 4 Missing ⚠️
src/cli.rs 90.90% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #89      +/-   ##
==========================================
+ Coverage   93.10%   96.07%   +2.96%     
==========================================
  Files          16       16              
  Lines        2263     2803     +540     
==========================================
+ Hits         2107     2693     +586     
+ Misses        156      110      -46     

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

@jhellewell14
jhellewell14 marked this pull request as ready for review January 27, 2025 07:50

@johnlees johnlees 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.

Nice!

@johnlees
johnlees merged commit fba2840 into master Jan 27, 2025
@johnlees
johnlees deleted the covbuildmerge branch January 27, 2025 08:50
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.

to merge ska cov with ska build for automatic min-count threshold [suggestion]

2 participants