Skip to content

Add module: dorado/basecaller - #11122

Open
sahuno wants to merge 23 commits into
nf-core:masterfrom
sahuno:add-dorado-basecaller
Open

sahuno wants to merge 23 commits into
nf-core:masterfrom
sahuno:add-dorado-basecaller

Conversation

@sahuno

@sahuno sahuno commented Apr 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds DORADO_BASECALLER process for Oxford Nanopore basecalling with dorado
  • Supports automatic model selection, modified base calling (5mCG_5hmCG, 5mC, m6A), and optional integrated alignment
  • GPU-accelerated; follows the same container pattern as nf-core/parabricks modules

Key design decisions

Container — no bioconda/BioContainers (ONTPL licence)

dorado is not on bioconda due to its Oxford Nanopore commercial licence. The module uses the official nanoporetech/dorado Docker Hub image directly (SHA-pinned to v1.4.0), the same pattern used by parabricks modules (nvcr.io/nvidia/...). conda null is set with a comment. ONT does not publish semver Docker tags yet — tracked in nanoporetech/dorado#1584; the SHA will be replaced with a version tag when available.

GPU label — process_gpu

The module requires a CUDA GPU and uses label 'process_gpu'. This label is defined in nf-core/configs but is flagged as non-standard by lint. Happy to discuss the right approach on the PR.

CI tests — stub only (GPU not available on GitHub Actions)

  • 2 stub tests run in CI: unaligned BAM and aligned BAM (reference input path)
  • 2 real GPU tests tagged gpu are excluded from CI but pass locally on a SLURM GPU node
  • Precedent: parabricks modules also skip GPU CI tests

Test data

Lint results

  • 48 tests passed, 0 failures, 4 warnings (all explained above: quay.io 403, container version mismatch, process_gpu label)

PR checklist

  • This comment contains a description of changes (with reason)
  • Added tests
  • Followed module conventions (contribution docs)
  • Test data included
  • No TODO statements
  • Version broadcast via topic: versions using eval() pattern
  • Naming conventions followed (DORADO_BASECALLER)
  • Resource label present (process_gpu)
  • conda null — bioconda not possible (ONTPL licence), documented
  • nf-core modules test dorado/basecaller --profile docker — pending (requires Docker daemon + GPU)
  • nf-core modules test dorado/basecaller --profile singularity — stub tests pass locally; real GPU tests require compute node

🤖 Generated with Claude Code

sahuno and others added 8 commits April 5, 2026 21:16
Oxford Nanopore dorado basecaller module with automatic model selection,
modified base calling (5mCG_5hmCG via combined model syntax), and optional
alignment to a reference genome. Uses local SIF for Track 1 (lab use);
Track 2 upstream blocked pending dorado bioconda package.

