Skip to content

feat: add ANNOTATE_HLAHD module - #260

Draft
johnoooh wants to merge 2 commits into
developfrom
feature/annotate_hlahd
Draft

feat: add ANNOTATE_HLAHD module#260
johnoooh wants to merge 2 commits into
developfrom
feature/annotate_hlahd

Conversation

@johnoooh

@johnoooh johnoooh commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds modules/msk/annotate_hlahd — post-processes HLA-HD class I output (<sample>_final.result.txt + per-locus <sample>_{A,B,C}.est.txt) into a P-group-annotated TSV, with an optional self-contained HTML report.

Container ghcr.io/mskcc-omics-workflows/hlahd-tools:1.0.0 (companion PR: mskcc-omics-workflows/containers#85)
Input [ meta, result_dir ], pgroup_file
Output tsv (always), report (*_report.html, optional — pass --skip_html via task.ext.args to omit it), versions

On the script

The actual annotation logic is mskcc/hla-annotate, installed by the hlahd-tools container (pinned to v1.0.0), which exposes an annotate_hlahd console command. It's also depended on directly by mskcc/HLA_HD_workflow (companion PR mskcc/HLA_HD_workflow#5 adds the --skip_html flag there) — one source of truth instead of vendoring copies into each consumer.

Test data

Synthetic fixtures (not derived from any real sample) pushed to test-datasets' feature/annotate_hlahd branch — registered in tests/config/test_data.config. Requesting Review Team promotion to an official annotate_hlahd branch.

Verification

Ran locally against the hlahd-tools:1.0.0 image built from the companion containers PR (built for linux/amd64, matching tests/config/nf-test.config's --platform=linux/amd64):

nf-test test modules/msk/annotate_hlahd/tests/main.nf.test --profile docker

Test Process ANNOTATE_HLAHD
  Test 'annotate_hlahd - result_dir - annotated tsv and html' PASSED
  Test 'annotate_hlahd - skip_html - no report emitted'       PASSED
  Test 'annotate_hlahd - stub'                                PASSED
SUCCESS: Executed 3 tests

Checklist

  • Checked no existing nf-core module/subworkflow covers this
  • Branch named feature/annotate_hlahd
  • Tests added (real-data, --skip_html, stub)
  • Test data: MSK test-datasets (pending Review Team promotion — see above)
  • No TODOs
  • versions.yml emitted
  • Naming conventions followed
  • Resource label (process_single) added
  • Singularity — not tested (no local singularity install); container path follows the standard ternary pattern

Post-processes HLA-HD class I output (final.result.txt + per-locus
est.txt) into a P-group-annotated TSV, with an optional self-contained
HTML report (pass --skip_html via task.ext.args to omit it).

- Container: ghcr.io/mskcc-omics-workflows/hlahd-tools:1.0.0 (companion
  PR: mskcc-omics-workflows/containers#85)
- Script vendored from mskcc/HLA_HD_workflow's scripts/annotate_hlahd.py
  + scripts/hlahd_annotate/ into resources/usr/bin/ (private repo, so it
  can't be pulled at container-build time -- same pattern as
  neoantigen-utils-base before neoantigen-utils had its own repo)
- Test data: mskcc-omics-workflows/test-datasets@feature/annotate_hlahd
  (synthetic fixtures; pending Review Team promotion to an official
  'annotate_hlahd' branch)
- Tests: real-data run, --skip_html run (asserts the report output is
  empty), and stub -- all passing locally against the built image
The hlahd-tools:1.0.0 container now installs mskcc/hla-annotate (see
companion containers PR) and exposes the 'annotate_hlahd' console
script, so the module no longer needs to vendor a copy of the script
under resources/usr/bin/.

Re-verified: nf-test suite (real-data, --skip_html, stub) passes
against the updated image -- identical output hashes to the vendored
version.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant