Feature/binned quality scoring - #304
Merged
Merged
Conversation
TraditionalQualityModel now accepts an optional quality_bins parameter that snaps sampled scores to the nearest discrete bin using vectorized np.searchsorted, matching how NovaSeq/NextSeq 2000 instruments emit only a small set of Phred values (e.g. Q2/Q12/Q23/Q37). The runner passes allowed_bins through so both Markov and traditional models produce realistically binned output when bins are specified. - Add quality_bins to TraditionalQualityModel.__init__ and get_quality_scores() - Pass allowed_bins to TraditionalQualityModel in model_qual_score runner - Expose _down_bin_quality as public down_bin_quality in markov_utils - Add QUALITY_PRESETS dict in neat/quality_score_modeling/presets.py (novaseq, nextseq2000, nextseq500) - Add --quality-preset CLI flag to neat model-qual-score; implies --markov - Fix stale -Q help text in model_sequencing_error CLI - Add TraditionalQualityModel binning tests + preset data/CLI tests Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add a "Binned quality scoring" subsection to neat model-qual-score showing how to use --quality-preset (novaseq, nextseq2000, nextseq500) and explicit -Q bin lists for instruments that emit discrete Phred levels. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Updates to renable binned scoring, now that the other things are fixed. Binned scoring requires user input for NEAT to know that bins are present. See README for details.