Skip to content

Preserve complete gene-query results in exports - #431

Merged
iskandr merged 1 commit into
mainfrom
fix/425-gene-query-union
Sep 7, 2026
Merged

Preserve complete gene-query results in exports#431
iskandr merged 1 commit into
mainfrom
fix/425-gene-query-union

Conversation

@iskandr

@iskandr iskandr commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

An export such as gene=["PRAME", "ENSG00000198681"] could drop both genes because names and IDs were intersected. MS, binding, and training exports now select the union of the gene alternatives and preserve it through source-protein expansion. Mappings matching both identifiers are deduplicated; unrelated genes sharing a peptide remain excluded. Explicit peptide filters narrow the union, and the low-level loaders retain their existing column-filter conjunctions.

Empty gene matches also exposed an untyped empty peptide predicate that raised a PyArrow type error. Peptide filters now carry a string-typed value set, so empty queries return zero rows. Version: 1.58.2.

Validation: format and lint pass; ./test.sh passes 1,232 tests; targeted export/loader tests pass 201 tests. New cases cover mixed/duplicate/unknown identifiers, compact and expanded training for all evidence modes, shared peptides, large mapping selections, and empty intersections.

Closes #425.
Closes #430.

@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 34115961327

Coverage increased (+0.2%) to 83.258%

Details

  • Coverage increased (+0.2%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 110 coverage regressions across 2 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

110 previously-covered lines in 2 files lost coverage.

File Lines Losing Coverage Coverage
export.py 101 90.12%
observations.py 9 96.58%

Coverage Stats

Coverage Status
Relevant Lines: 8165
Covered Lines: 6798
Line Coverage: 83.26%
Coverage Strength: 0.83 hits per line

💛 - Coveralls

@iskandr
iskandr merged commit 0441bfa into main Sep 7, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants