Skip to content

Feature/binned quality scoring - #304

Merged
joshfactorial merged 2 commits into
developfrom
feature/binned-quality-scoring
May 20, 2026
Merged

Feature/binned quality scoring#304
joshfactorial merged 2 commits into
developfrom
feature/binned-quality-scoring

Conversation

@joshfactorial

Copy link
Copy Markdown
Collaborator

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.

joshfactorial and others added 2 commits May 20, 2026 00:57
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>
@joshfactorial
joshfactorial changed the base branch from main to develop May 20, 2026 06:14
@joshfactorial
joshfactorial merged commit b4cacb8 into develop May 20, 2026
1 check passed
@joshfactorial
joshfactorial deleted the feature/binned-quality-scoring branch May 20, 2026 06:16
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