Skip to content

Commit 210748d

Browse files
jonasscheidclaude
andcommitted
Trim comments and changelog entry for the allele-label fix
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent ee65d6c commit 210748d

2 files changed

Lines changed: 3 additions & 11 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515

1616
### `Fixed`
1717

18-
- [#359](https://github.com/nf-core/epitopeprediction/pull/359) Fixed shuffled NetMHCpan/NetMHCIIpan allele labels in the merged/`best_allele` output by reading allele names from the xls header instead of assuming `sorted(meta.alleles)` order (fixes [#358](https://github.com/nf-core/epitopeprediction/issues/358)) ([@jonasscheid](https://github.com/jonasscheid/))
18+
- [#359](https://github.com/nf-core/epitopeprediction/pull/359) Fixed shuffled NetMHCpan/NetMHCIIpan allele labels by reading allele names from the xls header (fixes [#358](https://github.com/nf-core/epitopeprediction/issues/358)) ([@jonasscheid](https://github.com/jonasscheid/))
1919
- [#352](https://github.com/nf-core/epitopeprediction/pull/352) Accept 3- and 4-field HLA typings by truncating to 2 fields via mhcgnomes (fixes [#350](https://github.com/nf-core/epitopeprediction/issues/350)) ([@jonasscheid](https://github.com/jonasscheid/))
2020
- Fixed NetMHCIIpan mouse class II allele conversion: `H2-AA*b/AB*b` now maps to `H-2-IAb` (and `H2-EA*d/EB*d` to `H-2-IEd`) instead of the invalid `H-2-AAb-ABb` ([@jonasscheid](https://github.com/jonasscheid/))
2121
- [#349](https://github.com/nf-core/epitopeprediction/pull/349) Fixed MultiQC stats mismatch: use per-peptide binder counts, fix unsupported count formula, fix netmhcpan multi-allele column parsing ([@jonasscheid](https://github.com/jonasscheid/))

modules/local/merge_predictions/templates/merge_predictions.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,7 @@ def _format_mhcnuggets_prediction(self) -> pd.DataFrame:
195195
return df
196196

197197
def _format_netmhcpan_prediction(self) -> pd.DataFrame:
198-
# Map output-column index to allele from the xls header row (one name per allele block), in
199-
# NetMHCpan's output order. Reconstructing the order from sorted(meta.alleles) mislabels
200-
# alleles whenever that sort diverges from NetMHCpan's — e.g. a stray space in a samplesheet
201-
# allele ("; C*07:04") makes it sort first — leaving ranks correct but labels shuffled (#358).
202-
# These names are normalized by mhcgnomes for all predictors in main().
198+
# Map column index to allele from the xls header (output order), not sorted(meta.alleles) (#358)
203199
with open(self.file_path) as f:
204200
header_alleles = [allele.strip() for allele in f.readline().split('\t') if allele.strip()]
205201
alleles_dict = dict(enumerate(header_alleles))
@@ -245,11 +241,7 @@ def _format_netmhciipan_prediction(self) -> pd.DataFrame:
245241
NetMHCIIpan 4.3 xls uses `Rank` for the EL percentile and `Rank_BA` for BA percentile;
246242
multi-allele files are handled by pandas auto-suffixing duplicate columns as `.1`, `.2` …
247243
"""
248-
# Map output-column index to allele from the xls header row (one name per allele block).
249-
# NetMHCIIpan re-sorts alleles in its own name format, which diverges from the pipeline's
250-
# mhcgnomes sort (e.g. DPB1*10:01 vs DPB1*107:01), so reconstructing the order from
251-
# sorted(meta.alleles) mislabels alleles while leaving ranks correct (#358). These names are
252-
# normalized by mhcgnomes for all predictors in main().
244+
# Map column index to allele from the xls header (output order), not sorted(meta.alleles) (#358)
253245
with open(self.file_path) as f:
254246
header_alleles = [allele.strip() for allele in f.readline().split('\t') if allele.strip()]
255247
alleles_dict = dict(enumerate(header_alleles))

0 commit comments

Comments
 (0)