Tests: 2 stub (CPU) + 2 real GPU tests (NVIDIA L40S, componc_gpu_batch).
Uses --profile singularity,gpu to expose GPU via --nv flag.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds a stub test using the public HG002 GIAB pod5 from nf-core/test-datasets
(PR nf-core/test-datasets#1968). Test references the file via
modules_testdata_base_path so it resolves once that PR merges.

Also commits the 2.2 MB 10-read pod5 subset locally for development.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Thin wrapper over nanoporetech/dorado:sha... adding version labels.
Used by `wave freeze --dockerfile Dockerfile` to obtain a stable
community.wave.seqera.io URI for nf-core upstream submission.
See sandbox/TRACK2_wave_freeze.md for the full runbook.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
nf-core/parabricks modules use nvcr.io/nvidia/... directly without bioconda.
Following same pattern: use nanoporetech/dorado:sha... from Docker Hub.
Removes the singularity/docker ternary — single container field only.
Local SIF override kept in tests/nextflow.config for MSKCC HPC testing.
Tracking semantic version tags: nanoporetech/dorado#1584.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Container: sahuno/dorado:1.4.0 (wraps nanoporetech/dorado v1.4.0 + samtools)
- meta.yml: document that dorado outputs SO:unknown; advise SAMTOOLS_SORT +
  SAMTOOLS_INDEX downstream (confirmed with GIAB HG002 10-read test on A100)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Correct model input YAML structure (remove extra nesting level)
- Add topics: section for version broadcast
- Fix licence list format
- Add edam ontology for summary TSV output

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Switch from sahuno/dorado:1.4.0 wrapper to the upstream
nanoporetech/dorado:shac8f356489fa8b44b31beba841b84d2879de2088e (v1.4.0).
Same approach as parabricks modules using nvcr.io/nvidia directly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- tests/nextflow.config: remove hardcoded local SIF container override,
  local models_dir, and /data1/greenbab reference paths
- tests/main.nf.test: stub test 2 uses [[], [], []] for reference
  (stub block doesn't use reference; real aligned test is GPU-tagged);
  GPU test with reference uses params.modules_testdata_base_path
- Remove GIAB Track 2 stub test (pending nf-core/test-datasets#1968)
- Update snapshots

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sahuno
sahuno requested review from a team, edmundmiller and maxulysse as code owners April 6, 2026 02:09
ext.device is not an allowed ext key in nf-core modules (only ext.args,
ext.prefix, ext.when are permitted). Hardcode --device cuda:all directly
in the script block. Users needing a different device string can pass it
via ext.args (e.g. --device cpu for testing).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@dialvarezs dialvarezs left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, thanks for your contribution.

In general this looks fine to me.
An improvement would be requesting to upload the container to the nfcore org.

I have some comments.
And also, you have to remove the test data.

Comment thread .gitignore Resolved
@sahuno

sahuno commented Apr 6, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the review @dialvarezs! All points addressed in 8779494:

  • Container: switched from sahuno/dorado:1.4.0 to docker.io/nanoporetech/dorado:shac8f356489fa8b44b31beba841b84d2879de2088e (official upstream image with docker.io/ prefix)
  • Comment wording: updated as suggested
  • *.log output: removed from main.nf, meta.yml, and stub — confirmed dorado basecaller has no --log-file flag
  • Test data: removed both pod5 files from tests/data/ — the GIAB HG002 pod5 is now hosted in nf-core/test-datasets (merged in Added fq/lint module #1968) and referenced via params.modules_testdata_base_path
  • tests/nextflow.config: removed — it was not loaded by main.nf.test and contained local paths
  • .gitignore: no changes made to this file

Regarding the container upload to the nfcore org — happy to pursue that. Should I open a request with ONT to mirror nanoporetech/dorado under docker.io/nfcore/dorado, or is there an existing process for this in nf-core?

Lint: 51 passed, 0 failures (4 expected warnings for Docker Hub / SHA tag / process_gpu label).
Tests: 4/4 stub tests pass.

@sahuno
sahuno requested a review from dialvarezs April 6, 2026 21:39
@dialvarezs

Copy link
Copy Markdown
Member

It seems that you forgot to push the changes.

@Kevin-Brockers

Copy link
Copy Markdown
Contributor

Hi all,

I just stumbled across this PR, sorry if the answer is a bit late.

Here are my two cents:

  1. dorado basecaller with --reference will also do alignments, not sure if it would be better to also have a dorado/aligner module then (which in the end is just a wrapper for minimap2) and really restrict dorado/basecaller to basecalling. Could be useful to separate the processes because the alignment step does not require GPUs for full performance. - likely philosophical

  2. When I implemented dorado as a local module in one of my pipelines, I just used: 2> ${flowcell}/dorado_basecalling.log to emit something that comes close to a log file.

  3. In principle dorado works okeyish for calling unmodified bases using the fast base-models on CPUs, especially when testing on only a few read without alignments. One could implement a test for that, not sure about the base-model size and whether it might be limiting in the CI.

- Switch container from sahuno/dorado:1.4.0 to official upstream image:
  docker.io/nanoporetech/dorado:shac8f356489fa8b44b31beba841b84d2879de2088e
- Update container comment wording per reviewer suggestion
- Remove *.log output channel (dorado basecaller has no --log-file flag)
- Remove *.log from meta.yml outputs
- Hardcode --device cuda:all (remove task.ext.device custom ext key, R1 fix)
- Remove test data files from repo (pod5 files belong in nf-core/test-datasets)
- Remove tests/nextflow.config (not loaded by main.nf.test; contained local paths)
- Update tests to use params.modules_testdata_base_path concatenation (R4)
- Replace all local reference paths with nf-core/test-datasets genome paths
- Update snapshot (4 new, 6 obsolete removed)

Lint: 51 passed, 4 expected warnings, 0 failures
Tests: 4/4 stub tests pass

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sahuno

sahuno commented Apr 8, 2026

Copy link
Copy Markdown
Contributor Author

Hi @dialvarezs — I've addressed all your CHANGES_REQUESTED feedback:

  • ✅ Container: switched to docker.io/nanoporetech/dorado:shac8f356489fa8b44b31beba841b84d2879de2088e (explicit docker.io/ prefix)
  • ✅ Removed *.log output: dorado basecaller has no --log-file flag; removed emit and stub touch
  • ✅ Removed test data from repo: pod5 files deleted; tests now use params.modules_testdata_base_path pointing to nf-core/test-datasets (PR Add ONT BAM and bedMethyl test data: HG002 GIAB 10-read subset (PAW70337) test-datasets#1969 adds the GIAB HG002 pod5)
  • ✅ Removed tests/nextflow.config: was not loaded by nf-test and contained local paths
  • ✅ Hardcoded --device cuda:all: removed task.ext.device custom ext key
  • ✅ All 4 tests pass (2 stub + 2 GPU-tagged using public GIAB data)

Thanks for the thorough review!

@dialvarezs dialvarezs left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some extra comments.
I would also take the suggestions from @Kevin-Brockers, I agree with the 3 points.

Comment thread .gitignore Resolved
sahuno and others added 2 commits September 6, 2026 13:06
…the registry

Addresses @dialvarezs' outstanding review points:

- `.gitignore` is reverted to match master exactly. The previous PR head had
  unresolved merge-conflict markers (`<<<<<<< HEAD` / `>>>>>>>`) committed into
  it, so the earlier "no changes made to this file" reply was wrong. Sorry for
  the noise.
- Added `process_low` and `process_long` alongside `process_gpu`, since
  `process_gpu` only requests the accelerator. Note this makes lint emit
  `process_standard_label: Conflicting process labels` as a warning, because it
  warns on any use of more than one standard label; happy to drop one if you'd
  rather avoid the warning.
- Snapshots now use `sanitizeOutput(process.out)`.
- Filled the missing ontologies: the BAM output (meta.yml:95) and the reference
  FASTA input.

The lint failure is also fixed. `nf-core lint` only accepts container prefixes
listed under `container-registry:` in `.nf-core.yml`, which is why
`docker.io/nanoporetech` failed. Added it to that list, alongside the existing
`nvcr.io/nvidia/clara` entry that lets the parabricks modules use NVIDIA's
registry — the same precedent this module's container comment already cites.

Other fixes found while verifying against dorado 1.4.0:

- The `summary` output could never be produced: `--emit-summary` writes a
  fixed-name `sequencing_summary.txt`, not `*_summary.tsv`. Corrected the glob
  and the script now renames it to `<prefix>.sequencing_summary.txt`.
- Removed the dead `versions.yml` heredoc from the stub; this module reports
  versions through the `versions` topic, so nothing read that file.
- Removed a no-op `sed 's/^//'` from the version eval.
- `tests/nextflow.config` is restored, but this time actually loaded by
  `main.nf.test` and containing no local paths. Without it `params.module_args`
  never reached `ext.args`, so the `--mm2-opts "-Y"` case was not being tested.
- Removed the Dockerfile: it was left over from the abandoned Seqera Wave freeze
  and tripped `environment_yml_dockerfile_conflict`.
- Dropped six obsolete snapshot entries for tests that no longer exist.

nf-core/tools 4.1.0 lint: 60 passed, 0 failed.

The two GPU snapshots cannot be regenerated locally and are stale with respect
to the output changes above. They need
`@nf-core-bot update gpu snapshot path: modules/nf-core/dorado/basecaller/tests/main.nf.test`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E7RSvpouxbMBdimYSwJ5ZP
sahuno added a commit to sahuno/modules that referenced this pull request Sep 6, 2026
Adds `modkit localize`, which summarises methylation around a set of regions.

This PR previously carried three modules — `modkit/localize`,
`modkit/localize/plot` and the whole of `dorado/basecaller` — which is why
@famosab asked for it to be split. It now contains `modkit/localize` only:

- `dorado/basecaller` is dropped entirely; it is already in nf-core#11122, and the
  copy here was the older revision that still committed pod5 files into the
  repo.
- `modkit/localize/plot` moves to its own PR, renamed `modkit/localizeplot`
  since nf-core module paths are at most two levels deep.

Rebased onto current master, which required two fixes:

- `TABIX_TABIX` is now deprecated (its script is `assert false`, pointing at
  `HTSLIB/BGZIPTABIX`), and its input signature had grown from two elements to
  four. The test setup now uses `HTSLIB_BGZIPTABIX` to build the tabix index
  from the `MODKIT_PILEUP` output.
- `main.nf.test` never loaded `tests/nextflow.config`, so `params.module_args`
  never reached `ext.args` and the `--min-coverage 1 --window 1000` settings the
  test relies on were silently ignored. Added the `config` directive.

Also aligned the container declaration with the merged modkit modules
(`workflow.containerEngine in ['singularity', 'apptainer']` and the `quay.io/`
prefix required by lint).

nf-core/tools 4.1.0 lint: 59 passed, 0 warnings, 0 failed.
Both nf-tests pass under the singularity profile.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E7RSvpouxbMBdimYSwJ5ZP
@sahuno sahuno mentioned this pull request Sep 6, 2026
3 tasks done
@sahuno

sahuno commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

@dialvarezs thanks for your patience — everything you raised is now addressed,
and I owe you a correction on one point.

.gitignore. I said earlier that no changes were made to this file. That was
wrong: the pushed branch had unresolved merge-conflict markers committed into it
(<<<<<<< HEAD / >>>>>>> 5ea7c105e). It is now reverted to match master
exactly — git diff origin/master -- .gitignore is empty.

  • Labels: added process_low and process_long alongside process_gpu.
    Heads up that this makes lint emit process_standard_label: Conflicting process labels found: process_low,process_long as a warning — it warns on any
    use of more than one standard label. Happy to drop one if you would rather
    avoid the warning.
  • Snapshots: now use sanitizeOutput(process.out).
  • Ontologies: filled in for the BAM output (the meta.yml:95 one) and the
    reference FASTA input.

The lint failure is fixed too. The cause was not the container itself:
nf-core lint only accepts prefixes listed under container-registry: in
.nf-core.yml, and docker.io/nanoporetech was not among them. Added it next
to the existing nvcr.io/nvidia/clara entry, which is what lets the parabricks
modules use NVIDIA's registry — the same precedent this module's container
comment already cites. Note #11222 adds the same line, so whichever merges
second may need a trivial conflict resolution.

A few more things found while verifying against dorado 1.4.0:

  • The summary output could never fire. --emit-summary writes a fixed-name
    sequencing_summary.txt, not *_summary.tsv. Corrected the glob; the script
    now renames it to <prefix>.sequencing_summary.txt so outputs stay per-sample.
  • Removed the dead versions.yml heredoc from the stub — this module reports
    versions via the versions topic, so nothing ever read that file.
  • Removed a no-op sed 's/^//' from the version eval.
  • tests/nextflow.config is back, but this time actually loaded by
    main.nf.test and with no local paths. Without it params.module_args never
    reached ext.args, so the --mm2-opts "-Y" case was not really being tested.
    You were right to delete the old one; it was both unused and full of local
    paths.
  • Removed the Dockerfile (left over from the abandoned Wave freeze) — it tripped
    environment_yml_dockerfile_conflict.
  • Dropped six obsolete snapshot entries for tests that no longer exist.

nf-core/tools 4.1.0 lint: 60 passed, 0 failed (2 warnings: the label one
above, and process_gpu being non-standard, same as parabricks).

One thing I could not do: the two GPU snapshots are stale with respect to the
output changes above and I have no GPU runner here. They need
@nf-core-bot update gpu snapshot path: modules/nf-core/dorado/basecaller/tests/main.nf.test
run on this PR. I did not want to guess at their contents.

Re your question about the "dorado/basecaller functional test" over on
nf-core/test-datasets#1969 — that referred to the non-stub, GPU-tagged tests in
this PR, which need a real pod5 rather than a stub. Sorry for the unclear
wording. I will reply properly on that PR about dropping the pre-generated
bedmethyl files, which I agree with.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013fqrTt7TV2RSSUHaA4wP4v
dorado emits an @rg line with no SM tag, so htsjdk refuses the file at
its default stringency:

  htsjdk.samtools.SAMFormatException: Error parsing SAM header.
  @rg line missing SM tag.

That made every nft-bam call on a dorado BAM throw, not just the md5 —
1 of 4 assertions failed on the previous run, the read-count one. Pass
stringency: "silent" as nine other modules in the repo already do.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013fqrTt7TV2RSSUHaA4wP4v

@dialvarezs dialvarezs left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @sahuno.

Some of my existing comments still haven't been addressed.

Additionally, check the current GPU guide for modules: https://nf-co.re/docs/developing/components/gpu-modules. There are several things in that regard that this module should address.

Finally, if you're letting Claude to write everything (including responses in the thread), please tell it to be more concise (Opus 5 is known to be overly verbose) and double-check its claims.

@famosab

famosab commented Nov 9, 2026

Copy link
Copy Markdown
Member

@sahuno Are you still working on this?

sahuno and others added 2 commits November 11, 2026 16:03
…to basecalling

- select --device from task.accelerator (cuda:all when requested, cpu otherwise)
- replace 'conda null' and the placeholder environment.yml with the conda/mamba
  error guard used by the parabricks modules
- drop the reference input; alignment belongs to dorado/aligner
- emit dorado's stderr as a log output
- tests: add a CPU test with fast@v5.0.0, load accelerator = 1 through
  tests/nextflow.gpu.config for the GPU test, snapshot with sanitizeOutput

Tested with --profile=+singularity,gpu on an L40S: 3/3 pass twice.

Generated by Claude Fable 5.2

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@sahuno

sahuno commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

@dialvarezs @famosab still active, sorry for the wait. The module now follows the GPU guide (device from task.accelerator, conda guard as in parabricks), is restricted to basecalling (reference input removed), emits stderr as a log, and has a CPU test with fast@v5.0.0; 3/3 pass locally on an L40S with singularity. All tests carry the gpu tag because the 9.4 GB image fills the standard runners' disk (see #11222).

Comment added by Claude Fable 5.2

@dialvarezs dialvarezs left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @sahuno, what about bumping the image to the newest version (2.1.2)?
The 2.x branch introduced the v6 basecalling models and performance improvements.

@famosab

famosab commented Nov 12, 2026

Copy link
Copy Markdown
Member

When you do that can you also add the lock files? See #13143 :)

sahuno and others added 2 commits November 12, 2026 07:01
2.1.1 is the newest release with a vendor image on Docker Hub (2.1.2 ships
as a tarball only). The GPU and stub tests now pin hac@v6.0.0,5mCG_5hmCG@v1
instead of @latest; snapshots regenerated with nf-test. Adds the licence header.

Generated by Claude Fable 5.2

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@sahuno

sahuno commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

@dialvarezs bumped to 2.1.1, the newest release ONT has published a Docker image for; 2.1.2 exists as a tarball only, so it will come with the nf-core hosted image proposed in #11222 (its Dockerfile now targets 2.1.2 and passes these tests). The GPU test now basecalls with hac@v6.0.0,5mCG_5hmCG@v1. @famosab this module has no environment.yml (vendor container, as in parabricks), so there is nothing to lock.

Comment added by Claude Fable 5.2

@dialvarezs dialvarezs left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests do run on the GPU runners and both standard and GPU runners have a 40 GB volume, so nothing needs skipping. Still, splitting CPU and GPU tests would be better (see cellpose or caalm/caalm): the stub and the fast@v5.0.0 CPU case don't need a GPU.

And the new line in .github/skip_nf_test.json does nothing today, drop it.

Otherwise this looks good to me.

@famosab

famosab commented Nov 12, 2026

Copy link
Copy Markdown
Member

I think we also have issues with the licesnce (I think there were some discussions around dorado)

@renatosantos98

Copy link
Copy Markdown
Member

@famosab dorado and modkit have the same licence, Oxford Nanopore Technologies PLC. Public License Version 1.0, and modkit is an nf-core module and published on bioconda already, so that shouldn't be an issue?

All tests in this module carry the gpu tag, so they never reach the standard
nf-test workflow that reads the skip list (review comment by dialvarezs).

Generated by Claude Fable 5.2

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@sahuno

sahuno commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

@dialvarezs dropped the skip_nf_test.json line. On the split: the standard runners start with about 20 GiB free and run out of disk pulling the 10 GB vendor image (#11222, run 43222946511), while the g4dn runners have an extra 108 GiB disk, so the CPU and stub tests would fail there today. I will split into main.nf.test + main.gpu.nf.test as soon as the slim image from #11222 is hosted, or now if you prefer it red until then.

Comment added by Claude Fable 5.2

@famosab

famosab commented Nov 12, 2026

Copy link
Copy Markdown
Member

@renatosantos98 my bad you are correct!

@Kevin-Brockers

Kevin-Brockers commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Please make sure to document that dorado usage is research-only.

@famosab, I think this is sorted, since we are fine with research-only software as long as it's properly documented.

…only

Requested in review (Kevin-Brockers on nf-core#11122).

Generated by Claude Fable 5.2

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@sahuno

sahuno commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

@Kevin-Brockers done: meta.yml now states that dorado is licensed for research use only (same note added to dorado/aligner in #11222).

Comment added by Claude Fable 5.2

sahuno added a commit to sahuno/modules that referenced this pull request Nov 12, 2026
Requested in review (Kevin-Brockers on nf-core#11122).

Generated by Claude Fable 5.2

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
maxulysse pushed a commit to maxulysse/nf-core_modules that referenced this pull request Nov 12, 2026
* feat: add modkit/localize module

Adds `modkit localize`, which summarises methylation around a set of regions.

This PR previously carried three modules — `modkit/localize`,
`modkit/localize/plot` and the whole of `dorado/basecaller` — which is why
@famosab asked for it to be split. It now contains `modkit/localize` only:

- `dorado/basecaller` is dropped entirely; it is already in nf-core#11122, and the
  copy here was the older revision that still committed pod5 files into the
  repo.
- `modkit/localize/plot` moves to its own PR, renamed `modkit/localizeplot`
  since nf-core module paths are at most two levels deep.

Rebased onto current master, which required two fixes:

- `TABIX_TABIX` is now deprecated (its script is `assert false`, pointing at
  `HTSLIB/BGZIPTABIX`), and its input signature had grown from two elements to
  four. The test setup now uses `HTSLIB_BGZIPTABIX` to build the tabix index
  from the `MODKIT_PILEUP` output.
- `main.nf.test` never loaded `tests/nextflow.config`, so `params.module_args`
  never reached `ext.args` and the `--min-coverage 1 --window 1000` settings the
  test relies on were silently ignored. Added the `config` directive.

Also aligned the container declaration with the merged modkit modules
(`workflow.containerEngine in ['singularity', 'apptainer']` and the `quay.io/`
prefix required by lint).

nf-core/tools 4.1.0 lint: 59 passed, 0 warnings, 0 failed.
Both nf-tests pass under the singularity profile.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E7RSvpouxbMBdimYSwJ5ZP

* fix(modkit/localize): sanitizeOutput snapshots + bump ont-modkit to 0.6.4

Ports the review changes from nf-core#11286 to this module, keeping all four open
modkit module PRs on one modkit version.

- Snapshot via `sanitizeOutput(process.out)` with `assert process.success`
  outside `assertAll`, so a tool failure fails fast rather than reporting a
  snapshot mismatch against empty output.
- tests/nextflow.config is kept: it carries a real `ext.args2 = '-p bed'` for
  HTSLIB_BGZIPTABIX, not an empty ext.args.
- Bump ont-modkit 0.6.1 -> 0.6.4 (clears the `bioconda_latest` lint warning);
  container tag `0.6.4--h7f49ad2_0` verified on the Galaxy depot and quay.io.

All three output md5s are unchanged across the bump
(bc5b3b2e…, fdabfb3e…, and the empty-file stub hash).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAsT7dzCcLSicJxFRWJozr

* fix(modkit/localize): address review - format, ontologies, wire log output [skip ci]

WIP: snapshot not yet regenerated.

Generated by Claude Fable 5.2

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(modkit/localize): regenerate snapshot for the log output

Both tests pass twice with --profile=+singularity; nf-core modules lint
(4.2.2) and nextflow lint are clean.

Generated by Claude Fable 5.2

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* modkit/localize: switch to Seqera Containers and add conda lock files

Containers and lock files generated with 'nf-core modules containers create'
(same ont-modkit 0.6.4 build as the other modkit modules). Adds the bioconda
channel prefix in environment.yml and the licence header. Refs nf-core#13143.

Generated by Claude Fable 5.2

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Comment on lines +12 to +23
// every test runs on the GPU runners: the 10 GB vendor image does not fit on
// the standard ones. Only the test loading nextflow.gpu.config requests a GPU.
tag "gpu"

// dorado's basecalled BAM is not byte-reproducible: the docker and singularity
// shards of one CI run, on the same g4dn.xlarge, emit different md5s for the
// same output. The real tests therefore snapshot file names and versions only
// and assert on the read count.
//
// The nft-bam calls need stringency: "silent" because dorado writes an @RG
// line with no SM tag, which htsjdk rejects at default stringency.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we do not need all the comments here

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we allow a second .config file? Can we not set
accelerator = params.module_acc (or similar)
and then just set it in the nf-test directly using only one nextflow.config file?

Comment thread .nf-core.yml
- ghcr.io/nbisweden
- ghcr.io/scverse
- nvcr.io/nvidia/clara
- docker.io/nanoporetech

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mashehu Is that the indended change? That we can add more to this list if needed? (I am just unsure what our standard way is here)

delfiterradas pushed a commit to delfiterradas/modules that referenced this pull request Nov 16, 2026
* feat: add modkit/localize module

Adds `modkit localize`, which summarises methylation around a set of regions.

This PR previously carried three modules — `modkit/localize`,
`modkit/localize/plot` and the whole of `dorado/basecaller` — which is why
@famosab asked for it to be split. It now contains `modkit/localize` only:

- `dorado/basecaller` is dropped entirely; it is already in nf-core#11122, and the
  copy here was the older revision that still committed pod5 files into the
  repo.
- `modkit/localize/plot` moves to its own PR, renamed `modkit/localizeplot`
  since nf-core module paths are at most two levels deep.

Rebased onto current master, which required two fixes:

- `TABIX_TABIX` is now deprecated (its script is `assert false`, pointing at
  `HTSLIB/BGZIPTABIX`), and its input signature had grown from two elements to
  four. The test setup now uses `HTSLIB_BGZIPTABIX` to build the tabix index
  from the `MODKIT_PILEUP` output.
- `main.nf.test` never loaded `tests/nextflow.config`, so `params.module_args`
  never reached `ext.args` and the `--min-coverage 1 --window 1000` settings the
  test relies on were silently ignored. Added the `config` directive.

Also aligned the container declaration with the merged modkit modules
(`workflow.containerEngine in ['singularity', 'apptainer']` and the `quay.io/`
prefix required by lint).

nf-core/tools 4.1.0 lint: 59 passed, 0 warnings, 0 failed.
Both nf-tests pass under the singularity profile.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E7RSvpouxbMBdimYSwJ5ZP

* fix(modkit/localize): sanitizeOutput snapshots + bump ont-modkit to 0.6.4

Ports the review changes from nf-core#11286 to this module, keeping all four open
modkit module PRs on one modkit version.

- Snapshot via `sanitizeOutput(process.out)` with `assert process.success`
  outside `assertAll`, so a tool failure fails fast rather than reporting a
  snapshot mismatch against empty output.
- tests/nextflow.config is kept: it carries a real `ext.args2 = '-p bed'` for
  HTSLIB_BGZIPTABIX, not an empty ext.args.
- Bump ont-modkit 0.6.1 -> 0.6.4 (clears the `bioconda_latest` lint warning);
  container tag `0.6.4--h7f49ad2_0` verified on the Galaxy depot and quay.io.

All three output md5s are unchanged across the bump
(bc5b3b2e…, fdabfb3e…, and the empty-file stub hash).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAsT7dzCcLSicJxFRWJozr

* fix(modkit/localize): address review - format, ontologies, wire log output [skip ci]

WIP: snapshot not yet regenerated.

Generated by Claude Fable 5.2

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(modkit/localize): regenerate snapshot for the log output

Both tests pass twice with --profile=+singularity; nf-core modules lint
(4.2.2) and nextflow lint are clean.

Generated by Claude Fable 5.2

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* modkit/localize: switch to Seqera Containers and add conda lock files

Containers and lock files generated with 'nf-core modules containers create'
(same ont-modkit 0.6.4 build as the other modkit modules). Adds the bioconda
channel prefix in environment.yml and the licence header. Refs nf-core#13143.

Generated by Claude Fable 5.2

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
maxulysse pushed a commit to maxulysse/nf-core_modules that referenced this pull request Nov 18, 2026
* Create mtx2h5ad module

* Fix linting errors

* Update snapshots

* Pin python version and add cellranger test

* Create conda-lock file

* Add missing tags

* Minor format change

* Update conda-lock

* new submodule for bullseye (nf-core#13647)

* new submodule for bullseye

* fixing linter

* introducing changes according to comments

* parabricks/dbsnp: output bgzipped VCF and tabix index (nf-core#13706)

Write --out-vcf as ${prefix}.vcf.gz so pbrun emits a BGZF VCF plus its
.tbi index. The vcf emit is now *.vcf.gz (breaking) and a new tbi emit
is added. Update meta.yml, stub, tests and snapshots.

* BUG FIX: removed --ref_index flag in savana/cna. This flag is an unrecognised command and results in the module failing. (nf-core#13704)

* Removed --ref_index flag for savana/cna to prevent unknown flag error. Added bai index edam term to meta.

* fixed meta because prek complained.

* Add module: modkit/localize (nf-core#11120)

* feat: add modkit/localize module

Adds `modkit localize`, which summarises methylation around a set of regions.

This PR previously carried three modules — `modkit/localize`,
`modkit/localize/plot` and the whole of `dorado/basecaller` — which is why
@famosab asked for it to be split. It now contains `modkit/localize` only:

- `dorado/basecaller` is dropped entirely; it is already in nf-core#11122, and the
  copy here was the older revision that still committed pod5 files into the
  repo.
- `modkit/localize/plot` moves to its own PR, renamed `modkit/localizeplot`
  since nf-core module paths are at most two levels deep.

Rebased onto current master, which required two fixes:

- `TABIX_TABIX` is now deprecated (its script is `assert false`, pointing at
  `HTSLIB/BGZIPTABIX`), and its input signature had grown from two elements to
  four. The test setup now uses `HTSLIB_BGZIPTABIX` to build the tabix index
  from the `MODKIT_PILEUP` output.
- `main.nf.test` never loaded `tests/nextflow.config`, so `params.module_args`
  never reached `ext.args` and the `--min-coverage 1 --window 1000` settings the
  test relies on were silently ignored. Added the `config` directive.

Also aligned the container declaration with the merged modkit modules
(`workflow.containerEngine in ['singularity', 'apptainer']` and the `quay.io/`
prefix required by lint).

nf-core/tools 4.1.0 lint: 59 passed, 0 warnings, 0 failed.
Both nf-tests pass under the singularity profile.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E7RSvpouxbMBdimYSwJ5ZP

* fix(modkit/localize): sanitizeOutput snapshots + bump ont-modkit to 0.6.4

Ports the review changes from nf-core#11286 to this module, keeping all four open
modkit module PRs on one modkit version.

- Snapshot via `sanitizeOutput(process.out)` with `assert process.success`
  outside `assertAll`, so a tool failure fails fast rather than reporting a
  snapshot mismatch against empty output.
- tests/nextflow.config is kept: it carries a real `ext.args2 = '-p bed'` for
  HTSLIB_BGZIPTABIX, not an empty ext.args.
- Bump ont-modkit 0.6.1 -> 0.6.4 (clears the `bioconda_latest` lint warning);
  container tag `0.6.4--h7f49ad2_0` verified on the Galaxy depot and quay.io.

All three output md5s are unchanged across the bump
(bc5b3b2e…, fdabfb3e…, and the empty-file stub hash).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAsT7dzCcLSicJxFRWJozr

* fix(modkit/localize): address review - format, ontologies, wire log output [skip ci]

WIP: snapshot not yet regenerated.

Generated by Claude Fable 5.2

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(modkit/localize): regenerate snapshot for the log output

Both tests pass twice with --profile=+singularity; nf-core modules lint
(4.2.2) and nextflow lint are clean.

Generated by Claude Fable 5.2

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* modkit/localize: switch to Seqera Containers and add conda lock files

Containers and lock files generated with 'nf-core modules containers create'
(same ont-modkit 0.6.4 build as the other modkit modules). Adds the bioconda
channel prefix in environment.yml and the licence header. Refs nf-core#13143.

Generated by Claude Fable 5.2

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>

* parabricks/haplotypecaller: add out_ext input to emit bgzipped VCF and tbi (nf-core#13707)

* parabricks/haplotypecaller: add out_ext input to emit bgzipped VCF and tbi

With out_ext 'vcf.gz', pbrun writes a bgzipped VCF and its tabix index directly
(new vcf_gz and vcf_tbi outputs). With --gvcf the new gvcf_tbi output exposes the
index pbrun already writes. out_ext 'vcf' keeps the plain VCF output.

* parabricks/haplotypecaller: use ${prefix} in all output patterns

* parabricks/haplotypecaller: drop redundant comment

* parabricks/haplotypecaller: select gVCF output with out_ext 'g.vcf.gz'

out_ext now decides the output file alone; the module adds --gvcf itself and
rejects --gvcf in ext.args, so the two can no longer disagree.

* parabricks/haplotypecaller: only reject a literal --gvcf in ext.args, test it

args.contains('--gvcf') also matched valid options such as --gvcf-gq-bands.

* parabricks/haplotypecaller: validate out_ext and --gvcf in stub too, list out_ext values in meta.yml

* parabricks/haplotypecaller: snapshot tests with sanitizeOutput

* Implement reviewer's suggestions and add test with starsolo input

* Fix linting and update container

* Fix linting and update snpashots

* Skip conda test for mtx2h5ad module

* Add hdf5plugin import to mtx2h5ad.py

* Skip linting for hdf5plugin import

* Fix linting

---------

Co-authored-by: Famke Bäuerle <45968370+famosab@users.noreply.github.com>
Co-authored-by: Olga Brovkina <40294728+brovolia@users.noreply.github.com>
Co-authored-by: Friederike Hanssen <Friederike.hanssen@qbic.uni-tuebingen.de>
Co-authored-by: Dylan House <d.housexyz@proton.me>
Co-authored-by: Samuel Terkper Ahuno <ekwame001@gmail.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants