Guard Rust q-value path against non-integer tie-break columns#820
Open
GeorgWa wants to merge 1 commit into
Open
Guard Rust q-value path against non-integer tie-break columns#820GeorgWa wants to merge 1 commit into
GeorgWa wants to merge 1 commit into
Conversation
perform_protein_fdr calls get_q_values with extra_sort_columns=["pg"], the protein-group accession (a string). The Rust q-value path coerced that column to int64, raising ValueError during protein FDR. Take the Rust path only when the tie-break column is integer-typed; otherwise fall back to the reference pandas sort (string-safe). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
mschwoer
approved these changes
Jul 3, 2026
| extra_sort_columns = ["precursor_idx"] | ||
|
|
||
| if _USE_RUST_FDR and len(extra_sort_columns) == 1: | ||
| # The Rust kernel requires an integer tie-break key. Precursor FDR sorts by |
Collaborator
There was a problem hiding this comment.
these implicit assumptions on sorting will bite us one day :-)
mschwoer
reviewed
Jul 3, 2026
| # (a string), so fall back to the reference pandas path for non-integer columns. | ||
| if ( | ||
| _USE_RUST_FDR | ||
| and len(extra_sort_columns) == 1 |
Collaborator
There was a problem hiding this comment.
Is this fixing a bug? how much of an edge case? or what's the intent?
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.
get_q_valuescastextra_sort_columns[0]toint64for the Rust kernel. Protein FDR passespg(a string accession), raisingValueError. Take the Rust path only when the tie-break column is integer-typed; otherwise fall back to the reference pandas sort.