Skip to content

Add nf-test coverage for the basecalling Nextflow workflow #26

Description

@katherine-stansifer

Context

main.nf and the modules under modules/local/ (Dorado basecall/duplex/demux, samtools BAM↔FASTQ, etc.) currently have no automated tests. Regressions are only caught by running a real delivery end-to-end through AWS Batch, which is slow and consumes GPU spot capacity.

Came out of PR #23 review while tightening the head-container entrypoint — once the Python side has pytest, the Nextflow side is the remaining untested surface.

Scope

Adopt nf-test and add coverage for:

  • Per-process tests for the local modules (BASECALL_POD_5_SIMPLEX, BASECALL_POD_5_DUPLEX, DEMUX_POD_5, BAM_TO_FASTQ, MERGE_BAMS). Stub Dorado/samtools where needed so tests don't require GPUs — the goal is to validate channel wiring and output file shape, not re-test the binaries themselves.
  • Workflow-level test for main.nf with a small fixture POD5 (or a stub upstream channel) covering both the demux=true and demux=false branches, asserting the published raw/ layout matches what seq_import.samplesheet.generate_samplesheet expects to find.
  • Config sanity check — nextflow config main.nf -profile batch already runs in docker-build.yml; the nf-test suite supersedes that as the deeper check.

Out of scope

  • Real GPU runs against Dorado — those stay manual / batch-driven.
  • Testing the AWS Batch executor wiring (-profile batch) — nf-test runs locally; profile coverage would need a separate integration harness.

Wiring

  • Add an nf-test config + fixture directory (convention is tests/ at repo root, or tests/<module> colocated).
  • Run nf-test test from a GitHub Actions workflow on PRs. Survey mgs-orchestrator / det-read-scrubber first to see whether either has an nf-test CI pattern worth borrowing before standing up a new one.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions