• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

openvax / topiary / 25672919678
90%

Build:
DEFAULT BRANCH: master
Ran 11 May 2026 01:31PM UTC
Jobs 3
Files 34
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

11 May 2026 01:23PM UTC coverage: 89.526% (-0.07%) from 89.595%
25672919678

push

github

web-flow
Add best-allele aggregation for haplotype-mode presentation (#158) (#160)

* Add best-allele aggregation accessors for haplotype-mode predictors

Issue #158 calls out that pMHC_presentation from haplotype-mode
predictors (MHCflurry's class1_presentation in haplotype mode) is
conceptually a multi-allele input → per-peptide answer, but mhctools
emits one row per (peptide, allele) so the DSL's per-allele grouping
returns per-allele scores by default. Add an explicit aggregator that
returns the best score across alleles plus the corresponding allele
attribution, gated behind new accessors so the default per-allele
behavior is preserved.

- BestAlleleField DSLNode: per-peptide max/min of (kind, field) across
  alleles, broadcast back to ctx.group_index. Direction by field:
  score=max, value=min, percentile_rank=min.
- KindAccessor properties: best_value, best_score, best_rank, plus
  *_allele variants returning the allele name string.
- DSL string parser: presentation['mhcflurry'].best_score and
  best_score_allele (and rank/value/percentile spellings) now parse to
  BestAlleleField.
- Refactor: factor _filter_kind_method_version helper out of Field.eval
  for reuse by BestAlleleField.
- Bump topiary to 5.12.0 (additive minor).

Use case (per #158): vaxrank's "presented anywhere" tier signal —
``Presentation['mhcflurry'].best_score`` returns the multi-allele
aggregate, ``best_score_allele`` returns the attribution.

* Address review: drop merge, per-kind directions, kind_support warnings

Four fixes against PR #160 review:

1. Replace the fragile ``__best__``/merge broadcast with
   ``ctx.group_index.droplevel('allele')`` + ``per_peptide.reindex()``.
   No intermediate `__best__` column, no positional-merge ordering
   assumption, fewer allocations. ``sub.copy()`` is gone too — work
   on the filter's already-fresh slice via index masks + ``.assign()``.

2. Replace the field-only ``_BEST_DIRECTIONS`` constant with a
   per-(kind, field) lookup ``_best_dir... (continued)

147 of 164 new or added lines in 4 files covered. (89.63%)

4214 of 4707 relevant lines covered (89.53%)

2.69 hits per line

Uncovered Changes

Lines Coverage ∆ File
17
89.41
-0.41% topiary/ranking/nodes.py
Jobs
ID Job ID Ran Files Coverage
1 python-3.12 - 25672919678.1 11 May 2026 01:31PM UTC 34
89.53
GitHub Action Run
2 python-3.11 - 25672919678.2 11 May 2026 01:31PM UTC 34
89.53
GitHub Action Run
3 python-3.10 - 25672919678.3 11 May 2026 01:32PM UTC 34
89.53
GitHub Action Run
Source Files on build 25672919678
  • Tree
  • List 34
  • Changed 5
  • Source Changed 5
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #25672919678
  • 20dd613a on github
  • Prev Build on master (#25588999052)
  • Next Build on master (#25686019425)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc