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

pirl-unc / hitlist / 25587641606
75%

Build:
DEFAULT BRANCH: main
Ran 09 May 2026 01:25AM UTC
Jobs 1
Files 28
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

09 May 2026 01:23AM UTC coverage: 74.531% (+0.1%) from 74.402%
25587641606

push

github

web-flow
v1.30.45: predictor-driven multi-allele narrowing in pmhc query (closes #239) (#240)

When ``hitlist pmhc --predictor netmhcpan|mhcflurry`` runs against a
multi-allele row (every per-donor row from #236, every IEDB row whose
``host_mhc_types`` populated mhc_allele_set with the donor's full
typing), the predictor used to fail silently — `best_guess_allele`
was a semicolon-joined string, MHCflurry/NetMHCpan only accept single
4-digit alleles, and every multi-allele row came back unscored.

Post-#236 this affected most of the high-uncertainty slice the
predictor is supposed to be most useful for.

## What changed

`pmhc_query._attach_predictions` now:

1. Expands each row's ``best_guess_allele`` set into one
   ``(peptide, allele)`` candidate per individual allele.
2. Scores the unique pairs via the chosen predictor.
3. Picks the lowest-percentile (then lowest-affinity) winner per row.
4. Narrows ``mhc_allele`` and ``best_guess_allele`` to that allele
   when at least one allele scored; records the choice in a new
   ``best_predicted_allele`` column.
5. Re-aggregates rows that now share the same narrowed allele —
   the three SLLQHLIGL per-donor rows from #236 (MEL3 / MEL15 / OV1,
   each carrying A*02:01) collapse into one consolidated
   ``HLA-A*02:01`` row with summed n_observations and unioned pmids.

When every allele in a row's set returns NaN (predictor failure,
length mismatch, unknown allele), the multi-allele set is preserved
and ``best_predicted_allele`` is empty — avoids wrongly committing
to a non-binding allele.

Single-allele rows pass through with score columns added but no
structural change.

## Tests

4 new unit tests in ``tests/test_pmhc_query.py``:

- narrowing picks the lowest-percentile winner from a multi-allele set
- per-donor rows with shared best allele consolidate to one row with
  summed n_observations
- single-allele rows are unchanged (no spurious narrowing)
- all-NaN predictions preserve the multi-allele set

`./format.sh` ... (continued)

4211 of 5650 relevant lines covered (74.53%)

0.75 hits per line

Coverage Regressions

Lines Coverage ∆ File
20
88.57
0.21% pmhc_query.py
Jobs
ID Job ID Ran Files Coverage
1 25587641606.1 09 May 2026 01:25AM UTC 28
74.53
GitHub Action Run
Source Files on build 25587641606
  • Tree
  • List 28
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #25587641606
  • f83694dd on github
  • Prev Build on main (#25587063807)
  • Next Build on main (#25601432313)
  • Delete
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