diff --git a/.claude/docs/project/01-repository-structure.md b/.agents/docs/project/01-repository-structure.md similarity index 89% rename from .claude/docs/project/01-repository-structure.md rename to .agents/docs/project/01-repository-structure.md index 13e33678c..f159026be 100644 --- a/.claude/docs/project/01-repository-structure.md +++ b/.agents/docs/project/01-repository-structure.md @@ -7,7 +7,8 @@ The Bactopia repository follows a well-organized three-tier architecture that se ``` bactopia/ -├── .claude/ # AI context documentation (modular) +├── .agents/ # AI context: docs/ (modular documentation) and skills/ +├── .claude/ # Compatibility symlink: skills -> ../.agents/skills ├── .github/ # Github Actions workflows and issue templates ├── .vscode/ # Visual Studio Code settings and configurations ├── bin/ # Helper scripts and utilities @@ -26,7 +27,8 @@ bactopia/ ├── nextflow_schema.json # Parameter validation schema ├── catalog.json # Auto-generated component catalog ├── llms.txt # llms.txt-standard AI discovery index -├── CLAUDE.md # AI Context Master Map +├── AGENTS.md # AI Context Master Map (agents.md standard) +├── CLAUDE.md # One-line compatibility pointer importing AGENTS.md └── README.md # Project documentation ``` @@ -39,7 +41,7 @@ bactopia/ - `main.nf` - Process definition with GroovyDoc documentation - `module.config` - Module parameters and process configuration - `schema.json` - Parameter schema for validation -- **Count**: 98 modules +- **Count**: 104 modules - **Examples**: `abricate/`, `prokka/`, `kraken2/` ### `/subworkflows/` (Tier 2) @@ -50,7 +52,7 @@ bactopia/ - `{tool}/` - Tool-specific processing logic - **Contents**: - `main.nf` - Subworkflow definition with GroovyDoc documentation -- **Count**: 89 subworkflows +- **Count**: 93 subworkflows - **Key Requirement**: Emit two record channels — `sample_outputs` (module record passthrough) and `run_outputs` (aggregated results) ### `/workflows/` (Tier 1) @@ -87,10 +89,10 @@ bactopia/ - **Contents**: - `conda/` - Development environment specifications - `citations.yml` - Tool citations and references - - `proteins.faa` - Protein reference file + - `proteins.faa` - Trusted protein reference used by Prokka (`--prokka_proteins`) - Image assets (logos, banners) -Note: `catalog.json` (auto-generated component catalog) and `llms.txt` (AI discovery index) live at the repo root, not under `data/`. +Note: `catalog.json` (auto-generated component catalog) and `llms.txt` (AI discovery index) live at the repo root, not under `data/`. Modules never ship their own data — vendored static files live here and are referenced from `module.config` via `${params.bactopia_dir}`; downloadable databases go through a `download`/`fetch` submodule instead. ### `/bin/` - **Purpose**: CLI wrapper scripts for the bioconda `bactopia` package @@ -152,7 +154,7 @@ Results (record channels: sample_outputs + run_outputs) ### Workflow Organization - Entry points in root directory -- Bactopia Tools in `workflows/bactopia-tools/` (67 tools; 71 workflows total across all tiers) +- Bactopia Tools in `workflows/bactopia-tools/` (70 tools; 74 workflows total across all tiers) - Named workflows as separate directories under `workflows/`: - `workflows/cleanyerreads/` - Read cleaning workflow - `workflows/staphopia/` - Staphylococcus-focused analysis diff --git a/.claude/docs/project/02-development-workflow.md b/.agents/docs/project/02-development-workflow.md similarity index 100% rename from .claude/docs/project/02-development-workflow.md rename to .agents/docs/project/02-development-workflow.md diff --git a/.claude/docs/project/03-configuration-system.md b/.agents/docs/project/03-configuration-system.md similarity index 100% rename from .claude/docs/project/03-configuration-system.md rename to .agents/docs/project/03-configuration-system.md diff --git a/.claude/docs/project/04-testing-framework.md b/.agents/docs/project/04-testing-framework.md similarity index 95% rename from .claude/docs/project/04-testing-framework.md rename to .agents/docs/project/04-testing-framework.md index 2ca889ed0..843e35177 100644 --- a/.claude/docs/project/04-testing-framework.md +++ b/.agents/docs/project/04-testing-framework.md @@ -69,6 +69,7 @@ config { // Minimal config for module-level testing nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -78,25 +79,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" @@ -105,7 +88,7 @@ includeConfig "../../../conf/profiles.config" ``` > `params.workflow.ext` is a **string** at module-test scope (a single extension for the module's primary output). Workflow-level configs (`workflows/{name}/nextflow.config`) use the **list** form — e.g. `ext = ['fna']` — because workflows aggregate publishing across multiple module outputs. Match the surrounding layer when editing. -> `bactopia_version` is a placeholder — keep it in sync with the repo's `manifest.version` in [nextflow.config](../../../nextflow.config) when it drifts. +> The pipeline version and the `nf-bactopia@` plugin pin are **not** repeated per test config — they live in [conf/test_base.config](../../../conf/test_base.config), included at the top of every test config, and are propagated from `versions.yml` by `/bump-versions`. Only per-component params (`workflow{}`, `wf`, and any resource or tool-specific overrides) stay local. ## Writing Tests @@ -427,7 +410,7 @@ Sourced from `bactopia-test --help`: | `--outdir PATH` | Output | Where `logs/` is written | | `--json` | Output | Emit structured JSON summary | | `--keep` | Cleanup | Preserve `.nf-test/` dirs and logs on pass | -| `--cleanup` | Cleanup | Remove all `.nf-test/` temp dirs and exit (no tests run) | +| `--cleanup` | Cleanup | Remove `.nf-test/` temp dirs under `modules/`, `subworkflows/`, `workflows/`, `tests/` and exit (skips `logs/`; no tests run) | ### Raw `nf-test` (debugging) diff --git a/.claude/docs/reference/01-examples.md b/.agents/docs/reference/01-examples.md similarity index 98% rename from .claude/docs/reference/01-examples.md rename to .agents/docs/reference/01-examples.md index 24f77797b..9c2ca9798 100644 --- a/.claude/docs/reference/01-examples.md +++ b/.agents/docs/reference/01-examples.md @@ -174,9 +174,9 @@ workflow MLST { * @status stable * @keywords alignment, core-genome, pan-genome, phylogeny, comparative genomics, bactopia-tool * @tags complexity:complex input-type:parameter output-type:multiple features:bactopia-tool,aggregation,conditional-logic - * @citation clonalframeml, iqtree, iqtree_modelfinder, iqtree_ufboot, ncbigenomedownload, panaroo, pirate, prokka, roary, scoary + * @citation clonalframeml, iqtree, iqtree_modelfinder, iqtree_ufboot, genome_dl, panaroo, pirate, prokka, roary, scoary * - * @subworkflows utils_bactopia-tools, pangenome, ncbigenomedownload, prokka, clonalframeml, iqtree, scoary + * @subworkflows utils_bactopia-tools, pangenome, genome_dl, prokka, clonalframeml, iqtree, scoary * * @input rundir * Directory containing results from a completed Bactopia analysis run diff --git a/.claude/docs/reference/02-troubleshooting.md b/.agents/docs/reference/02-troubleshooting.md similarity index 100% rename from .claude/docs/reference/02-troubleshooting.md rename to .agents/docs/reference/02-troubleshooting.md diff --git a/.claude/docs/reference/03-glossary.md b/.agents/docs/reference/03-glossary.md similarity index 100% rename from .claude/docs/reference/03-glossary.md rename to .agents/docs/reference/03-glossary.md diff --git a/.claude/docs/reference/04-plugin-functions.md b/.agents/docs/reference/04-plugin-functions.md similarity index 100% rename from .claude/docs/reference/04-plugin-functions.md rename to .agents/docs/reference/04-plugin-functions.md diff --git a/.claude/docs/reference/05-task-ext-properties.md b/.agents/docs/reference/05-task-ext-properties.md similarity index 100% rename from .claude/docs/reference/05-task-ext-properties.md rename to .agents/docs/reference/05-task-ext-properties.md diff --git a/.claude/docs/reference/06-skills.md b/.agents/docs/reference/06-skills.md similarity index 67% rename from .claude/docs/reference/06-skills.md rename to .agents/docs/reference/06-skills.md index 24ce980c3..1f2afe75c 100644 --- a/.claude/docs/reference/06-skills.md +++ b/.agents/docs/reference/06-skills.md @@ -2,9 +2,9 @@ ## Overview -Skills are AI tooling — short instruction files that Claude invokes via the `Skill` tool when a matching trigger phrase appears. They are distinct from pipeline components (modules, subworkflows, workflows) and are **not** listed in [catalog.json](../../../catalog.json); this doc is the authoritative inventory for project-local skills. +Skills are AI tooling — short instruction files that the agent loads when a matching trigger phrase appears in its skill index. They are distinct from pipeline components (modules, subworkflows, workflows) and are **not** listed in [catalog.json](../../../catalog.json); this doc is the authoritative inventory for project-local skills. -**Pattern**: every project-local skill is a thin AI wrapper over a `bactopia-*` CLI in [bactopia-py](../../../../bactopia-py/bactopia/cli/). The skill lives at `.claude/skills//SKILL.md`; a wrapper script under `scripts/` discovers and invokes the CLI. Implementation logic belongs in the CLI so it can evolve independently and be run directly from the shell or CI — the `SKILL.md` is just interpretation. +**Pattern**: every project-local skill is a thin AI wrapper over a `bactopia-*` CLI in [bactopia-py](../../../../bactopia-py/bactopia/cli/). The skill lives at `.agents/skills//SKILL.md`; a wrapper script under `scripts/` discovers and invokes the CLI. Implementation logic belongs in the CLI so it can evolve independently and be run directly from the shell or CI — the `SKILL.md` is just interpretation. ## Project-local skills @@ -13,29 +13,30 @@ Skills are AI tooling — short instruction files that Claude invokes via the `S | [add-bactopia-tool](../../skills/add-bactopia-tool/) | `bactopia-scaffold` | Scaffold a complete Bactopia Tool across all three tiers -- module, subworkflow, and workflow entry point under workflows/bactopia-tools/. | | [add-module](../../skills/add-module/) | `bactopia-scaffold` | Scaffold a new Bactopia module from a bioconda/conda-forge package. | | [add-subworkflow](../../skills/add-subworkflow/) | `bactopia-scaffold` | Scaffold a new Bactopia subworkflow that orchestrates existing modules. | +| [bump-versions](../../skills/bump-versions/) | — | Propagate the Bactopia and nf-bactopia versions declared in versions.yml into the hand-maintained files that carry a literal version (conf/test_base.config, CITATION.cff, bin/bactopia, data/conda/meta.yaml). | | [merge-schemas](../../skills/merge-schemas/) | `bactopia-merge-schemas` | Regenerate nextflow.config and nextflow_schema.json for Bactopia workflows by running bactopia-merge-schemas. | | [project-status](../../skills/project-status/) | `bactopia-status` | Show a live snapshot of the Bactopia project state — component counts, GroovyDoc coverage, nf-test coverage, and structural issues. | +| [release-checklist](../../skills/release-checklist/) | — | Audit whether Bactopia is ready for a version release and produce a GO / NO-GO recommendation report. | | [review-citations](../../skills/review-citations/) | `bactopia-citations` | Review citation integrity across data/citations.yml and @citation tags using bactopia-citations --validate. | -| [review-docs](../../skills/review-docs/) | `bactopia-docs` | Review staleness of reference docs under .claude/docs/ using bactopia-docs --validate. | +| [review-docs](../../skills/review-docs/) | `bactopia-docs` | Review staleness of reference docs under .agents/docs/ using bactopia-docs --validate. | | [review-groovydoc](../../skills/review-groovydoc/) | `bactopia-lint` | Review GroovyDoc accuracy across modules and subworkflows using bactopia-lint. | | [review-tests](../../skills/review-tests/) | — | Review nf-test run results and present a diagnostic summary with grouped error analysis. | | [run-tests](../../skills/run-tests/) | `bactopia-test` | Run Bactopia nf-tests via bactopia-test and produce a timestamped logs/ directory that /review-tests can interpret. | | [update-catalog](../../skills/update-catalog/) | `bactopia-catalog` | Regenerate catalog.json and llms.txt by running bactopia-catalog. | +| [update-datasets](../../skills/update-datasets/) | — | Build and publish Bactopia's version-pinned datasets to Cloudflare R2. | | [update-module](../../skills/update-module/) | `bactopia-update` | Check for newer versions of tools used in Bactopia modules and apply updates to module.config files and CHANGELOG.md. | The `Purpose` column is the first sentence of each skill's `description:` frontmatter. Drift between the table and the source file is caught by **D107** in `/review-docs`. Full trigger-phrase lists live in each `SKILL.md` — read it directly when you need the exact phrasing. ## Global skills worth knowing -These live at `~/.claude/skills/` (user-global) or are built into the Claude Code harness: +These live at `~/.agents/skills/` (user-global, shared across harnesses) or are built into the agent harness: | Skill | When to use | |---|---| | `skill-creator` | **Any time** you are creating, editing, or improving a skill. Do not hand-scaffold `SKILL.md` files. | -| `session-handoff` | Save session context to the clipboard for resuming in a new session. | -| `update-config` | Configure the Claude Code harness via `settings.json` (hooks, permissions, status line). | -| `schedule` / `loop` | Recurring cron-style agents (`schedule`) or self-paced polling (`loop`). | -| `claude-api` | Reference for building apps on the Anthropic SDK — unrelated to the Bactopia pipeline. | + +Harnesses ship their own built-in skills on top of these (e.g. session handoff, config helpers) — consult your harness's skill list for those. ## When to invoke `skill-creator` @@ -51,7 +52,7 @@ Use it whenever the request is about *making* or *modifying* a skill: ## Architecture ```text -.claude/skills// +.agents/skills// SKILL.md # Frontmatter (name, description) + trigger instructions scripts/ # Optional — wrapper scripts run-bactopia-*.sh # Discovers the bactopia-* CLI in PATH or conda envs @@ -59,10 +60,10 @@ Use it whenever the request is about *making* or *modifying* a skill: Wrapper scripts find the backing CLI in this order: PATH first, then the exact bactopia-dev conda env, then exact bactopia-py, then any `bactopia-*` env (fuzzy match). This discovery code is shared across every wrapper, so env-setup changes propagate uniformly. -**Adding a new CLI-backed skill**: implement the CLI in [bactopia-py](../../../../bactopia-py/bactopia/cli/) first so it's testable, stable, and runnable outside Claude, then wrap it with `skill-creator`. The skill becomes the trigger surface; the CLI is the logic. +**Adding a new CLI-backed skill**: implement the CLI in [bactopia-py](../../../../bactopia-py/bactopia/cli/) first so it's testable, stable, and runnable outside an agent harness, then wrap it with `skill-creator`. The skill becomes the trigger surface; the CLI is the logic. ## Discoverability -- **Terminal CLI**: custom skills appear in the `/` autocomplete menu. -- **VS Code extension**: custom skills do **not** appear in the slash-command menu (known limitation). They still work — type `/skill-name` directly or describe what you want and Claude will trigger them via the same system reminder that enumerates skills at session start. -- This reference doc is linked from [CLAUDE.md](../../../CLAUDE.md) and [llms.txt](../../../llms.txt) so Claude has a canonical inventory to consult. +- **Slash commands**: most harnesses expose skills as `/skill:` (or list them in the `/` autocomplete menu). +- **Automatic triggering**: the harness enumerates skill names + descriptions at session start; the model loads the full `SKILL.md` when a description matches the task. Trigger phrases in `description:` are therefore the routing surface — keep them current. +- This reference doc is linked from [AGENTS.md](../../../AGENTS.md) and [llms.txt](../../../llms.txt) so agents have a canonical inventory to consult. diff --git a/.claude/docs/standards/01-style-guide.md b/.agents/docs/standards/01-style-guide.md similarity index 100% rename from .claude/docs/standards/01-style-guide.md rename to .agents/docs/standards/01-style-guide.md diff --git a/.claude/docs/standards/02-logic-rules.md b/.agents/docs/standards/02-logic-rules.md similarity index 97% rename from .claude/docs/standards/02-logic-rules.md rename to .agents/docs/standards/02-logic-rules.md index 039aa7657..61389d342 100644 --- a/.claude/docs/standards/02-logic-rules.md +++ b/.agents/docs/standards/02-logic-rules.md @@ -40,7 +40,7 @@ This guide defines the decision-making logic and taxonomy used to classify Bacto - **Definition**: No sample/data channels in the `take` block - **Use case**: Utility modules that download resources or perform setup tasks - **Note**: May have `Path`, `Value`, or other non-channel parameters but no `Channel` inputs -- **Examples**: wget, ariba/getref, bactopia/datasets, amrfinderplus/update +- **Examples**: wget, ariba/getref, bactopia/datasets ### Single Input - **Definition**: The `take` block defines exactly **1 Channel** @@ -119,7 +119,7 @@ This guide defines the decision-making logic and taxonomy used to classify Bacto #### internet-access - Requires active internet connection during execution - **Key indicators**: External URLs, download commands (wget, curl) -- Examples: gather (SRA download), amrfinderplus/update +- Examples: gather (SRA download), wget #### alternative-execution - Multiple tool options for the same task diff --git a/.claude/docs/standards/03-technical-specs.md b/.agents/docs/standards/03-technical-specs.md similarity index 89% rename from .claude/docs/standards/03-technical-specs.md rename to .agents/docs/standards/03-technical-specs.md index 8e3c2124f..375b282e8 100644 --- a/.claude/docs/standards/03-technical-specs.md +++ b/.agents/docs/standards/03-technical-specs.md @@ -505,6 +505,66 @@ GATHER is the only module that appends a `*???-` suffix — it runs before | `prokka`, `agrvate`, `bakta/run` | `staging/fna/*` | Single assembly staging | | `defensefinder/run` | `staging/faa/*` | Protein FASTA staging | +## Input Decompression Pattern + +Many tools do not accept gzip-compressed input (or cannot follow symlinks). Since assemblies +and other inputs may arrive either compressed (`.gz`) or plain, modules that need a real file +on disk use a standard decompress-or-copy guard. This is the convention used across roughly three dozen modules +(e.g., `agrvate`, `ectyper`, `mobsuite/recon`, `checkm2/predict`, `clonalframeml`). + +In the Groovy script block, before the shell heredoc: + +```groovy +def is_compressed = fna.getName().endsWith(".gz") ? true : false +def fna_name = fna.getName().replace(".gz", "") +``` + +In the shell block: + +```bash +if [ "${is_compressed}" == "true" ]; then + gzip -c -d ${fna} > ${fna_name} +fi +``` + +Then pass `${fna_name}` to the tool. Some tools also cannot follow symlinks, so the `else` +branch copies the real file (`cp -L ${fna} ${fna_name}`); include it only when the tool needs +a bare-named file at the task root in the uncompressed case too (e.g., `agrvate`). + +### `getName()` vs `fileName.name` + +`Path.getName()` (== the `.name` property) returns the path **relative to the task directory**, +not necessarily the bare filename. For a normally-staged (flat) input the two are identical: + +```groovy +flat.getName() // a.fna.gz +flat.fileName.name // a.fna.gz (same) +``` + +But for an input placed in a subdirectory via `stageAs 'staging/fna/*'`, `getName()` keeps the +subdir prefix while `fileName.name` strips it: + +```groovy +sub.getName() // staging/fna/b.fna.gz +sub.fileName.name // b.fna.gz +``` + +(Verified empirically; see the Nextflow [Path docs](https://docs.seqera.io/nextflow/reference/stdlib-types/path) — "Use `fileName.name` for task paths to get only the file name.") + +**Prefer `getName()`** — it is the established default and works for the common flat-input case: +- Suffix checks (`.endsWith(".gz")`, `is_tarball` detection) are unaffected by a subdir prefix, so `getName()` is always fine there. +- When a module decompresses/reads the staged file **in place** (no `cp`), the subdir-relative + path from `getName()` is exactly what the shell needs (e.g., `prokka` — the `${fna_name}` + it builds must resolve to the staged `staging/fna/...` file). + +**Use `fileName.name` only** when the module copies/decompresses to a **fresh bare-named local +file** the tool then reads (explicit `if/else` with `cp -L`), where a `staging/fna/` prefix +would corrupt the output name (e.g., `agrvate`, `gamma`). The rule of thumb: match the shell +strategy — `fileName.name` for copy-to-local, `getName()` for read-in-place. + +Do NOT use ad-hoc alternatives like `fna.getName()[0..-4]` or inline `gunzip -c` behind a +`[[ ... == *.gz ]]` shell test — keep the guard uniform. + ## Database Handling Patterns Many modules accept external databases. The codebase supports two formats: diff --git a/.claude/docs/standards/04-subworkflow-documentation.md b/.agents/docs/standards/04-subworkflow-documentation.md similarity index 100% rename from .claude/docs/standards/04-subworkflow-documentation.md rename to .agents/docs/standards/04-subworkflow-documentation.md diff --git a/.claude/docs/standards/05-module-documentation.md b/.agents/docs/standards/05-module-documentation.md similarity index 96% rename from .claude/docs/standards/05-module-documentation.md rename to .agents/docs/standards/05-module-documentation.md index 6d77df7b7..ab4151b44 100644 --- a/.claude/docs/standards/05-module-documentation.md +++ b/.agents/docs/standards/05-module-documentation.md @@ -89,7 +89,7 @@ Bactopia modules are individual process definitions that execute specific bioinf - **Definition**: No sample/data channels; only parameters - **Pattern**: No record input block; may accept simple `Path` or `String` parameters - **Use Case**: Utility modules for downloads, database setup, or internal maintenance -- **Examples**: wget, ariba/getref, bactopia/datasets, amrfinderplus/update +- **Examples**: wget, ariba/getref, bactopia/datasets #### Single Input - **Definition**: One primary data channel (plus parameters) @@ -554,7 +554,7 @@ Some tools are split across multiple modules (e.g., bakta/download, bakta/run): ### 8.4 Utility/Setup Modules Some modules are used for setup, downloading, or internal maintenance tasks rather than sample processing. These modules may have non-standard output structures: -**Examples**: `wget`, `ariba/getref`, `amrfinderplus/update`, `bakta/download`, `bactopia/datasets` +**Examples**: `wget`, `ariba/getref`, `bakta/download`, `bactopia/datasets` **Characteristics**: - May not include `nf_logs` and `versions` as separate outputs (logs may be bundled in a subdirectory) @@ -762,6 +762,18 @@ process { - First line is a section comment using the module name in snake_case: `// {tool}` or `// {tool}_{process}` - Modules with no parameters use `// No parameters` (capital N) - `fa_icon` in schema.json is determined by type: `string` = `fas fa-font`, `integer` = `fas fa-hashtag`, `number` = `fas fa-percentage`, `boolean` = `fas fa-toggle-on` +- **Modules never ship their own data.** There is no `modules/{tool}/data/` directory in this + repo, and adding one is not the pattern: downloadable databases go through a + `download`/`fetch` submodule (see `bakta`, `checkm2`, `deacon`, `eggnog`, `gtdbtk`, `midas`, + `nohuman`, `traitar`), and the one vendored static file lives at the repo root in `data/` +- Paths to that **vendored data** must be anchored on `${params.bactopia_dir}` (the repo root, + emitted into every generated workflow `nextflow.config`), e.g. + `prokka_proteins = "${params.bactopia_dir}/data/proteins.faa"`. A bare relative path such as + `"./data/proteins.faa"` resolves against **launchDir**, not the module, and `${projectDir}` + differs per tier. Enforced by lint rule `MC016`; the matching workflow-side anchor is + enforced by `W022`. Component `tests/nextflow.config` files that include such a + `module.config` must define `bactopia_dir = "${projectDir}/../../.."` (under nf-test, + `projectDir` is the `tests/` directory) ### 10.2 Key Properties @@ -914,6 +926,7 @@ nextflow_process { // Minimal config for module-level testing nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -923,25 +936,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" @@ -949,6 +944,8 @@ includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" ``` +`bactopia_version` and the `nf-bactopia@` plugin pin are inherited from [conf/test_base.config](../../../conf/test_base.config) (included at the top) — do not repeat them per file. `/bump-versions` propagates `versions.yml` into that single file. + **Path depth for multi-process modules:** Use `../../../../conf/` instead of `../../../conf/` since the module.config is one level deeper (e.g., `modules/bakta/run/tests/nextflow.config`). ### 11.4 nf-test.config Template diff --git a/.claude/docs/standards/06-workflow-documentation.md b/.agents/docs/standards/06-workflow-documentation.md similarity index 100% rename from .claude/docs/standards/06-workflow-documentation.md rename to .agents/docs/standards/06-workflow-documentation.md diff --git a/.claude/docs/standards/07-tier-architecture.md b/.agents/docs/standards/07-tier-architecture.md similarity index 100% rename from .claude/docs/standards/07-tier-architecture.md rename to .agents/docs/standards/07-tier-architecture.md diff --git a/.claude/skills/add-bactopia-tool/SKILL.md b/.agents/skills/add-bactopia-tool/SKILL.md similarity index 94% rename from .claude/skills/add-bactopia-tool/SKILL.md rename to .agents/skills/add-bactopia-tool/SKILL.md index c953a6a90..e8bddc255 100644 --- a/.claude/skills/add-bactopia-tool/SKILL.md +++ b/.agents/skills/add-bactopia-tool/SKILL.md @@ -24,8 +24,8 @@ This skill handles the **common single-tool pattern** which covers ~80% of bacto ## Prerequisites Before using this skill, read: -- `.claude/docs/standards/05-module-documentation.md` -- Module GroovyDoc standards -- `.claude/docs/standards/04-subworkflow-documentation.md` -- Subworkflow GroovyDoc standards +- `.agents/docs/standards/05-module-documentation.md` -- Module GroovyDoc standards +- `.agents/docs/standards/04-subworkflow-documentation.md` -- Subworkflow GroovyDoc standards ## Interactive Questioning @@ -50,7 +50,7 @@ Follow these phases in order. When unsure about ANYTHING, ask the user rather th 2. Run the lookup command: ```bash - bash .claude/skills/add-bactopia-tool/scripts/run-bactopia-scaffold.sh lookup {package_name} --bactopia-path . --pretty + bash .agents/skills/add-bactopia-tool/scripts/run-bactopia-scaffold.sh lookup {package_name} --bactopia-path . --pretty ``` 3. The output includes: @@ -115,7 +115,7 @@ with "(Recommended)" at the end of its label and place it first in the options l 3. **Run test-data discovery** based on the input type selected in Batch 1: ```bash - bash .claude/skills/add-bactopia-tool/scripts/run-bactopia-scaffold.sh test-data --input-type {input_type} --bactopia-path . --pretty + bash .agents/skills/add-bactopia-tool/scripts/run-bactopia-scaffold.sh test-data --input-type {input_type} --bactopia-path . --pretty ``` This returns species/accession combinations already used by similar modules, with pre-computed `test_data_path`, `test_uncompressed_path`, `test_species`, and @@ -242,7 +242,7 @@ with "(Recommended)" at the end of its label and place it first in the options l 2. Run the scaffold command: ```bash - bash .claude/skills/add-bactopia-tool/scripts/run-bactopia-scaffold.sh tool --config /tmp/scaffold-config.json --bactopia-path . --pretty + bash .agents/skills/add-bactopia-tool/scripts/run-bactopia-scaffold.sh tool --config /tmp/scaffold-config.json --bactopia-path . --pretty ``` 3. The command creates all 16 files. Review the output to confirm which files were created. @@ -276,15 +276,16 @@ The templates produce correct scaffolds but many tools need customization: ```bash if [ "${is_compressed}" == "true" ]; then gzip -c -d ${fna} > ${fna_name} - else - cp -L ${fna} ${fna_name} fi ``` Then use `${fna_name}` as the input filename for the tool command. This pattern is - used consistently across modules (e.g., staphopiasccmec, traitar). Do NOT use - alternative approaches like `fna.getName()[0..-4]` or inline `gunzip -c` with - `if [[ ... == *.gz ]]` shell tests. + used consistently across modules (e.g., staphopiasccmec, traitar). Prefer `fna.getName()`; + it returns the task-relative staged path, which is what read-in-place tools need. Use + `fna.fileName.name` only when you copy/decompress to a fresh bare-named local file (explicit + `if/else` with `cp -L`) and this module `stageAs`'s the input into a subdir, where a + `staging/fna/` prefix would corrupt the output name (e.g., `agrvate`, `gamma`). Do NOT use + alternatives like `fna.getName()[0..-4]` or inline `gunzip -c` with `if [[ ... == *.gz ]]`. 2. **Module `module.config`** -- review the `ext.args` construction: - Verify boolean/string/integer flag handling is correct for each parameter @@ -298,7 +299,7 @@ The templates produce correct scaffolds but many tools need customization: 5. **Run the linter** to catch structural issues before proceeding: ```bash - bash .claude/skills/add-bactopia-tool/scripts/run-bactopia-lint.sh {tool} --bactopia-path . + bash .agents/skills/add-bactopia-tool/scripts/run-bactopia-lint.sh {tool} --bactopia-path . ``` This runs `bactopia-lint` scoped to the new module, subworkflow, and workflow. Fix any FAILs before moving to Phase 5. Common issues: @@ -356,7 +357,7 @@ The templates produce correct scaffolds but many tools need customization: Test data paths are discovered dynamically from existing module tests using: ```bash -bash .claude/skills/add-bactopia-tool/scripts/run-bactopia-scaffold.sh test-data --input-type {type} --bactopia-path . --pretty +bash .agents/skills/add-bactopia-tool/scripts/run-bactopia-scaffold.sh test-data --input-type {type} --bactopia-path . --pretty ``` This scans `modules/*/tests/main.nf.test` for paths matching the input type and returns diff --git a/.claude/skills/add-bactopia-tool/scripts/run-bactopia-lint.sh b/.agents/skills/add-bactopia-tool/scripts/run-bactopia-lint.sh similarity index 100% rename from .claude/skills/add-bactopia-tool/scripts/run-bactopia-lint.sh rename to .agents/skills/add-bactopia-tool/scripts/run-bactopia-lint.sh diff --git a/.claude/skills/add-bactopia-tool/scripts/run-bactopia-scaffold.sh b/.agents/skills/add-bactopia-tool/scripts/run-bactopia-scaffold.sh similarity index 100% rename from .claude/skills/add-bactopia-tool/scripts/run-bactopia-scaffold.sh rename to .agents/skills/add-bactopia-tool/scripts/run-bactopia-scaffold.sh diff --git a/.claude/skills/add-module/SKILL.md b/.agents/skills/add-module/SKILL.md similarity index 96% rename from .claude/skills/add-module/SKILL.md rename to .agents/skills/add-module/SKILL.md index 12a387ffa..2810a961e 100644 --- a/.claude/skills/add-module/SKILL.md +++ b/.agents/skills/add-module/SKILL.md @@ -10,8 +10,8 @@ Scaffold a complete Bactopia module for a bioconda/conda-forge package, creating ## Prerequisites Before using this skill, read: -- `.claude/docs/standards/05-module-documentation.md` -- Module standards including module.config, schema.json, and test templates -- `.claude/docs/project/04-testing-framework.md` -- Testing framework details +- `.agents/docs/standards/05-module-documentation.md` -- Module standards including module.config, schema.json, and test templates +- `.agents/docs/project/04-testing-framework.md` -- Testing framework details ## Interactive Questioning @@ -41,7 +41,7 @@ Follow these phases in order. When unsure about ANYTHING, ask the user rather th 3. Run the lookup command: ```bash - bash .claude/skills/add-bactopia-tool/scripts/run-bactopia-scaffold.sh lookup {package_name} --bactopia-path . --pretty + bash .agents/skills/add-bactopia-tool/scripts/run-bactopia-scaffold.sh lookup {package_name} --bactopia-path . --pretty ``` 4. The output includes: @@ -101,7 +101,7 @@ with "(Recommended)" at the end of its label and place it first in the options l 3. **Run test-data discovery** based on the input type selected in Batch 1: ```bash - bash .claude/skills/add-bactopia-tool/scripts/run-bactopia-scaffold.sh test-data --input-type {input_type} --bactopia-path . --pretty + bash .agents/skills/add-bactopia-tool/scripts/run-bactopia-scaffold.sh test-data --input-type {input_type} --bactopia-path . --pretty ``` This returns species/accession combinations already used by similar modules, with pre-computed `test_data_path`, `test_uncompressed_path`, `test_species`, and @@ -207,7 +207,7 @@ with "(Recommended)" at the end of its label and place it first in the options l 2. Run the scaffold command: ```bash - bash .claude/skills/add-bactopia-tool/scripts/run-bactopia-scaffold.sh module --config /tmp/scaffold-config.json --bactopia-path . --pretty + bash .agents/skills/add-bactopia-tool/scripts/run-bactopia-scaffold.sh module --config /tmp/scaffold-config.json --bactopia-path . --pretty ``` 3. The command creates 6 files: @@ -242,7 +242,7 @@ with "(Recommended)" at the end of its label and place it first in the options l 5. **Run the linter** to catch structural issues before proceeding: ```bash - bash .claude/skills/add-bactopia-tool/scripts/run-bactopia-lint.sh {tool} --bactopia-path . + bash .agents/skills/add-bactopia-tool/scripts/run-bactopia-lint.sh {tool} --bactopia-path . ``` This runs `bactopia-lint` scoped to the new module. Fix any FAILs before moving on. Common issues: @@ -283,7 +283,7 @@ with "(Recommended)" at the end of its label and place it first in the options l Test data paths are discovered dynamically from existing module tests using: ```bash -bash .claude/skills/add-bactopia-tool/scripts/run-bactopia-scaffold.sh test-data --input-type {type} --bactopia-path . --pretty +bash .agents/skills/add-bactopia-tool/scripts/run-bactopia-scaffold.sh test-data --input-type {type} --bactopia-path . --pretty ``` This scans `modules/*/tests/main.nf.test` for paths matching the input type and returns diff --git a/.claude/skills/add-subworkflow/SKILL.md b/.agents/skills/add-subworkflow/SKILL.md similarity index 96% rename from .claude/skills/add-subworkflow/SKILL.md rename to .agents/skills/add-subworkflow/SKILL.md index a392e3c9c..9b807cdea 100644 --- a/.claude/skills/add-subworkflow/SKILL.md +++ b/.agents/skills/add-subworkflow/SKILL.md @@ -10,7 +10,7 @@ Scaffold a Bactopia subworkflow that orchestrates one or more existing modules. ## Prerequisites - The module(s) this subworkflow will use must already exist under `modules/` -- Read `.claude/docs/standards/04-subworkflow-documentation.md` for documentation standards +- Read `.agents/docs/standards/04-subworkflow-documentation.md` for documentation standards ## Interactive Questioning @@ -54,12 +54,12 @@ at the end of its label and place it first in the options list. 2. **Run the lookup command** if package info is needed: ```bash - bash .claude/skills/add-bactopia-tool/scripts/run-bactopia-scaffold.sh lookup {package_name} --bactopia-path . --pretty + bash .agents/skills/add-bactopia-tool/scripts/run-bactopia-scaffold.sh lookup {package_name} --bactopia-path . --pretty ``` 3. **Determine the input type** from the primary module's inputs, then **run test-data discovery**: ```bash - bash .claude/skills/add-bactopia-tool/scripts/run-bactopia-scaffold.sh test-data --input-type {input_type} --bactopia-path . --pretty + bash .agents/skills/add-bactopia-tool/scripts/run-bactopia-scaffold.sh test-data --input-type {input_type} --bactopia-path . --pretty ``` This returns species/accession combinations already used by similar modules, with pre-computed `test_data_path`, `test_uncompressed_path`, `test_species`, and @@ -153,7 +153,7 @@ at the end of its label and place it first in the options list. 2. Run the scaffold command: ```bash - bash .claude/skills/add-bactopia-tool/scripts/run-bactopia-scaffold.sh subworkflow --config /tmp/scaffold-config.json --bactopia-path . --pretty + bash .agents/skills/add-bactopia-tool/scripts/run-bactopia-scaffold.sh subworkflow --config /tmp/scaffold-config.json --bactopia-path . --pretty ``` 3. The command creates 5 files: @@ -187,7 +187,7 @@ at the end of its label and place it first in the options list. 4. **Run the linter** to catch structural issues before proceeding: ```bash - bash .claude/skills/add-bactopia-tool/scripts/run-bactopia-lint.sh {tool} --bactopia-path . + bash .agents/skills/add-bactopia-tool/scripts/run-bactopia-lint.sh {tool} --bactopia-path . ``` This runs `bactopia-lint` scoped to the new subworkflow (and module if it exists). Fix any FAILs before moving on. Common issues: @@ -238,7 +238,7 @@ The scaffold generates one of three patterns based on the `aggregation.strategy` Test data paths are discovered dynamically from existing module tests using: ```bash -bash .claude/skills/add-bactopia-tool/scripts/run-bactopia-scaffold.sh test-data --input-type {type} --bactopia-path . --pretty +bash .agents/skills/add-bactopia-tool/scripts/run-bactopia-scaffold.sh test-data --input-type {type} --bactopia-path . --pretty ``` This scans `modules/*/tests/main.nf.test` for paths matching the input type and returns diff --git a/.agents/skills/bump-versions/SKILL.md b/.agents/skills/bump-versions/SKILL.md new file mode 100644 index 000000000..8b347da1e --- /dev/null +++ b/.agents/skills/bump-versions/SKILL.md @@ -0,0 +1,85 @@ +--- +name: bump-versions +description: Propagate the Bactopia and nf-bactopia versions declared in versions.yml into the hand-maintained files that carry a literal version (conf/test_base.config, CITATION.cff, bin/bactopia, data/conda/meta.yaml). Use this whenever the user has edited versions.yml and wants the rest of the repo brought in line, or asks to bump the version, set the release version, propagate versions.yml, sync version-bearing files, fix a V001 version-consistency failure, or prepare version files for a release. This never edits versions.yml itself and never regenerates the templated artifacts (nextflow.config, catalog.json) — it hands those off to /merge-schemas and /update-catalog. +--- + +# Bump Versions + +`versions.yml` at the repo root is the **single source of truth** for the pipeline +version (`bactopia`) and the plugin pin (`nf-bactopia`). It is edited **by hand** — +this skill never touches it. Its job is the mechanical, error-prone part: copying +those two values into every *hand-maintained* file that repeats them, so +bactopia-lint's **V001** (version-bearing files must equal `versions.yml`) goes green. + +Two classes of version-bearing files exist, and only one is this skill's concern: + +- **Hand-maintained (this skill fixes these):** `conf/test_base.config` + (`bactopia_version` + the `nf-bactopia@` plugin pin, inherited by all ~183 + module/subworkflow test configs), `CITATION.cff`, `bin/bactopia`, + `data/conda/meta.yaml`. +- **Generated (this skill does NOT touch these):** `nextflow.config`, every + `workflows/*/nextflow.config`, `catalog.json`, `llms.txt`. These are rendered + from `versions.yml` by `bactopia-merge-schemas` / `bactopia-catalog`, so the fix + is to *regenerate* them — a follow-up, not an edit. Slash commands cannot invoke + other slash commands, so you recommend those to the user rather than running them. + +## Steps + +1. **Dry-run first.** Show the user exactly what will change before writing anything: + ``` + python3 .agents/skills/bump-versions/scripts/bump_versions.py \ + --bactopia-path /home/rpetit3/repos/bactopia/bactopia --check + ``` + The script reads `versions.yml`, then reports each hand-maintained literal as + `would update -> `, `already `, or a `WARN` (file missing or + the literal moved). If everything is already `ok`, tell the user the + hand-maintained files are in sync and skip to step 4 (they may still need a + regen if a generated artifact lagged). + +2. **Confirm, then apply.** Once the user is happy with the dry-run, drop `--check` + to write the changes: + ``` + python3 .agents/skills/bump-versions/scripts/bump_versions.py \ + --bactopia-path /home/rpetit3/repos/bactopia/bactopia + ``` + Only the version token inside each match is rewritten; runs are idempotent. + +3. **Recommend the regeneration follow-ups.** If anything changed (or a generated + artifact is suspected stale), tell the user to run, in order: + - `/merge-schemas all` — re-renders `nextflow.config` + workflow configs + schemas from `versions.yml`. + - `/update-catalog` — rebuilds `catalog.json` + `llms.txt`. + Do not attempt to run these from here. + +4. **Verify V001–V003.** Confirm the version gate is actually green: + ``` + bash .agents/skills/review-groovydoc/scripts/run-bactopia-lint.sh \ + --bactopia-path /home/rpetit3/repos/bactopia/bactopia --json --silent + ``` + Read the `repo` component's results. A clean run lists **no** `V0xx` failures + (PASS results are suppressed). If **V001** still fails, report the offending + files verbatim — most often a generated artifact whose regen (step 3) hasn't run + yet, or a version-bearing file this skill doesn't own. + +5. **Flag downstream checks (report, don't fix):** + - **V002** compares `versions.yml` to the top `## vX.Y.Z` CHANGELOG heading. If + they disagree, the CHANGELOG needs a section for the new version — that's + human-authored content, so surface it, don't invent it. + - Bumping `bactopia_version` changes the test container tag + (`bactopia/bactopia:`) used by every module/subworkflow test. Recommend + a smoke test (`/run-tests` on a quick component) once the matching image exists, + since a nonexistent tag will fail tests even with a green lint. + +## Notes + +- The script needs only Python stdlib + read access to `versions.yml`; no conda env + or `bactopia-*` CLI. There is deliberately **no** `bactopia-versions` CLI — + `versions.yml` is hand-edited and this propagation is the whole story. +- The four hand-maintained targets and their literal formats are encoded in the + script's `TARGETS` map, matching V001's own regexes so the skill fixes exactly what + the linter checks. If V001 ever grows a new hand-maintained file, add it there. + +### Sibling skills + +- `/merge-schemas`, `/update-catalog` — the regeneration follow-ups (step 3). +- `/review-groovydoc` — backs the `bactopia-lint` verification run (step 4). +- `/release-checklist` — its check 1 delegates the version gate to these same V-rules. diff --git a/.agents/skills/bump-versions/evals/evals.json b/.agents/skills/bump-versions/evals/evals.json new file mode 100644 index 000000000..46d538b91 --- /dev/null +++ b/.agents/skills/bump-versions/evals/evals.json @@ -0,0 +1,23 @@ +{ + "skill_name": "bump-versions", + "evals": [ + { + "id": 1, + "prompt": "I just bumped versions.yml to bactopia 4.1.0. Can you get the rest of the repo's version files in sync?", + "expected_output": "Runs bump_versions.py --check, shows the dry-run (conf/test_base.config bactopia_version 4.0.0 -> 4.1.0, others already current), applies after confirmation, then recommends /merge-schemas + /update-catalog and verifying V001, without editing versions.yml.", + "files": [] + }, + { + "id": 2, + "prompt": "release-checklist says V001 is failing on conf/test_base.config, the version doesn't match versions.yml. Fix it.", + "expected_output": "Identifies this as a version-propagation task, dry-runs and applies bump_versions.py to bring conf/test_base.config in line with versions.yml, re-runs bactopia-lint to confirm V001 passes, and flags that generated artifacts may still need /merge-schemas + /update-catalog.", + "files": [] + }, + { + "id": 3, + "prompt": "Do the version files need updating? versions.yml already says 4.1.0.", + "expected_output": "Runs bump_versions.py --check, reports every hand-maintained literal is already 4.1.0 (no writes needed), and notes that generated artifacts are verified via bactopia-lint V001 rather than by this skill.", + "files": [] + } + ] +} diff --git a/.agents/skills/bump-versions/scripts/bump_versions.py b/.agents/skills/bump-versions/scripts/bump_versions.py new file mode 100755 index 000000000..90edf33b0 --- /dev/null +++ b/.agents/skills/bump-versions/scripts/bump_versions.py @@ -0,0 +1,158 @@ +#!/usr/bin/env python3 +"""Propagate versions.yml into Bactopia's hand-maintained version-bearing files. + +`versions.yml` at the repo root is the single, *manually edited* source of truth +for the pipeline version (`bactopia`) and the plugin pin (`nf-bactopia`). This +script only ever READS it, then copies those values into the files that carry a +literal version but are NOT regenerated by any other tool: + + conf/test_base.config bactopia_version = '...' and id 'nf-bactopia@...' + CITATION.cff version: ... + bin/bactopia VERSION=... + data/conda/meta.yaml {% set version = '...' %} + +Everything else that carries the version is a generated artifact and is left to +its regenerator: `nextflow.config` / workflow configs (bactopia-merge-schemas) +and `catalog.json` / `llms.txt` (bactopia-catalog). Those are a follow-up step, +not this script's job. + +Only the exact version token inside each match is rewritten; surrounding text is +untouched. Runs are idempotent -- a file already at the target value is reported +as "current" and left byte-for-byte unchanged. This script NEVER writes +versions.yml. +""" + +import argparse +import re +import sys +from pathlib import Path + +DEFAULT_BP = "/home/rpetit3/repos/bactopia/bactopia" + +# Each rule: (regex with three groups (prefix, version, suffix), versions.yml key, +# human label). The version token is group 2; prefix/suffix are preserved verbatim. +TARGETS: dict[str, list[tuple[str, str, str]]] = { + "conf/test_base.config": [ + (r"(bactopia_version\s*=\s*')([^']+)(')", "bactopia", "bactopia_version"), + (r"(id\s+'nf-bactopia@)([^']+)(')", "nf-bactopia", "nf-bactopia pin"), + ], + "CITATION.cff": [ + (r"(?m)(^version:[ \t]*)(\S+)()", "bactopia", "version"), + ], + "bin/bactopia": [ + (r"(?m)(^VERSION=)(\S+)()", "bactopia", "VERSION"), + ], + "data/conda/meta.yaml": [ + (r"(\{%\s*set version\s*=\s*')([^']+)(')", "bactopia", "set version"), + ], +} + + +def read_versions(bp: Path) -> dict[str, str]: + """Parse versions.yml (simple `key: value`; stdlib only). Never modified.""" + path = bp / "versions.yml" + text = path.read_text() + out: dict[str, str] = {} + for line in text.splitlines(): + m = re.match(r"([\w-]+):\s*(\S+)", line) + if m: + out[m.group(1)] = m.group(2) + for key in ("bactopia", "nf-bactopia"): + if key not in out: + raise KeyError(f"versions.yml missing required key '{key}'") + return out + + +def apply_file( + bp: Path, rel: str, rules: list[tuple[str, str, str]], versions: dict, check: bool +) -> list[dict]: + """Return a list of change records for one file; write in place unless check.""" + path = bp / rel + changes: list[dict] = [] + if not path.exists(): + return [{"file": rel, "label": "-", "status": "missing"}] + text = path.read_text() + new_text = text + for pattern, key, label in rules: + want = versions[key] + rec = {"file": rel, "label": label, "want": want} + m = re.search(pattern, new_text) + if not m: + rec["status"] = "pattern-not-found" + changes.append(rec) + continue + old = m.group(2) + rec["old"] = old + if old == want: + rec["status"] = "current" + else: + rec["status"] = "update" + new_text = ( + new_text[: m.start(2)] + want + new_text[m.end(2) :] + ) + changes.append(rec) + if not check and new_text != text: + path.write_text(new_text) + return changes + + +def main() -> int: + ap = argparse.ArgumentParser( + description="Propagate versions.yml into hand-maintained version files." + ) + ap.add_argument("--bactopia-path", default=DEFAULT_BP) + ap.add_argument( + "--check", + action="store_true", + help="dry run: report what would change, write nothing", + ) + args = ap.parse_args() + bp = Path(args.bactopia_path) + + try: + versions = read_versions(bp) + except (FileNotFoundError, KeyError) as e: + print(f"ERROR: {e}", file=sys.stderr) + return 1 + + mode = "DRY RUN (no files written)" if args.check else "APPLY" + print(f"[bump-versions] {mode}") + print( + f" source versions.yml -> bactopia={versions['bactopia']}, " + f"nf-bactopia={versions['nf-bactopia']}\n" + ) + + updated = missing = notfound = 0 + for rel, rules in TARGETS.items(): + for rec in apply_file(bp, rel, rules, versions, args.check): + s = rec["status"] + if s == "update": + verb = "would update" if args.check else "updated" + print(f" [{verb}] {rel}: {rec['label']} {rec['old']} -> {rec['want']}") + updated += 1 + elif s == "current": + print(f" [ok] {rel}: {rec['label']} already {rec['want']}") + elif s == "missing": + print(f" [WARN] {rel}: file not found") + missing += 1 + elif s == "pattern-not-found": + print(f" [WARN] {rel}: could not locate {rec['label']} literal") + notfound += 1 + + print( + f"\n[bump-versions] {'would update' if args.check else 'updated'} " + f"{updated} value(s); warnings: {missing + notfound}" + ) + if updated and not args.check: + print( + "\nNext steps (regenerated artifacts are NOT touched here):\n" + " 1. /merge-schemas all (nextflow.config + schemas from versions.yml)\n" + " 2. /update-catalog (catalog.json + llms.txt)\n" + " 3. verify: bactopia-lint repo tier -> V001/V002/V003 should pass\n" + " 4. smoke-test a module whose test container tag changed." + ) + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/.claude/skills/merge-schemas/SKILL.md b/.agents/skills/merge-schemas/SKILL.md similarity index 98% rename from .claude/skills/merge-schemas/SKILL.md rename to .agents/skills/merge-schemas/SKILL.md index bd6714c78..3d728f493 100644 --- a/.claude/skills/merge-schemas/SKILL.md +++ b/.agents/skills/merge-schemas/SKILL.md @@ -35,7 +35,7 @@ Regenerate the `nextflow.config` and `nextflow_schema.json` files for one or mor 4. **Run `bactopia-merge-schemas` once per target** via the wrapper: ``` - bash .claude/skills/merge-schemas/scripts/run-bactopia-merge-schemas.sh \ + bash .agents/skills/merge-schemas/scripts/run-bactopia-merge-schemas.sh \ --bactopia-path /home/rpetit3/repos/bactopia/bactopia \ --wf \ --outdir \ diff --git a/.claude/skills/merge-schemas/scripts/run-bactopia-merge-schemas.sh b/.agents/skills/merge-schemas/scripts/run-bactopia-merge-schemas.sh similarity index 100% rename from .claude/skills/merge-schemas/scripts/run-bactopia-merge-schemas.sh rename to .agents/skills/merge-schemas/scripts/run-bactopia-merge-schemas.sh diff --git a/.claude/skills/project-status/SKILL.md b/.agents/skills/project-status/SKILL.md similarity index 98% rename from .claude/skills/project-status/SKILL.md rename to .agents/skills/project-status/SKILL.md index 8ad137850..97e28495b 100644 --- a/.claude/skills/project-status/SKILL.md +++ b/.agents/skills/project-status/SKILL.md @@ -11,7 +11,7 @@ Run the status script and interpret the output for the user. 1. Run `bactopia-status` via the wrapper script: ``` - bash .claude/skills/project-status/scripts/run-bactopia-status.sh --bactopia-path /home/rpetit3/repos/bactopia/bactopia --json + bash .agents/skills/project-status/scripts/run-bactopia-status.sh --bactopia-path /home/rpetit3/repos/bactopia/bactopia --json ``` 2. Parse the JSON output and present a clean, readable summary. Lead with: diff --git a/.claude/skills/project-status/scripts/run-bactopia-status.sh b/.agents/skills/project-status/scripts/run-bactopia-status.sh similarity index 100% rename from .claude/skills/project-status/scripts/run-bactopia-status.sh rename to .agents/skills/project-status/scripts/run-bactopia-status.sh diff --git a/.agents/skills/release-checklist/SKILL.md b/.agents/skills/release-checklist/SKILL.md new file mode 100644 index 000000000..4f80b9e99 --- /dev/null +++ b/.agents/skills/release-checklist/SKILL.md @@ -0,0 +1,247 @@ +--- +name: release-checklist +description: Audit whether Bactopia is ready for a version release and produce a GO / NO-GO recommendation report. Read-only — never commits, pushes, tags, edits issues, or regenerates tracked files. Use this whenever the user asks about release readiness, cutting a release, a release checklist, whether we can ship/tag a new version, pre-release audit, or "are we ready to release" — even if they don't say the word "checklist". Covers version consistency across bactopia/bactopia-py/nf-bactopia, nf-bactopia plugin pin + template drift, module tool-version bumps, workflow config/schema and catalog freshness, docs/citations/GroovyDoc/lint validators, recent test-run status, CHANGELOG completeness, and open-issue triage. +--- + +# Release Checklist + +Audit whether Bactopia is ready to cut a version release and produce a recommendation report. This is a **multi-repo, audit-only** skill: it reads `bactopia`, `bactopia-py`, `nf-bactopia`, and the docs-site `bactopia.github.io` (published at https://bactopia.io), plus GitHub issues, and synthesizes a GO / NO-GO report. + +## Hard constraints — read first + +- **Audit-only. Never mutate anything.** No `git commit`/`push`/`tag`, no `gh issue edit`/`comment`/`close`, no edits to any tracked source file, no running the config/catalog/schema *regenerators* against the repo. The only write is the report file under `logs/` and scratch files under a `mktemp` dir. +- **Every regeneration check writes to a temp dir and diffs** — it never overwrites tracked `nextflow.config` / `nextflow_schema.json` / `catalog.json` / `llms.txt`. +- **Report, don't fix.** When a check finds drift, record it and recommend the follow-up skill (e.g. `/update-catalog`, `/merge-schemas`, `/update-module`). Do not apply the fix here. + +## Version model (why the checks look where they do) + +The Bactopia pipeline version and the `nf-bactopia` plugin pin are **declared in `versions.yml` at the pipeline repo root** (keys `bactopia:` and `nf-bactopia:`). `bactopia-merge-schemas` reads them and renders every workflow's `nextflow.config` from the bactopia-py template, and `bactopia-catalog` reads them for `catalog.json`, so the main repo's `nextflow.config` and `catalog.json` versions are **generated artifacts**. `versions.yml` is the version source of truth; bactopia-lint's repo rules (V001/V002/V003) enforce that every version-bearing file, the CHANGELOG heading, and the plugin pin agree with it. `CITATION.cff`, `bin/bactopia`, and `data/conda/meta.yaml` carry hand-maintained literals that must be bumped to match and are frequent laggards. + +## Preamble + +Resolve paths and a timestamp (from the bash tool): + +``` +BP=/home/rpetit3/repos/bactopia/bactopia +PY=$BP/../bactopia-py +NFB=$BP/../nf-bactopia +DOCS=$BP/../bactopia.github.io +TS=$(date +%Y%m%d_%H%M%S) +AUDIT=$(mktemp -d) # scratch dir for read-only regen diffs +``` + +If a sibling repo path does not exist, run its checks in "skipped (repo not found)" mode and note it — never error out. + +## Run the checks + +Present each result; never fix. Numbers below are the report's check IDs. + +### 1. Version consistency (delegated to bactopia-lint) + +Version-bearing file consistency is enforced by bactopia-lint's **repo rules**, not re-implemented in this skill. Run bactopia-lint once — the same run feeds checks 8 and 11 — and read the `repo`-tier results: + +``` +bash .agents/skills/review-groovydoc/scripts/run-bactopia-lint.sh --bactopia-path $BP --json --silent +``` + +Parse the `repo` component's `results[]` for rule IDs starting with `V`: +- **V001** (FAIL): a version-bearing file disagrees with `versions.yml` — `nextflow.config`, `catalog.json`, `bin/bactopia`, `data/conda/meta.yaml`, `CITATION.cff`, or any `*.config` `bactopia_version` / `nf-bactopia@` pin. Module/subworkflow test configs inherit both from `conf/test_base.config`, so that single file is the usual test-side offender (not the ~180 individual test configs). The message groups offenders by value. +- **V002** (FAIL): `versions.yml: bactopia` ≠ the top `## vX.Y.Z` CHANGELOG heading (disagreement on what's being released). +- Passing rules are **not** listed individually (PASS components have empty `results[]`); absence of a V-FAIL means clean. +- Any V001/V002 FAIL ⇒ **check 1 = FAIL**. Fixes: regenerate configs (`/merge-schemas` + `/update-catalog`), hand-bump `CITATION.cff` / `bin/bactopia` / `data/conda/meta.yaml`, and bump `bactopia_version` in `conf/test_base.config` (the single source for every module/subworkflow test config). +- **Staleness guard:** the lint JSON MUST contain a `repo` component. If it does not, bactopia-py predates the version rules and the core version gate could not run — this is a **FAIL** (never a false PASS): report "version rules V001–V003 not loaded; update bactopia-py" and treat the release as NO-GO until re-audited with current tooling. + +The deterministic engine is run once and feeds checks 2, 12, 13: + +``` +python3 .agents/skills/release-checklist/scripts/release_audit.py --bactopia-path $BP --json +``` + +It returns `sibling_release_state` (check 12), `changelog` (check 13), `module_updates` (check 2), and `warnings[]` — surface any warnings. + +### 2. Module tool versions (offline — reads the /update-module record) + +This check does **not** hit the network. `bactopia-update` queries the Anaconda API for ~100 modules (~2 min), so the audit never runs it — instead it reads the record that `/update-module` leaves under `logs/module-updates/.json`. The engine's `module_updates` field carries the result: + +- `present: false` ⇒ **FAIL (blocking → NO-GO)**: no module-version check is on record for this cycle. Recommend: run `/update-module` (which writes the record) and then re-run `/run-tests`, before re-auditing. This is a hard release gate — do not hand-wave it. +- `present: true`: + - `module_config_changed_after: true` ⇒ **WARN**: `module.config` files changed after the record was written, so it is stale — re-run `/update-module`. + - `needs_update > 0` ⇒ **WARN**: that many modules have newer tool versions available — run `/update-module` to apply them. + - otherwise ⇒ **PASS**: module versions were checked at `log_timestamp`; the `needs_user_review` count is informational (multi-package modules needing manual review). + +Report `log_timestamp`, `needs_update`, `needs_user_review`, and `up_to_date` from the record. Never edit configs and never call `bactopia-update` from this skill. + +### 3. Workflow config/schema freshness (read-only diff) + +For each of the 4 named workflows — `bactopia`, `teton`, `staphopia`, `cleanyerreads` (paths from `catalog.json.workflows[].path`) — regenerate into the scratch dir and diff against the committed copies: + +``` +bash .agents/skills/merge-schemas/scripts/run-bactopia-merge-schemas.sh \ + --bactopia-path $BP --wf --outdir $AUDIT/ +diff $AUDIT//nextflow.config +diff $AUDIT//nextflow_schema.json +``` + +The scratch dir is empty, so `--force` is not needed and nothing tracked is touched. Any diff ⇒ the committed file is stale relative to current module schemas/template ⇒ recommend `/merge-schemas`. The root `bactopia` config round-trips cleanly, so a root diff usually means a module was added/removed without rewiring, or the template version was bumped without regenerating. Only extend to the ~66 bactopia-tools if the user explicitly asks ("all tools") — tool schemas are otherwise covered by their nf-tests. + +### 4. Catalog & llms.txt freshness (read-only diff) + +``` +bash .agents/skills/update-catalog/scripts/run-bactopia-catalog.sh \ + --bactopia-path $BP --output $AUDIT/catalog.json --pretty --llms-output $AUDIT/llms.txt +diff $AUDIT/catalog.json $BP/catalog.json +diff $AUDIT/llms.txt $BP/llms.txt +``` + +Any diff ⇒ stale ⇒ recommend `/update-catalog`. + +### 5. Docs-site (bactopia.io) version state + +In `$DOCS` (skip with a note if the repo is absent): + +- **(a) version label** — read `versions.current.label` in `docusaurus.config.ts`; compare to the release target. A lagging label is a WARN ("bump on release"). +- **(b) changelog mirror** — compare the top `## v` heading of `docs/changelog.md` to the main repo `CHANGELOG.md` top heading. A version mismatch is a WARN (mirror out of sync). +- **(c) plugin pins** — V001 only scans the bactopia repo's `*.config` files, so the docs site is not covered by the linter. Grep it directly: `grep -rn 'nf-bactopia@' "$DOCS" --include='*.md' --include='*.mdx'` and flag any pin that lags `versions.yml: nf-bactopia` (currently `developers/nf-bactopia/index.mdx` pins `2.0.3`). WARN. + +### 6. Docs sync (.agents/docs) + +``` +bash .agents/skills/review-docs/scripts/run-bactopia-docs.sh --bactopia-path $BP --validate --json --silent +``` + +Record `summary.fail`. Any FAIL ⇒ recommend `/review-docs`. + +### 7. Citations integrity + +``` +bash .agents/skills/review-citations/scripts/run-bactopia-citations.sh --bactopia-path $BP --validate --json --silent +``` + +Record `summary.orphans_total` and `summary.missing_total`. Either > 0 ⇒ recommend `/review-citations`. (`expected_orphans` are informational, not failures.) + +### 8. GroovyDoc / lint + +Reuse the bactopia-lint run from check 1 (do not run it twice). Count **component** FAIL results — module (`M0xx`/`MC0xx`), subworkflow (`S0xx`), workflow (`W0xx`) — and **exclude the `repo`-tier `V0xx` rules**, which are reported under checks 1 and 11. Any component FAIL ⇒ recommend `/review-groovydoc`. + +### 9. Python lint (bactopia-py) + +Run the configured ruff linter in `$PY` (prefer the justfile recipe, fall back to ruff directly): + +``` +cd $PY && just lint # == poetry run ruff check . ; fallback: ruff check . +``` + +Interpret the exit: lint findings (ruff reports violations) ⇒ **FAIL** recommending a ruff pass in bactopia-py. But distinguish "linter unavailable" from "lint failed": if neither `just` nor `ruff` is installed/resolvable in `$PY` (command-not-found, or `just lint` errors because the poetry env isn't set up), report **SKIP** ("ruff not available in this environment"), never FAIL — a missing tool is not a release blocker. + +### 10. Test-run freshness (never launches a run) + +Test runs live under `logs/run-tests//` (written by `/run-tests`); `bactopia-review-tests` defaults to the newest one. An aborted run leaves a dir with **no `summary.json`** and the CLI errors on it, so pick the newest run dir that actually has a summary and review it explicitly: + +``` +LATEST_RUN=$(for d in $(ls -1dt "$BP"/logs/run-tests/[0-9]*/ 2>/dev/null); do [ -f "$d/summary.json" ] && basename "$d" && break; done) +bash .agents/skills/review-tests/scripts/run-bactopia-review-tests.sh --bactopia-path $BP --run "$LATEST_RUN" --silent +``` + +Also count how many `logs/run-tests/[0-9]*/` dirs are newer than `$LATEST_RUN` but lack a `summary.json` — those are incomplete/aborted runs worth flagging. + +Relay the reviewed run's pass/fail status. Then judge **staleness**: compare `$LATEST_RUN`'s timestamp to the newest tracked-source commit (`git -C $BP log -1 --format=%ct`) and the working-tree dirty state (`sibling_release_state.bactopia.dirty_files` from the engine). Report `stale` if code changed after the run or the tree is dirty. Severity: a failing reviewed run ⇒ **FAIL**; a passing-but-stale run, or the presence of newer incomplete run dirs, ⇒ **WARN** recommending `/run-tests`; if no run dir has a `summary.json` at all ⇒ **WARN** ("no completed test run on record"). Never trigger a run from this skill. + +### 11. nf-bactopia plugin currency (bactopia-lint V003) + +From the same lint run, read repo rule **V003**: `versions.yml: nf-bactopia` vs the nf-bactopia repo's `build.gradle` latest. A `WARN` means the declared pin lags the newest nf-bactopia release — surface it; adopting the newer plugin may be intentional, so it's a judgment call, not a hard block. PASS/absent = current. Per-config pin drift is already covered by V001 (check 1). If the nf-bactopia repo isn't checked out, V003 PASSes with a "cannot verify" note. + +### 12. Sibling repo release state + +From the engine's `sibling_release_state`: per repo (`bactopia`, `bactopia-py`, `nf-bactopia`) report `latest_tag`, `commits_ahead`, `dirty_files`, `changelog_top`, `needs_release`. Flag each repo with `needs_release: true` (WARN) — unreleased commits past its last tag mean it may need its own release before the pipeline release. + +### 13. CHANGELOG completeness & concision + +Model-judgment check using the engine's `changelog` data: + +- `placeholder: true` (codename `"???"` or a `?` in the date) ⇒ **FAIL** (fill codename + date before release). +- `missing_section_for_target: true` ⇒ **FAIL** (the declared `target_version` from `versions.yml` has no `## v` CHANGELOG section at all). Whether the top heading equals the target is V002's job (check 1). +- Concision: the last git tag can predate multiple unreleased versions, so `commits_since_tag` may legitimately exceed `top_section_bullets` — do **not** treat that as an equality target. WARN only if top-section bullets are multi-sentence/verbose relative to peers, or the coverage gap looks like genuinely missing entries. Keep it qualitative; no bullet cap. + +### 14. Open-issue triage + +``` +gh issue list --repo bactopia/bactopia --state open --limit 300 \ + --json number,title,labels,updatedAt +``` + +- Exclude issues whose labels include the ignore label — default `release-ignore`, or whatever label the user names. If the label doesn't exist in the repo, nothing is filtered (no error). Report how many were excluded. +- Report total open, the excluded count, and a breakdown by label. +- Surface a **shortlist (≤10)** of likely release-relevant issues: labeled `bug`, referenced by `#` in the top CHANGELOG section, or updated within ~30 days. For each, give a one-line **address / postpone** suggestion. +- This check is **INFO** — it never changes the overall verdict on its own. Never edit, label, or comment on issues. + +### 15. Version-pinned datasets published + +`bactopia datasets` downloads pre-compiled bundles from `https://datasets.bactopia.com/datasets/v/`, where `` is the pipeline version from `versions.yml`. On a release the version is bumped **before** that version's bundle is uploaded, so the URL 404s and every dataset-dependent run — and the `bactopia_datasets` nf-test — fails. Probe the target version's bundle (read-only HEAD; the audit never uploads): + +``` +V=$(awk '/^bactopia:/{print $2}' $BP/versions.yml) +curl -s -o /dev/null -w '%{http_code}' -I "https://datasets.bactopia.com/datasets/v${V}/amrfinderplus.tar.gz" +``` + +- HTTP `200` ⇒ **PASS**: the v`` datasets are published. +- Anything else (typically `404`) ⇒ **FAIL (blocking → NO-GO)**: the v`` dataset bundle is not published. Publishing the versioned datasets is a required release step; until it lands, `bactopia datasets` 404s for users and the `bactopia_datasets` tests fail. The version-pinned `amrfinderplus.tar.gz` is a sufficient sentinel (other bundles like `mash-refseq88...` are not version-gated). **Fix:** run `/update-datasets` to rebuild `amrfinderplus.tar.gz` in the pinned container and publish it to `bactopia-r2:bactopia/datasets/v/`. + +## Synthesize the report (the primary deliverable) + +The report is produced two ways from the same content: + +1. **Write the full report** to `$BP/logs/release-audit-$TS.md` using the template below (all 15 checks, Blocking / Non-blocking sections, and a Details section per check with findings + the recommended follow-up skill). `logs/` is the scratch/output dir; use a single timestamped **file** (not a `logs//` dir) so `/review-tests`' run-dir scan ignores it. If `logs/` is unwritable, fall back to `$AUDIT/release-audit-$TS.md` and report that path. +2. **Present a condensed view in chat**: the Overall verdict line, the Checklist table, and the Blocking-items list — then end with the saved path, e.g. `Full report saved to: /home/rpetit3/repos/bactopia/bactopia/logs/release-audit-.md`. + +### Report template + +``` +# Bactopia Release Readiness Audit — +**Target release:** v **Overall: ** + + + +## Checklist +| # | Check | Status | Summary | +|---|-------|--------|---------| +| 1 | Version consistency | | ... | +| 2 | Module tool versions | ... | ... | +| 3 | Workflow configs & schemas | ... | ... | +| 4 | Catalog & llms.txt freshness | ... | ... | +| 5 | Docs-site (bactopia.io) state| ... | ... | +| 6 | Docs sync (.agents/docs) | ... | ... | +| 7 | Citations | ... | ... | +| 8 | GroovyDoc / lint | ... | ... | +| 9 | Python lint (ruff) | ... | ... | +| 10 | Test-run freshness | ... | ... | +| 11 | nf-bactopia plugin currency | ... | ... | +| 12 | Sibling repo release state | ... | ... | +| 13 | CHANGELOG completeness | ... | ... | +| 14 | Open issues | INFO | | +| 15 | Version-pinned datasets | | | + +## Blocking items (must fix before release) +- ... + +## Non-blocking / judgment items +- ... + +## Details +### 1. Version consistency (bactopia-lint V001/V002) + conf/test_base.config + CITATION.cff/bin/bactopia/meta.yaml), then regenerate generated artifacts with /merge-schemas + /update-catalog> +### 2. Module tool versions +... +``` + +### Severity + overall verdict (deterministic — status is never a guess) + +- **FAIL (blocking)**: check 1 — bactopia-lint **V001** (a version-bearing file ≠ `versions.yml`) or **V002** (`versions.yml` ≠ CHANGELOG top heading) reports FAIL, **or** the lint `repo` component is absent (version rules not loaded); CHANGELOG `placeholder` or `missing_section_for_target` (check 13); **no `/update-module` record — `module_updates.present == false` (check 2)**; schema/config drift (check 3); catalog/llms drift (check 4); any component docs/citations/lint failure (checks 6–8); a ruff lint failure when ruff is available (check 9); a failing test run (check 10); **the target-version dataset bundle is unpublished — `datasets.bactopia.com/datasets/v/` 404s (check 15)**. +- **WARN (non-blocking / judgment)**: pending module updates or a stale `/update-module` record (check 2); the declared nf-bactopia pin lags latest — V003 (check 11); a sibling repo with `needs_release` (check 12); docs-site label or changelog-mirror lag (checks 5a/5b); a passing-but-stale test run (check 10); a CHANGELOG concision concern (check 13). +- **PASS / SKIP / INFO**: PASS = check clean; SKIP = a check that could not run (e.g. ruff not installed, check 9) — never a blocker; INFO = informational only (check 14). None of these force a caveat. +- **Overall** = `NO-GO` if any FAIL; `GO WITH CAVEATS` if only WARN; `GO` if all PASS. Open issues (check 14) are INFO and never change the overall verdict on their own. + +## Notes + +- All `run-bactopia-*.sh` wrappers auto-discover their CLI (PATH → `bactopia-dev` conda env → `bactopia-py` → any `bactopia-*` env), so no env activation is needed. +- `--bactopia-path` is always `/home/rpetit3/repos/bactopia/bactopia`. +- The engine (`release_audit.py`) needs only `git` + the Python stdlib; it does not use conda or any `bactopia-*` CLI. diff --git a/.agents/skills/release-checklist/evals/evals.json b/.agents/skills/release-checklist/evals/evals.json new file mode 100644 index 000000000..141256520 --- /dev/null +++ b/.agents/skills/release-checklist/evals/evals.json @@ -0,0 +1,44 @@ +{ + "skill_name": "release-checklist", + "evals": [ + { + "id": 1, + "prompt": "are we ready to cut the v4.1.0 release? give me a go/no-go", + "expected_output": "A release-readiness report saved to logs/release-audit-.md and summarized in chat with an explicit GO / GO WITH CAVEATS / NO-GO verdict. Version consistency is sourced from bactopia-lint's repo rules (V001/V002), not re-derived in the skill; any version drift is reported via the failing V-rule. The audit makes no writes to tracked source or GitHub.", + "files": [], + "assertions": [ + "delegates_version_to_lint: check 1 (version consistency) is sourced from bactopia-lint repo rules V001/V002, not a re-implemented scan", + "reports_version_drift_from_vrule: if version-bearing files disagree with versions.yml, the report cites the V001 (or V002) finding rather than inventing its own", + "emits_overall_verdict: the report contains an explicit GO / GO WITH CAVEATS / NO-GO verdict", + "saves_markdown_report: a report file is written under logs/ (release-audit-.md) and its path is surfaced to the user", + "read_only: no git commit/push/tag, no gh issue edit/comment/close, and no edits to tracked source files" + ] + }, + { + "id": 2, + "prompt": "run the release checklist and tell me what's blocking a release", + "expected_output": "The full 14-check audit report plus a condensed chat summary (verdict + checklist table + blocking list). Version/pin checks are attributed to bactopia-lint V001/V002/V003; the module tool-version check reads the offline /update-module record (no network); blocking (FAIL) items are separated from non-blocking (WARN) items.", + "files": [], + "assertions": [ + "runs_all_checks: the report includes all 14 checklist rows with per-check status", + "version_check_via_lint: version and nf-bactopia pin findings are attributed to bactopia-lint (V001/V002/V003), not to a bespoke engine scan", + "module_versions_offline: check 2 reads the /update-module record (present/absent, log timestamp) and does not query the Anaconda API", + "separates_blocking_from_nonblocking: FAIL items are listed as blocking; WARN items as non-blocking/judgment", + "read_only: no git commit/push/tag, no gh mutation, no edits to tracked source files" + ] + }, + { + "id": 3, + "prompt": "do a pre-release audit across bactopia, bactopia-py, and nf-bactopia", + "expected_output": "A multi-repo audit report covering all three repos plus the docs site (bactopia.io), saved to logs/ and summarized in chat, including per-repo release state (latest tag, commits ahead, dirty files) from the engine and an open-issue summary that honors the release-ignore label.", + "files": [], + "assertions": [ + "covers_all_repos: the report addresses bactopia, bactopia-py, nf-bactopia, and the docs site (bactopia.io)", + "reports_sibling_release_state: per-repo latest tag and commits-ahead are reported (from the engine's sibling_release_state)", + "includes_issue_summary: the report includes an open-issue count and a shortlist, and mentions the release-ignore ignore label plus the excluded count", + "emits_overall_verdict: the report contains an explicit GO / GO WITH CAVEATS / NO-GO verdict", + "read_only: no git commit/push/tag, no gh mutation, no edits to tracked source files" + ] + } + ] +} diff --git a/.agents/skills/release-checklist/scripts/release_audit.py b/.agents/skills/release-checklist/scripts/release_audit.py new file mode 100755 index 000000000..6b5da5e5c --- /dev/null +++ b/.agents/skills/release-checklist/scripts/release_audit.py @@ -0,0 +1,284 @@ +#!/usr/bin/env python3 +"""Deterministic release-readiness checks for Bactopia (audit-only). + +Covers the git + file-state checks that are NOT version-file consistency: +sibling-repo release state, CHANGELOG structure, and the /update-module record. +It never writes to any repo and never touches git history -- `git` is invoked +read-only (describe/tag/rev-list/status/log). + +Version-bearing file consistency (versions.yml vs nextflow.config, catalog.json, +CITATION.cff, bin/bactopia, data/conda/meta.yaml, every *.config bactopia_version +and nf-bactopia@ pin, versions.yml vs CHANGELOG, and the declared nf-bactopia pin +vs the nf-bactopia repo's latest) is owned by the `bactopia-lint` repo rules +V001/V002/V003 -- the release-checklist skill surfaces those from the lint run +rather than re-implementing them here. + +Companion to the `release-checklist` skill: the SKILL.md orchestrates the +CLI-backed checks (bactopia-lint/update/merge-schemas/catalog/docs/citations/ +review-tests) and gh; this script owns the remaining pure file+git checks. +""" + +import argparse +import json +import re +import subprocess +import sys +from datetime import datetime, timezone +from pathlib import Path + +_SECTION_RE = re.compile(r"^##\s+v?(\d+\.\d+\.\d+)\b") + + +# --------------------------------------------------------------------------- # +# small helpers +# --------------------------------------------------------------------------- # +def _read(path: Path) -> str | None: + try: + return path.read_text(encoding="utf-8", errors="replace") + except OSError: + return None + + +def _git(repo: Path, *args: str) -> str | None: + """Run a read-only git command in `repo`; return stripped stdout or None.""" + try: + out = subprocess.run( + ["git", "-C", str(repo), *args], + capture_output=True, text=True, timeout=30, + ) + except (OSError, subprocess.SubprocessError): + return None + if out.returncode != 0: + return None + return out.stdout.strip() + + +def _changelog_top(text: str | None) -> dict: + """Parse the top `## v ... "codename" date` heading of a CHANGELOG.""" + result = {"version": None, "codename": None, "date": None, "placeholder": False} + if not text: + return result + for line in text.splitlines(): + m = _SECTION_RE.match(line) + if not m: + continue + result["version"] = m.group(1) + cm = re.search(r'"([^"]*)"', line) + if cm: + result["codename"] = cm.group(1) + dm = re.search(r'"[^"]*"\s*[-\s]*(.+?)\s*$', line) + if dm: + result["date"] = dm.group(1).strip() + cn = result["codename"] + dt = result["date"] or "" + result["placeholder"] = (cn is not None and "?" in cn) or ("?" in dt) + break + return result + + +def _all_sections(text: str | None) -> list[str]: + if not text: + return [] + return [m.group(1) for line in text.splitlines() + if (m := _SECTION_RE.match(line))] + + +def _read_versions_yml(bp: Path) -> dict: + """Parse the declared versions.yml (simple `key: value`; stdlib only).""" + text = _read(bp / "versions.yml") + out = {"present": text is not None, "bactopia": None, "nf_bactopia": None} + if not text: + return out + for line in text.splitlines(): + m = re.match(r"\s*([A-Za-z0-9_-]+)\s*:\s*(\S+)", line) + if not m: + continue + key, val = m.group(1), m.group(2).strip().strip("'\"") + if key == "bactopia": + out["bactopia"] = val + elif key in ("nf-bactopia", "nf_bactopia"): + out["nf_bactopia"] = val + return out + + +# --------------------------------------------------------------------------- # +# check families +# --------------------------------------------------------------------------- # +def sibling_release_state(repos: dict[str, Path | None], warnings: list) -> dict: + out = {} + for name, repo in repos.items(): + if not repo or not repo.exists(): + out[name] = None + warnings.append(f"repo '{name}' not found; release-state skipped") + continue + latest_tag = _git(repo, "describe", "--tags", "--abbrev=0") + commits_ahead = None + if latest_tag: + cnt = _git(repo, "rev-list", f"{latest_tag}..HEAD", "--count") + commits_ahead = int(cnt) if cnt and cnt.isdigit() else None + status = _git(repo, "status", "--porcelain") + dirty = len([ln for ln in status.splitlines() if ln.strip()]) if status else 0 + changelog = _changelog_top(_read(repo / "CHANGELOG.md")) + out[name] = { + "latest_tag": latest_tag, + "commits_ahead": commits_ahead, + "dirty_files": dirty, + "changelog_top": changelog["version"], + "needs_release": bool(commits_ahead and commits_ahead > 0), + } + return out + + +def changelog_state(bp: Path) -> dict: + text = _read(bp / "CHANGELOG.md") + sections = _all_sections(text) + top = _changelog_top(text) + latest_tag = _git(bp, "describe", "--tags", "--abbrev=0") + commits_since_tag = None + if latest_tag: + log = _git(bp, "log", f"{latest_tag}..HEAD", "--oneline") + commits_since_tag = len(log.splitlines()) if log else 0 + # bullets in the top section (until the next `## ` heading) + top_bullets = 0 + if text: + in_top = False + for line in text.splitlines(): + if _SECTION_RE.match(line): + if in_top: + break + in_top = True + continue + if in_top and re.match(r"^\s*-\s+", line): + top_bullets += 1 + # release target = declared version (versions.yml); it must have a section + target = _read_versions_yml(bp).get("bactopia") + missing = bool(target and target not in sections) + return { + "target_version": target, + "top_version": top["version"], + "codename": top["codename"], + "date": top["date"], + "placeholder": top["placeholder"], + "latest_tag": latest_tag, + "sections": sections, + "commits_since_tag": commits_since_tag, + "top_section_bullets": top_bullets, + "missing_section_for_target": missing, + } + + +def module_updates(bp: Path) -> dict: + """Read the newest /update-module record under logs/module-updates/. + + The update-module skill writes bactopia-update's JSON there after each run. + This is offline -- it only reads the record, never queries the network. + Returns present=False when no record exists (a release blocker). + """ + log_dir = bp / "logs" / "module-updates" + files = sorted(log_dir.glob("*.json")) if log_dir.is_dir() else [] + if not files: + return {"present": False, "log_dir": str(log_dir)} + newest = files[-1] # timestamped filenames sort chronologically + m = re.match(r"(\d{8}_\d{6})", newest.stem) + log_ts = None + if m: + try: + log_ts = int(datetime.strptime(m.group(1), "%Y%m%d_%H%M%S") + .replace(tzinfo=timezone.utc).timestamp()) + except ValueError: + log_ts = None + if log_ts is None: + try: + log_ts = int(newest.stat().st_mtime) + except OSError: + log_ts = None + + needs_update = needs_review = up_to_date = total = None + try: + data = json.loads(newest.read_text()) + rows = data.get("results", data) if isinstance(data, dict) else data + if isinstance(rows, dict): + rows = rows.get("modules") or rows.get("results") or [] + if isinstance(rows, list): + rows = [x for x in rows if isinstance(x, dict) + and not (x.get("tool") == "aria2" + and x.get("module") == "checkm2_download")] + total = len(rows) + needs_update = sum(1 for x in rows if x.get("needs_update")) + needs_review = sum(1 for x in rows if x.get("needs_user_review")) + up_to_date = total - needs_update - needs_review + except (OSError, json.JSONDecodeError): + pass + + cfg_ts = _git(bp, "log", "-1", "--format=%ct", + "--", ":(glob)modules/**/module.config") + cfg_ts = int(cfg_ts) if cfg_ts and cfg_ts.isdigit() else None + return { + "present": True, + "log_file": str(newest), + "log_timestamp": m.group(1) if m else newest.stem, + "needs_update": needs_update, + "needs_user_review": needs_review, + "up_to_date": up_to_date, + "total": total, + "module_config_changed_after": bool(log_ts and cfg_ts and cfg_ts > log_ts), + } + + +# --------------------------------------------------------------------------- # +# entry point +# --------------------------------------------------------------------------- # +def _resolve(explicit: str | None, default: Path) -> Path | None: + path = Path(explicit) if explicit else default + return path if path.exists() else None + + +def main() -> int: + ap = argparse.ArgumentParser(description="Deterministic Bactopia release audit.") + ap.add_argument("--bactopia-path", required=True) + ap.add_argument("--bactopia-py-path") + ap.add_argument("--nf-bactopia-path") + ap.add_argument("--docs-site-path") + ap.add_argument("--json", action="store_true", + help="emit JSON (default; kept for parity with other CLIs)") + args = ap.parse_args() + + bp = Path(args.bactopia_path).resolve() + if not bp.exists(): + print(json.dumps({"error": f"bactopia-path not found: {bp}"})) + return 0 + parent = bp.parent + py = _resolve(args.bactopia_py_path, parent / "bactopia-py") + nfb = _resolve(args.nf_bactopia_path, parent / "nf-bactopia") + docs = _resolve(args.docs_site_path, parent / "bactopia.github.io") + + warnings: list[str] = [] + for name, path in (("bactopia-py", py), ("nf-bactopia", nfb), + ("bactopia.github.io", docs)): + if path is None: + warnings.append(f"sibling repo '{name}' not found near {parent}") + + siblings = sibling_release_state( + {"bactopia": bp, "bactopia-py": py, "nf-bactopia": nfb}, warnings) + cl = changelog_state(bp) + mu = module_updates(bp) + + report = { + "bactopia_path": str(bp), + "paths": { + "bactopia_py": str(py) if py else None, + "nf_bactopia": str(nfb) if nfb else None, + "docs_site": str(docs) if docs else None, + }, + "sibling_release_state": siblings, + "changelog": cl, + "module_updates": mu, + "warnings": warnings, + "generated": datetime.now(timezone.utc).isoformat(), + } + print(json.dumps(report, indent=2)) + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/.claude/skills/review-citations/SKILL.md b/.agents/skills/review-citations/SKILL.md similarity index 98% rename from .claude/skills/review-citations/SKILL.md rename to .agents/skills/review-citations/SKILL.md index a28a7cef1..5d53de1dd 100644 --- a/.claude/skills/review-citations/SKILL.md +++ b/.agents/skills/review-citations/SKILL.md @@ -22,7 +22,7 @@ Module and subworkflow `@citation` validation is handled by `bactopia-lint` rule 1. Run `bactopia-citations --validate` via the wrapper, asking for JSON so it's easy to parse: ``` - bash .claude/skills/review-citations/scripts/run-bactopia-citations.sh \ + bash .agents/skills/review-citations/scripts/run-bactopia-citations.sh \ --bactopia-path /home/rpetit3/repos/bactopia/bactopia \ --validate --json --silent ``` @@ -166,4 +166,4 @@ Entries with this flag are intentionally unreferenced and surface in `expected_o ### When to redirect to other skills - Module or subworkflow `@citation` key typos → `/review-groovydoc` (rules M035, S019) -- Workflow GroovyDoc structure issues unrelated to citations → no skill yet; manual review against `.claude/docs/standards/06-workflow-documentation.md` +- Workflow GroovyDoc structure issues unrelated to citations → no skill yet; manual review against `.agents/docs/standards/06-workflow-documentation.md` diff --git a/.claude/skills/review-citations/scripts/run-bactopia-citations.sh b/.agents/skills/review-citations/scripts/run-bactopia-citations.sh similarity index 100% rename from .claude/skills/review-citations/scripts/run-bactopia-citations.sh rename to .agents/skills/review-citations/scripts/run-bactopia-citations.sh diff --git a/.claude/skills/review-docs/SKILL.md b/.agents/skills/review-docs/SKILL.md similarity index 95% rename from .claude/skills/review-docs/SKILL.md rename to .agents/skills/review-docs/SKILL.md index 263a6c512..24e0e6f8d 100644 --- a/.claude/skills/review-docs/SKILL.md +++ b/.agents/skills/review-docs/SKILL.md @@ -1,6 +1,6 @@ --- name: review-docs -description: Review staleness of reference docs under .claude/docs/ using bactopia-docs --validate. Detects deprecated patterns (residue from past migrations like flattenPaths, the 4-channel emission framing, meta:Map) and ground-truth violations (stale module/subworkflow/workflow counts, wrong Nextflow version, references to nonexistent bactopia-* commands or lint rule IDs, skill-inventory drift between 06-skills.md and .claude/skills/, broken markdown link targets). Use this skill whenever the user asks to review docs, check doc staleness, audit reference docs, find outdated documentation, verify doc claims, check if docs are current, or scan .claude/docs for drift after a migration. +description: Review staleness of reference docs under .agents/docs/ using bactopia-docs --validate. Detects deprecated patterns (residue from past migrations like flattenPaths, the 4-channel emission framing, meta:Map) and ground-truth violations (stale module/subworkflow/workflow counts, wrong Nextflow version, references to nonexistent bactopia-* commands or lint rule IDs, skill-inventory drift between 06-skills.md and .agents/skills/, broken markdown link targets). Use this skill whenever the user asks to review docs, check doc staleness, audit reference docs, find outdated documentation, verify doc claims, check if docs are current, or scan .agents/docs for drift after a migration. --- # Review Docs @@ -17,7 +17,7 @@ Two check families that don't fit the per-component lint rule model: - **D104** — Nextflow version (`nextflowVersion` in `nextflow.config`); informational mentions like `26.04+` or `until Nextflow X` are skipped. - **D105** — `` `bactopia-*` `` references inside backticks must resolve to a `[tool.poetry.scripts]` entry in `bactopia-py/pyproject.toml`. Bare prose mentions (`bactopia-tools`, `bactopia-py`) are ignored. - **D106** — `M0xx`/`S0xx`/`W0xx`/`MC0xx`/`JS0xx`/`FMT0xx` lint rule IDs must resolve to a `rid = "..."` assignment in `bactopia-py/bactopia/lint/rules/`. - - **D107** — skill inventory in [reference/06-skills.md](../../docs/reference/06-skills.md) must match `.claude/skills/*/SKILL.md`. Catches: skills on disk not listed in the table, rows referencing nonexistent skill directories, and purpose-cell drift from the SKILL.md `description:` first sentence. + - **D107** — skill inventory in [reference/06-skills.md](../../docs/reference/06-skills.md) must match `.agents/skills/*/SKILL.md`. Catches: skills on disk not listed in the table, rows referencing nonexistent skill directories, and purpose-cell drift from the SKILL.md `description:` first sentence. - **D108** — markdown link targets `[text](path)` must resolve to a real file. URLs and anchor-only links are skipped. Component-level checks live elsewhere: @@ -29,7 +29,7 @@ Component-level checks live elsewhere: 1. Run `bactopia-docs --validate` via the wrapper, asking for JSON so it's easy to parse: ``` - bash .claude/skills/review-docs/scripts/run-bactopia-docs.sh \ + bash .agents/skills/review-docs/scripts/run-bactopia-docs.sh \ --bactopia-path /home/rpetit3/repos/bactopia/bactopia \ --validate --json --silent ``` @@ -41,7 +41,7 @@ Component-level checks live elsewhere: ```json { "bactopia_path": "/home/rpetit3/repos/bactopia/bactopia", - "docs_path": ".claude/docs", + "docs_path": ".agents/docs", "patterns_file": "data/docs-patterns.yml", "ground_truth": { "counts": {"modules": 97, "subworkflows": 88, "workflows": 70}, @@ -116,7 +116,7 @@ Component-level checks live elsewhere: Each pattern represents a migration that already landed; the doc is just out of sync. Three fix patterns: -- **Replace with current term**: most common case. `flattenPaths` → describe the current direct-emit pattern. `4-channel` → `2 channels (sample_outputs + run_outputs)`. `Tuple` → `Channel`. Read the surrounding paragraph before editing — sometimes the whole sentence needs rewriting, not just a token swap. Look at [reference/01-examples.md](.claude/docs/reference/01-examples.md) for the modern equivalents. +- **Replace with current term**: most common case. `flattenPaths` → describe the current direct-emit pattern. `4-channel` → `2 channels (sample_outputs + run_outputs)`. `Tuple` → `Channel`. Read the surrounding paragraph before editing — sometimes the whole sentence needs rewriting, not just a token swap. Look at [reference/01-examples.md](.agents/docs/reference/01-examples.md) for the modern equivalents. - **Delete entirely**: glossary entries for terms that no longer exist (e.g. the `flattenPaths` definition, the `Tuple` type entries) should be removed, not rephrased. Take the whole bullet/section. - **Mark as historical with inline ignore**: very rarely, a doc legitimately needs to mention a deprecated term — e.g. a "what changed in v4" note. Suppress the rule on that line with an HTML comment: @@ -160,7 +160,7 @@ Always confirm with the user before adding a pattern — false positives at the - **Suppression is a last resort.** `` is technical debt; prefer rewriting to remove the deprecated term entirely. The rare legitimate use is a deliberate historical reference (changelog, "what changed" notes). - **D105/D106 skip silently when bactopia-py isn't found.** If `ground_truth.bactopia_py_resolved` is `null`, those checks didn't run. Pass `--bactopia-py-path` explicitly if the sibling repo is in a non-default location. - The wrapper script auto-discovers `bactopia-docs` (checks PATH, then conda envs). No need to activate an env first. -- The CLI's `--bactopia-path` must point at the repo root so the validator can find `.claude/docs/`, `data/docs-patterns.yml`, `nextflow.config`, and the tier directories. +- The CLI's `--bactopia-path` must point at the repo root so the validator can find `.agents/docs/`, `data/docs-patterns.yml`, `nextflow.config`, and the tier directories. ## Quick reference @@ -189,7 +189,7 @@ patterns: ### CLI flags - `--bactopia-path PATH` — required, points at the bactopia repo root -- `--docs-path PATH` — relative to bactopia-path (default: `.claude/docs`) +- `--docs-path PATH` — relative to bactopia-path (default: `.agents/docs`) - `--patterns-file PATH` — relative to bactopia-path (default: `data/docs-patterns.yml`) - `--bactopia-py-path PATH` — override the sibling-repo discovery for D105/D106 - `--skip-path-check` — skip D108 (faster runs; useful when you know link health is fine) diff --git a/.claude/skills/review-docs/scripts/run-bactopia-docs.sh b/.agents/skills/review-docs/scripts/run-bactopia-docs.sh similarity index 100% rename from .claude/skills/review-docs/scripts/run-bactopia-docs.sh rename to .agents/skills/review-docs/scripts/run-bactopia-docs.sh diff --git a/.claude/skills/review-groovydoc/SKILL.md b/.agents/skills/review-groovydoc/SKILL.md similarity index 98% rename from .claude/skills/review-groovydoc/SKILL.md rename to .agents/skills/review-groovydoc/SKILL.md index 501103886..a552ecafe 100644 --- a/.claude/skills/review-groovydoc/SKILL.md +++ b/.agents/skills/review-groovydoc/SKILL.md @@ -11,7 +11,7 @@ Run bactopia-lint focused on GroovyDoc accuracy rules and present the results. 1. Run `bactopia-lint` via the wrapper script. By default, lint both modules and subworkflows: ``` - bash .claude/skills/review-groovydoc/scripts/run-bactopia-lint.sh --bactopia-path /home/rpetit3/repos/bactopia/bactopia --quiet --json --silent + bash .agents/skills/review-groovydoc/scripts/run-bactopia-lint.sh --bactopia-path /home/rpetit3/repos/bactopia/bactopia --quiet --json --silent ``` - For modules only: add `--no-subworkflows --no-workflows` - For subworkflows only: add `--no-modules --no-workflows` @@ -51,7 +51,7 @@ Run bactopia-lint focused on GroovyDoc accuracy rules and present the results. - S027: @output field descriptions must not exist for channel.empty() emits **Entry workflows (W-series):** - - No dedicated GroovyDoc-accuracy W-rules exist. Workflow GroovyDoc review is a manual pass — check the workflow main.nf against `.claude/docs/standards/06-workflow-documentation.md`, verify `@subworkflows` directory keys match actual `include { ... }` imports (e.g., `utils_bactopia-tools`, `bactopia_qc`), validate `@citation` keys against `data/citations.yml`, confirm `@input` names match declared `params { }`, and ensure each `@section` has ≥1 `@publish`. The one-off drift-check approach used on 2026-04-10 lived at `/tmp/workflow_drift_check.py` and reused `parse_groovydoc_full()` + `parse_includes()` from `bactopia-py/bactopia/nf.py`. + - No dedicated GroovyDoc-accuracy W-rules exist. Workflow GroovyDoc review is a manual pass — check the workflow main.nf against `.agents/docs/standards/06-workflow-documentation.md`, verify `@subworkflows` directory keys match actual `include { ... }` imports (e.g., `utils_bactopia-tools`, `bactopia_qc`), validate `@citation` keys against `data/citations.yml`, confirm `@input` names match declared `params { }`, and ensure each `@section` has ≥1 `@publish`. The one-off drift-check approach used on 2026-04-10 lived at `/tmp/workflow_drift_check.py` and reused `parse_groovydoc_full()` + `parse_includes()` from `bactopia-py/bactopia/nf.py`. 3. Present results as a clean summary: - **If all pass**: Report "All X modules/subworkflows have clean GroovyDoc" and stop diff --git a/.claude/skills/review-groovydoc/scripts/run-bactopia-lint.sh b/.agents/skills/review-groovydoc/scripts/run-bactopia-lint.sh similarity index 100% rename from .claude/skills/review-groovydoc/scripts/run-bactopia-lint.sh rename to .agents/skills/review-groovydoc/scripts/run-bactopia-lint.sh diff --git a/.agents/skills/review-tests/SKILL.md b/.agents/skills/review-tests/SKILL.md new file mode 100644 index 000000000..a76cc013e --- /dev/null +++ b/.agents/skills/review-tests/SKILL.md @@ -0,0 +1,204 @@ +--- +name: review-tests +description: Review nf-test run results and present a diagnostic summary with grouped error analysis. Use when asked to review tests, check test results, show test failures, analyze test output, investigate why tests failed, see what's broken, or check test status. Runs are multi-profile (docker/conda/singularity) with docker as the reference baseline. Accepts an optional timestamp argument to review a specific run. +--- + +# Review Tests + +Run the review-tests CLI and present the results to the user. + +Runs are **multi-profile**: each component/tier is tested across up to four profiles +-- `docker` (the reference baseline), `conda`, `singularity_galaxy`, `singularity_pull`. +A cell is one (component, tier, profile). Most interpretation is a comparison of each +profile against docker. + +## Steps + +1. Run `bactopia-review-tests` via the wrapper script using the **default text output** + (do NOT use `--json`): + ``` + bash .agents/skills/review-tests/scripts/run-bactopia-review-tests.sh --bactopia-path /home/rpetit3/repos/bactopia/bactopia --silent + ``` + If the user provided a timestamp argument (e.g., `/review-tests 20260324_081306`), + add `--run 20260324_081306`. + +2. Present the text output directly to the user. The CLI produces a clean summary with a + **"Status Breakdown by Profile"** matrix and one section per failing status. Do NOT + parse JSON or write extra code to reformat -- just relay the output with your interpretation. + +3. Add interpretation and context after showing the output. Interpret **by status** + (see the status reference below), and always frame failures as "which profiles differ + from docker, and why." Summarize actionable items and next steps. + +4. If the text output is too large for a single response, summarize the key sections + (overview, status-by-profile matrix, failures) and note that per-file detail is in + `summary.json`. Use `--json`/`--pretty` or read `summary.json` directly for structured detail. + +## Status reference (per-cell `status`) + +- **`passed`** -- cell matched the committed snapshot / assertions. +- **`version_drift` / `output_drift` / `version+output_drift`** -- this profile's outputs differ + from docker: `version_drift` = `versions.yml` (runtime resolved a different tool version than the + docker container pin), `output_drift` = tool output file(s), `version+output_drift` = both. + `reason` names the divergent fields. When **docker passed** and only conda/singularity drift, this + is **genuine dependency-solve divergence**, not a bug. Fix = the **sccmec-pattern test migration** + (md5 the profile-stable files, existence-check the divergent ones, `versions` -> `contains('')`) + -- **NOT** snapshot regeneration. See `files[]` / `suggested_edit` in `summary.json` for the exact + bucketing. (A pure `version_drift` may instead warrant updating the container version pin.) +- **`snapshot_mismatch`** -- the snapshot didn't match but the files matrix could not attribute it to + specific fields (drift not subclassified). Inspect `files[]` and `{profile}/stderr.txt`. +- **`snapshot_stale`** -- the committed `.snap` no longer matches the **reference runtime (docker)**; + it shows on **all profiles including docker**. Fix: re-run with `--generate` under docker to + re-baseline. NOT a content or tool problem (on `generate=false`, docker's own mismatch is promoted + to this). Typical cause: a test's `snapshot()` shape was edited but `.snap` was never regenerated. +- **`assertion_failed`** -- a non-snapshot assertion failed (no output divergence detected). A test + logic/assertion issue, not drift -- read `{profile}/stderr.txt`. +- **`non_reproducible`** -- two docker runs produced different snapshots; docker's own output is + non-deterministic. Investigate the tool/test; regeneration will not fix it. +- **`build_failed`** -- the Conda env or Singularity image failed to build before testing. Infra: + build the env/image, then re-run (it blocks triage of that profile). +- **`no_ground_truth`** -- docker established no snapshot for the non-docker profiles to validate + against (usually docker itself failed to produce one). +- **`syntax_error`** -- the Nextflow script failed to compile. Fix the `.nf`. +- Housekeeping statuses you may also see: `skipped`, `timeout` (exceeded the per-run timeout), + `no_snapshot`, `n/a`. +- **`undeclared_outputs`** -- the tool produced files not declared in the module's `results`, + `logs`, `versions`, or `nf_logs`. For each file help the user route it: + - **`results`**: a real tool output users want (report, summary, data file) + - **`logs`**: stdout/stderr from the tool + - **`.outputs-ignore`**: staging artifact, intermediate, version-info side effect, or DB file + `.outputs-ignore` lives at `modules/{name}/tests/.outputs-ignore` (one glob per line; `#` + comments and blanks allowed; `staging/**` is ignored by default). NOTE: this check only runs + when the tool **succeeds**, so it is masked on a profile that `tool_error`'d -- use + `undeclared_outputs_union` to see the full set. +- **`tool_error`** -- the tool crashed at runtime. Read **`error_class`**: + - `env_dependency` -- conda/singularity re-solved a too-new interpreter/dependency + (e.g. py>=3.12 `pkg_resources`, numpy2 `newshape`, biopython `SeqFeature.strand`, R + `readr`/`lifecycle` `deprecate_stop`). **Fix the env/recipe, NOT the test.** + - `tool_crash` / `staging_bug` / `fs_permission` / `unknown` -- fix the module/upstream or + the workspace; when `unknown`, read the `Command error:` block. + `reason` carries the real tool error (from `Command error:`), not the downstream nf-test + `NullPointerException`. + +`generate` gates interpretation (shown in Run Parameters and the `# generate=` header +of `summary.tsv`): +- **`generate=true`**: the `.snap` was regenerated under docker first, so docker passing is the + re-baseline; any drift shown is genuine (docker vs profile). `snapshot_stale` cannot occur. +- **`generate=false`**: docker **also** failing => `snapshot_stale` (run `--generate`). docker + passing while a profile drifts => genuine content drift. + +## Multi-profile layout & `summary.json` + +Structured results live at `logs/run-tests/{ts}/summary.json` (plus `summary.tsv`, whose first +line is `# generate=`). Prefer `summary.json` for machine-readable detail; the CLI text is +the human summary. Key fields: + +- `profiles[]`, `reference_profile` (`"docker"`). +- `results[].cells.{profile}`: `status`, `duration`, `reason`, `error_class` (tool_error only), + `undeclared_outputs[]`. +- `results[].undeclared_outputs_union`: undeclared files unioned across profiles (unmasks + profiles that `tool_error`'d). +- `results[].files[]`: per output file, the **cross-profile md5 matrix** -- `process`, `scope` + (`sample`/`run`; subworkflow multi-record), `field`, `name`, `md5:{profile -> hash|null}`, + `verdict`, `divergent_profiles[]`, plus: + - `verdict`: `stable` (equal across all profiles that ran) | `divergent` | `indeterminate` + (a profile didn't produce it) | `skip`. + - `comparable`: `false` = intrinsically non-hashable (gz / normalized -> byte md5 is + meaningless) => bucket **existence-only**; `verdict:"skip"`. + - `incomplete[]`: profiles that produced no file (e.g. a `tool_error`'d conda) => `verdict` + is `indeterminate`, NOT a false `stable`; re-check after fixing that profile. + - `kind:"versions"` + `tool_key`: a `versions.yml` -> bucket to `contains('')`. + This matrix is computed from actual runtime outputs, so it is populated **even on passing or + stale cells** -- an always-on divergence diagnostic (also useful for `add-*` at creation time). +- `results[].suggested_edit` (module/subworkflow only): the exact test change implied by the + verdicts -- `snapshot:[fields]` (stable), `existence:[fields]` (divergent content), + `contains:[{field,value}]` (divergent versions). Subworkflow fields are **scope-prefixed** + (`sample.`/`run.`, e.g. `sample.blast`, `run.versions`). Directly consumable and self-verifying + (diff against the committed test). Workflow tier is intentionally `.nftignore`-only, so it has no + `suggested_edit`; add the divergent globs to `workflows/**/tests/.nftignore` instead. + +## Diagnostic files (per profile) + +Layout: `logs/run-tests/{ts}/{tier}/{component}/{profile}/`: +- **`stdout.txt`** -- nf-test console, including the tool's own `Command error:` block. + Read this for **`tool_error` root cause**. +- **`stderr.txt`** -- nf-test assertions, including the `Different Snapshot` per-file md5 diff. + Read this for **drift / assertion detail**. +- **`outputs.txt`** -- `# Undeclared outputs:` list, or `# OK`. +- **`.nf-test/**`** -- preserved work tree (present for all cells, passing included), including + `meta/output_0.json` (record field -> output file paths) and `meta/nextflow.log`. + +Both `stdout.txt` and `stderr.txt` matter now, split by class (this replaces the old +"read stdout, not stderr" rule). + +## Progressive Disclosure + +Keep the initial summary compact and scannable. Do NOT open `stdout`/`stderr`/`nextflow.log` +during the initial summary -- the status matrix, `reason`, `error_class`, and `files[]` usually +suffice. When the user asks for deeper detail: + +- **Specific component**: read its `summary.json` `results[]` entry first (cells, `reason`, + `error_class`, `files[]`, `suggested_edit`). Then, if needed, open + `{tier}/{component}/{profile}/stdout.txt` (tool_error) or that same dir's `stderr.txt` (drift diff). +- **Undeclared outputs**: use `undeclared_outputs_union` (or a cell's `undeclared_outputs[]`), + then read the module's `main.nf` output block to advise `results` / `logs` / `.outputs-ignore`. +- **Tool / abort errors**: read the `Command error:` block in `{profile}/stdout.txt`; the full + Nextflow log is at `{tier}/{component}/{profile}/.nf-test/tests/*/meta/nextflow.log` + (focus on ERROR/WARN and the last ~50 lines). +- **Drift bucketing**: use `files[]` + `suggested_edit`; cross-check with the + `Different Snapshot` block in `{profile}/stderr.txt`. + +## Important Reminders + +- CRITICAL: NEVER suggest `--update-snapshots` / snapshot regeneration for the drift statuses + (`output_drift`/`version_drift`/`version+output_drift`) or env-drift `tool_error`s. Regen does NOT fix profile divergence -- + migrate the test (sccmec pattern) or fix the env. `--generate` is the fix **only** for + `snapshot_stale`. +- `error_class: env_dependency` => fix the conda/singularity env or bioconda recipe, NOT the test. +- Read `{profile}/stdout.txt` for `tool_error` root cause and `{profile}/stderr.txt` for + drift/assertion diffs -- both matter. +- `undeclared_outputs` can be masked on a `tool_error`'d profile -- always check + `undeclared_outputs_union`. +- `files[]` verdicts: `comparable:false` (gz/normalized) -> existence-only; `verdict:indeterminate` + + `incomplete:[...]` -> a profile didn't run, re-check after fixing (never a clean bill). +- Not all tiers/profiles appear in every run; a component with no Galaxy image has + `galaxy:false` and no `singularity_galaxy` cell. +- `.nf-test/` work dirs are preserved per profile for **all** cells (passing included), so you can + inspect any profile's `meta/output_0.json` or work tree -- not just failures. + +## Updating Baselines + +Baselines file: `conf/test-times.json`. Durations are **docker-based** (the CLI reports +"Docker duration"). + +To update baselines after a clean all-pass run, add `--update-baselines`: +``` +bash .agents/skills/review-tests/scripts/run-bactopia-review-tests.sh --bactopia-path /home/rpetit3/repos/bactopia/bactopia --silent --update-baselines +``` +This writes actual runtimes from the current run into the baselines file and updates the +`_meta.updated` timestamp. Only entries for tested components are updated; other tiers +are left unchanged. After updating, re-run without `--update-baselines` to confirm anomalies +are resolved. + +## Interpreting Timing Anomalies + +Timing is measured against the **docker** profile. +- **generate=true vs generate=false**: a `generate=true` run executes tests twice (generate + snapshots, then test against them). If baselines were recorded from a `generate=true` run but + the current run uses `generate=false`, tests run at ~0.5x baseline -- expected, not suspicious. +- **Slow tests**: may reflect newly added test cases rather than regressions. Check recent + commits to the component's test file before flagging. +- **Only flag anomalies as concerning** when the `generate` parameter matches between the + baseline run and the current run. + +## Self-Improvement + +If you find yourself writing ad-hoc Python or bash to parse, explore, or extract data from the +CLI output or `summary.json`, that logic should be added to this skill or the underlying +`bactopia-review-tests` CLI instead. Update the skill so future sessions don't reinvent it. + +## JSON Output + +`logs/run-tests/{ts}/summary.json` is the primary structured source (schema above). The CLI can +also emit it with `--json` (add `--pretty` for readable output). See +`bactopia-review-tests --help` for details. diff --git a/.claude/skills/review-tests/scripts/run-bactopia-review-tests.sh b/.agents/skills/review-tests/scripts/run-bactopia-review-tests.sh similarity index 100% rename from .claude/skills/review-tests/scripts/run-bactopia-review-tests.sh rename to .agents/skills/review-tests/scripts/run-bactopia-review-tests.sh diff --git a/.claude/skills/run-tests/SKILL.md b/.agents/skills/run-tests/SKILL.md similarity index 58% rename from .claude/skills/run-tests/SKILL.md rename to .agents/skills/run-tests/SKILL.md index 197a07085..840bfa036 100644 --- a/.claude/skills/run-tests/SKILL.md +++ b/.agents/skills/run-tests/SKILL.md @@ -8,10 +8,18 @@ description: Run Bactopia nf-tests via bactopia-test and produce a timestamped l Run the Bactopia nf-test suite through `bactopia-test` for a specific component and present the live output to the user. This is the "before" half of the `run-tests` / `review-tests` pair: this skill **runs** the tests and writes a -timestamped `logs/{timestamp}/` directory; `/review-tests` then **interprets** +timestamped `logs/run-tests/{timestamp}/` directory; `/review-tests` then **interprets** that directory (grouping failures, reading stdout files, etc.). Keep the two responsibilities clearly separated -- do not try to do `/review-tests`' job here. +**Every run is a 4-profile matrix.** `bactopia-test` no longer takes a +`--profile` flag. For each selected component it tests `docker`, `conda`, +`singularity_galaxy`, and `singularity_pull`: docker validates (or generates) +the snapshot and the other three validate against it, surfacing runtime drift +without rewriting tests. Conda envs and Singularity images are **pre-built +serially** (from `--cachedir`) before the parallel test phase, so even a +single-component run pays that build/setup cost up front. + ## Steps 1. **Resolve `--tier` and `--include` from what the user said.** Use the @@ -22,12 +30,11 @@ responsibilities clearly separated -- do not try to do `/review-tests`' job here 2. **Invoke the wrapper script** with the resolved arguments: ``` - bash .claude/skills/run-tests/scripts/run-bactopia-test.sh \ + bash .agents/skills/run-tests/scripts/run-bactopia-test.sh \ --bactopia-path /home/rpetit3/repos/bactopia/bactopia \ --test-data /home/rpetit3/repos/bactopia/bactopia-tests \ --outdir /home/rpetit3/repos/bactopia/bactopia \ - --profile docker \ - --keep \ + --cachedir /data/cache \ [--tier TIER] \ --include COMPONENT ``` @@ -38,9 +45,10 @@ responsibilities clearly separated -- do not try to do `/review-tests`' job here whose name contains `snippy`. 3. **Present the CLI's live output directly.** `bactopia-test` produces a Rich - table with per-component status, durations, and a final summary. Relay it - without reformatting. Do not parse JSON, do not re-tabulate, do not read the - stdout files the CLI writes. + table with per-component, per-profile status (docker / conda / + singularity_galaxy / singularity_pull), durations, and a final summary. + Relay it without reformatting. Do not parse JSON, do not re-tabulate, do not + read the stdout files the CLI writes. 4. **After the run finishes**, extract the run timestamp and hand off to `/review-tests`. See the "After the run" section. @@ -76,42 +84,43 @@ These flags are always added without asking the user: | ----------------- | -------------------------------------------- | ----------------------------------------------------------------------------- | | `--bactopia-path` | `/home/rpetit3/repos/bactopia/bactopia` | Canonical repo location on this machine. | | `--test-data` | `/home/rpetit3/repos/bactopia/bactopia-tests`| Canonical test-data location; sets `BACTOPIA_TESTS`. | -| `--profile` | `docker` | Default execution profile. Docker is the baseline for reproducible tests. | -| `--keep` | *(always)* | Preserves `.nf-test/` dirs and logs on pass; `/review-tests` needs them. | -| `--outdir` | `/home/rpetit3/repos/bactopia/bactopia` | So `logs/{timestamp}/` lands at the repo root, where `/review-tests` reads. | +| `--cachedir` | `/data/cache` | Holds pre-built `conda/` and `singularity/` env caches on this host (the CLI default `~/.bactopia` is empty here). | +| `--outdir` | `/home/rpetit3/repos/bactopia/bactopia` | So `logs/run-tests/{timestamp}/` lands at the repo root, where `/review-tests` reads. | ## When to ask the user first (never auto-fill) | Flag | Policy | | -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `--condadir` | Only add if the user explicitly asked for `--profile conda`. **Ask the user** for the cache path before running; do not guess. | -| `--singularity_cache`| Only add if the user explicitly asked for `--profile singularity`. **Ask the user** for the cache path before running; do not guess. | -| `--generate` | **Never** add unless the user's request contains one of: `--generate`, "generate mode", "regenerate snapshots", or "update snapshots". Destructively deletes snapshots. | -| `--jobs N` | Pass through if the user specified a number (e.g. "with 32 jobs"); otherwise omit and let the CLI default (`max(1, nproc // 4)`) apply. | +| `--generate` | **Never** add unless the user's request contains one of: `--generate`, "generate mode", "regenerate snapshots", or "update snapshots". It **overwrites the committed docker `.snap`** for the tested components. | +| `--force-rebuild` | Only add if the user explicitly asks to rebuild environments (or a `build_failed` was diagnosed). Forces a rebuild of existing Conda envs and Singularity images -- slow. | +| `--jobs N` | Pass through if the user specified a number (e.g. "with 16 jobs"); otherwise omit and let the CLI default (`32`) apply. This is components-in-parallel; the 4 profiles within a component run sequentially. | ## Important Reminders These are the non-negotiable rules. Violating any of them can burn hours of time or delete work the user cares about. -- **CRITICAL: never run with no component filter.** The CLI defaults to - `--tier all` with no `--include`, which runs the entire test suite across - 96 modules + 87 subworkflows + 69 workflows. That is expensive and is not - what this skill is for. If the user asks to "run tests" without naming a - component, **stop and ask** which module / subworkflow / workflow they want. +- **CRITICAL: never run with no component filter.** With no `--include`, the CLI + tests every component (250+ across modules, subworkflows, and workflows) and + each one runs the full 4-profile matrix -- plus a serial env pre-build phase. + That is very expensive and is not what this skill is for. If the user asks to + "run tests" without naming a component, **stop and ask** which module / + subworkflow / workflow they want. - **NEVER pass `--generate`** unless the user explicitly asked for it with the literal flag name or the phrases "generate mode", "regenerate - snapshots", or "update snapshots". `--generate` deletes existing snapshot - files and re-runs each test twice. The deletion is not recoverable from - within the skill. + snapshots", or "update snapshots". `--generate` forces regeneration of the + docker snapshot, **overwriting the committed `.snap`** for the tested + components. (Without it, a missing snapshot is still generated automatically; + an existing one is validated, not touched.) -- **ALWAYS pass `--keep`.** On pass, the CLI cleans up `.nf-test/` work - directories by default; `--keep` preserves them. `/review-tests` may need - to read into them to diagnose undeclared outputs or assertion mismatches. +- **ALWAYS pass `--cachedir /data/cache`.** The pre-built `conda/` and + `singularity/` env caches live there on this host. The CLI default + (`~/.bactopia`) is empty, so omitting it forces every environment to rebuild + from scratch -- hours of wasted work. - **ALWAYS pass `--outdir /home/rpetit3/repos/bactopia/bactopia`** so that - `logs/{timestamp}/` is written at the bactopia repo root. `/review-tests` + `logs/run-tests/{timestamp}/` is written at the bactopia repo root. `/review-tests` looks for logs relative to `--bactopia-path`; if `--outdir` is omitted the logs land in whatever directory the shell was invoked from and the downstream skill will not find them. @@ -122,30 +131,57 @@ time or delete work the user cares about. not needed here. - **Do NOT pass `--fail-fast`** unless the user explicitly asks. The default - "run everything, report all failures at the end" behavior is what - `/review-tests` expects to consume. + "run every component, report all failures at the end" behavior is what + `/review-tests` expects to consume. (`--fail-fast` stops on the first + component with any failing profile.) - **Do NOT interpret failures in detail here.** Do not read - `.stdout.txt`, `.stderr.txt`, `.outputs.txt`, or `nextflow.log` files. Do + `stdout.txt`, `stderr.txt`, `outputs.txt`, or `nextflow.log` files. Do not group failures by type. Do not recommend fixes. That is deliberately reserved for `/review-tests` so the two skills stay loosely coupled and each has a single clear job. -- **Profile switching requires extra info.** If the user asks for - `--profile singularity` or `--profile conda`, switch profiles **and** ask - them for the corresponding `--singularity_cache` or `--condadir` path - before invoking the wrapper. Do not guess. +- **There is no `--profile` flag anymore.** Every run tests all four profiles. + If the user wants to re-check a single drifting/timed-out profile cell (e.g. + "re-run stecfinder's conda test"), you still run the whole component -- the + matrix always covers that profile -- and point them at that profile's row in + the output. + +- **A `timeout` can be an intermittent *hang*, not a too-small budget -- do not + assume raising `-tm` will let it finish.** Per-component timeout = + `min(expected_seconds * -tm, --timeout)`. A cell that hangs never completes: + the task is killed by SIGTERM at the cap, so a bigger budget only makes it + hang longer. Confirmed example: `stecfinder`'s conda profile has repeatedly + wedged on its third case -- the task runs the full ~184s (`46.1 * 4`) and is + killed (**exit 143**, `succeededCount=0; abortedCount=1`, no `Task completed`, + 0-byte outputs), yet the whole component passes in ~24s (docker ~24s) when the + hang doesn't recur. This is a **known intermittent hang to keep an eye on**, + not slowness and not a baseline problem. + When a cell reports `timeout`, inspect the work tree to classify it, then act: + - **Hang** (`{profile}/.nf-test/.../work/**/.exitcode` = `143`, empty/0-byte + outputs, no `Task completed` in `meta/nextflow.log`): the tool/task never + returned control to nextflow/nf-test. **Do NOT** raise `-tm` or + `--update-baselines` -- neither addresses a hang. In a real pipeline run + Nextflow's own task retries absorb an intermittent hang like this, so no + code change is required unless it becomes persistent. If it does recur + often, escalate to a **cross-environment deep dive** (compare the docker + vs conda vs singularity envs -- program versions, dependency pins) to find + what differs on the wedging profile. + - **Genuine slow-but-completes** (task reaches `COMPLETED` just past the + budget): re-run with a raised `-tm`; if it then passes, the budget was the + issue. Only this case warrants a baseline/multiplier adjustment. ## After the run When `bactopia-test` finishes, do these four things -- nothing more: -1. **Report overall pass/fail counts** from the CLI's final summary table - (it prints a row-count breakdown by status). +1. **Report the status breakdown** from the CLI's final summary table. It is a + per-profile matrix (docker / conda / singularity_galaxy / singularity_pull); + report the counts as shown. 2. **Extract the run timestamp.** The CLI prints the path to the logs directory, which ends in a `YYYYMMDD_HHMMSS` directory (e.g. - `logs/20260410_143022/`). Pull that timestamp out and show it to the user. + `logs/run-tests/20260410_143022/`). Pull that timestamp out and show it to the user. 3. **Point the user at `/review-tests`** with an exact next step: @@ -200,21 +236,22 @@ Defaults in parentheses. - `--exclude` — comma-separated component names (default: none) **Execution** -- `--profile` — `docker` / `singularity` / `conda` (default: `docker`) -- `--condadir` — conda cache dir (default: `${BACTOPIA_CACHEDIR}/conda`) -- `--singularity_cache` — singularity cache dir (default: `${BACTOPIA_CACHEDIR}/singularity`) -- `--generate` — delete snapshots and run twice (default: off) -- `--jobs` — parallel workers (default: `max(1, nproc // 4)`) -- `--fail-fast` — stop on first failure (default: off) -- `--timeout` — per-test timeout in **minutes**, 0 to disable (default: 90) +- `--cachedir` — cache dir holding pre-built `conda/` and `singularity/` subdirs (default: `~/.bactopia`; use `/data/cache` on this host) +- `--generate` — force regeneration of the docker snapshot, overwriting the committed `.snap` (default: off; a missing snapshot is generated regardless) +- `--force-rebuild` — force a rebuild of existing Conda envs and Singularity images (default: off) +- `--max-retry` — max build retries per environment during the build phase (default: 3) +- `--jobs` — components tested in parallel; the 4 profiles within a component run sequentially (default: 32) +- `--fail-fast` — stop on the first component with any failing profile (default: off) +- `--timeout` — per-run timeout in **minutes** (kills each nf-test subprocess), 0 to disable (default: 90) +- `--times` — path to test-times baseline JSON; enables per-component timeouts and longest-first ordering (default: `{bactopia-path}/conf/test-times.json`) +- `--timeout-multiplier` / `-tm` — per-component timeout = `min(expected_seconds * this, --timeout)`; only applied when a test-times file is available (default: 4) **Cleanup (operates instead of running tests)** -- `--cleanup` — find and remove all `.nf-test/` temp files, then exit +- `--cleanup` — remove `.nf-test/` temp files under `modules/`, `subworkflows/`, `workflows/`, `tests/`, then exit (skips `logs/` work dirs) - `--dry-run` — with `--cleanup`, list what would be removed **Output** - `--outdir` — directory to write `logs/` into (default: `.`) -- `--keep` — preserve `.nf-test/` dirs and logs on pass (default: off) - `--json` — emit results as JSON (default: off; used only as fallback) **Logging** @@ -222,28 +259,40 @@ Defaults in parentheses. - `--silent` — ERROR logging only - `--version` / `--help` +> Removed in the suite revamp: `--profile`, `--condadir`, `--singularity_cache` +> (folded into the 4-profile matrix + `--cachedir`), and `--keep` (per-profile +> logs and `.nf-test/` work dirs are now always preserved under `logs/`). + ### Output layout written by the CLI ``` -{outdir}/logs/{YYYYMMDD_HHMMSS}/ -├── summary.json # machine-readable rollup -├── summary.tsv # same data in TSV +{outdir}/logs/run-tests/{YYYYMMDD_HHMMSS}/ +├── summary.json # machine-readable rollup (first line of .tsv is `# generate=`) +├── summary.tsv # same data in TSV ├── modules/ -│ ├── {component}.stdout.txt # captured stdout from nf-test -│ ├── {component}.stderr.txt # captured stderr -│ └── {component}.outputs.txt # undeclared-outputs report +│ └── {component}/ +│ ├── docker/ # one dir per profile that ran +│ │ ├── stdout.txt # nf-test console incl. tool `Command error:` block +│ │ ├── stderr.txt # nf-test assertions / `Different Snapshot` md5 diff +│ │ ├── outputs.txt # undeclared-outputs report (or `# OK`) +│ │ └── .nf-test/ # preserved work tree (all cells, passing included) +│ ├── conda/ ... +│ ├── singularity_galaxy/ ... +│ └── singularity_pull/ ... ├── subworkflows/ │ └── ... (same structure) └── workflows/ └── ... (same structure) ``` -Only the tiers that were tested have subdirectories in a given run. -`/review-tests` reads these files directly -- do not pre-load them here. +Only the tiers that were tested have subdirectories in a given run, and a +component only has a `{profile}/` dir for each profile that actually ran (a +component with no Galaxy image has no `singularity_galaxy/`). `/review-tests` +reads these files directly -- do not pre-load them here. ### Wrapper script discovery order -The wrapper at `.claude/skills/run-tests/scripts/run-bactopia-test.sh` +The wrapper at `.agents/skills/run-tests/scripts/run-bactopia-test.sh` locates `bactopia-test` by checking, in order: 1. `bactopia-test` on `PATH` (respects an already-activated env) @@ -269,11 +318,11 @@ are forwarded through `"$@"`. ### Sibling skills -- `/review-tests` — the "after" half. Reads `logs/{timestamp}/`, groups +- `/review-tests` — the "after" half. Reads `logs/run-tests/{timestamp}/`, groups failures by type, reads stdout files on request, and suggests next steps. Always point the user here after a run completes. - `/project-status` — component counts and coverage. Unrelated to the test loop but uses the same wrapper-script pattern. - `/update-module` — bumps tool versions. Unrelated, but is the reference for the "ask the user before mutating" pattern borrowed here for - `--generate` and profile switches. + `--generate` and `--force-rebuild`. diff --git a/.claude/skills/run-tests/scripts/run-bactopia-test.sh b/.agents/skills/run-tests/scripts/run-bactopia-test.sh similarity index 100% rename from .claude/skills/run-tests/scripts/run-bactopia-test.sh rename to .agents/skills/run-tests/scripts/run-bactopia-test.sh diff --git a/.claude/skills/update-catalog/SKILL.md b/.agents/skills/update-catalog/SKILL.md similarity index 98% rename from .claude/skills/update-catalog/SKILL.md rename to .agents/skills/update-catalog/SKILL.md index 60c987364..35b66b1e8 100644 --- a/.claude/skills/update-catalog/SKILL.md +++ b/.agents/skills/update-catalog/SKILL.md @@ -17,7 +17,7 @@ Regenerate the machine-readable Bactopia component index (`catalog.json`) and th 2. **Run the wrapper** to regenerate both files in one invocation: ``` - bash .claude/skills/update-catalog/scripts/run-bactopia-catalog.sh \ + bash .agents/skills/update-catalog/scripts/run-bactopia-catalog.sh \ --bactopia-path /home/rpetit3/repos/bactopia/bactopia \ --output /home/rpetit3/repos/bactopia/bactopia/catalog.json \ --pretty \ diff --git a/.claude/skills/update-catalog/scripts/run-bactopia-catalog.sh b/.agents/skills/update-catalog/scripts/run-bactopia-catalog.sh similarity index 76% rename from .claude/skills/update-catalog/scripts/run-bactopia-catalog.sh rename to .agents/skills/update-catalog/scripts/run-bactopia-catalog.sh index 7198d7cb0..28b0909ca 100755 --- a/.claude/skills/update-catalog/scripts/run-bactopia-catalog.sh +++ b/.agents/skills/update-catalog/scripts/run-bactopia-catalog.sh @@ -41,6 +41,19 @@ find_conda_env() { return 1 } +# Default --llms-output so llms.txt is always regenerated alongside catalog.json +# (bactopia-catalog only renders llms.txt when the flag is given). +if [[ " $* " != *" --llms-output "* ]]; then + llms_target="llms.txt" + prev="" + for arg in "$@"; do + case "$prev" in --bactopia-path) llms_target="$arg/llms.txt"; break ;; esac + case "$arg" in --bactopia-path=*) llms_target="${arg#*=}/llms.txt"; break ;; esac + prev="$arg" + done + set -- "$@" --llms-output "$llms_target" +fi + # 1. Check PATH if command -v bactopia-catalog &>/dev/null; then exec bactopia-catalog "$@" diff --git a/.agents/skills/update-datasets/SKILL.md b/.agents/skills/update-datasets/SKILL.md new file mode 100644 index 000000000..765db136b --- /dev/null +++ b/.agents/skills/update-datasets/SKILL.md @@ -0,0 +1,95 @@ +--- +name: update-datasets +description: Build and publish Bactopia's version-pinned datasets to Cloudflare R2. Currently implements the AMRFinder+ database. It verifies the amrfinderplus module is at the latest bioconda version, rebuilds amrfinderplus.tar.gz inside the module's pinned container, and (after confirmation) uploads it via rclone to datasets/v/amrfinderplus.tar.gz. Use when asked to update datasets, rebuild the amrfinderplus database, publish a dataset bundle, refresh the version-pinned datasets, or prepare datasets for a release. +--- + +# Update Datasets + +Build and publish Bactopia's **version-pinned** datasets to Cloudflare R2. + +`bactopia datasets` downloads bundles from `https://datasets.bactopia.com/datasets/`. +Most bundles are shared across releases, but a few are pinned to the pipeline +version. The only version-pinned dataset today is **AMRFinder+** +(`conf/params.config`: `amrfinderplus_url = ".../datasets/v${params.bactopia_version}/amrfinderplus.tar.gz"`), +so this skill implements that path concretely; the name stays generic for future +version-pinned datasets. + +The publish version is `versions.yml`'s `bactopia` value, and the R2 layout is +`datasets/v/amrfinderplus.tar.gz`. The tool version that **builds** the +database must equal the version the pipeline **pins** (an outdated binary can +produce a database the pinned binary cannot load), so the skill hard-gates on +the `amrfinderplus` module being current before building. This skill is the sole +owner of the build recipe — the old `modules/amrfinderplus/update/` module that +carried it was removed. + +## Steps + +1. **Currency gate (hard stop).** Confirm the module tool is the latest bioconda + release before building: + ``` + bash .agents/skills/update-module/scripts/run-bactopia-update.sh \ + --bactopia-path /home/rpetit3/repos/bactopia/bactopia --module amrfinderplus --json --silent + ``` + Parse the entry whose `tool == "ncbi-amrfinderplus"`. + - `needs_update == true` -> **STOP**. Tell the user to run `/update-module` + (bumps `modules/amrfinderplus/run/module.config`), then re-run this skill. + Do not build against a stale version. + - `latest_version == null` (API failure) -> **STOP** and report the failure. + - `needs_update == false` -> proceed. + +2. **Build.** Rebuild the database in the module's pinned container: + ``` + bash .agents/skills/update-datasets/scripts/build-amrfinderplus-db.sh \ + --bactopia-path /home/rpetit3/repos/bactopia/bactopia + ``` + Add `--runtime singularity` if the user asks or docker is unavailable. This + downloads the latest NCBI database and produces the tarball; expect it to take + several minutes and hundreds of MB. The script reads the container image from + `modules/amrfinderplus/run/module.config`, so version bumps flow automatically. + +3. **Report the build.** Show the script's summary fields (tarball path, sha256, + tool version, database version). Read the publish version: + ``` + awk '/^bactopia:/{print $2}' /home/rpetit3/repos/bactopia/bactopia/versions.yml + ``` + The R2 key is `datasets/v/amrfinderplus.tar.gz`. + +4. **Upload (gated behind explicit confirmation).** The rclone destination base + is `bactopia-r2:bactopia` (remote `bactopia-r2`, bucket `bactopia`); + `$BACTOPIA_R2_DEST` overrides it if set. The public URL + `https://datasets.bactopia.com/datasets/...` maps to + `bactopia-r2:bactopia/datasets/...`, so the full key is + `/datasets/v/amrfinderplus.tar.gz`. + - Verify reachability: `rclone lsd bactopia-r2:bactopia`. On failure, report + it and fall back to printing the manual command below — do not upload. + - Show the exact command and **ask for confirmation** before running it: + ``` + rclone copyto "" "bactopia-r2:bactopia/datasets/v/amrfinderplus.tar.gz" --s3-no-check-bucket --progress + ``` + - `--s3-no-check-bucket` is **required**: R2 API tokens cannot `CreateBucket`, + which rclone otherwise attempts before the first upload and fails with a + `403 AccessDenied`. The bucket already exists, so skip the check. + - Only on an explicit yes, run it. `copyto` overwrites an existing key, so + re-publishing a version is idempotent. + +5. **Verify publication.** After upload, confirm the public URL resolves: + ``` + curl -s -o /dev/null -w '%{http_code}' -I "https://datasets.bactopia.com/datasets/v/amrfinderplus.tar.gz" + ``` + `200` -> published (this is exactly `/release-checklist` check 15's sentinel). + Report the HTTP code. + +## Notes + +- The currency gate reuses `/update-module`'s `run-bactopia-update.sh`; the build + image is read from `modules/amrfinderplus/run/module.config`, so a version bump + there is picked up without editing this skill. +- **Generic by design:** to add a future version-pinned dataset, add a sibling + build script and a step block — the R2 layout, publish-version logic, and + upload gating are shared. + +### Sibling skills + +- `/update-module` — the currency gate's remediation (step 1). +- `/release-checklist` — check 15 probes this exact bundle and recommends this + skill when it 404s. diff --git a/.agents/skills/update-datasets/scripts/build-amrfinderplus-db.sh b/.agents/skills/update-datasets/scripts/build-amrfinderplus-db.sh new file mode 100755 index 000000000..e0dff5664 --- /dev/null +++ b/.agents/skills/update-datasets/scripts/build-amrfinderplus-db.sh @@ -0,0 +1,129 @@ +#!/usr/bin/env bash +set -euo pipefail + +# Build the AMRFinder+ database tarball inside the amrfinderplus module's pinned +# container. This script owns the build recipe formerly carried by the (now +# removed) modules/amrfinderplus/update/ Nextflow module. +# +# It reads the pinned container image + tool version from the run module's +# config (modules/amrfinderplus/run/module.config) so a tool version bump flows +# through automatically, then runs `amrfinder_update` in that container and +# packages the result as amrfinderplus.tar.gz. + +usage() { + cat >&2 <<'EOF' +Usage: build-amrfinderplus-db.sh --bactopia-path [--runtime docker|singularity] [--outdir ] + + --bactopia-path Path to the Bactopia repository (required). + --runtime Container runtime: docker (default) or singularity. + --outdir Output directory for the tarball + (default: /logs/dataset-builds/). +EOF + exit 1 +} + +BACTOPIA_PATH="" +RUNTIME="docker" +OUTDIR="" + +while [[ $# -gt 0 ]]; do + case "$1" in + --bactopia-path) BACTOPIA_PATH="${2:-}"; shift 2 ;; + --runtime) RUNTIME="${2:-}"; shift 2 ;; + --outdir) OUTDIR="${2:-}"; shift 2 ;; + -h|--help) usage ;; + *) echo "ERROR: unknown argument: $1" >&2; usage ;; + esac +done + +[[ -n "$BACTOPIA_PATH" ]] || { echo "ERROR: --bactopia-path is required" >&2; usage; } +[[ -d "$BACTOPIA_PATH" ]] || { echo "ERROR: bactopia path not found: $BACTOPIA_PATH" >&2; exit 1; } + +case "$RUNTIME" in + docker|singularity) ;; + *) echo "ERROR: --runtime must be 'docker' or 'singularity'" >&2; exit 1 ;; +esac + +MODULE_CONFIG="$BACTOPIA_PATH/modules/amrfinderplus/run/module.config" +[[ -f "$MODULE_CONFIG" ]] || { echo "ERROR: module.config not found: $MODULE_CONFIG" >&2; exit 1; } + +# Pinned images live in the run module's config (ext.docker / ext.image). +DOCKER_IMAGE=$(grep -oP 'ext\.docker\s*=\s*"\K[^"]+' "$MODULE_CONFIG" | head -1) +SING_IMAGE=$(grep -oP 'ext\.image\s*=\s*"\K[^"]+' "$MODULE_CONFIG" | head -1) +[[ -n "$DOCKER_IMAGE" ]] || { echo "ERROR: could not parse ext.docker from $MODULE_CONFIG" >&2; exit 1; } +[[ -n "$SING_IMAGE" ]] || { echo "ERROR: could not parse ext.image from $MODULE_CONFIG" >&2; exit 1; } + +# ext.docker is a bare Docker Hub-style repo (e.g. biocontainers/...); Nextflow +# prepends params.registry (default quay.io) at run time, so we do the same. If +# the image's first path segment already looks like a host (contains '.' or ':'), +# it is left untouched. +REGISTRY=$(grep -oP 'registry\s*=\s*"\K[^"]+' "$BACTOPIA_PATH/conf/params.config" | head -1) +REGISTRY="${REGISTRY:-quay.io}" +first_segment="${DOCKER_IMAGE%%/*}" +if [[ "$DOCKER_IMAGE" == "$first_segment" || ( "$first_segment" != *.* && "$first_segment" != *:* ) ]]; then + FULL_IMAGE="$REGISTRY/$DOCKER_IMAGE" +else + FULL_IMAGE="$DOCKER_IMAGE" +fi + +if [[ -z "$OUTDIR" ]]; then + TS=$(date +%Y%m%d_%H%M%S) + OUTDIR="$BACTOPIA_PATH/logs/dataset-builds/$TS" +fi +mkdir -p "$OUTDIR" +OUTDIR=$(cd "$OUTDIR" && pwd) + +# Recipe executed inside the container; /work is bound to $OUTDIR. Command +# substitutions ($()) are evaluated by the container's shell at runtime. +read -r -d '' BODY <<'EOF' || true +set -euo pipefail +cd /work +rm -rf amrfinderplus-temp amrfinderplus +mkdir -p amrfinderplus-temp +amrfinder_update -d amrfinderplus-temp +mv "amrfinderplus-temp/$(readlink amrfinderplus-temp/latest)" amrfinderplus/ +tar czvf amrfinderplus.tar.gz amrfinderplus/ +amrfinder --version > TOOL_VERSION +echo $(amrfinder --database amrfinderplus --database_version 2> /dev/null) | rev | cut -f1 -d' ' | rev > DB_VERSION +rm -rf amrfinderplus-temp amrfinderplus +EOF + +echo ">> Building AMRFinder+ database" >&2 +echo ">> runtime=$RUNTIME image=$FULL_IMAGE outdir=$OUTDIR" >&2 + +if [[ "$RUNTIME" == "docker" ]]; then + command -v docker >/dev/null 2>&1 || { echo "ERROR: docker not found" >&2; exit 1; } + docker run --rm --user "$(id -u):$(id -g)" \ + -v "$OUTDIR":/work -w /work "$FULL_IMAGE" \ + bash -c "$BODY" +else + RUNNER="" + if command -v apptainer >/dev/null 2>&1; then + RUNNER="apptainer" + elif command -v singularity >/dev/null 2>&1; then + RUNNER="singularity" + else + echo "ERROR: singularity/apptainer not found" >&2 + exit 1 + fi + # Reuse the same registry-qualified image via docker:// so both runtimes match. + "$RUNNER" exec --bind "$OUTDIR":/work "docker://$FULL_IMAGE" bash -c "$BODY" +fi + +TARBALL="$OUTDIR/amrfinderplus.tar.gz" +[[ -s "$TARBALL" ]] || { echo "ERROR: build produced no tarball at $TARBALL" >&2; exit 1; } + +SHA=$(sha256sum "$TARBALL" | cut -d' ' -f1) +TOOL_VERSION=$(cat "$OUTDIR/TOOL_VERSION" 2>/dev/null || echo "unknown") +DB_VERSION=$(cat "$OUTDIR/DB_VERSION" 2>/dev/null || echo "unknown") + +cat <` to the command. + Parse the JSON from that file. If the user specified a module name, add `--module ` to the command **and do not write the record** (a filtered run is not a full-repo check — only an unfiltered scan is a valid `/release-checklist` freshness record). `logs/` is gitignored, so the record is scratch, not a tracked file. 2. Parse the JSON output. Separate entries into three categories: - **Needs update** (`needs_update: true`): ready for automatic update diff --git a/.claude/skills/update-module/scripts/run-bactopia-update.sh b/.agents/skills/update-module/scripts/run-bactopia-update.sh similarity index 100% rename from .claude/skills/update-module/scripts/run-bactopia-update.sh rename to .agents/skills/update-module/scripts/run-bactopia-update.sh diff --git a/.claude/settings.json b/.claude/settings.json deleted file mode 100644 index 6868c497d..000000000 --- a/.claude/settings.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "permissions": { - "allow": [ - "Bash(nf-test *)", - "WebFetch(domain:www.nf-test.com)", - "Bash(xargs ls:*)" - ], - "additionalDirectories": [ - "/home/rpetit3/.claude/projects/-home-rpetit3-repos-bactopia-bactopia", - "/home/rpetit3/repos/bactopia/bactopia-py", - "/home/rpetit3/repos/bactopia/nf-bactopia", - "/home/rpetit3/repos/bactopia/bactopia.github.io" - ] - } -} diff --git a/.claude/skills b/.claude/skills new file mode 120000 index 000000000..2b7a412b8 --- /dev/null +++ b/.claude/skills @@ -0,0 +1 @@ +../.agents/skills \ No newline at end of file diff --git a/.claude/skills/review-tests/SKILL.md b/.claude/skills/review-tests/SKILL.md deleted file mode 100644 index d65bcd8f7..000000000 --- a/.claude/skills/review-tests/SKILL.md +++ /dev/null @@ -1,124 +0,0 @@ ---- -name: review-tests -description: Review nf-test run results and present a diagnostic summary with grouped error analysis. Use when asked to review tests, check test results, show test failures, analyze test output, investigate why tests failed, see what's broken, or check test status. Accepts an optional timestamp argument to review a specific run. ---- - -# Review Tests - -Run the review-tests CLI and present the results to the user. - -## Steps - -1. Run `bactopia-review-tests` via the wrapper script using the **default text output** - (do NOT use `--json`): - ``` - bash .claude/skills/review-tests/scripts/run-bactopia-review-tests.sh --bactopia-path /home/rpetit3/repos/bactopia/bactopia --silent - ``` - If the user provided a timestamp argument (e.g., `/review-tests 20260324_081306`), - add `--run 20260324_081306`. - -2. Present the text output directly to the user. The CLI already produces a clean, - well-formatted summary with tables. Do NOT parse JSON or write extra code to - reformat -- just relay the output with your interpretation. - -3. Add interpretation and context after showing the output: - - For **assertion_failure** results, check the run parameters shown in the output: - - If `generate` was **true**: snapshots were regenerated and the test was run a - second time against them. These are **real failures** -- the workflow output - does not match its own freshly-generated snapshot, meaning the output is - non-deterministic or the test assertions are wrong. Flag these as needing - investigation, NOT snapshot regeneration. - - If `generate` was **false** (or not shown): snapshots may be stale. - Note these likely need snapshot regeneration or investigation. - - For **undeclared_outputs** results: these are files the tool produced in its - work directory that are NOT declared in the module's `results`, `logs`, - `versions`, or `nf_logs` output fields. Present each affected module with - its undeclared file list (from the `.outputs.txt` log file). For each file, - help the user decide: - - **Add to `results`**: if the file is a real tool output users would want - (e.g., a report, summary, or data file) - - **Add to `logs`**: if the file is stderr/stdout from the tool itself - - **Add to `.outputs-ignore`**: if the file is a staging artifact, - intermediate, version-info side effect, or database file that should - not be published - The `.outputs-ignore` file lives at `modules/{name}/tests/.outputs-ignore` - with one glob pattern per line (`#` comments, blank lines allowed). - The `staging/**` directory is already ignored by default. - - For **suspiciously fast tests**: note these likely exited early without running. - - Summarize actionable items and suggested next steps. - -4. If the text output is too large for a single response, summarize the key sections - (overview, status breakdown, failures) and note that timing details are available - on request. Use `--json` only as a fallback if the text output cannot be displayed. - -## Progressive Disclosure - -The initial summary should be compact and scannable. When the user asks for deeper detail: - -- **Specific component**: Read its stdout file at - `logs/{timestamp}/{tier}/{component}.stdout.txt` using the Read tool -- **Undeclared outputs**: Read the component's `.outputs.txt` file at - `logs/{timestamp}/{tier}/{component}.outputs.txt` for the full file list. - Then read the module's `main.nf` to see the current `results` and `logs` - fields and advise where each undeclared file should go. -- **Abort errors**: Read the nextflow.log for the component - (focus on ERROR/WARN lines and last 50 lines). - To find the log path, re-run with `--json` and check the `nextflow_log` field, - or look in `logs/{timestamp}/{tier}/{component}.stdout.txt` for the path. -- **Assertion details**: Read the stdout file and look for specific assertion - mismatch information - -Do NOT read nextflow.log or stdout files during the initial summary. - -## Important Reminders - -- CRITICAL: NEVER suggest "rerun with --update-snapshots" for non_reproducible - failures -- that does NOT fix the root cause -- When `params.generate` is true, NEVER suggest snapshot regeneration for - assertion failures -- snapshots were already regenerated during this run. - These represent non-deterministic output or incorrect test assertions. -- Always read `.stdout.txt` files for diagnostics, NOT `.stderr.txt` -- The `logs/{timestamp}/` directory contains tier subdirectories based on what - was tested -- not all tiers are present in every run -- The `.nf-test/` work directories under component test dirs only exist for - failed tests (including `undeclared_outputs` failures -- preserved for review) -- If the user asks about a specific component, offer to read its stdout file - in full and check for nextflow.log - -## Updating Baselines - -Baselines file: `conf/test-times.json` - -To update baselines after a clean all-pass run, add `--update-baselines`: -``` -bash .claude/skills/review-tests/scripts/run-bactopia-review-tests.sh --bactopia-path /home/rpetit3/repos/bactopia/bactopia --silent --update-baselines -``` -This writes actual runtimes from the current run into the baselines file and updates the -`_meta.updated` timestamp. Only entries for tested components are updated; other tiers -are left unchanged. - -After updating, re-run without `--update-baselines` to confirm anomalies are resolved. - -## Interpreting Timing Anomalies - -- **generate=true vs generate=false**: A `generate=true` run executes tests twice - (generate snapshots, then test against them). If baselines were recorded from a - `generate=true` run but the current run uses `generate=false`, tests will run at - ~0.5x baseline. This is expected, not suspicious. -- **Slow tests**: May reflect newly added test cases rather than regressions. Check - recent commits to the component's test file before flagging as a problem. -- **Only flag anomalies as concerning** when the `generate` parameter matches between - the baseline run and the current run. - -## Self-Improvement - -If you find yourself writing ad-hoc Python or bash to parse, explore, or extract data -from the CLI output, that logic should be added to this skill or the underlying -`bactopia-review-tests` CLI tool instead. Update the skill so future sessions don't -need to reinvent it. - -## JSON Output (Fallback) - -The `--json` flag is available as a fallback for programmatic access or when the -text output is too large. Use it with `--pretty` for readable JSON. See -`bactopia-review-tests --help` for details on JSON fields. diff --git a/.github/workflows/conda-build-manual.yml b/.github/workflows/conda-build-manual.yml index bf127d82d..bab8bd2ec 100644 --- a/.github/workflows/conda-build-manual.yml +++ b/.github/workflows/conda-build-manual.yml @@ -16,7 +16,7 @@ jobs: ref: dev - name: Setup Miniforge - uses: conda-incubator/setup-miniconda@v3 + uses: conda-incubator/setup-miniconda@v4 with: activate-environment: anaconda-client-env conda-remove-defaults: "true" @@ -26,7 +26,7 @@ jobs: run: | # Start build conda install -c conda-forge -c bioconda anaconda-client conda-build conda-verify - cd data/conda/ && conda build -c conda-forge -c bioconda --output-folder . . + cd data/conda/ && conda-build -c conda-forge -c bioconda --output-folder . . anaconda upload --force ./noarch/*.conda env: ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }} diff --git a/.gitignore b/.gitignore index 1f43a3057..0ab731365 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,7 @@ trace.txt* **/.nf-test/* **/.nf-test-*.nf logs/ +WATCHDOG.yml # Conda Build data/conda/channeldata.json @@ -25,9 +26,8 @@ data/conda/index.html data/conda/linux-64/ data/conda/noarch/ -# Claude -.claude/plans/ -.claude/handoffs/ +# Agent skill workspaces +.agents/skills/*-workspace/ # temp v4 folders old-bactopia/ diff --git a/.vscode/settings.json b/.vscode/settings.json index af2a622bd..4ee806fb6 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -52,6 +52,7 @@ "ariba", "Arkin", "Armbrust", + "aspera", "Astashyn", "Avagyan", "awsbatch", @@ -91,11 +92,13 @@ "Binations", "bioconda", "biocontainers", + "bioinformatic", "bioinformatics", "bionj", "bioperl", "Biosequence", "Biotechnol", + "biotools", "Birney", "bitscore", "blastdb", @@ -127,6 +130,7 @@ "btype", "BTYPER", "Buchfink", + "Burnedead's", "busco", "Busó", "bwaopt", @@ -184,6 +188,7 @@ "contigs", "contree", "Corander", + "coreutils", "Cosentino", "Coulouris", "cpus", @@ -311,9 +316,11 @@ "genegaps", "genepred", "Genom", + "genomedl", "genomesize", "genotyphi", "genotyping", + "genpept", "Gerken", "getenv", "getref", @@ -336,6 +343,7 @@ "Grabysz", "Griffiths", "Griswold", + "groovydoc", "Gruber", "gsize", "gtdb", @@ -430,6 +438,7 @@ "Kaufmann", "Kaur", "Keane", + "keepfiles", "KEGG", "Kempf", "Kimelman", @@ -482,6 +491,7 @@ "lipopolysaccharide", "lissero", "Litt", + "llms", "locustag", "Lohse", "lowmem", @@ -496,6 +506,7 @@ "Maguire", "Mahé", "makeblastdb", + "makedb", "Mallonee", "mambaforge", "Manni", @@ -504,6 +515,7 @@ "Marth", "mashdist", "mashtree", + "maskmiddle", "maskrc", "Masterson", "Mathys", @@ -511,6 +523,7 @@ "maxcor", "maxhap", "maxlcummins", + "maxlength", "maxsoft", "mccortex", "mcroni", @@ -532,6 +545,7 @@ "metagenomes", "metagenomic", "metagenomics", + "Metamorph", "methicillin", "Microb", "Microbiol", @@ -545,10 +559,13 @@ "miniasm", "minid", "Miniforge", + "minlen", "minlength", "Minm", "minmer", "minqual", + "minquality", + "minreadlen", "minscore", "Miroshnichenko", "misassembly", @@ -599,6 +616,7 @@ "nfconfig", "nfcore", "nfdir", + "nftest", "nftignore", "ngmaster", "NHBA", @@ -620,21 +638,27 @@ "nonprophage", "nopath", "noplus", + "nopolish", + "noreadcorr", "noreorient", "nosetests", + "nostitch", "Notredame", "nthi", "ntmax", "nucl", "nucmer", + "nullifybrokenquality", "numcpus", "Nurk", "Ohan", "Oloni", "Ondov", "opcov", + "openpyxl", "opid", "Oppong", + "orcid", "ords", "ortholog", "orthologous", @@ -701,6 +725,7 @@ "pneumocat", "pneumoniae", "pneumophila", + "polypolish", "pora", "porb", "porechop", @@ -862,6 +887,7 @@ "skesa", "sketchsize", "Slotta", + "SLURM", "SNPDISTS", "snpeff", "snpsites", @@ -887,6 +913,7 @@ "Standley", "staphopia", "staphopiasccmec", + "staphscan", "staphtyper", "Starrett", "STEC", @@ -898,6 +925,8 @@ "stutzeri", "Stutzerimonas", "subdir", + "subsampled", + "subsamples", "subsampling", "Subtyping", "Subworkflow", @@ -936,6 +965,7 @@ "Tomita", "Tommaso", "Tonder", + "tossbrokenreads", "tossjunk", "Touchon", "Traitar", diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 000000000..de32a4ee8 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,131 @@ +# Bactopia Pipeline Reference for AI Agents + +This document serves as the AI Context Master Map for the Bactopia pipeline, following the [agents.md](https://agents.md/) convention. It provides entry points to modular documentation for understanding the codebase structure, patterns, and conventions. + +## Project Overview + +Bactopia is a flexible pipeline for bacterial genome analysis. It follows a three-tier architecture: +- **Workflows** (Tier 1): User-facing entry points +- **Subworkflows** (Tier 2): Reusable orchestration components +- **Modules** (Tier 3): Individual tool implementations + +The pipeline uses standardized GroovyDoc documentation and static typing throughout all components. + +## Documentation Index + +### Standards and Conventions +- **[Style Guide & Templates](.agents/docs/standards/01-style-guide.md)** + - *Read this for*: GroovyDoc templates, header format, and tag ordering + - Visual formatting rules for all component types + +- **[Logic & Taxonomy](.agents/docs/standards/02-logic-rules.md)** + - *Read this for*: Determining complexity, input/output types + - Decision-making logic for component classification + +- **[Technical Specifications](.agents/docs/standards/03-technical-specs.md)** + - *Read this for*: Variable naming, type conventions, Path? optional inputs + - Implementation details and conventions + +- **[Subworkflow Documentation](.agents/docs/standards/04-subworkflow-documentation.md)** + - *Read this for*: Complete methodology for documenting subworkflows + - Step-by-step process with examples and best practices + +- **[Module Documentation](.agents/docs/standards/05-module-documentation.md)** + - *Read this for*: Complete methodology for documenting modules + - Detailed patterns and examples for individual tool implementations + +- **[Workflow Documentation](.agents/docs/standards/06-workflow-documentation.md)** + - *Read this for*: Complete methodology for documenting entry workflows + - User-facing documentation patterns with @publish and @section organization + +- **[Tier Architecture](.agents/docs/standards/07-tier-architecture.md)** + - *Read this for*: Formalized rules for workflows, subworkflows, and modules + - Tier responsibilities, allowed operations, plugin functions, ext system, catalog.json + +### Project Documentation +- **[Repository Structure](.agents/docs/project/01-repository-structure.md)** + - *Read this for*: Directory organization and three-tier architecture + - Physical layout of the codebase + +- **[Development Workflow](.agents/docs/project/02-development-workflow.md)** + - *Read this for*: Adding new tools and components + - Step-by-step development guide with checklist + +- **[Configuration System](.agents/docs/project/03-configuration-system.md)** + - *Read this for*: Understanding parameter hierarchy + - Configuration inheritance and profile management + +- **[Testing Framework](.agents/docs/project/04-testing-framework.md)** + - *Read this for*: Writing and running tests + - nf-test framework usage and patterns + +### Reference Materials +- **[Examples](.agents/docs/reference/01-examples.md)** + - *Read this for*: Concrete implementation examples + - Annotated examples of modules, subworkflows, and workflows + +- **[Troubleshooting](.agents/docs/reference/02-troubleshooting.md)** + - *Read this for*: Common error solutions + - Debugging tips and problem resolution + +- **[Glossary](.agents/docs/reference/03-glossary.md)** + - *Read this for*: Definitions of Bactopia-specific terms + - Quick reference for terminology and concepts + +- **[Plugin Functions](.agents/docs/reference/04-plugin-functions.md)** + - *Read this for*: Understanding `gather()` and `flattenPaths()` functions + - Channel manipulation utilities from nf-bactopia plugin + +- **[task.ext Properties](.agents/docs/reference/05-task-ext-properties.md)** + - *Read this for*: Configuring module behavior via task.ext + - Complete reference for all task.ext properties used in module.config files + +- **[Skills](.agents/docs/reference/06-skills.md)** + - *Read this for*: project-local skill inventory and when to invoke `skill-creator` + - Catalog of AI tooling built on top of `bactopia-*` CLIs + +## AI Agent Instructions + +When working with this codebase: + +1. **Read this Master Map first** to understand the structure +2. **Load only modules relevant to your current task** to maintain context efficiency +3. **For documenting modules**: Read [.agents/docs/standards/05-module-documentation.md](.agents/docs/standards/05-module-documentation.md) for complete methodology and examples +4. **For documenting subworkflows**: Read [.agents/docs/standards/04-subworkflow-documentation.md](.agents/docs/standards/04-subworkflow-documentation.md) for complete methodology and examples +5. **Always check** [.agents/docs/standards/03-technical-specs.md](.agents/docs/standards/03-technical-specs.md) for variable naming and technical conventions +6. **Always use the `bactopia-dev` conda env for all project tooling** — `ruff`, `bactopia-*` CLIs (`bactopia-lint`, `bactopia-test`, `bactopia-merge-schemas`, `bactopia-catalog`, `bactopia-citations`), and `nf-test`. Invoke via `conda run -n bactopia-dev ` (or activate the env first). Never report a check as SKIP because a tool is "not on PATH" without trying this env. + +## Quick Reference + +### Common Tasks + +**Adding a new tool**: +1. Read [Development Workflow](.agents/docs/project/02-development-workflow.md) +2. Follow the step-by-step guide +3. Use templates from [Module Documentation](.agents/docs/standards/05-module-documentation.md) + +**Debugging type errors**: +1. Check [Technical Specifications](.agents/docs/standards/03-technical-specs.md) +2. Review [Troubleshooting](.agents/docs/reference/02-troubleshooting.md) +3. Look for Path? optional input patterns + +**Understanding architecture**: +1. Start with [Repository Structure](.agents/docs/project/01-repository-structure.md) +2. Review three-tier architecture +3. Study [Examples](.agents/docs/reference/01-examples.md) + +**Creating or editing a skill**: +1. Use the `skill-creator` skill — do not hand-scaffold `SKILL.md` files +2. See [Skills](.agents/docs/reference/06-skills.md) for the project's skill conventions and inventory + +### Key Patterns + +**Module inputs**: Record-typed with named parameters (e.g., `record(meta: Record, fna: Path)`) +**Module outputs**: Single `record()` with named fields (downstream) + generic fields (publishing) +**Subworkflow outputs**: Emit `sample_outputs` (module record passthrough) and `run_outputs` (aggregated) +**Optional parameters**: Use `Path?` types with `?` suffix in GroovyDoc + +### Important Reminders +- **Use `file()` for single files, `files()` for multiple** +- **Follow existing patterns** - Don't reinvent unless necessary +- **Always use 4 spaces for indentation** in all code blocks and lists, with the exception of YAML files which use 2 spaces diff --git a/CHANGELOG.md b/CHANGELOG.md index 00ca6ceee..ad891d1b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,89 @@ sidebar_position: 5000 # Changelog +## v4.1.0 bactopia/bactopia "Cheyenne Frontier Days" 2026/08/05 + + +_"[Cheyenne Frontier Days (CFD)](https://cfdrodeo.com/)" ten days of rodeos, music, and carnival rides_ + +### `Added` + +- Bactopia Tools (`bactopia --wf `) + - `staphscan` - Genome-based surveillance analysis of _Staphylococcus aureus_ + - `traitar` - Predict phenotypic traits from microbial genomes +- New Skills + - `/update-datasets` to rebuild and publish version-pinned datasets +- Added StaphSCAN to the Staphtyper and Merlin subworkflows +- Deacon as the default host read scrubber (replaces nohuman as default) +- Deacon subworkflow orchestrating deacon/fetch and deacon/filter modules +- Three-way scrubber selection: deacon (default), nohuman (`--use_nohuman`), SRA Human Scrubber (`--use_srascrubber`) +- `genomedl` module and subworkflow - download assemblies from NCBI Datasets with `genome-dl` + - resolves version-less accessions to the latest assembly version + - subsamples `--species` downloads with `--limit` instead of `shuf | head` + - `--limit` defaults to 100 to prevent downloading 50k+ genomes (`--limit 0` for no limit) + - subworkflow emits `assemblies` from the named `fna` field, and `reference` from `gbff` +- Bump internal bactopia-* pipeline tool versions + - `bactopia-gather`: 1.0.5 -> 1.2.0 +- bump program versions in modules + - `abritamr`: 1.2.0 -> 1.3.0 + - `busco`: 6.0.0 -> 6.1.0 + - `defense-finder`: 2.0.1 -> 3.0.0 + - `eggnog-mapper`: 2.1.13 -> 2.1.15 + - `gtdbtk`: 2.7.1 -> 2.7.2 + - `iqtree`: 3.1.1 -> 3.1.3 + - `mash`: 2.3--hb105d93_10 -> 2.3--hf85e966_11 + - `mlst`: 2.33.1 -> 2.35.0 + - `ngmaster`: 2.0.0 -> 2.1.0 + - `panaroo`: 1.6.0 -> 1.8.0 + - `phispy`: 5.0.6 -> 5.0.10 + - `rgi`: 6.0.5 -> 6.0.8 + - `staphscan`: 0.3.1 -> 0.4.1 + +### `Changed` + +- Updated bactopia-teton meta-package from 1.1.3 to 1.1.4 (includes deacon) +- Bumped required `bactopia-py` to `>=2.3.0` (conda `meta.yaml`) +- `bactopia gather` now downloads assemblies with `genome-dl` instead of `ncbi-genome-download` + - `--no_cache` is no longer available (`ncbi-genome-download` specific param) +- `fastani`, `mashtree`, `pangenome` and `snippy` Bactopia Tools now download genomes with + `genomedl` instead of `ncbigenomedownload` + - `--kingdom` and `--keep_downloads` are no longer available to these tools + - `--limit` now defaults to 100 for `--species` (previously unlimited) + - `snippy --accession` requires `--format genbank` for an annotated reference +- Deacon modules now use bactopia-teton container instead of standalone deacon container +- Teton and scrubber workflows default to deacon instead of nohuman for host read removal +- cleanyerreads workflow supports `--use_deacon` flag for host read removal +- Added `params.bactopia_dir` (repo root) so `data/` can be referenced by all workflows +- Centralized configuration for module/subworkflow tests into `conf/test_base.config` +- Transitioned LLM context to be provider agnostic + - `CLAUDE.md` is now `AGENTS.md` following agents.md standard + - `.claude/docs` and `.claude/skills` moved to `.agents/docs` + `.agents/skills` + - Preserved Claude Code compatibility via `CLAUDE.md` shim and symlinks in `.claude/skills` + - `llms.txt` and `catalog.json` updated with latest changes + +### `Fixed` + +- float parameters being interpreted as strings in CLI +- `--prokka_proteins` not being found in non-Bactopia workflows +- `--fastani_skip_pairwise` parameter that does not exist +- `mlst` and `amrfinderplus` Bactopia Tools failing with `ERROR ~ Path string cannot be empty` +- `mlst` Bactopia Tool not falling back on bactopia/datasets +- `mobsuite` failing on any sample without plasmids due to compressing non-existent files +- removed unused `amrfinderplus/update` module +- `rgi` failing with `unrecognized arguments: --num_threads` (renamed to `--threads`) +- `rgi_exclude_nudge` replaced with `rgi_include_nudge` +- `bactopia datasets` tests requesting a version-pinned `mlst.tar.gz` (404) +- `gubbins` failing under Singularity/Apptainer when Numba tried to write to read-only container ([#667](https://github.com/bactopia/bactopia/issues/667)) (@pvanheus) +- `agrvate`, `gamma`, and `traitar` modules failing under Conda with `cp: '...' are the same file` +- Conda errors due to loose pinnings + - `ariba`, `ismapper`, `mykrobe`, `shigeifinder`, `sistr` - `setuptools=80` (`pkg_resources` removed in setuptools 81) + - `clonalframeml` (maskrc-svg) - `python=3.12` (stdlib `cgi` removed in Python 3.13) + - `hicap` - `biopython=1.79` (`SeqFeature.strand` removed in Biopython 1.80) + - `mcroni` - `numpy=2.0` (`reshape(newshape=)` removed in NumPy 2.1) + - `clermontyping` - `r-readr=2.1` (`quoted_na` promoted to a hard error) + - `snippy` (bactopia-variants) - `htslib=1.14` (bcftools 1.14/htslib 1.21 ABI mismatch segfaulted `bcftools consensus`) +- added sample samples to ariba outputs + ## v4.0.0 bactopia/bactopia "Cream Puff" 2026/04/29 diff --git a/CITATION.cff b/CITATION.cff index f0c2c7b81..f2c147a12 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -10,4 +10,4 @@ authors: title: "Bactopia: a Flexible Pipeline for Complete Analysis of Bacterial Genomes. mSystems. 5 (2020)" doi: 10.1128/mSystems.00190-20 url: "https://github.com/bactopia/bactopia" -version: 4.0.0 +version: 4.1.0 diff --git a/CLAUDE.md b/CLAUDE.md index 956faea20..43c994c2d 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,130 +1 @@ -# Bactopia Pipeline Reference for Claude - -This document serves as the AI Context Master Map for the Bactopia pipeline. It provides entry points to modular documentation for understanding the codebase structure, patterns, and conventions. - -## Project Overview - -Bactopia is a flexible pipeline for bacterial genome analysis. It follows a three-tier architecture: -- **Workflows** (Tier 1): User-facing entry points -- **Subworkflows** (Tier 2): Reusable orchestration components -- **Modules** (Tier 3): Individual tool implementations - -The pipeline uses standardized GroovyDoc documentation and static typing throughout all components. - -## Documentation Index - -### Standards and Conventions -- **[Style Guide & Templates](.claude/docs/standards/01-style-guide.md)** - - *Read this for*: GroovyDoc templates, header format, and tag ordering - - Visual formatting rules for all component types - -- **[Logic & Taxonomy](.claude/docs/standards/02-logic-rules.md)** - - *Read this for*: Determining complexity, input/output types - - Decision-making logic for component classification - -- **[Technical Specifications](.claude/docs/standards/03-technical-specs.md)** - - *Read this for*: Variable naming, type conventions, Path? optional inputs - - Implementation details and conventions - -- **[Subworkflow Documentation](.claude/docs/standards/04-subworkflow-documentation.md)** - - *Read this for*: Complete methodology for documenting subworkflows - - Step-by-step process with examples and best practices - -- **[Module Documentation](.claude/docs/standards/05-module-documentation.md)** - - *Read this for*: Complete methodology for documenting modules - - Detailed patterns and examples for individual tool implementations - -- **[Workflow Documentation](.claude/docs/standards/06-workflow-documentation.md)** - - *Read this for*: Complete methodology for documenting entry workflows - - User-facing documentation patterns with @publish and @section organization - -- **[Tier Architecture](.claude/docs/standards/07-tier-architecture.md)** - - *Read this for*: Formalized rules for workflows, subworkflows, and modules - - Tier responsibilities, allowed operations, plugin functions, ext system, catalog.json - -### Project Documentation -- **[Repository Structure](.claude/docs/project/01-repository-structure.md)** - - *Read this for*: Directory organization and three-tier architecture - - Physical layout of the codebase - -- **[Development Workflow](.claude/docs/project/02-development-workflow.md)** - - *Read this for*: Adding new tools and components - - Step-by-step development guide with checklist - -- **[Configuration System](.claude/docs/project/03-configuration-system.md)** - - *Read this for*: Understanding parameter hierarchy - - Configuration inheritance and profile management - -- **[Testing Framework](.claude/docs/project/04-testing-framework.md)** - - *Read this for*: Writing and running tests - - nf-test framework usage and patterns - -### Reference Materials -- **[Examples](.claude/docs/reference/01-examples.md)** - - *Read this for*: Concrete implementation examples - - Annotated examples of modules, subworkflows, and workflows - -- **[Troubleshooting](.claude/docs/reference/02-troubleshooting.md)** - - *Read this for*: Common error solutions - - Debugging tips and problem resolution - -- **[Glossary](.claude/docs/reference/03-glossary.md)** - - *Read this for*: Definitions of Bactopia-specific terms - - Quick reference for terminology and concepts - -- **[Plugin Functions](.claude/docs/reference/04-plugin-functions.md)** - - *Read this for*: Understanding `gather()` and `flattenPaths()` functions - - Channel manipulation utilities from nf-bactopia plugin - -- **[task.ext Properties](.claude/docs/reference/05-task-ext-properties.md)** - - *Read this for*: Configuring module behavior via task.ext - - Complete reference for all task.ext properties used in module.config files - -- **[Skills](.claude/docs/reference/06-skills.md)** - - *Read this for*: project-local skill inventory and when to invoke `skill-creator` - - Catalog of AI tooling built on top of `bactopia-*` CLIs - -## AI Agent Instructions - -When working with this codebase: - -1. **Read this Master Map first** to understand the structure -2. **Load only modules relevant to your current task** to maintain context efficiency -3. **For documenting modules**: Read [.claude/docs/standards/05-module-documentation.md](.claude/docs/standards/05-module-documentation.md) for complete methodology and examples -4. **For documenting subworkflows**: Read [.claude/docs/standards/04-subworkflow-documentation.md](.claude/docs/standards/04-subworkflow-documentation.md) for complete methodology and examples -5. **Always check** [.claude/docs/standards/03-technical-specs.md](.claude/docs/standards/03-technical-specs.md) for variable naming and technical conventions - -## Quick Reference - -### Common Tasks - -**Adding a new tool**: -1. Read [Development Workflow](.claude/docs/project/02-development-workflow.md) -2. Follow the step-by-step guide -3. Use templates from [Module Documentation](.claude/docs/standards/05-module-documentation.md) - -**Debugging type errors**: -1. Check [Technical Specifications](.claude/docs/standards/03-technical-specs.md) -2. Review [Troubleshooting](.claude/docs/reference/02-troubleshooting.md) -3. Look for Path? optional input patterns - -**Understanding architecture**: -1. Start with [Repository Structure](.claude/docs/project/01-repository-structure.md) -2. Review three-tier architecture -3. Study [Examples](.claude/docs/reference/01-examples.md) - -**Creating or editing a skill**: -1. Use the `skill-creator` skill — do not hand-scaffold `SKILL.md` files -2. See [Skills](.claude/docs/reference/06-skills.md) for the project's skill conventions and inventory - -### Key Patterns - -**Module inputs**: Record-typed with named parameters (e.g., `record(meta: Record, fna: Path)`) -**Module outputs**: Single `record()` with named fields (downstream) + generic fields (publishing) -**Subworkflow outputs**: Emit `sample_outputs` (module record passthrough) and `run_outputs` (aggregated) -**Optional parameters**: Use `Path?` types with `?` suffix in GroovyDoc - -### Important Reminders -- **Use `file()` for single files, `files()` for multiple** -- **Follow existing patterns** - Don't reinvent unless necessary -- **Always use 4 spaces for indentation** in all code blocks and lists, with the exception of YAML files which use 2 spaces +@AGENTS.md diff --git a/bin/bactopia b/bin/bactopia index dff17ac73..7b7a7010c 100755 --- a/bin/bactopia +++ b/bin/bactopia @@ -1,5 +1,5 @@ #!/usr/bin/env bash -VERSION=4.0.0 +VERSION=4.1.0 CONDA_ENV=$(which bactopia | sed 's=bin/bactopia==') BACTOPIA_NF="${CONDA_ENV}/share/bactopia-${VERSION}" diff --git a/catalog.json b/catalog.json index 12fdbdcfb..0becbb436 100644 --- a/catalog.json +++ b/catalog.json @@ -1,9 +1,9 @@ { "version": "1.0", - "generated": "2026-04-29T11:30:57Z", - "bactopia_version": "4.0.0", - "bactopia_py_version": "2.1.2", - "nf_bactopia_version": "2.1.0", + "generated": "2026-08-05T02:01:25Z", + "bactopia_version": "4.1.0", + "bactopia_py_version": "2.4.2", + "nf_bactopia_version": "2.1.7", "modules": { "abricate_run": { "description": "Mass screening of contigs for antimicrobial and virulence genes.", @@ -60,7 +60,7 @@ "process_name": "abritamr", "tool": { "name": "abritamr", - "version": "1.2.0" + "version": "1.3.0" }, "takes": [ "fna" @@ -141,31 +141,6 @@ ] } }, - "amrfinderplus_update": { - "description": "Download and index the latest AMRFinder+ database.", - "path": "modules/amrfinderplus/update/", - "scope": "sample", - "process_name": "amrfinderplus_update", - "tool": { - "name": "ncbi-amrfinderplus", - "version": "4.2.7" - }, - "emits": [ - "db" - ], - "tags": { - "complexity": "simple", - "input_type": "none", - "output_type": "single", - "features": [ - "internet-access", - "archive-output", - "compression", - "database-dependent", - "no-test" - ] - } - }, "ariba_getref": { "description": "Download and prepare reference databases for ARIBA analysis.", "path": "modules/ariba/getref/", @@ -299,7 +274,7 @@ "process_name": "gather", "tool": { "name": "bactopia-gather", - "version": "1.0.5" + "version": "1.2.0" }, "takes": [ "r1_files", @@ -423,7 +398,7 @@ "process_name": "teton-prepare", "tool": { "name": "bactopia-teton", - "version": "1.1.3" + "version": "1.1.4" }, "takes": [ "classification" @@ -634,7 +609,7 @@ "process_name": "bracken", "tool": { "name": "bactopia-teton", - "version": "1.1.3" + "version": "1.1.4" }, "takes": [ "r1", @@ -708,7 +683,7 @@ "process_name": "busco", "tool": { "name": "busco", - "version": "6.0.0" + "version": "6.1.0" }, "takes": [ "fna" @@ -905,6 +880,96 @@ ] } }, + "deacon_fetch": { + "description": "Fetch a pre-built deacon index for host read filtering.", + "path": "modules/deacon/fetch/", + "scope": "run", + "process_name": "deacon_fetch", + "tool": { + "name": "bactopia-teton", + "version": "1.1.4" + }, + "emits": [ + "db" + ], + "tags": { + "complexity": "simple", + "input_type": "none", + "output_type": "single", + "features": [ + "internet-access", + "resource-download", + "no-test" + ] + } + }, + "deacon_filter": { + "description": "Filter host reads from sequencing data using minimizer-based comparison.", + "path": "modules/deacon/filter/", + "scope": "sample", + "process_name": "deacon", + "tool": { + "name": "bactopia-teton", + "version": "1.1.4" + }, + "takes": [ + "r1", + "r2", + "se", + "lr" + ], + "takes_optional": [ + "r1", + "r2", + "se", + "lr" + ], + "emits": [ + "special_meta", + "r1", + "r2", + "se", + "lr", + "scrub_report", + "json_summary" + ], + "emits_optional": [ + "r1", + "r2", + "se", + "lr" + ], + "tags": { + "complexity": "moderate", + "input_type": "single", + "output_type": "multiple", + "features": [ + "database-dependent", + "conditional-logic" + ] + } + }, + "deacon_index": { + "description": "Build a deacon minimizer index from a FASTA reference genome.", + "path": "modules/deacon/index/", + "scope": "run", + "process_name": "deacon_index", + "tool": { + "name": "bactopia-teton", + "version": "1.1.4" + }, + "emits": [ + "db" + ], + "tags": { + "complexity": "simple", + "input_type": "single", + "output_type": "single", + "features": [ + "no-test" + ] + } + }, "defensefinder_run": { "description": "Detect anti-phage defense systems using HMM profiles.", "path": "modules/defensefinder/run/", @@ -912,7 +977,7 @@ "process_name": "defensefinder", "tool": { "name": "defense-finder", - "version": "2.0.1" + "version": "3.0.0" }, "takes": [ "faa" @@ -947,7 +1012,7 @@ "process_name": "defensefinder", "tool": { "name": "defense-finder", - "version": "2.0.1" + "version": "3.0.0" }, "emits": [ "db" @@ -996,7 +1061,7 @@ "process_name": "eggnog", "tool": { "name": "eggnog-mapper", - "version": "2.1.13" + "version": "2.1.15" }, "emits": [ "db", @@ -1020,7 +1085,7 @@ "process_name": "eggnog", "tool": { "name": "eggnog-mapper", - "version": "2.1.13" + "version": "2.1.15" }, "takes": [ "faa" @@ -1136,6 +1201,62 @@ ] } }, + "genomedl": { + "description": "Download genome assemblies and annotation files from NCBI Datasets.", + "path": "modules/genomedl/", + "scope": "run", + "process_name": "genomedl", + "tool": { + "name": "genome-dl", + "version": "1.0.0" + }, + "emits": [ + "fna", + "gbff", + "wgs_gbk", + "gff", + "gtf", + "faa", + "gpff", + "cds", + "translated_cds", + "rna", + "features", + "report", + "stats", + "metadata", + "summary", + "json" + ], + "emits_optional": [ + "fna", + "gbff", + "wgs_gbk", + "gff", + "gtf", + "faa", + "gpff", + "cds", + "translated_cds", + "rna", + "features", + "report", + "stats", + "metadata", + "summary", + "json" + ], + "tags": { + "complexity": "moderate", + "input_type": "single", + "output_type": "multiple", + "features": [ + "internet-access", + "resource-download", + "conditional-logic" + ] + } + }, "genotyphi_parse": { "description": "Parse Mykrobe results to genotype *Salmonella* Typhi.", "path": "modules/genotyphi/parse/", @@ -1189,7 +1310,7 @@ "process_name": "gtdb", "tool": { "name": "gtdbtk", - "version": "2.7.1" + "version": "2.7.2" }, "takes": [ "fna" @@ -1219,7 +1340,7 @@ "process_name": "gtdbtk", "tool": { "name": "gtdbtk", - "version": "2.7.1" + "version": "2.7.2" }, "emits": [ "db", @@ -1324,7 +1445,7 @@ "process_name": "iqtree", "tool": { "name": "iqtree", - "version": "3.1.1" + "version": "3.1.3" }, "takes": [ "aln" @@ -1396,7 +1517,7 @@ "process_name": "kraken2", "tool": { "name": "bactopia-teton", - "version": "1.1.3" + "version": "1.1.4" }, "takes": [ "r1", @@ -1720,7 +1841,7 @@ "process_name": "mlst", "tool": { "name": "mlst", - "version": "2.33.1" + "version": "2.35.0" }, "takes": [ "fna" @@ -1804,58 +1925,6 @@ ] } }, - "ncbigenomedownload": { - "description": "Download assemblies and annotation files from NCBI's Assembly database.", - "path": "modules/ncbigenomedownload/", - "scope": "run", - "process_name": "ncbigenomedownload", - "tool": { - "name": "ncbi-genome-download", - "version": "0.3.3" - }, - "emits": [ - "gbff", - "fna", - "rm", - "features", - "gff", - "faa", - "gpff", - "wgs_gbk", - "cds", - "rna", - "rna_fna", - "report", - "stats", - "accessions" - ], - "emits_optional": [ - "gbff", - "fna", - "rm", - "features", - "gff", - "faa", - "gpff", - "wgs_gbk", - "cds", - "rna", - "rna_fna", - "report", - "stats", - "accessions" - ], - "tags": { - "complexity": "moderate", - "input_type": "single", - "output_type": "multiple", - "features": [ - "internet-access", - "resource-download", - "conditional-logic" - ] - } - }, "ngmaster": { "description": "Serotyping and Multi-Antigen Sequence Typing (MAST) of *Neisseria gonorrhoeae*.", "path": "modules/ngmaster/", @@ -1863,7 +1932,7 @@ "process_name": "ngmaster", "tool": { "name": "ngmaster", - "version": "2.0.0" + "version": "2.1.0" }, "takes": [ "fna" @@ -1888,7 +1957,7 @@ "process_name": "nohuman_download", "tool": { "name": "bactopia-teton", - "version": "1.1.3" + "version": "1.1.4" }, "emits": [ "db", @@ -1914,7 +1983,7 @@ "process_name": "nohuman", "tool": { "name": "bactopia-teton", - "version": "1.1.3" + "version": "1.1.4" }, "takes": [ "r1", @@ -1959,7 +2028,7 @@ "process_name": "panaroo_run", "tool": { "name": "panaroo", - "version": "1.6.0" + "version": "1.8.0" }, "takes": [ "gff" @@ -2043,7 +2112,7 @@ "process_name": "phispy", "tool": { "name": "phispy", - "version": "5.0.6" + "version": "5.0.10" }, "takes": [ "gbff" @@ -2216,7 +2285,7 @@ "process_name": "rgi_heatmap", "tool": { "name": "rgi", - "version": "6.0.5" + "version": "6.0.8" }, "takes": [ "json" @@ -2243,7 +2312,7 @@ "process_name": "rgi_main", "tool": { "name": "rgi", - "version": "6.0.5" + "version": "6.0.8" }, "takes": [ "fna" @@ -2681,7 +2750,7 @@ "process_name": "srahumanscrubber", "tool": { "name": "bactopia-teton", - "version": "1.1.3" + "version": "1.1.4" }, "takes": [ "r1", @@ -2769,6 +2838,31 @@ ] } }, + "staphscan": { + "description": "Genome-based surveillance analysis of Staphylococcus aureus.", + "path": "modules/staphscan/", + "scope": "sample", + "process_name": "staphscan", + "tool": { + "name": "staphscan", + "version": "0.4.1" + }, + "takes": [ + "fna" + ], + "emits": [ + "tsv" + ], + "tags": { + "complexity": "simple", + "input_type": "single", + "output_type": "single", + "features": [ + "compression", + "conditional-logic" + ] + } + }, "stecfinder": { "description": "Serotype of Shigatoxin producing E. coli using reads/assemblies.", "path": "modules/stecfinder/", @@ -2803,6 +2897,30 @@ ] } }, + "stxtyper": { + "description": "Identify and type Stx operons from assembled genomic sequences", + "path": "modules/stxtyper/", + "scope": "sample", + "process_name": "stxtyper", + "tool": { + "name": "ncbi-stxtyper", + "version": "1.0.45" + }, + "takes": [ + "fna" + ], + "emits": [ + "tsv" + ], + "tags": { + "complexity": "simple", + "input_type": "single", + "output_type": "single", + "features": [ + "conditional-logic" + ] + } + }, "sylph_profile": { "description": "Profile metagenome samples against a database using Sylph.", "path": "modules/sylph/profile/", @@ -2906,6 +3024,55 @@ "conditional-logic" ] } + }, + "traitar_download": { + "description": "Download the Pfam database required by Traitar.", + "path": "modules/traitar/download/", + "scope": "run", + "process_name": "traitar_download", + "tool": { + "name": "traitar", + "version": "3.0.1" + }, + "emits": [ + "db" + ], + "tags": { + "complexity": "simple", + "input_type": "none", + "output_type": "single", + "features": [ + "internet-access", + "resource-download", + "no-test" + ] + } + }, + "traitar_run": { + "description": "Predict phenotypic traits from microbial genomes.", + "path": "modules/traitar/run/", + "scope": "sample", + "process_name": "traitar", + "tool": { + "name": "traitar", + "version": "3.0.1" + }, + "takes": [ + "fna" + ], + "emits": [ + "majority_tsv", + "single_tsv" + ], + "tags": { + "complexity": "simple", + "input_type": "single", + "output_type": "single", + "features": [ + "database-dependent", + "conditional-logic" + ] + } } }, "subworkflows": { @@ -3712,6 +3879,54 @@ ] } }, + "deacon": { + "description": "Remove host reads from sequencing data using deacon.", + "path": "subworkflows/deacon/", + "takes": [ + "r1", + "r2", + "se", + "lr" + ], + "takes_optional": [ + "r1", + "r2", + "se", + "lr" + ], + "takes_params": [ + "database", + "download_deacon" + ], + "emits": { + "sample_outputs": [ + "special_meta", + "r1", + "r2", + "se", + "lr", + "scrub_report" + ], + "run_outputs": [] + }, + "scope": "sample", + "calls": { + "modules": [ + "deacon_fetch", + "deacon_filter" + ] + }, + "tags": { + "complexity": "moderate", + "input_type": "single", + "output_type": "single", + "features": [ + "database-dependent", + "conditional-logic", + "resource-download" + ] + } + }, "defensefinder": { "description": "Systematically search for anti-phage defense systems.", "path": "subworkflows/defensefinder/", @@ -3922,6 +4137,53 @@ ] } }, + "genomedl": { + "description": "Download genome assemblies from NCBI Datasets.", + "path": "subworkflows/genomedl/", + "takes_params": [ + "accessions" + ], + "emits": { + "sample_outputs": [ + "fna", + "gbff", + "wgs_gbk", + "gff", + "gtf", + "faa", + "gpff", + "cds", + "translated_cds", + "rna", + "features", + "report", + "stats", + "metadata", + "summary", + "json" + ], + "run_outputs": [], + "assemblies": [ + "fna" + ], + "reference": [] + }, + "scope": "sample", + "calls": { + "modules": [ + "genomedl" + ] + }, + "tags": { + "complexity": "moderate", + "input_type": "single", + "output_type": "multiple", + "features": [ + "resource-download", + "internet-access" + ] + } + }, "genotyphi": { "description": "Assign genotypes to Salmonella Typhi genomes.", "path": "subworkflows/genotyphi/", @@ -4484,7 +4746,8 @@ "hicap_database_dir", "hicap_model_fp", "staphtyper_repeats", - "staphtyper_repeat_order" + "staphtyper_repeat_order", + "staphscan_db_mlst" ], "emits": { "sample_outputs": [], @@ -4744,52 +5007,6 @@ ] } }, - "ncbigenomedownload": { - "description": "Download bacterial genomes from NCBI's RefSeq database.", - "path": "subworkflows/ncbigenomedownload/", - "takes_params": [ - "accessions" - ], - "emits": { - "sample_outputs": [ - "gbff", - "fna", - "gff", - "faa", - "gpff", - "wgs_gbk", - "cds", - "rna", - "rna_fna", - "features", - "rm", - "report", - "stats", - "accessions" - ], - "bactopia_tools": [], - "run_outputs": [], - "assemblies": [ - "fna" - ], - "reference": [] - }, - "scope": "sample", - "calls": { - "modules": [ - "ncbigenomedownload" - ] - }, - "tags": { - "complexity": "moderate", - "input_type": "single", - "output_type": "multiple", - "features": [ - "resource-download", - "database-dependent" - ] - } - }, "ngmaster": { "description": "Perform multi-antigen sequence typing of Neisseria gonorrhoeae from genome assemblies.", "path": "subworkflows/ngmaster/", @@ -5364,9 +5581,12 @@ ], "takes_params": [ "use_srascrubber", + "use_nohuman", "nohuman_db", "download_nohuman", - "nohuman_save_as_tarball" + "nohuman_save_as_tarball", + "deacon_db", + "download_deacon" ], "emits": { "sample_outputs": [ @@ -5405,7 +5625,8 @@ ], "subworkflows": [ "srahumanscrubber", - "nohuman" + "nohuman", + "deacon" ] }, "tags": { @@ -5883,15 +6104,49 @@ ] } }, + "staphscan": { + "description": "Genome-based surveillance analysis of Staphylococcus aureus.", + "path": "subworkflows/staphscan/", + "takes": [ + "fna" + ], + "takes_params": [ + "db" + ], + "emits": { + "sample_outputs": [ + "tsv" + ], + "run_outputs": [ + "csv" + ] + }, + "scope": "sample", + "calls": { + "modules": [ + "staphscan", + "csvtk_concat" + ] + }, + "tags": { + "complexity": "moderate", + "input_type": "single", + "output_type": "multiple", + "features": [ + "aggregation" + ] + } + }, "staphtyper": { - "description": "Determine the agr, spa and SCCmec types for _Staphylococcus aureus_ genomes.", + "description": "Determine the agr, spa, SCCmec types and perform genome-based surveillance for _Staphylococcus aureus_ genomes.", "path": "subworkflows/staphtyper/", "takes": [ "assembly" ], "takes_params": [ "repeats", - "repeat_order" + "repeat_order", + "staphscan_db_mlst" ], "emits": { "sample_outputs": [], @@ -5904,7 +6159,8 @@ "subworkflows": [ "agrvate", "spatyper", - "sccmec" + "sccmec", + "staphscan" ] }, "tags": { @@ -5958,6 +6214,36 @@ ] } }, + "stxtyper": { + "description": "Identify and type Stx operons from assembled genomic sequences", + "path": "subworkflows/stxtyper/", + "takes": [ + "fna" + ], + "emits": { + "sample_outputs": [ + "tsv" + ], + "run_outputs": [ + "csv" + ] + }, + "scope": "sample", + "calls": { + "modules": [ + "stxtyper", + "csvtk_concat" + ] + }, + "tags": { + "complexity": "moderate", + "input_type": "single", + "output_type": "multiple", + "features": [ + "aggregation" + ] + } + }, "sylph": { "description": "Profile microbial composition using Sylph.", "path": "subworkflows/sylph/", @@ -6131,7 +6417,13 @@ ], "takes_params": [ "db", - "use_srascrubber" + "use_srascrubber", + "use_nohuman", + "nohuman_db", + "download_nohuman", + "nohuman_save_as_tarball", + "deacon_db", + "download_deacon" ], "emits": { "sample_outputs": [], @@ -6159,6 +6451,45 @@ "conditional-logic" ] } + }, + "traitar": { + "description": "Predict phenotypic traits from microbial genomes", + "path": "subworkflows/traitar/", + "takes": [ + "fna" + ], + "takes_params": [ + "database", + "download_traitar" + ], + "emits": { + "sample_outputs": [ + "majority_tsv", + "single_tsv" + ], + "run_outputs": [ + "csv" + ] + }, + "scope": "sample", + "calls": { + "modules": [ + "traitar_download", + "traitar_run", + "csvtk_concat" + ] + }, + "tags": { + "complexity": "moderate", + "input_type": "single", + "output_type": "multiple", + "features": [ + "aggregation", + "database-dependent", + "conditional-logic", + "resource-download" + ] + } } }, "workflows": { @@ -6383,7 +6714,7 @@ ], "subworkflows": [ "fastani", - "ncbigenomedownload" + "genomedl" ] }, "gamma": { @@ -6527,7 +6858,7 @@ ], "subworkflows": [ "mashtree", - "ncbigenomedownload" + "genomedl" ] }, "mcroni": { @@ -6584,7 +6915,8 @@ "fna" ], "subworkflows": [ - "mlst" + "mlst", + "bactopia_datasets" ] }, "mobsuite": { @@ -6628,7 +6960,7 @@ "gff" ], "subworkflows": [ - "ncbigenomedownload", + "genomedl", "prokka", "pangenome", "clonalframeml", @@ -6825,7 +7157,7 @@ "se" ], "subworkflows": [ - "ncbigenomedownload", + "genomedl", "snippy_run", "snippy_core", "gubbins", @@ -6854,6 +7186,17 @@ "ssuissero" ] }, + "staphscan": { + "description": "Genome-based surveillance analysis of Staphylococcus aureus.", + "type": "tool", + "path": "workflows/bactopia-tools/staphscan/", + "ext": [ + "fna" + ], + "subworkflows": [ + "staphscan" + ] + }, "staphtyper": { "description": "Comprehensive typing of Staphylococcus aureus genomes.", "type": "tool", @@ -6877,6 +7220,17 @@ "stecfinder" ] }, + "stxtyper": { + "description": "Identify and type Stx operons from assembled genomic sequences", + "type": "tool", + "path": "workflows/bactopia-tools/stxtyper/", + "ext": [ + "fna" + ], + "subworkflows": [ + "stxtyper" + ] + }, "sylph": { "description": "Taxonomic profiling by abundance-corrected MinHash.", "type": "tool", @@ -6921,6 +7275,17 @@ "tbprofiler" ] }, + "traitar": { + "description": "Predict phenotypic traits from microbial genomes", + "type": "tool", + "path": "workflows/bactopia-tools/traitar/", + "ext": [ + "fna" + ], + "subworkflows": [ + "traitar" + ] + }, "cleanyerreads": { "description": "Quality control and optional host read removal from raw sequencing reads.", "type": "named", diff --git a/conf/base.config b/conf/base.config index 22153b882..aa1326ce7 100644 --- a/conf/base.config +++ b/conf/base.config @@ -52,7 +52,7 @@ process { time = { 96.h * task.attempt } } withLabel: process_high_memory { - memory = { 128.GB * task.attempt } + memory = { 144.GB * task.attempt } } withLabel: error_ignore { errorStrategy = 'ignore' diff --git a/conf/params.config b/conf/params.config index e002f4707..e7be6c099 100644 --- a/conf/params.config +++ b/conf/params.config @@ -27,9 +27,9 @@ params { cleanup_workdir = false // Nextflow Profile Parameters - condadir = "${params.bactopia_cache}/conda" + condadir = System.getenv("NXF_CONDA_CACHEDIR") ?: "${params.bactopia_cache}/conda" singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false + singularity_pull_docker_container = System.getenv("NFT_SINGULARITY_PULL_DOCKER") == "true" force_rebuild = false container_opts = "" registry = "quay.io" @@ -38,7 +38,6 @@ params { help = null help_all = false sleep_time = 5 - validate_params = true //nf-core monochrome_logs = false diff --git a/conf/params/cleanyerreads.config b/conf/params/cleanyerreads.config index 17188b256..51b790c4b 100644 --- a/conf/params/cleanyerreads.config +++ b/conf/params/cleanyerreads.config @@ -11,7 +11,7 @@ params { // Optional Parameters coverage = 0 - genome_size = "1" + genome_size = 0 // Gather Samples Parameters enable_fastq_check = false diff --git a/conf/params/teton.config b/conf/params/teton.config index 94c8e613b..e6c821c73 100644 --- a/conf/params/teton.config +++ b/conf/params/teton.config @@ -8,7 +8,7 @@ params { // Optional Parameters coverage = 0 - genome_size = "1" + genome_size = 0 sampleseed = 42 // Kraken2 Parameters @@ -21,5 +21,5 @@ params { skip_scrubber = false // Params to ignore - schema_ignore_params = "${params.schema_ignore_params},bactopia,use_bakta,sampleseed,skip_scrubber,skip_fastq_check,ask_merlin,species,datasets,reassemble,assembly,short_polish,hybrid,available_datasets,use_nohuman" + schema_ignore_params = "${params.schema_ignore_params},bactopia,use_bakta,sampleseed,skip_scrubber,skip_fastq_check,ask_merlin,species,datasets,reassemble,assembly,short_polish,hybrid,available_datasets,use_nohuman,use_deacon" } diff --git a/conf/schema/generic.json b/conf/schema/generic.json index 89bde2c7c..b9044ebc3 100644 --- a/conf/schema/generic.json +++ b/conf/schema/generic.json @@ -303,13 +303,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/conf/test-times.json b/conf/test-times.json index a9c064f12..1ca07af5f 100644 --- a/conf/test-times.json +++ b/conf/test-times.json @@ -221,10 +221,6 @@ "expected_seconds": 24.1, "tolerance_factor": 2.0 }, - "modules/ncbigenomedownload": { - "expected_seconds": 44.4, - "tolerance_factor": 2.0 - }, "modules/ngmaster": { "expected_seconds": 86.1, "tolerance_factor": 2.0 @@ -549,10 +545,6 @@ "expected_seconds": 28.5, "tolerance_factor": 2.0 }, - "subworkflows/ncbigenomedownload": { - "expected_seconds": 39.5, - "tolerance_factor": 2.0 - }, "subworkflows/ngmaster": { "expected_seconds": 42.5, "tolerance_factor": 2.0 diff --git a/conf/test.config b/conf/test.config index 424b64a7d..7e878d665 100644 --- a/conf/test.config +++ b/conf/test.config @@ -13,12 +13,12 @@ params { test_ont = null gamma_test = null nohuman_test = null + deacon_test = null is_ci = true max_retry = 1 - condadir = System.getenv("BACTOPIA_CONDA") - singularity_pull_docker_container = true - test_data_dir = System.getenv("BACTOPIA_TESTS") + singularity_pull_docker_container = System.getenv("NFT_SINGULARITY_PULL_DOCKER") == "true" + test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" bactopia = params.bactopia_test ? "${params.test_data_dir}/${params.bactopia_test}" : null // General inputs @@ -46,6 +46,7 @@ params { midas_db = "${params.test_data_dir}/${params.test_dataset}" mlst_db = params.test_dataset ? "${params.test_data_dir}/${params.test_dataset}" : null mykrobe_species = params.test_dataset2 + deacon_db = params.deacon_test ? "${params.test_data_dir}/${params.deacon_test}" : null nohuman_db = params.nohuman_test ? "${params.test_data_dir}/${params.nohuman_test}" : null reference = "${params.test_data_dir}/${params.test_dataset2}" scoary_traits = params.test_dataset ? "${params.test_data_dir}/${params.test_dataset}" : null @@ -53,6 +54,7 @@ params { sylph_db = "${params.test_data_dir}/${params.test_dataset}" tblastn_query = "${params.test_data_dir}/${params.test_dataset}" tblastx_query = "${params.test_data_dir}/${params.test_dataset}" + traitar_db = "${params.test_data_dir}/${params.test_dataset}" // Static data inputs prokka_proteins = "${params.test_data_dir}/datasets/generic/proteins.faa" diff --git a/conf/test_base.config b/conf/test_base.config new file mode 100644 index 000000000..0e4bf00e2 --- /dev/null +++ b/conf/test_base.config @@ -0,0 +1,26 @@ +// Params +params { + bactopia_version = '4.1.0' + bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" + condadir = System.getenv("NXF_CONDA_CACHEDIR") ?: "${params.bactopia_cache}/conda" + merge_folder = "merged-results" + test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" + is_ci = true + + // Max Job Request Parameters + max_retry = 1 + max_time = 2.h + max_memory = 8.GB + max_cpus = 2 + + // Nextflow Profile Parameters + registry = "quay.io" + singularity_cache = System.getenv("NXF_SINGULARITY_CACHEDIR") ?: "${params.bactopia_cache}/singularity" + singularity_pull_docker_container = System.getenv("NFT_SINGULARITY_PULL_DOCKER") == "true" + container_opts = "" +} + +// Plugin +plugins { + id 'nf-bactopia@2.1.7' +} diff --git a/data/citations.yml b/data/citations.yml index c51eca1be..84517d17a 100644 --- a/data/citations.yml +++ b/data/citations.yml @@ -317,6 +317,13 @@ tools: cite: | Shen, W [csvtk: A cross-platform, efficient and practical CSV/TSV toolkit in Golang.](https://github.com/shenwei356/csvtk/) (GitHub) + deacon: + name: deacon + link: https://github.com/bede/deacon + description: SIMD-accelerated filtering of DNA sequences using minimizer-based comparison + cite: | + Bede N. [deacon: SIMD-accelerated filtering of DNA sequences using minimizer-based comparison.](https://github.com/bede/deacon) (GitHub) + defensefinder: name: DefenseFinder link: https://github.com/mdmparis/defense-finder @@ -421,6 +428,13 @@ tools: cite: | Stanton RA, Vlachos N, Halpin AL [GAMMA: a tool for the rapid identification, classification, and annotation of translated gene matches from sequencing data.](https://doi.org/10.1093/bioinformatics/btab607) _Bioinformatics_ (2021) + genome_dl: + name: genome-dl + link: https://github.com/rpetit3/genome-dl + description: Download genome assemblies from NCBI Datasets. + cite: | + Petit III RA [genome-dl: Download genomes from NCBI Datasets](https://github.com/rpetit3/genome-dl) (GitHub) + genotyphi: name: GenoTyphi link: https://github.com/katholt/genotyphi @@ -686,13 +700,6 @@ tools: cite: | Steinig E [Nanoq: Minimal but speedy quality control for nanopore reads in Rust](https://github.com/esteinig/nanoq) (GitHub) - ncbigenomedownload: - name: ncbi-genome-download - link: https://github.com/kblin/ncbi-genome-download - description: Scripts to download genomes from the NCBI FTP servers - cite: | - Blin K [ncbi-genome-download: Scripts to download genomes from the NCBI FTP servers](https://github.com/kblin/ncbi-genome-download) (GitHub) - nextflow: name: Nextflow provenance_only: true @@ -1038,6 +1045,13 @@ tools: cite: | Lui J [SsuisSero: Rapid _Streptococcus suis_ serotyping](https://github.com/jimmyliu1326/SsuisSero) (GitHub) + staphscan: + name: StaphSCAN + link: https://github.com/riccabolla/StaphSCAN + description: Genome-based surveillance analysis of _Staphylococcus aureus_ + cite: | + Bollini R [StaphSCAN (v0.3.0).](https://github.com/riccabolla/StaphSCAN) Zenodo (2026) + staphopiasccmec: name: staphopia-sccmec link: https://github.com/staphopia/staphopia-sccmec @@ -1052,6 +1066,13 @@ tools: cite: | Zhang X, Payne M, Kaur S, and Lan R [Improved Genomic Identification, Clustering, and Serotyping of Shiga Toxin-Producing Escherichia coli Using Cluster/Serotype-Specific Gene Markers.](https://doi.org/10.3389/fcimb.2021.772574) _Frontiers in Cellular and Infection Microbiology_, 11, 772574. (2021) + stxtyper: + name: StxTyper + link: https://github.com/ncbi/stxtyper + description: Identify and type Stx operons from assembled genomic sequences + cite: | + Feldgarden M, Brover V, Gonzalez-Escalona N, Frrat JG, Haendiges J, Haft DH, Hoffmann M, Pettengill JB, Prasad AB, Tillman GE, Tyson GH, Klimke W [AMRFinderPlus and the Reference Gene Catalog facilitate examination of the genomic links among antimicrobial resistance, stress response, and virulence.](https://doi.org/10.1038/s41598-021-91456-0) _Scientific Reports_ 11, 12728 (2021) + sylph: name: Sylph link: https://github.com/bluenote-1/sylph @@ -1066,6 +1087,13 @@ tools: cite: | Phelan JE, O'Sullivan DM, Machado D, Ramos J, Oppong YEA, Campino S, O'Grady J, McNerney R, Hibberd ML, Viveiros M, Huggett JF, Clark TG [Integrating informatics tools and portable sequencing technology for rapid detection of resistance to anti-tuberculous drugs.](https://doi.org/10.1186/s13073-019-0650-x) _Genome Med_ 11, 41 (2019) + traitar: + name: Traitar + link: https://github.com/nick-youngblut/traitar3/ + description: Predict phenotypic traits from microbial genomes + cite: | + Weimann A, Mooren K, Frank J, Pope PB, Gronow S, So AP [From genomes to phenotypes: Traitar, the microbial trait analyzer.](https://doi.org/10.1128/mSystems.00101-16) _mSystems_ 1(6), e00101-16 (2016) + unicycler: name: Unicycler link: https://github.com/rrwick/Unicycler diff --git a/data/conda/meta.yaml b/data/conda/meta.yaml index 0af535e1a..175445ad1 100644 --- a/data/conda/meta.yaml +++ b/data/conda/meta.yaml @@ -1,4 +1,4 @@ -{% set version = '4.0.0' %} +{% set version = '4.1.0' %} package: name: bactopia @@ -17,7 +17,7 @@ requirements: - python >3.9,<3.14 - wget run: - - bactopia-py >=2.1.6 + - bactopia-py >=2.4.2 - conda >=25 - coreutils - mamba >=2 diff --git a/data/docs-patterns.yml b/data/docs-patterns.yml index 988c554bc..22e943a9c 100644 --- a/data/docs-patterns.yml +++ b/data/docs-patterns.yml @@ -2,7 +2,7 @@ # # Each entry flags a phrase that is no longer current — usually residue # from a past migration. Validator (`bactopia.lint.docs.validate_docs`) -# greps every line of every doc under `.claude/docs/` against these +# greps every line of every doc under `.agents/docs/` against these # patterns; matches surface as D0xx FAILs. # # Schema (per entry): diff --git a/llms.txt b/llms.txt index 279a52351..2ea43d2eb 100644 --- a/llms.txt +++ b/llms.txt @@ -23,7 +23,7 @@ All components use standardized GroovyDoc documentation and static typing. - [workflows/cleanyerreads/](workflows/cleanyerreads/): Quality control and optional host read removal from raw sequencing reads. - [workflows/staphopia/](workflows/staphopia/): Comprehensive analysis pipeline for Staphylococcus aureus isolates. - [workflows/teton/](workflows/teton/): Taxonomic classification and abundance profiling of metagenomic reads. -- [workflows/bactopia-tools/](workflows/bactopia-tools/): 67 comparative analysis workflows (pan-genome, phylogenetics, typing) +- [workflows/bactopia-tools/](workflows/bactopia-tools/): 70 comparative analysis workflows (pan-genome, phylogenetics, typing) ## Subworkflows (Tier 2) @@ -34,9 +34,10 @@ All components use standardized GroovyDoc documentation and static typing. ## Modules (Tier 3) -98 tool-specific modules live under `modules/`. Each module directory contains: +104 tool-specific modules live under `modules/`. Each module directory contains: - `main.nf`: Process definition with GroovyDoc header -- `meta.yml`: Tool metadata, inputs, outputs, and parameter descriptions +- `module.config`: Default parameters and `task.ext` configuration +- `schema.json`: JSON Schema for the module's parameters - `tests/`: nf-test test cases Key module categories: @@ -53,17 +54,24 @@ Key module categories: ## AI Agent Documentation -- [CLAUDE.md](CLAUDE.md): Master map for AI agents — architecture, conventions, and documentation index -- [.claude/docs/standards/01-style-guide.md](.claude/docs/standards/01-style-guide.md): GroovyDoc templates and formatting rules -- [.claude/docs/standards/02-logic-rules.md](.claude/docs/standards/02-logic-rules.md): Component classification logic -- [.claude/docs/standards/03-technical-specs.md](.claude/docs/standards/03-technical-specs.md): Variable naming, types, Path? optional inputs -- [.claude/docs/standards/04-subworkflow-documentation.md](.claude/docs/standards/04-subworkflow-documentation.md): Subworkflow documentation methodology -- [.claude/docs/standards/05-module-documentation.md](.claude/docs/standards/05-module-documentation.md): Module documentation methodology -- [.claude/docs/standards/07-tier-architecture.md](.claude/docs/standards/07-tier-architecture.md): Tier architecture rules, plugin functions, ext system, catalog.json -- [.claude/docs/project/01-repository-structure.md](.claude/docs/project/01-repository-structure.md): Full directory layout -- [.claude/docs/project/02-development-workflow.md](.claude/docs/project/02-development-workflow.md): Step-by-step guide for adding new tools -- [.claude/docs/reference/01-examples.md](.claude/docs/reference/01-examples.md): Annotated implementation examples -- [.claude/docs/reference/06-skills.md](.claude/docs/reference/06-skills.md): Project skill inventory and when to invoke skill-creator +- [AGENTS.md](AGENTS.md): Master map for AI agents — architecture, conventions, and documentation index +- [.agents/docs/standards/01-style-guide.md](.agents/docs/standards/01-style-guide.md): GroovyDoc templates and formatting rules +- [.agents/docs/standards/02-logic-rules.md](.agents/docs/standards/02-logic-rules.md): Component classification logic +- [.agents/docs/standards/03-technical-specs.md](.agents/docs/standards/03-technical-specs.md): Variable naming, types, Path? optional inputs +- [.agents/docs/standards/04-subworkflow-documentation.md](.agents/docs/standards/04-subworkflow-documentation.md): Subworkflow documentation methodology +- [.agents/docs/standards/05-module-documentation.md](.agents/docs/standards/05-module-documentation.md): Module documentation methodology +- [.agents/docs/standards/06-workflow-documentation.md](.agents/docs/standards/06-workflow-documentation.md): Workflow documentation methodology +- [.agents/docs/standards/07-tier-architecture.md](.agents/docs/standards/07-tier-architecture.md): Tier architecture rules, plugin functions, ext system, catalog.json +- [.agents/docs/project/01-repository-structure.md](.agents/docs/project/01-repository-structure.md): Full directory layout +- [.agents/docs/project/02-development-workflow.md](.agents/docs/project/02-development-workflow.md): Step-by-step guide for adding new tools +- [.agents/docs/project/03-configuration-system.md](.agents/docs/project/03-configuration-system.md): Parameter hierarchy and profile management +- [.agents/docs/project/04-testing-framework.md](.agents/docs/project/04-testing-framework.md): nf-test framework usage and patterns +- [.agents/docs/reference/01-examples.md](.agents/docs/reference/01-examples.md): Annotated implementation examples +- [.agents/docs/reference/02-troubleshooting.md](.agents/docs/reference/02-troubleshooting.md): Common error solutions +- [.agents/docs/reference/03-glossary.md](.agents/docs/reference/03-glossary.md): Bactopia-specific terminology +- [.agents/docs/reference/04-plugin-functions.md](.agents/docs/reference/04-plugin-functions.md): nf-bactopia channel utilities +- [.agents/docs/reference/05-task-ext-properties.md](.agents/docs/reference/05-task-ext-properties.md): task.ext reference for module.config files +- [.agents/docs/reference/06-skills.md](.agents/docs/reference/06-skills.md): Project skill inventory (.agents/skills/) and when to invoke skill-creator ## Key Patterns for Agents diff --git a/main.nf b/main.nf index 0aa9bb9d5..cc91dcbcf 100644 --- a/main.nf +++ b/main.nf @@ -161,6 +161,7 @@ params { ask_merlin : Boolean spatyper_repeats : Path? spatyper_repeat_order : Path? + staphscan_db_mlst : Path? } // Core @@ -260,7 +261,8 @@ workflow { params.hicap_model_fp, // staphtyper params.spatyper_repeats, - params.spatyper_repeat_order + params.spatyper_repeat_order, + params.staphscan_db_mlst ) ch_sample_outputs = ch_sample_outputs.mix(ch_merlin.sample_outputs) ch_run_outputs = ch_run_outputs.mix(ch_merlin.run_outputs) diff --git a/modules/abricate/run/tests/main.nf.test.snap b/modules/abricate/run/tests/main.nf.test.snap index fec637ac8..958ff84c9 100644 --- a/modules/abricate/run/tests/main.nf.test.snap +++ b/modules/abricate/run/tests/main.nf.test.snap @@ -14,7 +14,7 @@ "versions.yml:md5,7baef5ee36e4b70a7227723d89bf97ea" ] ], - "timestamp": "2026-04-29T11:15:41.488349212", + "timestamp": "2026-07-30T19:01:00.391837391", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/abricate/run/tests/nextflow.config b/modules/abricate/run/tests/nextflow.config index 7d79268c9..22a37b5f2 100644 --- a/modules/abricate/run/tests/nextflow.config +++ b/modules/abricate/run/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of ABRICATE_RUN nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/abricate/summary/tests/main.nf.test.snap b/modules/abricate/summary/tests/main.nf.test.snap index cc22b5005..e0c71575c 100644 --- a/modules/abricate/summary/tests/main.nf.test.snap +++ b/modules/abricate/summary/tests/main.nf.test.snap @@ -14,7 +14,7 @@ "versions.yml:md5,87422ca0c784de85ba93ac7352052d82" ] ], - "timestamp": "2026-04-29T11:15:37.997794062", + "timestamp": "2026-07-30T19:01:02.763625519", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/abricate/summary/tests/nextflow.config b/modules/abricate/summary/tests/nextflow.config index 92b2a9601..0d58999da 100644 --- a/modules/abricate/summary/tests/nextflow.config +++ b/modules/abricate/summary/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of ABRICATE_SUMMARY nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../../run/module.config" diff --git a/modules/abritamr/run/module.config b/modules/abritamr/run/module.config index 11b173460..12bd61bcc 100644 --- a/modules/abritamr/run/module.config +++ b/modules/abritamr/run/module.config @@ -19,9 +19,9 @@ process { ].join(' ').replaceAll("\\s{2,}", " ").trim() // Environment information - ext.toolName = "bioconda::abritamr=1.2.0".replace("=", "-").replace(":", "-").replace(" ", "-") - ext.docker = "biocontainers/abritamr:1.2.0--pyh5707d69_1" - ext.image = "https://depot.galaxyproject.org/singularity/abritamr:1.2.0--pyh5707d69_1" + ext.toolName = "bioconda::abritamr=1.3.0".replace("=", "-").replace(":", "-").replace(" ", "-") + ext.docker = "biocontainers/abritamr:1.3.0--pyh5707d69_0" + ext.image = "https://depot.galaxyproject.org/singularity/abritamr:1.3.0--pyh5707d69_0" ext.condaDir = "${params.condadir}" } } diff --git a/modules/abritamr/run/tests/main.nf.test.snap b/modules/abritamr/run/tests/main.nf.test.snap index 8b64ff003..4f056f664 100644 --- a/modules/abritamr/run/tests/main.nf.test.snap +++ b/modules/abritamr/run/tests/main.nf.test.snap @@ -15,10 +15,10 @@ "GCF_001682305.summary_virulence.tsv:md5,439b76b76818cbe8ec06bc82bd2711fe", "GCF_001682305.amrfinder.out:md5,5653ba9662232edc023dcc9606440e91", [ - "versions.yml:md5,ebc49c238ebaaaa54c98e7276f3f2aff" + "versions.yml:md5,752ffc1de1fcfed0f5e5bb025b542fdd" ] ], - "timestamp": "2026-04-29T11:20:00.097478921", + "timestamp": "2026-07-30T19:05:13.996504626", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -40,10 +40,10 @@ "GCF_001682305.summary_virulence.tsv:md5,439b76b76818cbe8ec06bc82bd2711fe", "GCF_001682305.amrfinder.out:md5,5653ba9662232edc023dcc9606440e91", [ - "versions.yml:md5,ebc49c238ebaaaa54c98e7276f3f2aff" + "versions.yml:md5,752ffc1de1fcfed0f5e5bb025b542fdd" ] ], - "timestamp": "2026-04-29T11:24:26.482969396", + "timestamp": "2026-07-30T19:09:37.004458976", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/abritamr/run/tests/nextflow.config b/modules/abritamr/run/tests/nextflow.config index e82b1674b..2c5efde44 100644 --- a/modules/abritamr/run/tests/nextflow.config +++ b/modules/abritamr/run/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of ABRITAMR_RUN nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/agrvate/main.nf b/modules/agrvate/main.nf index 88b39cb7c..b2b2fae52 100644 --- a/modules/agrvate/main.nf +++ b/modules/agrvate/main.nf @@ -69,14 +69,14 @@ process AGRVATE { process_name: task.ext.process_name ) - def is_compressed = fna.getName().endsWith(".gz") ? true : false - def fna_name = fna.getName().replace(".gz", "") + def is_compressed = fna.fileName.name.endsWith(".gz") ? true : false + def fna_name = fna.fileName.name.replace(".gz", "") """ if [ "${is_compressed}" == "true" ]; then gzip -c -d ${fna} > ./${fna_name} else # agrvate does not support symlinks - cp ${fna} ./${fna_name} + cp -L ${fna} ./${fna_name} fi agrvate \\ @@ -88,9 +88,7 @@ process AGRVATE { mv supplemental/${prefix}-summary.tab ./${prefix}.tsv # Cleanup - if [ "${is_compressed}" == "true" ]; then - rm -rf ${fna_name} - fi + rm -rf ./${fna_name} cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/agrvate/tests/main.nf.test.snap b/modules/agrvate/tests/main.nf.test.snap index 1e800dd7c..eb5289f7e 100644 --- a/modules/agrvate/tests/main.nf.test.snap +++ b/modules/agrvate/tests/main.nf.test.snap @@ -14,7 +14,7 @@ "versions.yml:md5,fbf8f6ba5629f99370082f5f837a7a2e" ] ], - "timestamp": "2026-04-29T11:15:55.590124401", + "timestamp": "2026-07-30T19:01:13.333516992", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -35,7 +35,7 @@ "versions.yml:md5,fbf8f6ba5629f99370082f5f837a7a2e" ] ], - "timestamp": "2026-04-29T11:15:39.027066867", + "timestamp": "2026-07-30T19:00:59.980438821", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/agrvate/tests/nextflow.config b/modules/agrvate/tests/nextflow.config index 764a49f18..f2ff956b2 100644 --- a/modules/agrvate/tests/nextflow.config +++ b/modules/agrvate/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of AGRVATE nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/amrfinderplus/run/module.config b/modules/amrfinderplus/run/module.config index 4e7875bc2..bc8923cb4 100644 --- a/modules/amrfinderplus/run/module.config +++ b/modules/amrfinderplus/run/module.config @@ -2,7 +2,7 @@ params { // amrfinderplus_run amrfinderplus_coverage_min = 0.5 - amrfinderplus_db = "" + amrfinderplus_db = null amrfinderplus_ident_min = -1 amrfinderplus_noplus = false amrfinderplus_opts = "" diff --git a/modules/amrfinderplus/run/schema.json b/modules/amrfinderplus/run/schema.json index 2c58043f6..06ad4e07f 100644 --- a/modules/amrfinderplus/run/schema.json +++ b/modules/amrfinderplus/run/schema.json @@ -67,7 +67,6 @@ }, "amrfinderplus_db": { "type": "string", - "default": "", "description": "A custom AMRFinder+ database to use, either a tarball or a folder", "fa_icon": "fas fa-font", "hidden": true diff --git a/modules/amrfinderplus/run/tests/main.nf.test.snap b/modules/amrfinderplus/run/tests/main.nf.test.snap index 6046e4ff4..346c72c93 100644 --- a/modules/amrfinderplus/run/tests/main.nf.test.snap +++ b/modules/amrfinderplus/run/tests/main.nf.test.snap @@ -14,7 +14,7 @@ "versions.yml:md5,b34cfaa3dacca27f98634ce626aab7df" ] ], - "timestamp": "2026-04-29T11:15:49.829865356", + "timestamp": "2026-07-30T19:01:11.923262811", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -35,7 +35,7 @@ "versions.yml:md5,b34cfaa3dacca27f98634ce626aab7df" ] ], - "timestamp": "2026-04-29T11:16:12.919706335", + "timestamp": "2026-07-30T19:01:34.662980606", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/amrfinderplus/run/tests/nextflow.config b/modules/amrfinderplus/run/tests/nextflow.config index e92a2356b..52bae2527 100644 --- a/modules/amrfinderplus/run/tests/nextflow.config +++ b/modules/amrfinderplus/run/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of AMRFINDERPLUS_RUN nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/amrfinderplus/update/main.nf b/modules/amrfinderplus/update/main.nf deleted file mode 100644 index 583729251..000000000 --- a/modules/amrfinderplus/update/main.nf +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Download and index the latest AMRFinder+ database. - * - * Fetches the most recent [AMRFinder+](https://github.com/ncbi/amr) databases from NCBI, - * indexes them, and packages them into a tarball. - * - * @status stable - * @keywords bacteria, database, antimicrobial resistance, update, download, ncbi - * @tags complexity:simple input-type:none output-type:single features:internet-access,archive-output,compression,database-dependent,no-test - * @citation amrfinderplus - * - * @note Internal Maintenance - * This process is primarily used internally by Bactopia to build and update the - * built-in datasets. - * - * @output record(db, logs) - * - `db`: A compressed tarball of the latest AMRFinder+ database - */ -nextflow.enable.types = true - -// bactopia-lint: ignore M012,M017,M018,M022,M023,M024,M025,M026,M028 -process AMRFINDERPLUS_UPDATE { - tag "amrfinderplus-update" - label 'process_low' - - conda "${task.ext.condaDir}/${task.ext.toolName}" - container "${task.ext.container}" - - output: - record( - db: file("updater/amrfinderplus.tar.gz"), - logs: files("updater/logs/*", optional: true) - ) - - script: - """ - mkdir -p updater/logs - mkdir amrfinderplus-temp - amrfinder_update -d amrfinderplus-temp - mv amrfinderplus-temp/\$(readlink amrfinderplus-temp/latest) amrfinderplus/ - tar czvf amrfinderplus.tar.gz amrfinderplus/ - mv amrfinderplus.tar.gz updater/ - - # Move outputs to tool specific folder - cp .command.begin updater/logs/nf.command.begin - cp .command.err updater/logs/nf.command.err - cp .command.log updater/logs/nf.command.log - cp .command.out updater/logs/nf.command.out - cp .command.run updater/logs/nf.command.run - cp .command.sh updater/logs/nf.command.sh - cp .command.trace updater/logs/nf.command.trace - - cat <<-END_VERSIONS > updater/logs/versions.yml - "${task.process}": - amrfinderplus: \$(amrfinder --version) - amrfinderplus-database: \$(echo \$(echo \$(amrfinder --database amrfinderplus --database_version 2> stdout) | rev | cut -f 1 -d ' ' | rev)) - END_VERSIONS - """ -} diff --git a/modules/amrfinderplus/update/module.config b/modules/amrfinderplus/update/module.config deleted file mode 100644 index bc2bea267..000000000 --- a/modules/amrfinderplus/update/module.config +++ /dev/null @@ -1,23 +0,0 @@ -params { - // No parameters -} - -process { - withName: 'AMRFINDERPLUS_UPDATE' { - ext.wf = params.wf - ext.scope = "sample" - ext.subdir = "" - ext.logs_subdir = "" - ext.process_name = "amrfinderplus_update" - storeDir = params.datasets_cache - - // Tool arguments - ext.args = "" - - // Environment information - ext.toolName = "bioconda::ncbi-amrfinderplus=4.2.7".replace("=", "-").replace(":", "-").replace(" ", "-") - ext.docker = "biocontainers/ncbi-amrfinderplus:4.2.7--hf69ffd2_0" - ext.image = "https://depot.galaxyproject.org/singularity/ncbi-amrfinderplus:4.2.7--hf69ffd2_0" - ext.condaDir = "${params.condadir}" - } -} diff --git a/modules/ariba/getref/module.config b/modules/ariba/getref/module.config index 519e8a94e..310e13494 100644 --- a/modules/ariba/getref/module.config +++ b/modules/ariba/getref/module.config @@ -15,7 +15,7 @@ process { ext.args = "" // Environment information - ext.toolName = "bioconda::ariba=2.14.7".replace("=", "-").replace(":", "-").replace(" ", "-") + ext.toolName = "bioconda::ariba=2.14.7 conda-forge::setuptools=80".replace("=", "-").replace(":", "-").replace(" ", "-") ext.docker = "biocontainers/ariba:2.14.7--py39h746d604_0" ext.image = "https://depot.galaxyproject.org/singularity/ariba:2.14.7--py39h746d604_0" ext.condaDir = "${params.condadir}" diff --git a/modules/ariba/run/main.nf b/modules/ariba/run/main.nf index c758a7502..23287b5db 100644 --- a/modules/ariba/run/main.nf +++ b/modules/ariba/run/main.nf @@ -104,6 +104,10 @@ process ARIBA_RUN { mv ${db_name}/summary.csv ./${prefix}-summary.csv mv ${db_name}/ supplemental/ + # Prepend a sample column so merged results can be traced to the sample + sed -i -e '1s|^name|sample,database|' -e '1!s|^|${prefix},|' ${prefix}-summary.csv + sed -i -e '1s|^#ariba_ref_name|sample\tariba_ref_name|' -e '1!s|^|${prefix}\t|' ${prefix}-report.tsv + # Cleanup rm -rf ${db_name}db diff --git a/modules/ariba/run/module.config b/modules/ariba/run/module.config index c04c7cfdd..991726f69 100644 --- a/modules/ariba/run/module.config +++ b/modules/ariba/run/module.config @@ -39,7 +39,7 @@ process { ].join(' ').replaceAll("\\s{2,}", " ").trim() // Environment information - ext.toolName = "bioconda::ariba=2.14.7".replace("=", "-").replace(":", "-").replace(" ", "-") + ext.toolName = "bioconda::ariba=2.14.7 conda-forge::setuptools=80".replace("=", "-").replace(":", "-").replace(" ", "-") ext.docker = "biocontainers/ariba:2.14.7--py39h746d604_0" ext.image = "https://depot.galaxyproject.org/singularity/ariba:2.14.7--py39h746d604_0" ext.condaDir = "${params.condadir}" diff --git a/modules/ariba/run/schema.json b/modules/ariba/run/schema.json index 749eb1540..955d51ebd 100644 --- a/modules/ariba/run/schema.json +++ b/modules/ariba/run/schema.json @@ -92,6 +92,7 @@ }, "ariba_no_clean": { "type": "boolean", + "default": false, "description": "Do not clean up intermediate files created by Ariba.", "fa_icon": "fas fa-toggle-on", "hidden": true diff --git a/modules/ariba/run/tests/main.nf.test.snap b/modules/ariba/run/tests/main.nf.test.snap index 173c0dab2..7a11e1e8c 100644 --- a/modules/ariba/run/tests/main.nf.test.snap +++ b/modules/ariba/run/tests/main.nf.test.snap @@ -9,13 +9,13 @@ "process_name": "ariba", "scope": "sample" }, - "SRR2838702-report.tsv:md5,5ee10dd85eb51e673a8eb7e07298c69d", - "SRR2838702-summary.csv:md5,e973fbf0fffdcfc500bfba85549239e4", + "SRR2838702-report.tsv:md5,a7574299aadfff54270d5f7657ad5d54", + "SRR2838702-summary.csv:md5,39cbff7dcb0c255ea78dc6d9bfc19749", [ "versions.yml:md5,2d20a87ab1578332cae79c947a52e8f8" ] ], - "timestamp": "2026-04-29T11:16:11.163361868", + "timestamp": "2026-08-04T21:00:57.091217972", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/ariba/run/tests/nextflow.config b/modules/ariba/run/tests/nextflow.config index de63ff3ca..5472409c1 100644 --- a/modules/ariba/run/tests/nextflow.config +++ b/modules/ariba/run/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of ARIBA_RUN nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/bactopia/assembler/schema.json b/modules/bactopia/assembler/schema.json index 19c64d536..9bff9c8b2 100644 --- a/modules/bactopia/assembler/schema.json +++ b/modules/bactopia/assembler/schema.json @@ -39,6 +39,7 @@ }, "use_unicycler": { "type": "boolean", + "default": false, "description": "Use unicycler for paired end assembly", "fa_icon": "fas fa-toggle-on", "hidden": true @@ -159,18 +160,21 @@ }, "no_polish": { "type": "boolean", + "default": false, "description": "Skip the assembly polishing step", "fa_icon": "fas fa-toggle-on", "hidden": true }, "no_miniasm": { "type": "boolean", + "default": false, "description": "Skip miniasm+Racon bridging", "fa_icon": "fas fa-toggle-on", "hidden": true }, "no_rotate": { "type": "boolean", + "default": false, "description": "Do not rotate completed replicons to start at a standard gene", "fa_icon": "fas fa-toggle-on", "hidden": true diff --git a/modules/bactopia/assembler/tests/main.nf.test b/modules/bactopia/assembler/tests/main.nf.test index 14278169d..94c089b98 100644 --- a/modules/bactopia/assembler/tests/main.nf.test +++ b/modules/bactopia/assembler/tests/main.nf.test @@ -33,10 +33,12 @@ nextflow_process { { assert process.success }, { assert record.fna != null }, { assert record.tsv != null }, + // Reproducible outputs { assert snapshot( - record.meta, - record.versions - ).match() } + record.meta + ).match() }, + // Non-reproducible outputs + { assert path(record.versions[0]).text.contains('assembly-scan') } ) } } @@ -68,10 +70,12 @@ nextflow_process { { assert process.success }, { assert record.fna != null }, { assert record.tsv != null }, + // Reproducible outputs { assert snapshot( - record.meta, - record.versions - ).match() } + record.meta + ).match() }, + // Non-reproducible outputs + { assert path(record.versions[0]).text.contains('assembly-scan') } ) } } @@ -103,10 +107,12 @@ nextflow_process { { assert process.success }, { assert record.fna != null }, { assert record.tsv != null }, + // Reproducible outputs { assert snapshot( - record.meta, - record.versions - ).match() } + record.meta + ).match() }, + // Non-reproducible outputs + { assert path(record.versions[0]).text.contains('assembly-scan') } ) } } @@ -139,10 +145,12 @@ nextflow_process { { assert process.success }, { assert record.fna != null }, { assert record.tsv != null }, + // Reproducible outputs { assert snapshot( - record.meta, - record.versions - ).match() } + record.meta + ).match() }, + // Non-reproducible outputs + { assert path(record.versions[0]).text.contains('assembly-scan') } ) } } @@ -174,10 +182,12 @@ nextflow_process { { assert process.success }, { assert record.fna != null }, { assert record.tsv != null }, + // Reproducible outputs { assert snapshot( - record.meta, - record.versions - ).match() } + record.meta + ).match() }, + // Non-reproducible outputs + { assert path(record.versions[0]).text.contains('assembly-scan') } ) } } @@ -212,10 +222,12 @@ nextflow_process { { assert process.success }, { assert record.fna == null }, { assert record.tsv == null }, + // Reproducible outputs { assert snapshot( - record.meta, - record.versions - ).match() } + record.meta + ).match() }, + // Non-reproducible outputs + { assert path(record.versions[0]).text.contains('assembly-scan') } ) } } @@ -248,10 +260,12 @@ nextflow_process { { assert process.success }, { assert record.fna != null }, { assert record.tsv != null }, + // Reproducible outputs { assert snapshot( - record.meta, - record.versions - ).match() } + record.meta + ).match() }, + // Non-reproducible outputs + { assert path(record.versions[0]).text.contains('assembly-scan') } ) } } @@ -284,10 +298,12 @@ nextflow_process { { assert process.success }, { assert record.fna != null }, { assert record.tsv != null }, + // Reproducible outputs { assert snapshot( - record.meta, - record.versions - ).match() } + record.meta + ).match() }, + // Non-reproducible outputs + { assert path(record.versions[0]).text.contains('assembly-scan') } ) } } diff --git a/modules/bactopia/assembler/tests/main.nf.test.snap b/modules/bactopia/assembler/tests/main.nf.test.snap index ec0c17fea..65b01a37d 100644 --- a/modules/bactopia/assembler/tests/main.nf.test.snap +++ b/modules/bactopia/assembler/tests/main.nf.test.snap @@ -12,12 +12,9 @@ "scope": "sample", "single_end": false, "species": "Portiera aleyrodidarum" - }, - [ - "versions.yml:md5,278ebf6d69552124610809b2ea1520fa" - ] + } ], - "timestamp": "2026-04-29T11:30:20.139919124", + "timestamp": "2026-07-30T19:17:06.857512715", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -36,12 +33,9 @@ "scope": "sample", "single_end": true, "species": "Portiera aleyrodidarum" - }, - [ - "versions.yml:md5,278ebf6d69552124610809b2ea1520fa" - ] + } ], - "timestamp": "2026-04-29T11:34:21.859433895", + "timestamp": "2026-07-30T19:23:20.256569677", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -60,12 +54,9 @@ "scope": "sample", "single_end": false, "species": "Portiera aleyrodidarum" - }, - [ - "versions.yml:md5,278ebf6d69552124610809b2ea1520fa" - ] + } ], - "timestamp": "2026-04-29T11:33:59.04450709", + "timestamp": "2026-07-30T19:22:40.875565491", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -84,12 +75,9 @@ "scope": "sample", "single_end": true, "species": "Portiera aleyrodidarum" - }, - [ - "versions.yml:md5,278ebf6d69552124610809b2ea1520fa" - ] + } ], - "timestamp": "2026-04-29T11:32:34.46974438", + "timestamp": "2026-07-30T19:20:36.677813837", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -108,12 +96,9 @@ "scope": "sample", "single_end": false, "species": "Portiera aleyrodidarum" - }, - [ - "versions.yml:md5,278ebf6d69552124610809b2ea1520fa" - ] + } ], - "timestamp": "2026-04-29T11:33:02.375790423", + "timestamp": "2026-07-30T19:21:18.12930881", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -132,12 +117,9 @@ "scope": "sample", "single_end": false, "species": "Portiera aleyrodidarum" - }, - [ - "versions.yml:md5,278ebf6d69552124610809b2ea1520fa" - ] + } ], - "timestamp": "2026-04-29T11:18:07.066187784", + "timestamp": "2026-07-30T19:03:23.888754747", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -156,12 +138,9 @@ "scope": "sample", "single_end": true, "species": "Portiera aleyrodidarum" - }, - [ - "versions.yml:md5,278ebf6d69552124610809b2ea1520fa" - ] + } ], - "timestamp": "2026-04-29T11:18:51.640725893", + "timestamp": "2026-07-30T19:04:04.211041576", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -180,12 +159,9 @@ "scope": "sample", "single_end": true, "species": "Portiera aleyrodidarum" - }, - [ - "versions.yml:md5,278ebf6d69552124610809b2ea1520fa" - ] + } ], - "timestamp": "2026-04-29T11:23:08.642297911", + "timestamp": "2026-07-30T19:08:17.703593976", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/bactopia/assembler/tests/nextflow.config b/modules/bactopia/assembler/tests/nextflow.config index 173d68ca6..5e8ded2fc 100644 --- a/modules/bactopia/assembler/tests/nextflow.config +++ b/modules/bactopia/assembler/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of ASSEMBLER nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -10,26 +11,11 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB max_cpus = 12 - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" - // Module-specific defaults skip_compression = false keep_all_files = false diff --git a/modules/bactopia/datasets/tests/nextflow.config b/modules/bactopia/datasets/tests/nextflow.config index 786efd126..3bce1f353 100644 --- a/modules/bactopia/datasets/tests/nextflow.config +++ b/modules/bactopia/datasets/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of DATASETS nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -10,30 +11,12 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" // Module-specific defaults datasets_cache = "${params.bactopia_cache}/datasets" amrfinderplus_url = "https://datasets.bactopia.com/datasets/v${params.bactopia_version}/amrfinderplus.tar.gz" - mlst_url = "https://datasets.bactopia.com/datasets/v${params.bactopia_version}/mlst.tar.gz" + mlst_url = "https://datasets.bactopia.com/datasets/mlst.tar.gz" mash_url = "https://datasets.bactopia.com/datasets/mash-refseq88.k21.msh.xz" sourmash_url = "https://datasets.bactopia.com/datasets/gtdb-rs207.genomic-reps.dna.k31.lca.json.gz" } diff --git a/modules/bactopia/gather/main.nf b/modules/bactopia/gather/main.nf index 4df3b7399..b6300b3d4 100644 --- a/modules/bactopia/gather/main.nf +++ b/modules/bactopia/gather/main.nf @@ -14,7 +14,7 @@ * @status stable * @keywords fastq, validation, sra, ena, download, merging, simulation, art, ncbi * @tags complexity:complex input-type:multiple output-type:multiple features:internet-access,resource-download,conditional-logic - * @citation bactopia, art, fastq_dl, fastq_scan, ncbigenomedownload, pigz + * @citation bactopia, art, fastq_dl, fastq_scan, genome_dl, pigz * * @input record(meta, r1_files, r2_files, se_files, lr_files, fna_files) * - `meta`: Groovy Record containing sample information @@ -81,7 +81,7 @@ process GATHER { ], logs: files("*.{log,err}", optional: true), nf_logs: files(".command.*"), - versions: files("versions.yml", optional: true) + versions: files("versions.yml") ) script: @@ -115,9 +115,7 @@ process GATHER { ) // WF specific parameters - def String no_cache = task.ext.no_cache ? '-N' : '' def String archive = task.ext.use_ena ? (task.attempt >= 4 ? "SRA" : "ENA") : "SRA" - def String section = runtype == 'assembly_accession' ? (prefix.startsWith('GCF') ? 'refseq' : 'genbank') : '' def Integer fcov = task.ext.coverage.toInteger() == 0 ? 150 : Math.round(task.ext.coverage.toInteger() * 1.5) // Determine what reads we have based on the explicit slots @@ -260,14 +258,12 @@ process GATHER { rm check-assembly-accession.txt fi - # Download from NCBI assembly and simulate reads - ncbi-genome-download bacteria -o ./ -F fasta -p ${task.cpus} \\ - -u "https://ftp.ncbi.nlm.nih.gov/genomes" \\ - -s ${section} -A accession.txt -r 50 ${no_cache} + # Download from NCBI Datasets and simulate reads + genome-dl --formats fasta --outdir ./ --cpus ${task.cpus} --max-attempts ${task.ext.max_retry} \\ + --prefix ${prefix} --accession ${prefix} - # Nested directories are not easy to predict, but there should only be a - # single assembly file. The assembly version (e.g., GCF_000005845.2 --> .2) - # is removed for consistency. + # genome-dl names the assembly by its resolved accession. The assembly version + # (e.g., GCF_000005845.2 --> .2) is removed for consistency. find . -name "*${prefix}*.fna.gz" | xargs -I {} mv {} assembly/ rename 's/(GC[AF]_\\d+).*/\$1.fna.gz/' assembly/* gzip -cd assembly/${prefix}.fna.gz > ${prefix}-art.fna @@ -357,7 +353,7 @@ process GATHER { art: \$(echo \$(art_illumina --help 2>&1) | sed 's/^.*Version //;s/ .*\$//') fastq-dl: \$(echo \$(fastq-dl --version 2>&1) | sed 's/fastq-dl, version //') fastq-scan: \$(echo \$(fastq-scan -v 2>&1) | sed 's/fastq-scan //') - ncbi-genome-download: \$(echo \$(ncbi-genome-download --version 2>&1)) + genomedl: \$(echo \$(genome-dl --version 2>&1) | sed 's/.*version //') pigz: \$(echo \$(pigz --version 2>&1) | sed 's/pigz //') END_VERSIONS """ diff --git a/modules/bactopia/gather/module.config b/modules/bactopia/gather/module.config index 658d68c99..4400e555d 100644 --- a/modules/bactopia/gather/module.config +++ b/modules/bactopia/gather/module.config @@ -7,7 +7,6 @@ params { min_genome_size = 100000 min_proportion = 0.5 min_reads = 7472 - no_cache = false skip_fastq_check = false use_ena = false } @@ -24,9 +23,9 @@ process { ext.args = "" // Environment information - ext.toolName = "bioconda::bactopia-gather=1.0.5".replace("=", "-").replace(":", "-").replace(" ", "-") - ext.docker = "biocontainers/bactopia-gather:1.0.5--hdfd78af_0" - ext.image = "https://depot.galaxyproject.org/singularity/bactopia-gather:1.0.5--hdfd78af_0" + ext.toolName = "bioconda::bactopia-gather=1.2.0".replace("=", "-").replace(":", "-").replace(" ", "-") + ext.docker = "biocontainers/bactopia-gather:1.2.0--hdfd78af_0" + ext.image = "https://depot.galaxyproject.org/singularity/bactopia-gather:1.2.0--hdfd78af_0" ext.condaDir = "${params.condadir}" // Module-specific parameters @@ -35,7 +34,6 @@ process { ext.min_basepairs = params.min_basepairs ext.min_proportion = params.min_proportion ext.min_reads = params.min_reads - ext.no_cache = params.no_cache ext.sampleseed = params.sampleseed ext.skip_compression = params.skip_compression ext.skip_fastq_check = params.skip_fastq_check diff --git a/modules/bactopia/gather/schema-cleanyerreads.json b/modules/bactopia/gather/schema-cleanyerreads.json index 5780345be..15e01ed5f 100644 --- a/modules/bactopia/gather/schema-cleanyerreads.json +++ b/modules/bactopia/gather/schema-cleanyerreads.json @@ -27,7 +27,7 @@ }, "genome_size": { "type": "string", - "default": "1", + "default": "0", "description": "Expected genome size (bp) for all samples", "help": "If `--species` is used, `min`, `median`, `mean`, or `max` can be used for `--genome_size`", "fa_icon": "fas fa-arrows-alt-h", @@ -88,12 +88,6 @@ "description": "Download FASTQs from ENA", "fa_icon": "fas fa-globe-europe", "hidden": true - }, - "no_cache": { - "type": "boolean", - "description": "Skip caching the assembly summary file from ncbi-genome-download", - "fa_icon": "fas fa-save", - "hidden": true } } } diff --git a/modules/bactopia/gather/schema-teton.json b/modules/bactopia/gather/schema-teton.json index 27b747332..a2122dc43 100644 --- a/modules/bactopia/gather/schema-teton.json +++ b/modules/bactopia/gather/schema-teton.json @@ -88,12 +88,6 @@ "description": "Download FASTQs from ENA", "fa_icon": "fas fa-globe-europe", "hidden": true - }, - "no_cache": { - "type": "boolean", - "description": "Skip caching the assembly summary file from ncbi-genome-download", - "fa_icon": "fas fa-save", - "hidden": true } } } diff --git a/modules/bactopia/gather/schema.json b/modules/bactopia/gather/schema.json index 5f2eaed51..47f65e5f5 100644 --- a/modules/bactopia/gather/schema.json +++ b/modules/bactopia/gather/schema.json @@ -14,6 +14,7 @@ "properties": { "skip_fastq_check": { "type": "boolean", + "default": false, "description": "Skip minimum requirement checks for input FASTQs", "help": "This parameter is useful if you are confident your sequences will pass the minimum requirements.", "fa_icon": "fas fa-toggle-on", @@ -71,15 +72,10 @@ }, "use_ena": { "type": "boolean", + "default": false, "description": "Download FASTQs from ENA", "fa_icon": "fas fa-toggle-on", "hidden": true - }, - "no_cache": { - "type": "boolean", - "description": "Skip caching the assembly summary file from ncbi-genome-download", - "fa_icon": "fas fa-toggle-on", - "hidden": true } } } diff --git a/modules/bactopia/gather/tests/main.nf.test.snap b/modules/bactopia/gather/tests/main.nf.test.snap index b103bf00e..78c15ec81 100644 --- a/modules/bactopia/gather/tests/main.nf.test.snap +++ b/modules/bactopia/gather/tests/main.nf.test.snap @@ -16,10 +16,10 @@ }, "output-meta.tsv:md5,ef455a74203f7b19de75cb17a98cb547", [ - "versions.yml:md5,837f65a9cb0c03f876b433e027c58725" + "versions.yml:md5,92a16e28a5dc385e3e050bae94c9d4ef" ] ], - "timestamp": "2026-04-29T11:16:29.989103896", + "timestamp": "2026-07-30T19:02:05.469986376", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -42,10 +42,10 @@ }, "output-meta.tsv:md5,ba9712352bf788edfdfbf6d059dbc042", [ - "versions.yml:md5,837f65a9cb0c03f876b433e027c58725" + "versions.yml:md5,92a16e28a5dc385e3e050bae94c9d4ef" ] ], - "timestamp": "2026-04-29T11:16:52.590715521", + "timestamp": "2026-07-30T19:02:28.432278438", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -67,10 +67,10 @@ "species": "Portiera aleyrodidarum" }, [ - "versions.yml:md5,837f65a9cb0c03f876b433e027c58725" + "versions.yml:md5,92a16e28a5dc385e3e050bae94c9d4ef" ] ], - "timestamp": "2026-04-29T11:18:31.051121254", + "timestamp": "2026-07-30T19:04:02.535874545", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -92,10 +92,10 @@ "species": "Portiera aleyrodidarum" }, [ - "versions.yml:md5,837f65a9cb0c03f876b433e027c58725" + "versions.yml:md5,92a16e28a5dc385e3e050bae94c9d4ef" ] ], - "timestamp": "2026-04-29T11:18:11.586314321", + "timestamp": "2026-07-30T19:03:43.552805995", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -118,10 +118,10 @@ }, "SRR2838702-meta.tsv:md5,1a1053e05f4f7a7407b6a1c03c74cd75", [ - "versions.yml:md5,837f65a9cb0c03f876b433e027c58725" + "versions.yml:md5,92a16e28a5dc385e3e050bae94c9d4ef" ] ], - "timestamp": "2026-04-29T11:17:29.942675107", + "timestamp": "2026-07-30T19:03:01.490354819", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -144,10 +144,10 @@ }, "output-meta.tsv:md5,83fb00c77440761635fd0606ebddbec0", [ - "versions.yml:md5,837f65a9cb0c03f876b433e027c58725" + "versions.yml:md5,92a16e28a5dc385e3e050bae94c9d4ef" ] ], - "timestamp": "2026-04-29T11:17:51.45634273", + "timestamp": "2026-07-30T19:03:22.422035436", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -170,10 +170,10 @@ }, "output-meta.tsv:md5,64f8cba4de7e40198f70b08bfb166a13", [ - "versions.yml:md5,837f65a9cb0c03f876b433e027c58725" + "versions.yml:md5,92a16e28a5dc385e3e050bae94c9d4ef" ] ], - "timestamp": "2026-04-29T11:15:49.823379114", + "timestamp": "2026-07-30T19:01:21.591931572", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -196,10 +196,10 @@ }, "output-meta.tsv:md5,d350d0a30825ec8a049363594e5ff9dd", [ - "versions.yml:md5,837f65a9cb0c03f876b433e027c58725" + "versions.yml:md5,92a16e28a5dc385e3e050bae94c9d4ef" ] ], - "timestamp": "2026-04-29T11:16:08.925459823", + "timestamp": "2026-07-30T19:01:43.359870539", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/bactopia/gather/tests/nextflow.config b/modules/bactopia/gather/tests/nextflow.config index b6633d628..37f406206 100644 --- a/modules/bactopia/gather/tests/nextflow.config +++ b/modules/bactopia/gather/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of GATHER nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" // Module-specific defaults coverage = 100 diff --git a/modules/bactopia/qc/schema.json b/modules/bactopia/qc/schema.json index d07ae13b1..545f625db 100644 --- a/modules/bactopia/qc/schema.json +++ b/modules/bactopia/qc/schema.json @@ -14,6 +14,7 @@ "properties": { "use_bbmap": { "type": "boolean", + "default": false, "description": "Illumina reads will be QC'd using BBMap", "help": "", "fa_icon": "fas fa-toggle-on", @@ -29,6 +30,7 @@ }, "skip_qc": { "type": "boolean", + "default": false, "description": "The QC step will be skipped and it will be assumed the inputs sequences have already been QCed.", "help": "This is really only useful if you have already QC'd your reads, or have a specific need", "fa_icon": "fas fa-toggle-on", @@ -36,12 +38,14 @@ }, "skip_qc_plots": { "type": "boolean", + "default": false, "description": "QC Plot creation by FastQC or Nanoplot will be skipped", "fa_icon": "fas fa-toggle-on", "hidden": true }, "skip_error_correction": { "type": "boolean", + "default": false, "description": "FLASH error correction of reads will be skipped.", "fa_icon": "fas fa-toggle-on", "hidden": true diff --git a/modules/bactopia/qc/tests/main.nf.test b/modules/bactopia/qc/tests/main.nf.test index 7a9be3b1e..67dfdab03 100644 --- a/modules/bactopia/qc/tests/main.nf.test +++ b/modules/bactopia/qc/tests/main.nf.test @@ -35,10 +35,12 @@ nextflow_process { { assert process.success }, { assert record.r1 != null }, { assert record.r2 != null }, + // Reproducible outputs { assert snapshot( - record.meta, - record.versions - ).match() } + record.meta + ).match() }, + // Non-reproducible outputs + { assert path(record.versions[0]).text.contains('fastp') } ) } } @@ -71,10 +73,12 @@ nextflow_process { assertAll( { assert process.success }, { assert record.se != null }, + // Reproducible outputs { assert snapshot( - record.meta, - record.versions - ).match() } + record.meta + ).match() }, + // Non-reproducible outputs + { assert path(record.versions[0]).text.contains('fastp') } ) } } @@ -107,10 +111,12 @@ nextflow_process { assertAll( { assert process.success }, { assert record.lr != null }, + // Reproducible outputs { assert snapshot( - record.meta, - record.versions - ).match() } + record.meta + ).match() }, + // Non-reproducible outputs + { assert path(record.versions[0]).text.contains('fastp') } ) } } @@ -147,10 +153,12 @@ nextflow_process { { assert record.r1 != null }, { assert record.r2 != null }, { assert record.lr != null }, + // Reproducible outputs { assert snapshot( - record.meta, - record.versions - ).match() } + record.meta + ).match() }, + // Non-reproducible outputs + { assert path(record.versions[0]).text.contains('fastp') } ) } } @@ -185,10 +193,12 @@ nextflow_process { { assert process.success }, { assert record.r1 != null }, { assert record.r2 != null }, + // Reproducible outputs { assert snapshot( - record.meta, - record.versions - ).match() } + record.meta + ).match() }, + // Non-reproducible outputs + { assert path(record.versions[0]).text.contains('fastp') } ) } } diff --git a/modules/bactopia/qc/tests/main.nf.test.snap b/modules/bactopia/qc/tests/main.nf.test.snap index c596b2ec9..64b3aa55c 100644 --- a/modules/bactopia/qc/tests/main.nf.test.snap +++ b/modules/bactopia/qc/tests/main.nf.test.snap @@ -12,12 +12,9 @@ "scope": "sample", "single_end": false, "species": "Portiera aleyrodidarum" - }, - [ - "versions.yml:md5,039e8b06ff0140cc2616c36d90ded521" - ] + } ], - "timestamp": "2026-04-29T11:17:05.661396493", + "timestamp": "2026-07-30T19:02:27.03483307", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -36,12 +33,9 @@ "scope": "sample", "single_end": true, "species": "Portiera aleyrodidarum" - }, - [ - "versions.yml:md5,039e8b06ff0140cc2616c36d90ded521" - ] + } ], - "timestamp": "2026-04-29T11:18:09.002888188", + "timestamp": "2026-07-30T19:03:27.769846657", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -60,12 +54,9 @@ "scope": "sample", "single_end": false, "species": "Portiera aleyrodidarum" - }, - [ - "versions.yml:md5,039e8b06ff0140cc2616c36d90ded521" - ] + } ], - "timestamp": "2026-04-29T11:20:54.528982484", + "timestamp": "2026-07-30T19:06:04.95777414", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -84,12 +75,9 @@ "scope": "sample", "single_end": true, "species": "Portiera aleyrodidarum" - }, - [ - "versions.yml:md5,039e8b06ff0140cc2616c36d90ded521" - ] + } ], - "timestamp": "2026-04-29T11:19:01.400915676", + "timestamp": "2026-07-30T19:04:14.917296416", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -108,12 +96,9 @@ "scope": "sample", "single_end": false, "species": "Portiera aleyrodidarum" - }, - [ - "versions.yml:md5,039e8b06ff0140cc2616c36d90ded521" - ] + } ], - "timestamp": "2026-04-29T11:21:35.403721612", + "timestamp": "2026-07-30T19:06:43.129431936", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/bactopia/qc/tests/nextflow.config b/modules/bactopia/qc/tests/nextflow.config index 2c23ea722..9a6acf142 100644 --- a/modules/bactopia/qc/tests/nextflow.config +++ b/modules/bactopia/qc/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of QC nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" // Module-specific defaults coverage = 0 diff --git a/modules/bactopia/sketcher/schema.json b/modules/bactopia/sketcher/schema.json index 16f74dca1..d35cde8ea 100644 --- a/modules/bactopia/sketcher/schema.json +++ b/modules/bactopia/sketcher/schema.json @@ -28,6 +28,7 @@ }, "no_winner_take_all": { "type": "boolean", + "default": false, "description": "Disable winner-takes-all strategy for identity estimates", "help": "winner-take-all description: After counting hashes for each query, hashes that appear in multiple queries will be removed from all except the one with the best identity (ties broken by larger query), and other identities will be reduced. This removes output redundancy, providing a rough compositional outline.", "fa_icon": "fas fa-toggle-on", diff --git a/modules/bactopia/sketcher/tests/main.nf.test.snap b/modules/bactopia/sketcher/tests/main.nf.test.snap index d68cb450e..a75c26a10 100644 --- a/modules/bactopia/sketcher/tests/main.nf.test.snap +++ b/modules/bactopia/sketcher/tests/main.nf.test.snap @@ -15,7 +15,7 @@ "versions.yml:md5,559fcd38f7410952b8da3f25f165d6fd" ] ], - "timestamp": "2026-04-29T11:18:09.554728941", + "timestamp": "2026-07-30T19:03:44.161949329", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/bactopia/sketcher/tests/nextflow.config b/modules/bactopia/sketcher/tests/nextflow.config index c48a53a5b..5171b2b83 100644 --- a/modules/bactopia/sketcher/tests/nextflow.config +++ b/modules/bactopia/sketcher/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of SKETCHER nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/bactopia/teton/module.config b/modules/bactopia/teton/module.config index 0499e2aa1..ce51f9b3e 100644 --- a/modules/bactopia/teton/module.config +++ b/modules/bactopia/teton/module.config @@ -14,9 +14,9 @@ process { ext.args = "" // Environment information - ext.toolName = "bioconda::bactopia-teton=1.1.3".replace("=", "-").replace(":", "-").replace(" ", "-") - ext.docker = "biocontainers/bactopia-teton:1.1.3--hdfd78af_0" - ext.image = "https://depot.galaxyproject.org/singularity/bactopia-teton:1.1.3--hdfd78af_0" + ext.toolName = "bioconda::bactopia-teton=1.1.4".replace("=", "-").replace(":", "-").replace(" ", "-") + ext.docker = "biocontainers/bactopia-teton:1.1.4--hdfd78af_0" + ext.image = "https://depot.galaxyproject.org/singularity/bactopia-teton:1.1.4--hdfd78af_0" ext.condaDir = "${params.condadir}" // Module-specific parameters diff --git a/modules/bactopia/teton/tests/main.nf.test.snap b/modules/bactopia/teton/tests/main.nf.test.snap index 25cfda13d..982601b8a 100644 --- a/modules/bactopia/teton/tests/main.nf.test.snap +++ b/modules/bactopia/teton/tests/main.nf.test.snap @@ -18,7 +18,7 @@ "versions.yml:md5,7b812154dd8f427d515417e5cfa98423" ] ], - "timestamp": "2026-04-29T11:15:38.449618682", + "timestamp": "2026-07-30T19:01:01.796760179", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -43,7 +43,7 @@ "versions.yml:md5,7b812154dd8f427d515417e5cfa98423" ] ], - "timestamp": "2026-04-29T11:15:55.492042681", + "timestamp": "2026-07-30T19:01:16.865011628", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/bactopia/teton/tests/nextflow.config b/modules/bactopia/teton/tests/nextflow.config index f16cf2b16..5612d6675 100644 --- a/modules/bactopia/teton/tests/nextflow.config +++ b/modules/bactopia/teton/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of BACTOPIA_SAMPLESHEET (teton) nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -10,26 +11,8 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true outdir = "bactopia" - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/bakta/run/tests/main.nf.test.snap b/modules/bakta/run/tests/main.nf.test.snap index 0264701c6..0382cdb29 100644 --- a/modules/bakta/run/tests/main.nf.test.snap +++ b/modules/bakta/run/tests/main.nf.test.snap @@ -15,7 +15,7 @@ "versions.yml:md5,370f7613e15ca17b54474b6c92316d6c" ] ], - "timestamp": "2026-04-29T11:20:00.580493161", + "timestamp": "2026-07-30T19:05:08.727846161", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -37,7 +37,7 @@ "versions.yml:md5,370f7613e15ca17b54474b6c92316d6c" ] ], - "timestamp": "2026-04-29T11:22:53.418790016", + "timestamp": "2026-07-30T19:08:02.3833008", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/bakta/run/tests/nextflow.config b/modules/bakta/run/tests/nextflow.config index 49117b422..2761c6aec 100644 --- a/modules/bakta/run/tests/nextflow.config +++ b/modules/bakta/run/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of BAKTA_RUN nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/blast/blastn/tests/main.nf.test.snap b/modules/blast/blastn/tests/main.nf.test.snap index 636fa0781..4aeb42fec 100644 --- a/modules/blast/blastn/tests/main.nf.test.snap +++ b/modules/blast/blastn/tests/main.nf.test.snap @@ -14,7 +14,7 @@ "versions.yml:md5,45d0dac48620078713131f03b02bd14a" ] ], - "timestamp": "2026-04-29T11:15:30.048855529", + "timestamp": "2026-07-30T19:01:01.860442122", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/blast/blastn/tests/nextflow.config b/modules/blast/blastn/tests/nextflow.config index df31131be..34fd95e54 100644 --- a/modules/blast/blastn/tests/nextflow.config +++ b/modules/blast/blastn/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of BLAST_BLASTN nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/blast/blastp/tests/main.nf.test.snap b/modules/blast/blastp/tests/main.nf.test.snap index be8ce4f70..1a414eb8a 100644 --- a/modules/blast/blastp/tests/main.nf.test.snap +++ b/modules/blast/blastp/tests/main.nf.test.snap @@ -14,7 +14,7 @@ "versions.yml:md5,617451a4191edeef7d2c7fb101c1ac14" ] ], - "timestamp": "2026-04-29T11:15:31.839259609", + "timestamp": "2026-07-30T19:01:01.585693627", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/blast/blastp/tests/nextflow.config b/modules/blast/blastp/tests/nextflow.config index b0f7240ae..f8fcaba8c 100644 --- a/modules/blast/blastp/tests/nextflow.config +++ b/modules/blast/blastp/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of BLAST_BLASTP nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/blast/blastx/tests/main.nf.test.snap b/modules/blast/blastx/tests/main.nf.test.snap index f08d01695..647f26734 100644 --- a/modules/blast/blastx/tests/main.nf.test.snap +++ b/modules/blast/blastx/tests/main.nf.test.snap @@ -14,7 +14,7 @@ "versions.yml:md5,6a3a4c2a4204ac747af921720f265d86" ] ], - "timestamp": "2026-04-29T11:15:31.209848107", + "timestamp": "2026-07-30T19:01:05.844155633", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/blast/blastx/tests/nextflow.config b/modules/blast/blastx/tests/nextflow.config index 5387cc21e..6f93ba7ae 100644 --- a/modules/blast/blastx/tests/nextflow.config +++ b/modules/blast/blastx/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of BLAST_BLASTX nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/blast/tblastn/tests/main.nf.test.snap b/modules/blast/tblastn/tests/main.nf.test.snap index cb49486d9..904ea1638 100644 --- a/modules/blast/tblastn/tests/main.nf.test.snap +++ b/modules/blast/tblastn/tests/main.nf.test.snap @@ -14,7 +14,7 @@ "versions.yml:md5,24c7db9cd7b317dcf8ad2057a04b2860" ] ], - "timestamp": "2026-04-29T11:15:30.007079346", + "timestamp": "2026-07-30T19:01:00.704641483", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/blast/tblastn/tests/nextflow.config b/modules/blast/tblastn/tests/nextflow.config index aa0e88ae6..51c06d035 100644 --- a/modules/blast/tblastn/tests/nextflow.config +++ b/modules/blast/tblastn/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of BLAST_TBLASTN nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/blast/tblastx/tests/main.nf.test.snap b/modules/blast/tblastx/tests/main.nf.test.snap index 5e474f736..10d8fc7df 100644 --- a/modules/blast/tblastx/tests/main.nf.test.snap +++ b/modules/blast/tblastx/tests/main.nf.test.snap @@ -14,7 +14,7 @@ "versions.yml:md5,2d402efb20baa10e7b3af88ef3f2312d" ] ], - "timestamp": "2026-04-29T11:15:28.369354558", + "timestamp": "2026-07-30T19:01:10.570704095", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/blast/tblastx/tests/nextflow.config b/modules/blast/tblastx/tests/nextflow.config index 5bbb21775..3050633e2 100644 --- a/modules/blast/tblastx/tests/nextflow.config +++ b/modules/blast/tblastx/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of BLAST_TBLASTX nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/bracken/module.config b/modules/bracken/module.config index 34d429106..e84347916 100644 --- a/modules/bracken/module.config +++ b/modules/bracken/module.config @@ -47,9 +47,9 @@ process { ].join(' ').replaceAll("\\s{2,}", " ").trim() // Environment information - ext.toolName = "bioconda::bactopia-teton=1.1.3".replace("=", "-").replace(":", "-").replace(" ", "-") - ext.docker = "biocontainers/bactopia-teton:1.1.3--hdfd78af_0" - ext.image = "https://depot.galaxyproject.org/singularity/bactopia-teton:1.1.3--hdfd78af_0" + ext.toolName = "bioconda::bactopia-teton=1.1.4".replace("=", "-").replace(":", "-").replace(" ", "-") + ext.docker = "biocontainers/bactopia-teton:1.1.4--hdfd78af_0" + ext.image = "https://depot.galaxyproject.org/singularity/bactopia-teton:1.1.4--hdfd78af_0" ext.condaDir = "${params.condadir}" // Module-specific parameters diff --git a/modules/bracken/tests/main.nf.test b/modules/bracken/tests/main.nf.test index adc458b2f..a2b9b2410 100644 --- a/modules/bracken/tests/main.nf.test +++ b/modules/bracken/tests/main.nf.test @@ -30,14 +30,18 @@ nextflow_process { def record = process.out[0][0] assertAll( { assert process.success }, + // Reproducible outputs { assert snapshot( record.meta, record.tsv, record.kraken2_report, - record.bracken_report, - record.abundances, - record.versions - ).match() } + record.bracken_report + ).match() }, + // Non-reproducible outputs + { assert [ + record.abundances + ].every { path(it).exists() } }, + { assert path(record.versions[0]).text.contains('bracken') } ) } } @@ -67,14 +71,18 @@ nextflow_process { def record = process.out[0][0] assertAll( { assert process.success }, + // Reproducible outputs { assert snapshot( record.meta, record.tsv, record.kraken2_report, - record.bracken_report, - record.abundances, - record.versions - ).match() } + record.bracken_report + ).match() }, + // Non-reproducible outputs + { assert [ + record.abundances + ].every { path(it).exists() } }, + { assert path(record.versions[0]).text.contains('bracken') } ) } } diff --git a/modules/bracken/tests/main.nf.test.snap b/modules/bracken/tests/main.nf.test.snap index 2d3590549..d8b036b8a 100644 --- a/modules/bracken/tests/main.nf.test.snap +++ b/modules/bracken/tests/main.nf.test.snap @@ -13,13 +13,9 @@ }, "SRR2838702.bracken.tsv:md5,ea649edb882ed5adfb200f740bcdf17e", "SRR2838702.kraken2.report.txt:md5,29a9ad9bb9b9b17a43e969f82c6e3e9f", - "SRR2838702.bracken.report.txt:md5,3ca9ddfeb074bce0b9fd1e8b8b9c8443", - "SRR2838702.bracken.abundances.txt:md5,bfc7aea2ef689c21fdab164d29d2d57b", - [ - "versions.yml:md5,1c58acfb3b27362db6c664d6757c6d53" - ] + "SRR2838702.bracken.report.txt:md5,3ca9ddfeb074bce0b9fd1e8b8b9c8443" ], - "timestamp": "2026-04-29T11:16:08.392324412", + "timestamp": "2026-07-30T19:01:31.941954637", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -38,14 +34,10 @@ "teton_reads": "SRR2838702SE.fastq.gz" }, "SRR2838702.bracken.tsv:md5,327dffe42a06c5819893b9043fc62f1a", - "SRR2838702.kraken2.report.txt:md5,8f8118f0d4eb6cef15f76c5c1fe880b8", - "SRR2838702.bracken.report.txt:md5,03fceefeff81b30a0fd7390584b5e5aa", - "SRR2838702.bracken.abundances.txt:md5,64fb9c79e36082acae54ead9cc8dcf83", - [ - "versions.yml:md5,1c58acfb3b27362db6c664d6757c6d53" - ] + "SRR2838702.kraken2.report.txt:md5,d883be153ee044e74a9504c128f20ccd", + "SRR2838702.bracken.report.txt:md5,2ed70b1d772694c9737e5c817efd2d97" ], - "timestamp": "2026-04-29T11:19:50.777475925", + "timestamp": "2026-07-30T19:05:08.82532146", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/bracken/tests/nextflow.config b/modules/bracken/tests/nextflow.config index 50eeb8438..d170f5674 100644 --- a/modules/bracken/tests/nextflow.config +++ b/modules/bracken/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of BRACKEN nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -10,25 +11,10 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB max_cpus = 12 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/btyper3/tests/main.nf.test.snap b/modules/btyper3/tests/main.nf.test.snap index c96f5b027..0efdbf299 100644 --- a/modules/btyper3/tests/main.nf.test.snap +++ b/modules/btyper3/tests/main.nf.test.snap @@ -14,7 +14,7 @@ "versions.yml:md5,d417e0067e48969f3cc66f12727471ba" ] ], - "timestamp": "2026-04-29T11:19:23.171937712", + "timestamp": "2026-07-30T19:04:42.381040781", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -35,7 +35,7 @@ "versions.yml:md5,d417e0067e48969f3cc66f12727471ba" ] ], - "timestamp": "2026-04-29T11:17:24.997856437", + "timestamp": "2026-07-30T19:02:46.436132943", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/btyper3/tests/nextflow.config b/modules/btyper3/tests/nextflow.config index 55f16cc0f..2fe481d3f 100644 --- a/modules/btyper3/tests/nextflow.config +++ b/modules/btyper3/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of BTYPER3 nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/busco/module.config b/modules/busco/module.config index c0cdd6daf..037b7c51e 100644 --- a/modules/busco/module.config +++ b/modules/busco/module.config @@ -34,9 +34,9 @@ process { ].join(' ').replaceAll("\\s{2,}", " ").trim() // Environment information - ext.toolName = "bioconda::busco=6.0.0".replace("=", "-").replace(":", "-").replace(" ", "-") - ext.docker = "biocontainers/busco:6.0.0--pyhdfd78af_3" - ext.image = "https://depot.galaxyproject.org/singularity/busco:6.0.0--pyhdfd78af_3" + ext.toolName = "bioconda::busco=6.1.0".replace("=", "-").replace(":", "-").replace(" ", "-") + ext.docker = "biocontainers/busco:6.1.0--pyhdfd78af_1" + ext.image = "https://depot.galaxyproject.org/singularity/busco:6.1.0--pyhdfd78af_1" ext.condaDir = "${params.condadir}" // Module-specific parameters diff --git a/modules/busco/tests/main.nf.test.snap b/modules/busco/tests/main.nf.test.snap index 2f758591d..c0fd5c1c9 100644 --- a/modules/busco/tests/main.nf.test.snap +++ b/modules/busco/tests/main.nf.test.snap @@ -11,10 +11,10 @@ }, "SRR2838702-summary.txt:md5,d1cbbfb9ab7dee0204bfa26f3b982620", [ - "versions.yml:md5,f0c1c6e03db9f8846867b50f08126e1b" + "versions.yml:md5,63a54671479080ef196761c11a1d1ee9" ] ], - "timestamp": "2026-04-29T11:16:54.42682481", + "timestamp": "2026-07-30T19:02:00.498495737", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -32,10 +32,10 @@ }, "SRR2838702-summary.txt:md5,6f1755af3cdf443a46475b3cac0e37cf", [ - "versions.yml:md5,f0c1c6e03db9f8846867b50f08126e1b" + "versions.yml:md5,63a54671479080ef196761c11a1d1ee9" ] ], - "timestamp": "2026-04-29T11:16:14.368804183", + "timestamp": "2026-07-30T19:01:23.518262947", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/busco/tests/nextflow.config b/modules/busco/tests/nextflow.config index 8231daf08..9dfa990bf 100644 --- a/modules/busco/tests/nextflow.config +++ b/modules/busco/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of BUSCO nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/checkm/lineagewf/tests/main.nf.test.snap b/modules/checkm/lineagewf/tests/main.nf.test.snap index 5ab7f5876..3db817e54 100644 --- a/modules/checkm/lineagewf/tests/main.nf.test.snap +++ b/modules/checkm/lineagewf/tests/main.nf.test.snap @@ -14,7 +14,7 @@ "versions.yml:md5,26aa8d1005c5ccafccfe332302d24f80" ] ], - "timestamp": "2026-04-29T11:25:13.069448253", + "timestamp": "2026-07-30T19:10:50.721728279", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -35,7 +35,7 @@ "versions.yml:md5,26aa8d1005c5ccafccfe332302d24f80" ] ], - "timestamp": "2026-04-29T11:26:52.020682491", + "timestamp": "2026-07-30T19:12:42.276902775", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/checkm/lineagewf/tests/nextflow.config b/modules/checkm/lineagewf/tests/nextflow.config index 1eb333169..44464ea5d 100644 --- a/modules/checkm/lineagewf/tests/nextflow.config +++ b/modules/checkm/lineagewf/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of CHECKM_LINEAGEWF nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/checkm2/predict/tests/main.nf.test.snap b/modules/checkm2/predict/tests/main.nf.test.snap index 760de478b..35bbd8b0f 100644 --- a/modules/checkm2/predict/tests/main.nf.test.snap +++ b/modules/checkm2/predict/tests/main.nf.test.snap @@ -14,7 +14,7 @@ "versions.yml:md5,f13e02312d6a08ca746e6de2659d8195" ] ], - "timestamp": "2026-04-29T11:25:49.447579673", + "timestamp": "2026-07-30T19:10:34.905820971", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -35,7 +35,7 @@ "versions.yml:md5,f13e02312d6a08ca746e6de2659d8195" ] ], - "timestamp": "2026-04-29T11:20:50.020786938", + "timestamp": "2026-07-30T19:06:07.118903521", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/checkm2/predict/tests/nextflow.config b/modules/checkm2/predict/tests/nextflow.config index e0a7b1520..2c37e0343 100644 --- a/modules/checkm2/predict/tests/nextflow.config +++ b/modules/checkm2/predict/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of CHECKM2_PREDICT nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/clermontyping/module.config b/modules/clermontyping/module.config index 0a37032d2..f3a572271 100644 --- a/modules/clermontyping/module.config +++ b/modules/clermontyping/module.config @@ -17,7 +17,7 @@ process { ].join(' ').replaceAll("\\s{2,}", " ").trim() // Environment information - ext.toolName = "bioconda::clermontyping=24.02".replace("=", "-").replace(":", "-").replace(" ", "-") + ext.toolName = "bioconda::clermontyping=24.02 conda-forge::r-readr=2.1".replace("=", "-").replace(":", "-").replace(" ", "-") ext.docker = "biocontainers/clermontyping:24.02--py312hdfd78af_1" ext.image = "https://depot.galaxyproject.org/singularity/clermontyping:24.02--py312hdfd78af_1" ext.condaDir = "${params.condadir}" diff --git a/modules/clermontyping/tests/main.nf.test.snap b/modules/clermontyping/tests/main.nf.test.snap index ff0dd65af..8f36aa746 100644 --- a/modules/clermontyping/tests/main.nf.test.snap +++ b/modules/clermontyping/tests/main.nf.test.snap @@ -14,7 +14,7 @@ "versions.yml:md5,f4bd87be75db967a591cbfaef55ad136" ] ], - "timestamp": "2026-04-29T11:16:43.324300019", + "timestamp": "2026-07-30T19:01:59.804010965", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -35,7 +35,7 @@ "versions.yml:md5,f4bd87be75db967a591cbfaef55ad136" ] ], - "timestamp": "2026-04-29T11:16:04.914654129", + "timestamp": "2026-07-30T19:01:18.809092664", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/clermontyping/tests/nextflow.config b/modules/clermontyping/tests/nextflow.config index c1d01cfad..0acb9da7c 100644 --- a/modules/clermontyping/tests/nextflow.config +++ b/modules/clermontyping/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of CLERMONTYPING nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/clonalframeml/module.config b/modules/clonalframeml/module.config index feb4fda16..aa56e4cb7 100644 --- a/modules/clonalframeml/module.config +++ b/modules/clonalframeml/module.config @@ -20,7 +20,7 @@ process { ].join(' ').replaceAll("\\s{2,}", " ").trim() // Environment information - ext.toolName = "bioconda::clonalframeml=1.12 bioconda::maskrc-svg=0.5".replace("=", "-").replace(":", "-").replace(" ", "-") + ext.toolName = "bioconda::clonalframeml=1.12 bioconda::maskrc-svg=0.5 conda-forge::python=3.12".replace("=", "-").replace(":", "-").replace(" ", "-") ext.docker = "biocontainers/mulled-v2-f5c68f1508671d5744655da9b0e8b609098f4138:7e089189af7822a6a18245830639dbfe11a4c277-0" ext.image = "https://depot.galaxyproject.org/singularity/mulled-v2-f5c68f1508671d5744655da9b0e8b609098f4138:7e089189af7822a6a18245830639dbfe11a4c277-0" ext.condaDir = "${params.condadir}" diff --git a/modules/clonalframeml/tests/main.nf.test.snap b/modules/clonalframeml/tests/main.nf.test.snap index 516ae3021..c5bb6da41 100644 --- a/modules/clonalframeml/tests/main.nf.test.snap +++ b/modules/clonalframeml/tests/main.nf.test.snap @@ -16,7 +16,7 @@ "versions.yml:md5,34acb1ed178173aa1445f1f0a9238e64" ] ], - "timestamp": "2026-04-29T11:16:42.71640291", + "timestamp": "2026-07-30T19:02:18.126742578", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -39,7 +39,7 @@ "versions.yml:md5,34acb1ed178173aa1445f1f0a9238e64" ] ], - "timestamp": "2026-04-29T11:18:05.517482702", + "timestamp": "2026-07-30T19:03:39.064087697", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/clonalframeml/tests/nextflow.config b/modules/clonalframeml/tests/nextflow.config index eb4cce809..e092e8d74 100644 --- a/modules/clonalframeml/tests/nextflow.config +++ b/modules/clonalframeml/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of CLONALFRAMEML nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/csvtk/concat/tests/main.nf.test.snap b/modules/csvtk/concat/tests/main.nf.test.snap index bb88d11fa..7dc2f21d5 100644 --- a/modules/csvtk/concat/tests/main.nf.test.snap +++ b/modules/csvtk/concat/tests/main.nf.test.snap @@ -14,7 +14,7 @@ "versions.yml:md5,c203a84cc5b289951b70302549dcf08d" ] ], - "timestamp": "2026-04-29T11:15:38.416605135", + "timestamp": "2026-07-30T19:01:06.99317976", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -35,7 +35,7 @@ "versions.yml:md5,c203a84cc5b289951b70302549dcf08d" ] ], - "timestamp": "2026-04-29T11:15:54.044146975", + "timestamp": "2026-07-30T19:01:22.210365652", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/csvtk/concat/tests/nextflow.config b/modules/csvtk/concat/tests/nextflow.config index 414ce9b1b..ca5df16f8 100644 --- a/modules/csvtk/concat/tests/nextflow.config +++ b/modules/csvtk/concat/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of CSVTK_CONCAT nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/csvtk/join/tests/main.nf.test.snap b/modules/csvtk/join/tests/main.nf.test.snap index 01de082ed..6e621acea 100644 --- a/modules/csvtk/join/tests/main.nf.test.snap +++ b/modules/csvtk/join/tests/main.nf.test.snap @@ -14,7 +14,7 @@ "versions.yml:md5,b80d80628bb39bba336cff32fe502aac" ] ], - "timestamp": "2026-04-29T11:15:35.884363273", + "timestamp": "2026-07-30T19:00:59.285867921", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -35,7 +35,7 @@ "versions.yml:md5,b80d80628bb39bba336cff32fe502aac" ] ], - "timestamp": "2026-04-29T11:15:51.646604522", + "timestamp": "2026-07-30T19:01:12.091971745", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/csvtk/join/tests/nextflow.config b/modules/csvtk/join/tests/nextflow.config index 70642a34a..eb9446b5f 100644 --- a/modules/csvtk/join/tests/nextflow.config +++ b/modules/csvtk/join/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of CSVTK_JOIN nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/deacon/fetch/main.nf b/modules/deacon/fetch/main.nf new file mode 100644 index 000000000..e91c4f5c6 --- /dev/null +++ b/modules/deacon/fetch/main.nf @@ -0,0 +1,59 @@ +/** + * Fetch a pre-built deacon index for host read filtering. + * + * Uses [deacon](https://github.com/bede/deacon) to download a pre-built minimizer index + * for filtering host reads from sequencing data. The default index is `panhuman-1`, which + * covers human reference genomes for human read depletion. + * + * @status stable + * @keywords host, decontamination, depletion, download, index, minimizer, deacon + * @tags complexity:simple input-type:none output-type:single features:internet-access,resource-download,no-test + * @citation deacon + * + * @note Internet Required + * This process requires an active internet connection to fetch the pre-built index. + * + * @output record(db, logs) + * - `db`: The pre-built deacon minimizer index file + */ +nextflow.enable.types = true + +// bactopia-lint: ignore M012,M017,M018,M022,M023,M024,M025,M026,M028 +process DEACON_FETCH { + label 'process_single' + + conda "${task.ext.condaDir}/${task.ext.toolName}" + container "${task.ext.container}" + + output: + record( + db: file("${prefix}/${task.ext.deacon_index_name}.idx"), + logs: files("${prefix}/logs/*", optional: true) + ) + + script: + prefix = task.ext.process_name + """ + mkdir -p ${prefix}/logs + + deacon \\ + index \\ + fetch \\ + ${task.ext.deacon_index_name} \\ + > ${prefix}/${task.ext.deacon_index_name}.idx + + # Move outputs to tool specific folder + cp .command.begin ${prefix}/logs/nf.command.begin + cp .command.err ${prefix}/logs/nf.command.err + cp .command.log ${prefix}/logs/nf.command.log + cp .command.out ${prefix}/logs/nf.command.out + cp .command.run ${prefix}/logs/nf.command.run + cp .command.sh ${prefix}/logs/nf.command.sh + cp .command.trace ${prefix}/logs/nf.command.trace + + cat <<-END_VERSIONS > ${prefix}/logs/versions.yml + "${task.process}": + deacon: \$( deacon --version | head -n1 | sed 's/deacon //' ) + END_VERSIONS + """ +} diff --git a/modules/deacon/fetch/module.config b/modules/deacon/fetch/module.config new file mode 100644 index 000000000..0f4a33f38 --- /dev/null +++ b/modules/deacon/fetch/module.config @@ -0,0 +1,30 @@ +params { + // deacon_fetch + deacon_db = null + deacon_index_name = "panhuman-1" + download_deacon = false + use_deacon = false +} + +process { + withName: 'DEACON_FETCH' { + ext.wf = params.wf + ext.scope = "run" + ext.subdir = "" + ext.logs_subdir = "" + ext.process_name = "deacon_fetch" + storeDir = params.datasets_cache + + // Tool arguments + ext.args = "" + + // Environment information + ext.toolName = "bioconda::bactopia-teton=1.1.4".replace("=", "-").replace(":", "-").replace(" ", "-") + ext.docker = "biocontainers/bactopia-teton:1.1.4--hdfd78af_0" + ext.image = "https://depot.galaxyproject.org/singularity/bactopia-teton:1.1.4--hdfd78af_0" + ext.condaDir = "${params.condadir}" + + // Module-specific parameters + ext.deacon_index_name = params.deacon_index_name + } +} diff --git a/modules/deacon/fetch/schema.json b/modules/deacon/fetch/schema.json new file mode 100644 index 000000000..934e3d3e7 --- /dev/null +++ b/modules/deacon/fetch/schema.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/bactopia/bactopia/master/modules/deacon/fetch/schema.json", + "title": "Deacon Fetch Module", + "description": "A module for fetching a pre-built deacon index for host read filtering", + "type": "object", + "$defs": { + "deacon_fetch_parameters": { + "title": "Deacon Fetch Parameters", + "type": "object", + "description": "", + "default": "", + "fa_icon": "fas fa-exclamation-circle", + "properties": { + "deacon_index_name": { + "type": "string", + "default": "panhuman-1", + "description": "Name of the pre-built deacon index to fetch", + "fa_icon": "fas fa-font" + }, + "download_deacon": { + "type": "boolean", + "default": false, + "description": "Download the deacon index to the datasets cache", + "fa_icon": "fas fa-toggle-on" + }, + "use_deacon": { + "type": "boolean", + "default": false, + "description": "Use deacon for host read filtering", + "fa_icon": "fas fa-toggle-on" + } + } + } + }, + "allOf": [ + { + "$ref": "#/$defs/deacon_fetch_parameters" + } + ] +} diff --git a/modules/deacon/filter/main.nf b/modules/deacon/filter/main.nf new file mode 100644 index 000000000..c084e66f2 --- /dev/null +++ b/modules/deacon/filter/main.nf @@ -0,0 +1,159 @@ +/** + * Filter host reads from sequencing data using minimizer-based comparison. + * + * Uses [deacon](https://github.com/bede/deacon) to identify and remove host reads from + * FASTQ files using SIMD-accelerated minimizer comparison against a pre-built or custom + * reference index. Supports paired-end, single-end, and long reads. + * + * @status stable + * @keywords host, contamination, decontamination, depletion, filtering, minimizer, reads, deacon + * @tags complexity:moderate input-type:single output-type:multiple features:database-dependent,conditional-logic + * @citation deacon + * + * @note Database Required + * Requires a deacon minimizer index. Use the deacon/fetch module to download a pre-built + * index (e.g., panhuman-1) or deacon/index to build one from a reference FASTA. + * + * @input record(meta, r1?, r2?, se?, lr?) + * - `meta`: Groovy Record containing sample information + * - `r1?`: Illumina R1 reads (paired-end forward) + * - `r2?`: Illumina R2 reads (paired-end reverse) + * - `se?`: Single-end Illumina reads + * - `lr?`: Long reads (ONT/PacBio) + * + * @input db + * Deacon minimizer index file (.idx) for host read filtering + * + * @output record(meta, special_meta, r1?, r2?, se?, lr?, scrub_report, json_summary, results, logs, nf_logs, versions) + * - `special_meta`: A simplified metadata record for downstream report joining + * - `r1?`: Filtered paired-end forward reads + * - `r2?`: Filtered paired-end reverse reads + * - `se?`: Filtered single-end reads + * - `lr?`: Filtered long reads + * - `scrub_report`: Summary report of reads removed during filtering + * - `json_summary`: Deacon JSON summary of the filtering run + */ +nextflow.enable.types = true + +process DEACON_FILTER { + tag "${prefix}" + label 'process_low' + + conda "${task.ext.condaDir}/${task.ext.toolName}" + container "${task.ext.container}" + + input: + record ( + meta: Record, + r1: Path?, + r2: Path?, + se: Path?, + lr: Path? + ) + db: Path + + output: + record( + // Named fields (used downstream) + meta: meta, + special_meta: special_meta, + r1: file("${prefix}_R1.scrubbed.fastq.gz", optional: true), + r2: file("${prefix}_R2.scrubbed.fastq.gz", optional: true), + se: file("${prefix}.scrubbed.fastq.gz", optional: true), + lr: file("${prefix}.scrubbed.fastq.gz", optional: true), + scrub_report: file("${prefix}.scrub.report.tsv"), + json_summary: file("${prefix}.deacon.json"), + // Generic fields (used for publishing) + results: [ + files("${prefix}*.scrubbed.fastq.gz"), + files("${prefix}.scrub.report.tsv"), + files("${prefix}.deacon.json") + ], + logs: files("*.{log,err}", optional: true), + nf_logs: files(".command.*"), + versions: files("versions.yml") + ) + + script: + def _meta = meta + prefix = task.ext.prefix ?: "${_meta.name}" + output_folder = task.ext.wf == "scrubber" || task.ext.wf == "teton" ? "scrubber" : "${task.ext.process_name}" + + // Determine read type from explicit slots + has_r1 = r1 != null + has_r2 = r2 != null + has_se = se != null + has_lr = lr != null + + // Create a new meta variable + meta = record( + id: "${prefix}-${task.process}", + name: prefix, + scope: task.ext.scope, + output_dir: "${prefix}/tools/${output_folder}", + logs_dir: "${prefix}/tools/${output_folder}/logs/${task.ext.logs_subdir}", + process_name: task.ext.process_name, + single_end: (has_se || has_lr) && !has_r1 && !has_r2, + runtype: _meta.runtype != null ? _meta.runtype : (has_r1 && has_r2 ? "paired-end" : (has_lr ? "lr" : "se")) + ) + + // Simplified meta for downstream report joining + special_meta = record( + name: prefix + ) + + // Pick the single-file input (se or lr) + def single_reads = has_se ? "${se}" : "${lr}" + if (meta.single_end) { + """ + deacon \\ + filter \\ + --threads ${task.cpus} \\ + --summary ${prefix}.deacon.json \\ + ${task.ext.args} \\ + ${db} \\ + ${single_reads} \\ + -o ${prefix}.scrubbed.fastq.gz + + # Quick stats on reads + zcat ${single_reads} | fastq-scan > original.json + zcat *.scrubbed.fastq.gz | fastq-scan > scrubbed.json + bactopia-scrubber-summary ${prefix} original.json scrubbed.json > ${prefix}.scrub.report.tsv + + # Cleanup + rm original.json scrubbed.json + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + deacon: \$( deacon --version | head -n1 | sed 's/deacon //' ) + fastq-scan: \$(echo \$(fastq-scan -v 2>&1) | sed 's/fastq-scan //') + END_VERSIONS + """ + } else { + """ + deacon \\ + filter \\ + --threads ${task.cpus} \\ + --summary ${prefix}.deacon.json \\ + ${task.ext.args} \\ + ${db} \\ + ${r1} ${r2} \\ + -o ${prefix}_R1.scrubbed.fastq.gz \\ + -O ${prefix}_R2.scrubbed.fastq.gz + + # Quick stats on reads + zcat ${r1} ${r2} | fastq-scan > original.json + zcat *.scrubbed.fastq.gz | fastq-scan > scrubbed.json + bactopia-scrubber-summary ${prefix} original.json scrubbed.json > ${prefix}.scrub.report.tsv + + # Cleanup + rm original.json scrubbed.json + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + deacon: \$( deacon --version | head -n1 | sed 's/deacon //' ) + fastq-scan: \$(echo \$(fastq-scan -v 2>&1) | sed 's/fastq-scan //') + END_VERSIONS + """ + } +} diff --git a/modules/deacon/filter/module.config b/modules/deacon/filter/module.config new file mode 100644 index 000000000..e5b5a624b --- /dev/null +++ b/modules/deacon/filter/module.config @@ -0,0 +1,33 @@ +params { + // deacon_filter + deacon_abs_threshold = 2 + deacon_deplete = true + deacon_opts = "" + deacon_prefix_length = 0 + deacon_rel_threshold = 0.01 +} + +process { + withName: 'DEACON_FILTER' { + ext.wf = params.wf + ext.scope = "sample" + ext.subdir = "" + ext.logs_subdir = "" + ext.process_name = "deacon" + + // Tool arguments + ext.args = [ + params.deacon_deplete ? "-d" : "", + params.deacon_abs_threshold != 2 ? "-a ${params.deacon_abs_threshold}" : "", + params.deacon_rel_threshold != 0.01 ? "-r ${params.deacon_rel_threshold}" : "", + params.deacon_prefix_length > 0 ? "-p ${params.deacon_prefix_length}" : "", + params.deacon_opts ? "${params.deacon_opts}" : "" + ].join(' ').replaceAll("\\s{2,}", " ").trim() + + // Environment information + ext.toolName = "bioconda::bactopia-teton=1.1.4".replace("=", "-").replace(":", "-").replace(" ", "-") + ext.docker = "biocontainers/bactopia-teton:1.1.4--hdfd78af_0" + ext.image = "https://depot.galaxyproject.org/singularity/bactopia-teton:1.1.4--hdfd78af_0" + ext.condaDir = "${params.condadir}" + } +} diff --git a/modules/deacon/filter/schema.json b/modules/deacon/filter/schema.json new file mode 100644 index 000000000..0604b7b9a --- /dev/null +++ b/modules/deacon/filter/schema.json @@ -0,0 +1,59 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/bactopia/bactopia/master/modules/deacon/filter/schema.json", + "title": "Deacon Filter Module", + "description": "A module for filtering host reads from sequencing data using minimizer-based comparison", + "type": "object", + "$defs": { + "deacon_filter_parameters": { + "title": "Deacon Filter Parameters", + "type": "object", + "description": "", + "default": "", + "fa_icon": "fas fa-exclamation-circle", + "properties": { + "deacon_abs_threshold": { + "type": "integer", + "default": 2, + "description": "Minimum absolute number of minimizer hits for a match", + "fa_icon": "fas fa-hashtag" + }, + "deacon_db": { + "type": "string", + "default": "", + "description": "Path to a pre-existing deacon index (.idx) for host read filtering", + "fa_icon": "fas fa-font" + }, + "deacon_deplete": { + "type": "boolean", + "default": true, + "description": "Discard matching sequences instead of keeping them", + "fa_icon": "fas fa-toggle-on" + }, + "deacon_opts": { + "type": "string", + "default": "", + "description": "Additional deacon filter options not covered by other parameters", + "fa_icon": "fas fa-font" + }, + "deacon_prefix_length": { + "type": "integer", + "default": 0, + "description": "Search only the first N nucleotides per sequence (0 for all)", + "fa_icon": "fas fa-hashtag" + }, + "deacon_rel_threshold": { + "type": "number", + "default": 0.01, + "description": "Minimum relative proportion (0.0-1.0) of minimizer hits for a match", + "fa_icon": "fas fa-percentage" + } + } + } + }, + "allOf": [ + { + "$ref": "#/$defs/deacon_filter_parameters" + } + ] +} diff --git a/modules/deacon/filter/tests/main.nf.test b/modules/deacon/filter/tests/main.nf.test new file mode 100644 index 000000000..3e12ad2c6 --- /dev/null +++ b/modules/deacon/filter/tests/main.nf.test @@ -0,0 +1,123 @@ +nextflow_process { + name "Test DEACON_FILTER" + script "../main.nf" + process "DEACON_FILTER" + tag "modules" + tag "deacon" + tag "deacon_filter" + + test("deacon_filter - module - SRR2838702 - PE") { + when { + params { + test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" + } + process { + """ + input[0] = Channel.of( + record( + meta: [name: "SRR2838702"], + r1: file("${params.test_data_dir}/species/portiera/reads/illumina/SRR2838702_R1.fastq.gz"), + r2: file("${params.test_data_dir}/species/portiera/reads/illumina/SRR2838702_R2.fastq.gz"), + se: null, + lr: null + ) + ) + input[1] = file("${params.test_data_dir}/datasets/deacon/panhuman-1.idx") + """ + } + } + + then { + def record = process.out[0][0] + assertAll( + { assert process.success }, + { assert record.r1 != null }, + { assert record.r2 != null }, + { assert record.scrub_report != null }, + { assert record.special_meta != null }, + { assert snapshot( + record.meta, + record.special_meta, + record.scrub_report, + record.versions + ).match() } + ) + } + } + + test("deacon_filter - module - SRR2838702 - SE") { + when { + params { + test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" + } + process { + """ + input[0] = Channel.of( + record( + meta: [name: "SRR2838702"], + r1: null, + r2: null, + se: file("${params.test_data_dir}/species/portiera/reads/illumina/SRR2838702SE.fastq.gz"), + lr: null + ) + ) + input[1] = file("${params.test_data_dir}/datasets/deacon/panhuman-1.idx") + """ + } + } + + then { + def record = process.out[0][0] + assertAll( + { assert process.success }, + { assert record.se != null }, + { assert record.scrub_report != null }, + { assert record.special_meta != null }, + { assert snapshot( + record.meta, + record.special_meta, + record.scrub_report, + record.versions + ).match() } + ) + } + } + + test("deacon_filter - module - ERR3772599 - LR") { + when { + params { + test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" + } + process { + """ + input[0] = Channel.of( + record( + meta: [name: "ERR3772599"], + r1: null, + r2: null, + se: null, + lr: file("${params.test_data_dir}/species/portiera/reads/nanopore/ERR3772599.fastq.gz") + ) + ) + input[1] = file("${params.test_data_dir}/datasets/deacon/panhuman-1.idx") + """ + } + } + + then { + def record = process.out[0][0] + assertAll( + { assert process.success }, + { assert record.lr != null }, + { assert record.scrub_report != null }, + { assert record.special_meta != null }, + { assert snapshot( + record.meta, + record.special_meta, + record.scrub_report, + record.versions + ).match() } + ) + } + } +} diff --git a/modules/deacon/filter/tests/main.nf.test.snap b/modules/deacon/filter/tests/main.nf.test.snap new file mode 100644 index 000000000..92ba46cce --- /dev/null +++ b/modules/deacon/filter/tests/main.nf.test.snap @@ -0,0 +1,80 @@ +{ + "deacon_filter - module - ERR3772599 - LR": { + "content": [ + { + "id": "ERR3772599-DEACON_FILTER", + "logs_dir": "ERR3772599/tools/deacon/logs/", + "name": "ERR3772599", + "output_dir": "ERR3772599/tools/deacon", + "process_name": "deacon", + "runtype": "lr", + "scope": "sample", + "single_end": true + }, + { + "name": "ERR3772599" + }, + "ERR3772599.scrub.report.tsv:md5,09560c6e71aa935477497e7c70b09783", + [ + "versions.yml:md5,7b45b6c5acaead3263ddcf10a6b7b1c3" + ] + ], + "timestamp": "2026-07-30T19:02:31.608511666", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + }, + "deacon_filter - module - SRR2838702 - SE": { + "content": [ + { + "id": "SRR2838702-DEACON_FILTER", + "logs_dir": "SRR2838702/tools/deacon/logs/", + "name": "SRR2838702", + "output_dir": "SRR2838702/tools/deacon", + "process_name": "deacon", + "runtype": "se", + "scope": "sample", + "single_end": true + }, + { + "name": "SRR2838702" + }, + "SRR2838702.scrub.report.tsv:md5,e410acaf72867214ee63f0e2927141b7", + [ + "versions.yml:md5,7b45b6c5acaead3263ddcf10a6b7b1c3" + ] + ], + "timestamp": "2026-07-30T19:01:57.161551068", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + }, + "deacon_filter - module - SRR2838702 - PE": { + "content": [ + { + "id": "SRR2838702-DEACON_FILTER", + "logs_dir": "SRR2838702/tools/deacon/logs/", + "name": "SRR2838702", + "output_dir": "SRR2838702/tools/deacon", + "process_name": "deacon", + "runtype": "paired-end", + "scope": "sample", + "single_end": false + }, + { + "name": "SRR2838702" + }, + "SRR2838702.scrub.report.tsv:md5,fa4967e6660c5d5939e60f387876500f", + [ + "versions.yml:md5,7b45b6c5acaead3263ddcf10a6b7b1c3" + ] + ], + "timestamp": "2026-07-30T19:01:25.369991526", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + } +} \ No newline at end of file diff --git a/modules/deacon/filter/tests/nextflow.config b/modules/deacon/filter/tests/nextflow.config new file mode 100644 index 000000000..88de10025 --- /dev/null +++ b/modules/deacon/filter/tests/nextflow.config @@ -0,0 +1,19 @@ +// Minimal config for module-level testing of DEACON_FILTER +nextflow.enable.types = true +nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" + +params { + workflow { + name = "deacon" + logo_name = "bactopia-tools" + description = "Filter host reads from sequencing data" + ext = "fna" + } + + wf = params.workflow.name +} + +includeConfig "../module.config" +includeConfig "../../../../conf/base.config" +includeConfig "../../../../conf/profiles.config" diff --git a/modules/ncbigenomedownload/tests/nf-test.config b/modules/deacon/filter/tests/nf-test.config similarity index 100% rename from modules/ncbigenomedownload/tests/nf-test.config rename to modules/deacon/filter/tests/nf-test.config diff --git a/modules/deacon/index/main.nf b/modules/deacon/index/main.nf new file mode 100644 index 000000000..e04547b69 --- /dev/null +++ b/modules/deacon/index/main.nf @@ -0,0 +1,69 @@ +/** + * Build a deacon minimizer index from a FASTA reference genome. + * + * Uses [deacon](https://github.com/bede/deacon) to build a minimizer index from a reference + * genome in FASTA format. The resulting index is used by the deacon filter module to remove + * host contamination from sequencing reads via SIMD-accelerated minimizer comparison. + * + * @status stable + * @keywords host, decontamination, depletion, index, minimizer, reference, deacon + * @tags complexity:simple input-type:single output-type:single features:no-test + * @citation deacon + * + * @note Build Once + * This process builds a minimizer index from a reference FASTA. The index is cached + * via storeDir and only needs to be built once per reference genome. + * + * @input reference + * Reference genome in FASTA format to build the minimizer index from + * + * @output record(db, logs) + * - `db`: The built deacon minimizer index file + */ +nextflow.enable.types = true + +// bactopia-lint: ignore M012,M017,M018,M022,M023,M024,M025,M026,M028 +process DEACON_INDEX { + tag "deacon-index" + label 'process_medium' + + conda "${task.ext.condaDir}/${task.ext.toolName}" + container "${task.ext.container}" + + input: + reference: Path + + output: + record( + db: file("${prefix}/deacon-index.idx"), + logs: files("${prefix}/logs/*", optional: true) + ) + + script: + prefix = task.ext.process_name + """ + mkdir -p ${prefix}/logs + + deacon \\ + index \\ + build \\ + --threads ${task.cpus} \\ + ${task.ext.args} \\ + ${reference} \\ + > ${prefix}/deacon-index.idx + + # Move outputs to tool specific folder + cp .command.begin ${prefix}/logs/nf.command.begin + cp .command.err ${prefix}/logs/nf.command.err + cp .command.log ${prefix}/logs/nf.command.log + cp .command.out ${prefix}/logs/nf.command.out + cp .command.run ${prefix}/logs/nf.command.run + cp .command.sh ${prefix}/logs/nf.command.sh + cp .command.trace ${prefix}/logs/nf.command.trace + + cat <<-END_VERSIONS > ${prefix}/logs/versions.yml + "${task.process}": + deacon: \$( deacon --version | head -n1 | sed 's/deacon //' ) + END_VERSIONS + """ +} diff --git a/modules/deacon/index/module.config b/modules/deacon/index/module.config new file mode 100644 index 000000000..392dde1e3 --- /dev/null +++ b/modules/deacon/index/module.config @@ -0,0 +1,23 @@ +params { + // deacon_index +} + +process { + withName: 'DEACON_INDEX' { + ext.wf = params.wf + ext.scope = "run" + ext.subdir = "" + ext.logs_subdir = "" + ext.process_name = "deacon_index" + storeDir = params.datasets_cache + + // Tool arguments + ext.args = "" + + // Environment information + ext.toolName = "bioconda::bactopia-teton=1.1.4".replace("=", "-").replace(":", "-").replace(" ", "-") + ext.docker = "biocontainers/bactopia-teton:1.1.4--hdfd78af_0" + ext.image = "https://depot.galaxyproject.org/singularity/bactopia-teton:1.1.4--hdfd78af_0" + ext.condaDir = "${params.condadir}" + } +} diff --git a/modules/deacon/index/schema.json b/modules/deacon/index/schema.json new file mode 100644 index 000000000..568b2cf6b --- /dev/null +++ b/modules/deacon/index/schema.json @@ -0,0 +1,29 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/bactopia/bactopia/master/modules/deacon/index/schema.json", + "title": "Deacon Index Module", + "description": "A module for building a deacon minimizer index from a reference genome", + "type": "object", + "$defs": { + "deacon_index_parameters": { + "title": "Deacon Index Parameters", + "type": "object", + "description": "", + "default": "", + "fa_icon": "fas fa-exclamation-circle", + "properties": { + "deacon_reference": { + "type": "string", + "default": "", + "description": "Path to a reference genome FASTA file to build the deacon index from", + "fa_icon": "fas fa-font" + } + } + } + }, + "allOf": [ + { + "$ref": "#/$defs/deacon_index_parameters" + } + ] +} diff --git a/modules/defensefinder/run/module.config b/modules/defensefinder/run/module.config index d4eaa35a5..1aa5002f8 100644 --- a/modules/defensefinder/run/module.config +++ b/modules/defensefinder/run/module.config @@ -23,9 +23,9 @@ process { ].join(' ').replaceAll("\\s{2,}", " ").trim() // Environment information - ext.toolName = "bioconda::defense-finder=2.0.1".replace("=", "-").replace(":", "-").replace(" ", "-") - ext.docker = "biocontainers/defense-finder:2.0.1--pyhdfd78af_0" - ext.image = "https://depot.galaxyproject.org/singularity/defense-finder:2.0.1--pyhdfd78af_0" + ext.toolName = "bioconda::defense-finder=3.0.0".replace("=", "-").replace(":", "-").replace(" ", "-") + ext.docker = "biocontainers/defense-finder:3.0.0--pyhdfd78af_0" + ext.image = "https://depot.galaxyproject.org/singularity/defense-finder:3.0.0--pyhdfd78af_0" ext.condaDir = "${params.condadir}" // Module-specific parameters diff --git a/modules/defensefinder/run/schema.json b/modules/defensefinder/run/schema.json index e0c704472..51e6cf260 100644 --- a/modules/defensefinder/run/schema.json +++ b/modules/defensefinder/run/schema.json @@ -31,12 +31,14 @@ }, "defensefinder_preserveraw": { "type": "boolean", + "default": false, "description": "Preserve raw MacsyFinder outputs alongside Defense Finder results inside the output directory", "fa_icon": "fas fa-toggle-on", "hidden": true }, "defensefinder_nocutga": { "type": "boolean", + "default": false, "description": "Advanced! Run macsyfinder in no-cut-ga mode. The validity of the genes and systems found is not guaranteed!", "fa_icon": "fas fa-toggle-on", "hidden": true diff --git a/modules/defensefinder/run/tests/main.nf.test.snap b/modules/defensefinder/run/tests/main.nf.test.snap index 7ca2d4159..ff8b74454 100644 --- a/modules/defensefinder/run/tests/main.nf.test.snap +++ b/modules/defensefinder/run/tests/main.nf.test.snap @@ -16,7 +16,7 @@ "versions.yml:md5,96378138554cc40b07841aed5efb3e7d" ] ], - "timestamp": "2026-04-29T11:16:13.441035414", + "timestamp": "2026-07-30T19:01:39.151339268", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/defensefinder/run/tests/nextflow.config b/modules/defensefinder/run/tests/nextflow.config index 0e4f33ae6..f9434ab27 100644 --- a/modules/defensefinder/run/tests/nextflow.config +++ b/modules/defensefinder/run/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of DEFENSEFINDER_RUN nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/defensefinder/update/module.config b/modules/defensefinder/update/module.config index 900a19249..9ac900008 100644 --- a/modules/defensefinder/update/module.config +++ b/modules/defensefinder/update/module.config @@ -15,9 +15,9 @@ process { ext.args = "" // Environment information - ext.toolName = "bioconda::defense-finder=2.0.1".replace("=", "-").replace(":", "-").replace(" ", "-") - ext.docker = "biocontainers/defense-finder:2.0.1--pyhdfd78af_0" - ext.image = "https://depot.galaxyproject.org/singularity/defense-finder:2.0.1--pyhdfd78af_0" + ext.toolName = "bioconda::defense-finder=3.0.0".replace("=", "-").replace(":", "-").replace(" ", "-") + ext.docker = "biocontainers/defense-finder:3.0.0--pyhdfd78af_0" + ext.image = "https://depot.galaxyproject.org/singularity/defense-finder:3.0.0--pyhdfd78af_0" ext.condaDir = "${params.condadir}" // Module-specific parameters diff --git a/modules/defensefinder/update/tests/nextflow.config b/modules/defensefinder/update/tests/nextflow.config index 88f400f3f..d11726604 100644 --- a/modules/defensefinder/update/tests/nextflow.config +++ b/modules/defensefinder/update/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of DEFENSEFINDER_UPDATE nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/ectyper/tests/main.nf.test.snap b/modules/ectyper/tests/main.nf.test.snap index e721d41a0..383144dbf 100644 --- a/modules/ectyper/tests/main.nf.test.snap +++ b/modules/ectyper/tests/main.nf.test.snap @@ -15,7 +15,7 @@ "versions.yml:md5,8da5d25c63ebd770e9c1776106725972" ] ], - "timestamp": "2026-04-29T11:16:38.699285839", + "timestamp": "2026-07-30T19:02:07.337367191", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -37,7 +37,7 @@ "versions.yml:md5,8da5d25c63ebd770e9c1776106725972" ] ], - "timestamp": "2026-04-29T11:15:59.994882882", + "timestamp": "2026-07-30T19:01:30.096476215", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/ectyper/tests/nextflow.config b/modules/ectyper/tests/nextflow.config index b60a37ebd..efa80ab38 100644 --- a/modules/ectyper/tests/nextflow.config +++ b/modules/ectyper/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of ECTYPER nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/eggnog/download/module.config b/modules/eggnog/download/module.config index b17130859..a787616c7 100644 --- a/modules/eggnog/download/module.config +++ b/modules/eggnog/download/module.config @@ -32,9 +32,9 @@ process { ].join(' ').replaceAll("\\s{2,}", " ").trim() // Environment information - ext.toolName = "bioconda::eggnog-mapper=2.1.13".replace("=", "-").replace(":", "-").replace(" ", "-") - ext.docker = "biocontainers/eggnog-mapper:2.1.13--pyhdfd78af_2" - ext.image = "https://depot.galaxyproject.org/singularity/eggnog-mapper:2.1.13--pyhdfd78af_2" + ext.toolName = "bioconda::eggnog-mapper=2.1.15".replace("=", "-").replace(":", "-").replace(" ", "-") + ext.docker = "biocontainers/eggnog-mapper:2.1.15--pyhdfd78af_0" + ext.image = "https://depot.galaxyproject.org/singularity/eggnog-mapper:2.1.15--pyhdfd78af_0" ext.condaDir = "${params.condadir}" // Module-specific parameters diff --git a/modules/eggnog/download/schema.json b/modules/eggnog/download/schema.json index 343fcb3d5..03f351ace 100644 --- a/modules/eggnog/download/schema.json +++ b/modules/eggnog/download/schema.json @@ -25,9 +25,10 @@ "fa_icon": "fas fa-toggle-on" }, "eggnog_save_as_tarball": { - "type": "string", + "type": "boolean", + "default": false, "description": "Save the eggNOG database as a single tarball", - "fa_icon": "fas fa-font" + "fa_icon": "fas fa-toggle-on" }, "eggnog_skip_diamond": { "type": "boolean", diff --git a/modules/eggnog/mapper/module.config b/modules/eggnog/mapper/module.config index d13488fa2..692811472 100644 --- a/modules/eggnog/mapper/module.config +++ b/modules/eggnog/mapper/module.config @@ -21,9 +21,9 @@ process { ].join(' ').replaceAll("\\s{2,}", " ").trim() // Environment information - ext.toolName = "bioconda::eggnog-mapper=2.1.13".replace("=", "-").replace(":", "-").replace(" ", "-") - ext.docker = "biocontainers/eggnog-mapper:2.1.13--pyhdfd78af_2" - ext.image = "https://depot.galaxyproject.org/singularity/eggnog-mapper:2.1.13--pyhdfd78af_2" + ext.toolName = "bioconda::eggnog-mapper=2.1.15".replace("=", "-").replace(":", "-").replace(" ", "-") + ext.docker = "biocontainers/eggnog-mapper:2.1.15--pyhdfd78af_0" + ext.image = "https://depot.galaxyproject.org/singularity/eggnog-mapper:2.1.15--pyhdfd78af_0" ext.condaDir = "${params.condadir}" } } diff --git a/modules/eggnog/mapper/tests/main.nf.test b/modules/eggnog/mapper/tests/main.nf.test index 43470b746..83e9c3b50 100644 --- a/modules/eggnog/mapper/tests/main.nf.test +++ b/modules/eggnog/mapper/tests/main.nf.test @@ -28,10 +28,12 @@ nextflow_process { def record = process.out[0][0] assertAll( { assert process.success }, + // Reproducible outputs { assert snapshot( - record.meta, - record.versions - ).match() } + record.meta + ).match() }, + // Non-reproducible outputs + { assert path(record.versions[0]).text.contains('eggnog-mapper') } ) } } @@ -58,10 +60,12 @@ nextflow_process { def record = process.out[0][0] assertAll( { assert process.success }, + // Reproducible outputs { assert snapshot( - record.meta, - record.versions - ).match() } + record.meta + ).match() }, + // Non-reproducible outputs + { assert path(record.versions[0]).text.contains('eggnog-mapper') } ) } } diff --git a/modules/eggnog/mapper/tests/main.nf.test.snap b/modules/eggnog/mapper/tests/main.nf.test.snap index b247c7e47..5b94aba1a 100644 --- a/modules/eggnog/mapper/tests/main.nf.test.snap +++ b/modules/eggnog/mapper/tests/main.nf.test.snap @@ -8,12 +8,9 @@ "output_dir": "SRR2838702/tools/eggnog/", "process_name": "eggnog", "scope": "sample" - }, - [ - "versions.yml:md5,2784870d86d92b80930b2cc28c81757d" - ] + } ], - "timestamp": "2026-04-29T11:29:26.491545586", + "timestamp": "2026-07-30T19:15:27.85648084", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -28,12 +25,9 @@ "output_dir": "SRR2838702/tools/eggnog/", "process_name": "eggnog", "scope": "sample" - }, - [ - "versions.yml:md5,2784870d86d92b80930b2cc28c81757d" - ] + } ], - "timestamp": "2026-04-29T11:33:43.79747669", + "timestamp": "2026-07-30T19:21:08.051829481", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/eggnog/mapper/tests/nextflow.config b/modules/eggnog/mapper/tests/nextflow.config index c11fe59be..9a7b70a18 100644 --- a/modules/eggnog/mapper/tests/nextflow.config +++ b/modules/eggnog/mapper/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of EGGNOG_MAPPER nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -10,25 +11,10 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB max_cpus = 12 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/emmtyper/tests/main.nf.test.snap b/modules/emmtyper/tests/main.nf.test.snap index 00b20c4a6..8208d216d 100644 --- a/modules/emmtyper/tests/main.nf.test.snap +++ b/modules/emmtyper/tests/main.nf.test.snap @@ -14,7 +14,7 @@ "versions.yml:md5,8028be40b22a6bec2ce48bbc811c663a" ] ], - "timestamp": "2026-04-29T11:15:48.369769489", + "timestamp": "2026-07-30T19:01:15.516758295", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -35,7 +35,7 @@ "versions.yml:md5,8028be40b22a6bec2ce48bbc811c663a" ] ], - "timestamp": "2026-04-29T11:16:04.878639906", + "timestamp": "2026-07-30T19:01:31.61507558", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -56,7 +56,7 @@ "versions.yml:md5,8028be40b22a6bec2ce48bbc811c663a" ] ], - "timestamp": "2026-04-29T11:15:33.033869822", + "timestamp": "2026-07-30T19:00:59.825790299", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/emmtyper/tests/nextflow.config b/modules/emmtyper/tests/nextflow.config index f50a8a422..45d8d006c 100644 --- a/modules/emmtyper/tests/nextflow.config +++ b/modules/emmtyper/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of EMMTYPER nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/fastani/module.config b/modules/fastani/module.config index 450ebb1d5..2e535e52c 100644 --- a/modules/fastani/module.config +++ b/modules/fastani/module.config @@ -3,8 +3,8 @@ params { fastani_frag_len = 3000 fastani_kmer = 16 fastani_min_fraction = 0.2 + fastani_pairwise = false fastani_reference = null - fastani_skip_pairwise = false } process { diff --git a/modules/fastani/schema.json b/modules/fastani/schema.json index 60452ad54..5e4db8e3c 100644 --- a/modules/fastani/schema.json +++ b/modules/fastani/schema.json @@ -37,10 +37,10 @@ "description": "fragment length", "fa_icon": "fas fa-hashtag" }, - "fastani_skip_pairwise": { + "fastani_pairwise": { "type": "boolean", "default": false, - "description": "Only use RefSeq or local assemblies for ANI calculations", + "description": "Add every sample to the reference set, comparing each sample against every other sample in addition to any other references", "fa_icon": "fas fa-toggle-on" } } diff --git a/modules/fastani/tests/main.nf.test.snap b/modules/fastani/tests/main.nf.test.snap index ca676021b..9add115c1 100644 --- a/modules/fastani/tests/main.nf.test.snap +++ b/modules/fastani/tests/main.nf.test.snap @@ -14,7 +14,7 @@ "versions.yml:md5,3c8fce061d0dc503f4830ad0f1e2ebba" ] ], - "timestamp": "2026-04-29T11:15:33.056261848", + "timestamp": "2026-07-30T19:00:59.602119388", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -35,7 +35,7 @@ "versions.yml:md5,3c8fce061d0dc503f4830ad0f1e2ebba" ] ], - "timestamp": "2026-04-29T11:15:47.327096724", + "timestamp": "2026-07-30T19:01:13.170212084", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/fastani/tests/nextflow.config b/modules/fastani/tests/nextflow.config index cc37ece27..f88211325 100644 --- a/modules/fastani/tests/nextflow.config +++ b/modules/fastani/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of FASTANI nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/gamma/main.nf b/modules/gamma/main.nf index 1a8176c5c..7b1c982e1 100644 --- a/modules/gamma/main.nf +++ b/modules/gamma/main.nf @@ -77,8 +77,8 @@ process GAMMA { process_name: task.ext.process_name ) - def is_compressed = fna.getName().endsWith(".gz") ? true : false - def fna_name = fna.getName().replace(".gz", "") + def is_compressed = fna.fileName.name.endsWith(".gz") ? true : false + def fna_name = fna.fileName.name.replace(".gz", "") // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. def VERSION = '2.1' @@ -86,7 +86,7 @@ process GAMMA { if [ "${is_compressed}" == "true" ]; then gzip -c -d ${fna} > ./${fna_name} else - cp ${fna} ./${fna_name} + cp -L ${fna} ./${fna_name} fi GAMMA.py \\ @@ -96,9 +96,7 @@ process GAMMA { ${prefix} # Cleanup - if [ "${is_compressed}" == "true" ]; then - rm -rf ${fna_name} - fi + rm -rf ./${fna_name} cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/gamma/tests/main.nf.test.snap b/modules/gamma/tests/main.nf.test.snap index 4c0f3100c..29d27a34c 100644 --- a/modules/gamma/tests/main.nf.test.snap +++ b/modules/gamma/tests/main.nf.test.snap @@ -15,7 +15,7 @@ "versions.yml:md5,11f61b65b031ac9b3e1afcd127b93d49" ] ], - "timestamp": "2026-04-29T11:15:41.617890697", + "timestamp": "2026-07-30T19:01:12.592848128", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -37,7 +37,7 @@ "versions.yml:md5,11f61b65b031ac9b3e1afcd127b93d49" ] ], - "timestamp": "2026-04-29T11:15:58.34573894", + "timestamp": "2026-07-30T19:01:28.026426906", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/gamma/tests/nextflow.config b/modules/gamma/tests/nextflow.config index 7e010b4b4..8c54d1aec 100644 --- a/modules/gamma/tests/nextflow.config +++ b/modules/gamma/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of GAMMA nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/genomedl/main.nf b/modules/genomedl/main.nf new file mode 100644 index 000000000..d2e70b1e5 --- /dev/null +++ b/modules/genomedl/main.nf @@ -0,0 +1,137 @@ +/** + * Download genome assemblies and annotation files from NCBI Datasets. + * + * Uses [genome-dl](https://github.com/rpetit3/genome-dl) to query the NCBI Datasets v2 REST API + * for assembly metadata, then download the requested file formats directly from the NCBI FTP + * site. Accessions are resolved to their latest version before download, and species queries + * are subsampled to the first `--limit` assemblies in NCBI relevance order (reference first). + * + * @status stable + * @keywords ncbi, datasets, download, genome, assembly, fasta, utility + * @tags complexity:moderate input-type:single output-type:multiple features:internet-access,resource-download,conditional-logic + * @citation genome_dl + * + * @note Internet Required + * Queries the NCBI Datasets v2 REST API and downloads from the NCBI FTP site. Setting the + * `NCBI_API_KEY` environment variable raises the API rate limit from 5 to 10 requests per second. + * + * @note Species Downloads Are Capped + * `--limit` defaults to 100 so a broad `--species` cannot accidentally pull the tens of + * thousands of assemblies NCBI holds for common taxa. Raise it, or use `--limit 0` for no + * limit, only when that is genuinely intended. + * + * @input accessions? + * A path to a text file containing a list of NCBI Assembly accessions (one per line) + * + * @output record(meta, fna?, gbff?, wgs_gbk?, gff?, gtf?, faa?, gpff?, cds?, translated_cds?, rna?, features?, report?, stats?, metadata?, summary?, json?, results, logs, nf_logs, versions) + * - `fna?`: FASTA format of the genomic nucleotide sequence(s) (*.fna.gz) + * - `gbff?`: GenBank format of the genomic sequence(s) (*.gbff.gz) + * - `wgs_gbk?`: GenBank flat file format of the WGS master (*.wgsmaster.gbff.gz) + * - `gff?`: Annotation of the genomic sequence(s) in GFF3 format (*.gff.gz) + * - `gtf?`: Annotation of the genomic sequence(s) in GTF format (*.gtf.gz) + * - `faa?`: FASTA format of the accessioned protein products (*.faa.gz) + * - `gpff?`: GenPept format of the accessioned protein products (*.gpff.gz) + * - `cds?`: FASTA format of the nucleotide sequences corresponding to all CDS features + * - `translated_cds?`: FASTA format of the protein sequences corresponding to all CDS features + * - `rna?`: FASTA format of the nucleotide sequences corresponding to all RNA features + * - `features?`: Tab-delimited text file reporting locations and attributes for a subset of features + * - `report?`: Tab-delimited text file reporting assembly unit names, roles, and relationships + * - `stats?`: Tab-delimited text file reporting assembly statistics + * - `metadata?`: Tab-delimited NCBI Datasets metadata for each downloaded assembly + * - `summary?`: Human-readable run summary of the version, parameters, and results + * - `json?`: Machine-readable run report of the parameters, results, and per-assembly metadata + */ +nextflow.enable.types = true + +// bactopia-lint: ignore M017,M026 +process GENOMEDL { + label 'process_low' + + conda "${task.ext.condaDir}/${task.ext.toolName}" + container "${task.ext.container}" + + input: + accessions : Path? + + stage: + stageAs accessions, 'staging/accessions/*' + + output: + record( + // Named fields (used downstream) + meta: meta, + // Use the [0-9] to separate a genomic FASTA from the cds.fna.gz/rna.fna.gz variants + fna: files("*[0-9].fna.gz", optional: true), + gbff: files("*[0-9].gbff.gz", optional: true), + wgs_gbk: files("*.wgsmaster.gbff.gz", optional: true), + gff: files("*.gff.gz", optional: true), + gtf: files("*.gtf.gz", optional: true), + faa: files("*[0-9].faa.gz", optional: true), + gpff: files("*.gpff.gz", optional: true), + cds: files("*.cds.fna.gz", optional: true), + translated_cds: files("*.translated_cds.faa.gz", optional: true), + rna: files("*.rna.fna.gz", optional: true), + features: files("*.feature_table.txt.gz", optional: true), + report: files("*.assembly_report.txt", optional: true), + stats: files("*.assembly_stats.txt", optional: true), + metadata: files("*-metadata.tsv", optional: true), + summary: files("*-summary.txt", optional: true), + json: files("*.json", optional: true), + // Generic fields (used for publishing) + results: [ + files("*.gz", optional: true), + files("*.txt", optional: true), + files("*.tsv", optional: true), + files("*.json", optional: true) + ], + logs: files("*.{log,err}", optional: true), + nf_logs: files(".command.*"), + versions: files("versions.yml") + ) + + script: + prefix = task.ext.prefix ?: task.ext.meta_id + meta = record( + id: task.ext.meta_id, + name: task.ext.meta_id, + limit: task.ext.meta_limit, + accession: task.ext.meta_accession, + species: task.ext.meta_species, + scope: task.ext.scope, + process_name: task.ext.process_name, + output_dir: task.ext.process_name, + logs_dir: "${task.ext.process_name}/logs" + ) + + def has_accession = task.ext.meta_accession != null + def has_accessions = accessions != null + def has_species = task.ext.meta_species != null + def opts = "${task.ext.args} --outdir ./ --cpus ${task.cpus} --max-attempts ${task.ext.max_retry}" + """ + # genome-dl can't mix --accession, --accessions, and --species, so run for each + if [ "${has_accession}" == "true" ]; then + genome-dl ${opts} \\ + --prefix ${prefix}-accession \\ + --accession ${task.ext.meta_accession} + fi + + if [ "${has_accessions}" == "true" ]; then + genome-dl ${opts} \\ + --prefix ${prefix}-accessions \\ + --accessions ${accessions} + fi + + if [ "${has_species}" == "true" ]; then + genome-dl ${opts} ${task.ext.args2} \\ + --prefix ${prefix}-species \\ + --species "${task.ext.meta_species}" + fi + + # Cleanup + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + genomedl: \$(echo \$(genome-dl --version 2>&1) | sed 's/.*version //') + END_VERSIONS + """ +} diff --git a/modules/ncbigenomedownload/module.config b/modules/genomedl/module.config similarity index 54% rename from modules/ncbigenomedownload/module.config rename to modules/genomedl/module.config index b793c6e5b..d81651f77 100644 --- a/modules/ncbigenomedownload/module.config +++ b/modules/genomedl/module.config @@ -1,45 +1,47 @@ // bactopia-lint: ignore MC009,JS004 params { - // ncbigenomedownload + // genomedl accession = null accessions = null assembly_level = "complete" format = "fasta" - keep_downloads = false - kingdom = "bacteria" - limit = null + genomedl_allow_outdated = false + limit = 100 max_retry = 10 section = "refseq" species = null } process { - withName: 'NCBIGENOMEDOWNLOAD' { + withName: 'GENOMEDL' { ext.wf = params.wf ext.scope = "run" ext.subdir = "" ext.logs_subdir = "" - ext.process_name = "ncbigenomedownload" + ext.process_name = "genomedl" // Tool arguments ext.args = [ - params.kingdom, - "--section ${params.section}", "--formats ${params.format}", - "--assembly-levels ${params.assembly_level}", - "--verbose", - params.enable_conda ? "" : "--no-cache" + params.genomedl_allow_outdated ? "--allow-outdated" : "" + ].join(' ').replaceAll("\\s{2,}", " ").trim() + + // Species-only arguments (--section, --assembly-level and --limit only apply to --species) + ext.args2 = [ + "--section ${params.section}", + "--assembly-level ${params.assembly_level}", + "--limit ${params.limit}" ].join(' ').replaceAll("\\s{2,}", " ").trim() // Environment information - ext.toolName = "bioconda::ncbi-genome-download=0.3.3".replace("=", "-").replace(":", "-").replace(" ", "-") - ext.docker = "biocontainers/ncbi-genome-download:0.3.3--pyh7cba7a3_0" - ext.image = "https://depot.galaxyproject.org/singularity/ncbi-genome-download:0.3.3--pyh7cba7a3_0" + ext.toolName = "bioconda::genome-dl=1.0.0".replace("=", "-").replace(":", "-").replace(" ", "-") + ext.docker = "biocontainers/genome-dl:1.0.0--pyhdfd78af_0" + ext.image = "https://depot.galaxyproject.org/singularity/genome-dl:1.0.0--pyhdfd78af_0" ext.condaDir = "${params.condadir}" // Module-specific parameters ext.max_retry = params.max_retry - ext.meta_id = "ncbigenomedownload" + ext.meta_id = "genomedl" ext.meta_limit = params.limit ext.meta_accession = params.accession ext.meta_species = params.species diff --git a/modules/ncbigenomedownload/schema.json b/modules/genomedl/schema.json similarity index 64% rename from modules/ncbigenomedownload/schema.json rename to modules/genomedl/schema.json index 92becdc63..b3f6f8aeb 100644 --- a/modules/ncbigenomedownload/schema.json +++ b/modules/genomedl/schema.json @@ -1,12 +1,12 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/bactopia/bactopia/master/modules/ncbigenomedownload/schema.json", - "title": "NCBI Genome Download Module", - "description": "A module to download assemblies from NCBI's Assembly database", + "$id": "https://raw.githubusercontent.com/bactopia/bactopia/master/modules/genomedl/schema.json", + "title": "genome-dl Module", + "description": "A module to download genome assemblies from NCBI Datasets", "type": "object", "$defs": { - "ncbigenomedownload_parameters": { - "title": "NCBI Genome Download Parameters", + "genomedl_parameters": { + "title": "genome-dl Parameters", "type": "object", "description": "", "default": "", @@ -20,6 +20,7 @@ "accession": { "type": "string", "description": "An NCBI Assembly accession to be downloaded", + "help": "Version-less accessions (e.g. GCF_000005845) are resolved to the latest version.", "fa_icon": "fas fa-font" }, "accessions": { @@ -31,12 +32,14 @@ "type": "string", "default": "fasta", "description": "Comma separated list of formats to download", + "help": "Choose from fasta, genbank, wgs, gff, gtf, protein, genpept, cds, translated-cds, rna, feature-table, assembly-report, assembly-stats or all.", "fa_icon": "fas fa-font" }, "section": { "type": "string", "default": "refseq", "description": "NCBI section to download", + "help": "Only applies to `--species`. Choose from refseq, genbank or all.", "fa_icon": "fas fa-font", "hidden": true }, @@ -44,26 +47,21 @@ "type": "string", "default": "complete", "description": "Comma separated list of assembly levels to download", - "fa_icon": "fas fa-font", - "hidden": true - }, - "kingdom": { - "type": "string", - "default": "bacteria", - "description": "Comma separated list of formats to download", + "help": "Only applies to `--species`. Choose from complete, chromosome, scaffold, contig or all.", "fa_icon": "fas fa-font", "hidden": true }, "limit": { - "type": "string", + "type": "integer", + "default": 100, "description": "Limit the number of assemblies to download", - "help": "If the the number of available genomes exceeds the given limit, a random subset will be selected.", - "fa_icon": "fas fa-font" + "help": "Only applies to `--species`, limit to first N assemblies returned by NCBI. Use 0 for no limit.", + "fa_icon": "fas fa-sort-numeric-up" }, - "keep_downloads": { + "genomedl_allow_outdated": { "type": "boolean", "default": false, - "description": "Save downloaded files into the bactopia-runs folder", + "description": "Download an explicitly requested outdated accession version instead of erroring", "fa_icon": "fas fa-toggle-on" } } @@ -71,7 +69,7 @@ }, "allOf": [ { - "$ref": "#/$defs/ncbigenomedownload_parameters" + "$ref": "#/$defs/genomedl_parameters" } ] } diff --git a/modules/genomedl/tests/main.nf.test b/modules/genomedl/tests/main.nf.test new file mode 100644 index 000000000..04854ad40 --- /dev/null +++ b/modules/genomedl/tests/main.nf.test @@ -0,0 +1,110 @@ +nextflow_process { + name "Test GENOMEDL" + script "../main.nf" + process "GENOMEDL" + tag "modules" + tag "genomedl" + + test("genomedl - module - single accession") { + + when { + params { + test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" + // Portiera aleyrodidarum (~360 kb), version-less to test accession resolution + accession = "GCF_000292685" + format = "fasta" + } + process { + """ + input[0] = null + """ + } + } + + then { + def record = process.out[0][0] + assertAll( + { assert process.success }, + { assert snapshot( + record.meta, + record.versions + ).match() }, + // GCF_000292685 resolves to GCF_000292685.1, and the genomic FASTA glob must + // not also pick up the *.cds.fna.gz / *.rna.fna.gz variants + { assert record.fna.size() == 1 }, + { assert record.fna[0].toString().endsWith("/GCF_000292685.1.fna.gz") }, + { assert record.metadata.size() == 1 }, + { assert record.summary.size() == 1 }, + { assert record.json.size() == 1 } + ) + } + } + + test("genomedl - module - species with limit") { + + when { + params { + test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" + // The taxon has 14 complete RefSeq assemblies, --limit trims the download to one + species = "Candidatus Portiera aleyrodidarum" + assembly_level = "complete" + format = "fasta" + limit = 1 + } + process { + """ + input[0] = null + """ + } + } + + then { + def record = process.out[0][0] + assertAll( + { assert process.success }, + { assert snapshot( + record.meta, + record.versions + ).match() }, + { assert record.fna.size() == 1 }, + { assert record.metadata.size() == 1 }, + { assert record.summary.size() == 1 }, + { assert record.json.size() == 1 } + ) + } + } + + test("genomedl - module - accessions file") { + + when { + params { + test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" + format = "fasta" + } + process { + """ + input[0] = file("${params.test_data_dir}/datasets/generic/test-assembly-accessions.txt") + """ + } + } + + then { + def record = process.out[0][0] + def published = record.results.flatten().collect { p -> p.toString() } + assertAll( + { assert process.success }, + { assert snapshot( + record.meta, + record.versions + ).match() }, + // Two accessions, one comment line that genome-dl must skip + { assert record.fna.size() == 2 }, + { assert record.metadata.size() == 1 }, + { assert record.summary.size() == 1 }, + { assert record.json.size() == 1 }, + // The staged input list must not be republished as a result + { assert published.every { p -> !p.endsWith("test-assembly-accessions.txt") } } + ) + } + } +} diff --git a/modules/genomedl/tests/main.nf.test.snap b/modules/genomedl/tests/main.nf.test.snap new file mode 100644 index 000000000..a177a3dd9 --- /dev/null +++ b/modules/genomedl/tests/main.nf.test.snap @@ -0,0 +1,71 @@ +{ + "genomedl - module - species with limit": { + "content": [ + { + "accession": null, + "id": "genomedl", + "limit": 1, + "logs_dir": "genomedl/logs", + "name": "genomedl", + "output_dir": "genomedl", + "process_name": "genomedl", + "scope": "run", + "species": "Candidatus Portiera aleyrodidarum" + }, + [ + "versions.yml:md5,bb83b7d6091b1b7e8a93fba8cc9a3e7d" + ] + ], + "timestamp": "2026-07-30T19:01:27.973113225", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + }, + "genomedl - module - single accession": { + "content": [ + { + "accession": "GCF_000292685", + "id": "genomedl", + "limit": 100, + "logs_dir": "genomedl/logs", + "name": "genomedl", + "output_dir": "genomedl", + "process_name": "genomedl", + "scope": "run", + "species": null + }, + [ + "versions.yml:md5,bb83b7d6091b1b7e8a93fba8cc9a3e7d" + ] + ], + "timestamp": "2026-07-30T19:01:08.996012109", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + }, + "genomedl - module - accessions file": { + "content": [ + { + "accession": null, + "id": "genomedl", + "limit": 100, + "logs_dir": "genomedl/logs", + "name": "genomedl", + "output_dir": "genomedl", + "process_name": "genomedl", + "scope": "run", + "species": null + }, + [ + "versions.yml:md5,bb83b7d6091b1b7e8a93fba8cc9a3e7d" + ] + ], + "timestamp": "2026-07-30T19:01:44.533547638", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + } +} \ No newline at end of file diff --git a/modules/genomedl/tests/nextflow.config b/modules/genomedl/tests/nextflow.config new file mode 100644 index 000000000..87708b3cb --- /dev/null +++ b/modules/genomedl/tests/nextflow.config @@ -0,0 +1,19 @@ +// Minimal config for module-level testing of GENOMEDL +nextflow.enable.types = true +nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" + +params { + workflow { + name = "genomedl" + logo_name = "bactopia-tools" + description = "Download genome assemblies from NCBI Datasets" + ext = "fna" + } + + wf = params.workflow.name +} + +includeConfig "../module.config" +includeConfig "../../../conf/base.config" +includeConfig "../../../conf/profiles.config" diff --git a/subworkflows/ncbigenomedownload/tests/nf-test.config b/modules/genomedl/tests/nf-test.config similarity index 100% rename from subworkflows/ncbigenomedownload/tests/nf-test.config rename to modules/genomedl/tests/nf-test.config diff --git a/modules/genotyphi/parse/module.config b/modules/genotyphi/parse/module.config index 33d9f9116..1048323a0 100644 --- a/modules/genotyphi/parse/module.config +++ b/modules/genotyphi/parse/module.config @@ -42,7 +42,7 @@ process { ].join(' ').replaceAll("\\s{2,}", " ").trim() // Environment information - ext.toolName = "bioconda::mykrobe=0.13.0".replace("=", "-").replace(":", "-").replace(" ", "-") + ext.toolName = "bioconda::mykrobe=0.13.0 conda-forge::setuptools=80".replace("=", "-").replace(":", "-").replace(" ", "-") ext.docker = "biocontainers/mykrobe:0.13.0--py38h2214202_0" ext.image = "https://depot.galaxyproject.org/singularity/mykrobe:0.13.0--py38h2214202_0" ext.condaDir = "${params.condadir}" diff --git a/modules/genotyphi/parse/tests/main.nf.test.snap b/modules/genotyphi/parse/tests/main.nf.test.snap index e1416d707..d8dcbe5ce 100644 --- a/modules/genotyphi/parse/tests/main.nf.test.snap +++ b/modules/genotyphi/parse/tests/main.nf.test.snap @@ -14,7 +14,7 @@ "versions.yml:md5,359680888d6e4e84784879e6e92c3439" ] ], - "timestamp": "2026-04-29T11:15:36.410818766", + "timestamp": "2026-07-30T19:00:58.901288242", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/genotyphi/parse/tests/nextflow.config b/modules/genotyphi/parse/tests/nextflow.config index 286ee6d70..645c31754 100644 --- a/modules/genotyphi/parse/tests/nextflow.config +++ b/modules/genotyphi/parse/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of GENOTYPHI_PARSE nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/gigatyper/tests/main.nf.test.snap b/modules/gigatyper/tests/main.nf.test.snap index 8a85cf33c..b418d37ec 100644 --- a/modules/gigatyper/tests/main.nf.test.snap +++ b/modules/gigatyper/tests/main.nf.test.snap @@ -14,7 +14,7 @@ "versions.yml:md5,ae98787b0c6ddf8f10515b895570a41a" ] ], - "timestamp": "2026-04-29T11:15:49.784505502", + "timestamp": "2026-07-30T19:01:14.005166773", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/gigatyper/tests/nextflow.config b/modules/gigatyper/tests/nextflow.config index 693decf6b..d10847f05 100644 --- a/modules/gigatyper/tests/nextflow.config +++ b/modules/gigatyper/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of GIGATYPER nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/gtdbtk/classifywf/module.config b/modules/gtdbtk/classifywf/module.config index 77ebdc0da..ac2884178 100644 --- a/modules/gtdbtk/classifywf/module.config +++ b/modules/gtdbtk/classifywf/module.config @@ -30,9 +30,9 @@ process { ].join(' ').replaceAll("\\s{2,}", " ").trim() // Environment information - ext.toolName = "bioconda::gtdbtk=2.7.1".replace("=", "-").replace(":", "-").replace(" ", "-") - ext.docker = "biocontainers/gtdbtk:2.7.1--pyhdfd78af_1" - ext.image = "https://depot.galaxyproject.org/singularity/gtdbtk:2.7.1--pyhdfd78af_1" + ext.toolName = "bioconda::gtdbtk=2.7.2".replace("=", "-").replace(":", "-").replace(" ", "-") + ext.docker = "biocontainers/gtdbtk:2.7.2--pyhdfd78af_1" + ext.image = "https://depot.galaxyproject.org/singularity/gtdbtk:2.7.2--pyhdfd78af_1" ext.condaDir = "${params.condadir}" // Module-specific parameters diff --git a/modules/gtdbtk/classifywf/tests/main.nf.test.snap b/modules/gtdbtk/classifywf/tests/main.nf.test.snap index d70bfac68..9bb08aaab 100644 --- a/modules/gtdbtk/classifywf/tests/main.nf.test.snap +++ b/modules/gtdbtk/classifywf/tests/main.nf.test.snap @@ -10,10 +10,10 @@ "scope": "sample" }, [ - "versions.yml:md5,f023d15f8b26e9599946afeb72989b98" + "versions.yml:md5,7cb27f0b82d34e40565279ff91f60fda" ] ], - "timestamp": "2026-04-29T11:20:34.013534922", + "timestamp": "2026-07-30T19:06:03.495274325", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/gtdbtk/classifywf/tests/nextflow.config b/modules/gtdbtk/classifywf/tests/nextflow.config index 5bd46b0d4..7eb03e6e9 100644 --- a/modules/gtdbtk/classifywf/tests/nextflow.config +++ b/modules/gtdbtk/classifywf/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of GTDBTK_CLASSIFYWF nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -10,26 +11,12 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true // Max Job Request Parameters - max_retry = 1 - max_time = 2.h max_memory = 144.GB max_cpus = 32 - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" - // GTDB-Tk specific run_name = "" } diff --git a/modules/gtdbtk/download/module.config b/modules/gtdbtk/download/module.config index 8d22de7d9..f2a8cd46d 100644 --- a/modules/gtdbtk/download/module.config +++ b/modules/gtdbtk/download/module.config @@ -23,9 +23,9 @@ process { ext.args = "" // Environment information - ext.toolName = "bioconda::gtdbtk=2.7.1".replace("=", "-").replace(":", "-").replace(" ", "-") - ext.docker = "biocontainers/gtdbtk:2.7.1--pyhdfd78af_1" - ext.image = "https://depot.galaxyproject.org/singularity/gtdbtk:2.7.1--pyhdfd78af_1" + ext.toolName = "bioconda::gtdbtk=2.7.2".replace("=", "-").replace(":", "-").replace(" ", "-") + ext.docker = "biocontainers/gtdbtk:2.7.2--pyhdfd78af_1" + ext.image = "https://depot.galaxyproject.org/singularity/gtdbtk:2.7.2--pyhdfd78af_1" ext.condaDir = "${params.condadir}" // Module-specific parameters diff --git a/modules/gubbins/main.nf b/modules/gubbins/main.nf index 5517ca9f6..4243950d9 100644 --- a/modules/gubbins/main.nf +++ b/modules/gubbins/main.nf @@ -75,6 +75,9 @@ process GUBBINS { def is_compressed = aln.getName().endsWith(".gz") ? true : false def aln_name = aln.getName().replace(".gz", "") """ + mkdir -p tmp/numba_cache + export NUMBA_CACHE_DIR="./tmp/numba_cache" + if [ "${is_compressed}" == "true" ]; then gzip -c -d ${aln} > ${aln_name} fi @@ -114,5 +117,8 @@ process GUBBINS { "${task.process}": gubbins: \$(run_gubbins.py --version 2>&1) END_VERSIONS + + # gubbins --version causes numba cache to be recreated, so cleanup after version check + rm -rf tmp/ """ } diff --git a/modules/gubbins/tests/main.nf.test b/modules/gubbins/tests/main.nf.test index ec6e11afe..f7db66261 100644 --- a/modules/gubbins/tests/main.nf.test +++ b/modules/gubbins/tests/main.nf.test @@ -26,11 +26,13 @@ nextflow_process { def record = process.out[0][0] assertAll( { assert process.success }, + // Reproducible outputs { assert snapshot( record.meta, - record.masked_aln, - record.versions - ).match() } + record.masked_aln + ).match() }, + // Non-reproducible outputs + { assert path(record.versions[0]).text.contains('gubbins') } ) } } @@ -56,11 +58,13 @@ nextflow_process { def record = process.out[0][0] assertAll( { assert process.success }, + // Reproducible outputs { assert snapshot( record.meta, - record.masked_aln, - record.versions - ).match() } + record.masked_aln + ).match() }, + // Non-reproducible outputs + { assert path(record.versions[0]).text.contains('gubbins') } ) } } diff --git a/modules/gubbins/tests/main.nf.test.snap b/modules/gubbins/tests/main.nf.test.snap index f60c90555..dd74208af 100644 --- a/modules/gubbins/tests/main.nf.test.snap +++ b/modules/gubbins/tests/main.nf.test.snap @@ -9,12 +9,9 @@ "process_name": "gubbins", "scope": "run" }, - "test.masked.aln.gz:md5,0aa89f5b52d36f88d6bbf52b9015a719", - [ - "versions.yml:md5,623c400503380dab143c222d825e55f6" - ] + "test.masked.aln.gz:md5,0aa89f5b52d36f88d6bbf52b9015a719" ], - "timestamp": "2026-04-29T11:15:53.545814148", + "timestamp": "2026-07-30T19:01:52.976881269", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -30,12 +27,9 @@ "process_name": "gubbins", "scope": "run" }, - "test.masked.aln.gz:md5,0aa89f5b52d36f88d6bbf52b9015a719", - [ - "versions.yml:md5,623c400503380dab143c222d825e55f6" - ] + "test.masked.aln.gz:md5,0aa89f5b52d36f88d6bbf52b9015a719" ], - "timestamp": "2026-04-29T11:16:30.454810404", + "timestamp": "2026-07-30T19:02:56.185234141", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/gubbins/tests/nextflow.config b/modules/gubbins/tests/nextflow.config index 10642aac1..e5c52811e 100644 --- a/modules/gubbins/tests/nextflow.config +++ b/modules/gubbins/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of GUBBINS nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -10,25 +11,10 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB max_cpus = 4 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/hicap/module.config b/modules/hicap/module.config index fee8233be..9909d7dda 100644 --- a/modules/hicap/module.config +++ b/modules/hicap/module.config @@ -27,7 +27,7 @@ process { ].join(' ').replaceAll("\\s{2,}", " ").trim() // Environment information - ext.toolName = "bioconda::hicap=1.0.4".replace("=", "-").replace(":", "-").replace(" ", "-") + ext.toolName = "bioconda::hicap=1.0.4 conda-forge::biopython=1.79".replace("=", "-").replace(":", "-").replace(" ", "-") ext.docker = "biocontainers/hicap:1.0.4--pyhdfd78af_2" ext.image = "https://depot.galaxyproject.org/singularity/hicap:1.0.4--pyhdfd78af_2" ext.condaDir = "${params.condadir}" diff --git a/modules/hicap/tests/main.nf.test.snap b/modules/hicap/tests/main.nf.test.snap index a6cb5c1bd..5a7b42edd 100644 --- a/modules/hicap/tests/main.nf.test.snap +++ b/modules/hicap/tests/main.nf.test.snap @@ -14,7 +14,7 @@ "versions.yml:md5,a4a5a455027f57fbd081f501832ec3d3" ] ], - "timestamp": "2026-04-29T11:16:38.289081697", + "timestamp": "2026-07-30T19:02:06.883246191", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -35,7 +35,7 @@ "versions.yml:md5,a4a5a455027f57fbd081f501832ec3d3" ] ], - "timestamp": "2026-04-29T11:15:56.229487967", + "timestamp": "2026-07-30T19:01:27.129799543", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -56,7 +56,7 @@ "versions.yml:md5,a4a5a455027f57fbd081f501832ec3d3" ] ], - "timestamp": "2026-04-29T11:17:56.200188445", + "timestamp": "2026-07-30T19:03:20.732689084", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -77,7 +77,7 @@ "versions.yml:md5,a4a5a455027f57fbd081f501832ec3d3" ] ], - "timestamp": "2026-04-29T11:17:16.975963914", + "timestamp": "2026-07-30T19:02:44.146624378", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/hicap/tests/nextflow.config b/modules/hicap/tests/nextflow.config index 6338272b9..06ece62c9 100644 --- a/modules/hicap/tests/nextflow.config +++ b/modules/hicap/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of HICAP nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/hpsuissero/tests/main.nf.test.snap b/modules/hpsuissero/tests/main.nf.test.snap index 06694c9a8..ad46a6e91 100644 --- a/modules/hpsuissero/tests/main.nf.test.snap +++ b/modules/hpsuissero/tests/main.nf.test.snap @@ -14,7 +14,7 @@ "versions.yml:md5,2e1e831c688899545872927bdf90d852" ] ], - "timestamp": "2026-04-29T11:15:55.922851305", + "timestamp": "2026-07-30T19:01:14.597731705", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -35,7 +35,7 @@ "versions.yml:md5,2e1e831c688899545872927bdf90d852" ] ], - "timestamp": "2026-04-29T11:15:39.077032116", + "timestamp": "2026-07-30T19:01:00.300979516", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/hpsuissero/tests/nextflow.config b/modules/hpsuissero/tests/nextflow.config index a9430ab8c..e0622e8b4 100644 --- a/modules/hpsuissero/tests/nextflow.config +++ b/modules/hpsuissero/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of HPSUISSERO nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/iqtree/module.config b/modules/iqtree/module.config index 4027f9cb7..89577255b 100644 --- a/modules/iqtree/module.config +++ b/modules/iqtree/module.config @@ -26,9 +26,9 @@ process { ].join(' ').replaceAll("\\s{2,}", " ").trim() // Environment information - ext.toolName = "bioconda::iqtree=3.1.1".replace("=", "-").replace(":", "-").replace(" ", "-") - ext.docker = "biocontainers/iqtree:3.1.1--hde5307d_1" - ext.image = "https://depot.galaxyproject.org/singularity/iqtree:3.1.1--hde5307d_1" + ext.toolName = "bioconda::iqtree=3.1.3".replace("=", "-").replace(":", "-").replace(" ", "-") + ext.docker = "biocontainers/iqtree:3.1.3--h8471819_0" + ext.image = "https://depot.galaxyproject.org/singularity/iqtree:3.1.3--h8471819_0" ext.condaDir = "${params.condadir}" // Module-specific parameters diff --git a/modules/iqtree/tests/main.nf.test.snap b/modules/iqtree/tests/main.nf.test.snap index 9bacc751c..5b2e413ee 100644 --- a/modules/iqtree/tests/main.nf.test.snap +++ b/modules/iqtree/tests/main.nf.test.snap @@ -10,10 +10,10 @@ "scope": "run" }, [ - "versions.yml:md5,7c9654347c5eee68869012773f03db28" + "versions.yml:md5,e866b0d7c6f535259cd190571ebec653" ] ], - "timestamp": "2026-04-29T11:15:58.939802654", + "timestamp": "2026-07-30T19:01:24.814474762", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -30,10 +30,10 @@ "scope": "run" }, [ - "versions.yml:md5,7c9654347c5eee68869012773f03db28" + "versions.yml:md5,e866b0d7c6f535259cd190571ebec653" ] ], - "timestamp": "2026-04-29T11:15:42.55950921", + "timestamp": "2026-07-30T19:01:08.606761219", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/iqtree/tests/nextflow.config b/modules/iqtree/tests/nextflow.config index d21a37758..2cd1f2427 100644 --- a/modules/iqtree/tests/nextflow.config +++ b/modules/iqtree/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of IQTREE nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/ismapper/module.config b/modules/ismapper/module.config index c57d6b261..4edcea125 100644 --- a/modules/ismapper/module.config +++ b/modules/ismapper/module.config @@ -36,7 +36,7 @@ process { ].join(' ').replaceAll("\\s{2,}", " ").trim() // Environment information - ext.toolName = "bioconda::ismapper=2.0.2".replace("=", "-").replace(":", "-").replace(" ", "-") + ext.toolName = "bioconda::ismapper=2.0.2 conda-forge::setuptools=80".replace("=", "-").replace(":", "-").replace(" ", "-") ext.docker = "biocontainers/ismapper:2.0.2--pyhdfd78af_1" ext.image = "https://depot.galaxyproject.org/singularity/ismapper:2.0.2--pyhdfd78af_1" ext.condaDir = "${params.condadir}" diff --git a/modules/ismapper/tests/main.nf.test.snap b/modules/ismapper/tests/main.nf.test.snap index 643a482e8..f89dd1edb 100644 --- a/modules/ismapper/tests/main.nf.test.snap +++ b/modules/ismapper/tests/main.nf.test.snap @@ -13,7 +13,7 @@ "versions.yml:md5,bbe2280116459026bfc2304b2b6c0f5f" ] ], - "timestamp": "2026-04-29T11:16:35.274177837", + "timestamp": "2026-07-30T19:02:01.544785645", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/ismapper/tests/nextflow.config b/modules/ismapper/tests/nextflow.config index 358fe7bf4..5fc772ecd 100644 --- a/modules/ismapper/tests/nextflow.config +++ b/modules/ismapper/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of ISMAPPER nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/kleborate/tests/main.nf.test.snap b/modules/kleborate/tests/main.nf.test.snap index 60f2bccc4..d1ae363c4 100644 --- a/modules/kleborate/tests/main.nf.test.snap +++ b/modules/kleborate/tests/main.nf.test.snap @@ -13,7 +13,7 @@ "versions.yml:md5,9511fd36659702fc20722109151dca4b" ] ], - "timestamp": "2026-04-29T11:16:02.985211375", + "timestamp": "2026-07-30T19:01:31.638304898", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/kleborate/tests/nextflow.config b/modules/kleborate/tests/nextflow.config index 3f8abc7ad..cab43b0da 100644 --- a/modules/kleborate/tests/nextflow.config +++ b/modules/kleborate/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of KLEBORATE nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/kraken2/module.config b/modules/kraken2/module.config index 5d7512d30..8b699b21f 100644 --- a/modules/kraken2/module.config +++ b/modules/kraken2/module.config @@ -35,9 +35,9 @@ process { ].join(' ').replaceAll("\\s{2,}", " ").trim() // Environment information - ext.toolName = "bioconda::bactopia-teton=1.1.3".replace("=", "-").replace(":", "-").replace(" ", "-") - ext.docker = "biocontainers/bactopia-teton:1.1.3--hdfd78af_0" - ext.image = "https://depot.galaxyproject.org/singularity/bactopia-teton:1.1.3--hdfd78af_0" + ext.toolName = "bioconda::bactopia-teton=1.1.4".replace("=", "-").replace(":", "-").replace(" ", "-") + ext.docker = "biocontainers/bactopia-teton:1.1.4--hdfd78af_0" + ext.image = "https://depot.galaxyproject.org/singularity/bactopia-teton:1.1.4--hdfd78af_0" ext.condaDir = "${params.condadir}" // Module-specific parameters diff --git a/modules/kraken2/tests/main.nf.test.snap b/modules/kraken2/tests/main.nf.test.snap index 0bd8f25c2..9120222d7 100644 --- a/modules/kraken2/tests/main.nf.test.snap +++ b/modules/kraken2/tests/main.nf.test.snap @@ -11,10 +11,10 @@ "single_end": false }, [ - "versions.yml:md5,f9292e3762a8b98912643f1c044b07f2" + "versions.yml:md5,d4763c91677a2c1d143fd4afd6ee8c4c" ] ], - "timestamp": "2026-04-29T11:19:46.509803138", + "timestamp": "2026-07-30T19:05:04.105362641", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -32,10 +32,10 @@ "single_end": false }, [ - "versions.yml:md5,f9292e3762a8b98912643f1c044b07f2" + "versions.yml:md5,d4763c91677a2c1d143fd4afd6ee8c4c" ] ], - "timestamp": "2026-04-29T11:15:56.544183038", + "timestamp": "2026-07-30T19:01:28.812358446", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/kraken2/tests/nextflow.config b/modules/kraken2/tests/nextflow.config index 7e595da0e..a786a89c3 100644 --- a/modules/kraken2/tests/nextflow.config +++ b/modules/kraken2/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of KRAKEN2 nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/legsta/tests/main.nf.test.snap b/modules/legsta/tests/main.nf.test.snap index d763204bd..832861300 100644 --- a/modules/legsta/tests/main.nf.test.snap +++ b/modules/legsta/tests/main.nf.test.snap @@ -14,7 +14,7 @@ "versions.yml:md5,1ea80a08aa0a9efc6d82ffa9e668ad6d" ] ], - "timestamp": "2026-04-29T11:15:32.144911959", + "timestamp": "2026-07-30T19:00:59.971048627", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/legsta/tests/nextflow.config b/modules/legsta/tests/nextflow.config index e1876d69e..aa4fafff2 100644 --- a/modules/legsta/tests/nextflow.config +++ b/modules/legsta/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of LEGSTA nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/lissero/tests/main.nf.test.snap b/modules/lissero/tests/main.nf.test.snap index a61fc1ea2..88cf0e0e2 100644 --- a/modules/lissero/tests/main.nf.test.snap +++ b/modules/lissero/tests/main.nf.test.snap @@ -14,7 +14,7 @@ "versions.yml:md5,ab0e6efb3af123eb9bb0f6fdf60cac2f" ] ], - "timestamp": "2026-04-29T11:15:50.368192123", + "timestamp": "2026-07-30T19:01:29.728833737", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -35,7 +35,7 @@ "versions.yml:md5,ab0e6efb3af123eb9bb0f6fdf60cac2f" ] ], - "timestamp": "2026-04-29T11:15:33.497457272", + "timestamp": "2026-07-30T19:01:12.614261239", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/lissero/tests/nextflow.config b/modules/lissero/tests/nextflow.config index d08382ca5..42cf4b4ea 100644 --- a/modules/lissero/tests/nextflow.config +++ b/modules/lissero/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of LISSERO nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/mash/dist/module.config b/modules/mash/dist/module.config index d4202d012..e62d0b6ea 100644 --- a/modules/mash/dist/module.config +++ b/modules/mash/dist/module.config @@ -31,8 +31,8 @@ process { // Environment information ext.toolName = "bioconda::mash=2.3".replace("=", "-").replace(":", "-").replace(" ", "-") - ext.docker = "biocontainers/mash:2.3--hb105d93_10" - ext.image = "https://depot.galaxyproject.org/singularity/mash:2.3--hb105d93_10" + ext.docker = "biocontainers/mash:2.3--hf85e966_11" + ext.image = "https://depot.galaxyproject.org/singularity/mash:2.3--hf85e966_11" ext.condaDir = "${params.condadir}" // Module-specific parameters diff --git a/modules/mash/dist/tests/main.nf.test.snap b/modules/mash/dist/tests/main.nf.test.snap index d4e7e2d0d..924f8ca39 100644 --- a/modules/mash/dist/tests/main.nf.test.snap +++ b/modules/mash/dist/tests/main.nf.test.snap @@ -14,7 +14,7 @@ "versions.yml:md5,fcbb8bfc66b899b46ba971030f287212" ] ], - "timestamp": "2026-04-29T11:15:44.358692007", + "timestamp": "2026-07-30T19:01:18.974907865", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -35,7 +35,7 @@ "versions.yml:md5,fcbb8bfc66b899b46ba971030f287212" ] ], - "timestamp": "2026-04-29T11:15:30.968891098", + "timestamp": "2026-07-30T19:01:04.733521704", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/mash/dist/tests/nextflow.config b/modules/mash/dist/tests/nextflow.config index e65ef262f..4a3ca7606 100644 --- a/modules/mash/dist/tests/nextflow.config +++ b/modules/mash/dist/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of MASH_DIST nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" // Mash dist specific ask_merlin = false diff --git a/modules/mashtree/tests/main.nf.test.snap b/modules/mashtree/tests/main.nf.test.snap index 0c6269d7d..9c2b88e3b 100644 --- a/modules/mashtree/tests/main.nf.test.snap +++ b/modules/mashtree/tests/main.nf.test.snap @@ -13,7 +13,7 @@ "versions.yml:md5,6d51bcb025e39e73864f2236b1ce99e9" ] ], - "timestamp": "2026-04-29T11:15:33.989920095", + "timestamp": "2026-07-30T19:01:02.067594861", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/mashtree/tests/nextflow.config b/modules/mashtree/tests/nextflow.config index 5a4af57a6..25083a1f9 100644 --- a/modules/mashtree/tests/nextflow.config +++ b/modules/mashtree/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of MASHTREE nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/mcroni/module.config b/modules/mcroni/module.config index 5a03a44dc..de33eb40a 100644 --- a/modules/mcroni/module.config +++ b/modules/mcroni/module.config @@ -14,7 +14,7 @@ process { ext.args = "" // Environment information - ext.toolName = "bioconda::mcroni=1.0.4".replace("=", "-").replace(":", "-").replace(" ", "-") + ext.toolName = "bioconda::mcroni=1.0.4 conda-forge::numpy=2.0".replace("=", "-").replace(":", "-").replace(" ", "-") ext.docker = "biocontainers/mcroni:1.0.4--pyh5e36f6f_0" ext.image = "https://depot.galaxyproject.org/singularity/mcroni:1.0.4--pyh5e36f6f_0" ext.condaDir = "${params.condadir}" diff --git a/modules/mcroni/tests/main.nf.test.snap b/modules/mcroni/tests/main.nf.test.snap index f290192e3..32b6f66b7 100644 --- a/modules/mcroni/tests/main.nf.test.snap +++ b/modules/mcroni/tests/main.nf.test.snap @@ -15,7 +15,7 @@ "versions.yml:md5,0db3954c37fd7f15463e1ca4736a5910" ] ], - "timestamp": "2026-04-29T11:15:46.785524863", + "timestamp": "2026-07-30T19:01:16.968734334", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -37,7 +37,7 @@ "versions.yml:md5,0db3954c37fd7f15463e1ca4736a5910" ] ], - "timestamp": "2026-04-29T11:15:32.422346592", + "timestamp": "2026-07-30T19:01:01.499110844", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/mcroni/tests/nextflow.config b/modules/mcroni/tests/nextflow.config index 5112d5baa..e4cf2bd01 100644 --- a/modules/mcroni/tests/nextflow.config +++ b/modules/mcroni/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of MCRONI nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/meningotype/tests/main.nf.test.snap b/modules/meningotype/tests/main.nf.test.snap index 767904f13..e04a5d115 100644 --- a/modules/meningotype/tests/main.nf.test.snap +++ b/modules/meningotype/tests/main.nf.test.snap @@ -14,7 +14,7 @@ "versions.yml:md5,8d3bfe53cfc5fc586e9dd9fba13d374e" ] ], - "timestamp": "2026-04-29T11:15:48.022863891", + "timestamp": "2026-07-30T19:01:22.875551398", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -35,7 +35,7 @@ "versions.yml:md5,8d3bfe53cfc5fc586e9dd9fba13d374e" ] ], - "timestamp": "2026-04-29T11:15:31.953507021", + "timestamp": "2026-07-30T19:01:05.203558481", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/meningotype/tests/nextflow.config b/modules/meningotype/tests/nextflow.config index eac4673ae..7425e0cd4 100644 --- a/modules/meningotype/tests/nextflow.config +++ b/modules/meningotype/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of MENINGOTYPE nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/merlin/dist/module.config b/modules/merlin/dist/module.config index 6f0f85142..53661fa97 100644 --- a/modules/merlin/dist/module.config +++ b/modules/merlin/dist/module.config @@ -32,8 +32,8 @@ process { // Environment information ext.toolName = "bioconda::mash=2.3".replace("=", "-").replace(":", "-").replace(" ", "-") - ext.docker = "biocontainers/mash:2.3--hb105d93_10" - ext.image = "https://depot.galaxyproject.org/singularity/mash:2.3--hb105d93_10" + ext.docker = "biocontainers/mash:2.3--hf85e966_11" + ext.image = "https://depot.galaxyproject.org/singularity/mash:2.3--hf85e966_11" ext.condaDir = "${params.condadir}" // Module-specific parameters diff --git a/modules/merlin/dist/tests/main.nf.test.snap b/modules/merlin/dist/tests/main.nf.test.snap index 71b190d8a..dff730104 100644 --- a/modules/merlin/dist/tests/main.nf.test.snap +++ b/modules/merlin/dist/tests/main.nf.test.snap @@ -16,7 +16,7 @@ "versions.yml:md5,44524f1e9fb05faa952755ecf34bcd18" ] ], - "timestamp": "2026-04-29T11:16:56.070387534", + "timestamp": "2026-07-30T19:02:07.458443286", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -39,7 +39,7 @@ "versions.yml:md5,44524f1e9fb05faa952755ecf34bcd18" ] ], - "timestamp": "2026-04-29T11:18:20.752298012", + "timestamp": "2026-07-30T19:03:16.908045685", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/merlin/dist/tests/nextflow.config b/modules/merlin/dist/tests/nextflow.config index 698bbde6e..7849216f7 100644 --- a/modules/merlin/dist/tests/nextflow.config +++ b/modules/merlin/dist/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of MERLIN_DIST nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -10,27 +11,9 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true run_name = "merlin" ask_merlin = false - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/midas/species/tests/main.nf.test.snap b/modules/midas/species/tests/main.nf.test.snap index beb2ceb4b..2a6578a9d 100644 --- a/modules/midas/species/tests/main.nf.test.snap +++ b/modules/midas/species/tests/main.nf.test.snap @@ -16,7 +16,7 @@ "versions.yml:md5,580a248b19c50e578df537679c14f459" ] ], - "timestamp": "2026-04-29T11:22:53.910500819", + "timestamp": "2026-07-30T19:08:04.666523771", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -39,7 +39,7 @@ "versions.yml:md5,580a248b19c50e578df537679c14f459" ] ], - "timestamp": "2026-04-29T11:23:48.2696469", + "timestamp": "2026-07-30T19:08:58.728415642", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/midas/species/tests/nextflow.config b/modules/midas/species/tests/nextflow.config index 7e4e15ef0..b98135c78 100644 --- a/modules/midas/species/tests/nextflow.config +++ b/modules/midas/species/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of MIDAS_SPECIES nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/mlst/module.config b/modules/mlst/module.config index df1efab7b..2517ef7ed 100644 --- a/modules/mlst/module.config +++ b/modules/mlst/module.config @@ -1,6 +1,6 @@ params { // mlst - mlst_db = "" + mlst_db = null mlst_mincov = 10 mlst_minid = 95 mlst_minscore = 50 @@ -26,9 +26,9 @@ process { ].join(' ').replaceAll("\\s{2,}", " ").trim() // Environment information - ext.toolName = "bioconda::mlst=2.33.1".replace("=", "-").replace(":", "-").replace(" ", "-") - ext.docker = "biocontainers/mlst:2.33.1--hdfd78af_0" - ext.image = "https://depot.galaxyproject.org/singularity/mlst:2.33.1--hdfd78af_0" + ext.toolName = "bioconda::mlst=2.35.0".replace("=", "-").replace(":", "-").replace(" ", "-") + ext.docker = "biocontainers/mlst:2.35.0--hdfd78af_0" + ext.image = "https://depot.galaxyproject.org/singularity/mlst:2.35.0--hdfd78af_0" ext.condaDir = "${params.condadir}" } } diff --git a/modules/mlst/schema.json b/modules/mlst/schema.json index b31c04477..70ec9639a 100644 --- a/modules/mlst/schema.json +++ b/modules/mlst/schema.json @@ -44,7 +44,6 @@ }, "mlst_db": { "type": "string", - "default": "", "description": "A custom MLST database to use, either a tarball or a directory", "fa_icon": "fas fa-font" } diff --git a/modules/mlst/tests/main.nf.test.snap b/modules/mlst/tests/main.nf.test.snap index 0f3cee432..eb149fe9f 100644 --- a/modules/mlst/tests/main.nf.test.snap +++ b/modules/mlst/tests/main.nf.test.snap @@ -11,10 +11,10 @@ }, "GCF_000017085.tsv:md5,c2faf73735d4ebc6fb0d8f4b263eb5b6", [ - "versions.yml:md5,430105b9f7348fc38a47d20c19daf7fd" + "versions.yml:md5,6515f9242cdb83b9c720f39ce67a528f" ] ], - "timestamp": "2026-04-29T11:15:42.575237329", + "timestamp": "2026-07-30T19:01:04.724308312", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/mlst/tests/nextflow.config b/modules/mlst/tests/nextflow.config index f868d0310..1da3f8424 100644 --- a/modules/mlst/tests/nextflow.config +++ b/modules/mlst/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of MLST nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/mobsuite/recon/main.nf b/modules/mobsuite/recon/main.nf index 60b81b466..8c13ec382 100644 --- a/modules/mobsuite/recon/main.nf +++ b/modules/mobsuite/recon/main.nf @@ -97,8 +97,8 @@ process MOBSUITE_RECON { fi # Cleanup - gzip supplemental/*.fasta - mv supplemental/*.fasta.gz ./ + find supplemental/ -maxdepth 1 -name "*.fasta" -exec gzip {} \\; + find supplemental/ -maxdepth 1 -name "*.fasta.gz" -exec mv {} ./ \\; if [ "${is_compressed}" == "true" ]; then rm -rf ${fasta_name} fi diff --git a/modules/mobsuite/recon/tests/main.nf.test b/modules/mobsuite/recon/tests/main.nf.test index 603f56a0b..8edf6cbdf 100644 --- a/modules/mobsuite/recon/tests/main.nf.test +++ b/modules/mobsuite/recon/tests/main.nf.test @@ -67,4 +67,36 @@ nextflow_process { ) } } + + test("mobsuite_recon - module - GCF_006364235 - no plasmids") { + when { + params { + test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" + } + process { + """ + input[0] = Channel.of( + record( + meta: [name: "GCF_006364235"], + fna: file("${params.test_data_dir}/species/streptococcus_pyogenes/uncompressed/GCF_006364235/main/assembler/GCF_006364235.fna") + ) + ) + """ + } + } + + then { + def record = process.out[0][0] + assertAll( + { assert process.success }, + { assert snapshot( + record.meta, + record.chromosome, + record.contig_report, + record.plasmids, + record.versions + ).match() } + ) + } + } } diff --git a/modules/mobsuite/recon/tests/main.nf.test.snap b/modules/mobsuite/recon/tests/main.nf.test.snap index c77bf0f41..165ee33e2 100644 --- a/modules/mobsuite/recon/tests/main.nf.test.snap +++ b/modules/mobsuite/recon/tests/main.nf.test.snap @@ -1,4 +1,29 @@ { + "mobsuite_recon - module - GCF_006364235 - no plasmids": { + "content": [ + { + "id": "GCF_006364235-MOBSUITE_RECON", + "logs_dir": "GCF_006364235/tools/mobsuite//logs/", + "name": "GCF_006364235", + "output_dir": "GCF_006364235/tools/mobsuite/", + "process_name": "mobsuite", + "scope": "sample" + }, + "GCF_006364235-chromosome.fasta.gz:md5,6a71b83161328f8b0d8df42f1d30e853", + "GCF_006364235-contig_report.txt:md5,8aa74842a7a0af81d899b4d64f5f7c5b", + [ + + ], + [ + "versions.yml:md5,ff6f105fca429e7482ac358949a11f93" + ] + ], + "timestamp": "2026-07-30T19:05:12.197818243", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + }, "mobsuite_recon - module - GCF_000017085 - compressed": { "content": [ { @@ -15,7 +40,7 @@ "versions.yml:md5,ff6f105fca429e7482ac358949a11f93" ] ], - "timestamp": "2026-04-29T11:18:35.704802529", + "timestamp": "2026-07-30T19:04:07.812256834", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -37,7 +62,7 @@ "versions.yml:md5,ff6f105fca429e7482ac358949a11f93" ] ], - "timestamp": "2026-04-29T11:16:55.889054755", + "timestamp": "2026-07-30T19:02:33.098847623", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/mobsuite/recon/tests/nextflow.config b/modules/mobsuite/recon/tests/nextflow.config index 8f1b94a7b..3da4fdba1 100644 --- a/modules/mobsuite/recon/tests/nextflow.config +++ b/modules/mobsuite/recon/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of MOBSUITE_RECON nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/mykrobe/predict/module.config b/modules/mykrobe/predict/module.config index d0cd602f9..6e24a498b 100644 --- a/modules/mykrobe/predict/module.config +++ b/modules/mykrobe/predict/module.config @@ -26,7 +26,7 @@ process { ].join(' ').replaceAll("\\s{2,}", " ").trim() // Environment information - ext.toolName = "bioconda::mykrobe=0.13.0".replace("=", "-").replace(":", "-").replace(" ", "-") + ext.toolName = "bioconda::mykrobe=0.13.0 conda-forge::setuptools=80".replace("=", "-").replace(":", "-").replace(" ", "-") ext.docker = "biocontainers/mykrobe:0.13.0--py312h20b014d_5" ext.image = "https://depot.galaxyproject.org/singularity/mykrobe:0.13.0--py312h20b014d_5" ext.condaDir = "${params.condadir}" diff --git a/modules/mykrobe/predict/tests/main.nf.test b/modules/mykrobe/predict/tests/main.nf.test index 7acfa4805..11f88bd92 100644 --- a/modules/mykrobe/predict/tests/main.nf.test +++ b/modules/mykrobe/predict/tests/main.nf.test @@ -31,12 +31,16 @@ nextflow_process { def record = process.out[0][0] assertAll( { assert process.success }, + // Reproducible outputs { assert snapshot( record.meta, - record.csv, - record.json, record.versions - ).match() } + ).match() }, + // Non-reproducible outputs + { assert [ + record.csv, + record.json + ].every { path(it).exists() } } ) } } diff --git a/modules/mykrobe/predict/tests/main.nf.test.snap b/modules/mykrobe/predict/tests/main.nf.test.snap index 88e19458b..97c7e3575 100644 --- a/modules/mykrobe/predict/tests/main.nf.test.snap +++ b/modules/mykrobe/predict/tests/main.nf.test.snap @@ -10,13 +10,11 @@ "scope": "sample", "single_end": false }, - "SRR2838702.csv:md5,a27c093fe0789e56a7100d16ae757766", - "SRR2838702.json:md5,c27fd2ccc9ffc107511fa83ef4920897", [ "versions.yml:md5,3756fdfbed62cef8782098468ef3da9d" ] ], - "timestamp": "2026-04-29T11:15:40.218598288", + "timestamp": "2026-07-30T19:01:15.217118703", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/mykrobe/predict/tests/nextflow.config b/modules/mykrobe/predict/tests/nextflow.config index a2633eee2..9006a0321 100644 --- a/modules/mykrobe/predict/tests/nextflow.config +++ b/modules/mykrobe/predict/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of MYKROBE_PREDICT nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/ncbigenomedownload/main.nf b/modules/ncbigenomedownload/main.nf deleted file mode 100644 index c3b2da8c7..000000000 --- a/modules/ncbigenomedownload/main.nf +++ /dev/null @@ -1,113 +0,0 @@ -/** - * Download assemblies and annotation files from NCBI's Assembly database. - * - * Uses [ncbi-genome-download](https://github.com/kblin/ncbi-genome-download) to efficiently fetch - * one or more complete genome assemblies and their associated annotation and report files from - * the NCBI FTP site based on accession numbers, species name, or assembly ID. - * - * @status stable - * @keywords ncbi, download, genome, assembly, fasta, genbank, utility - * @tags complexity:moderate input-type:single output-type:multiple features:internet-access,resource-download,conditional-logic - * @citation ncbigenomedownload - * - * @input accessions? - * A path to a text file containing a list of NCBI Assembly accession numbers (one per line) - * - * @output record(meta, gbff?, fna?, rm?, features?, gff?, faa?, gpff?, wgs_gbk?, cds?, rna?, rna_fna?, report?, stats?, accessions?, results, logs, nf_logs, versions) - * - `gbff?`: GenBank format of the genomic sequence(s) (*_genomic.gbff.gz) - * - `fna?`: FASTA format of the genomic nucleotide sequence(s) (*_genomic.fna.gz) - * - `rm?`: RepeatMasker output for eukaryotes - * - `features?`: Tab-delimited text file reporting locations and attributes for a subset of features - * - `gff?`: Annotation of the genomic sequence(s) in GFF3 format (*_genomic.gff.gz) - * - `faa?`: FASTA format of the accessioned protein products (*_protein.faa.gz) - * - `gpff?`: GenPept format of the accessioned protein products - * - `wgs_gbk?`: GenBank flat file format of the WGS master - * - `cds?`: FASTA format of the nucleotide sequences corresponding to all CDS features - * - `rna?`: FASTA format of accessioned RNA products - * - `rna_fna?`: FASTA format of the nucleotide sequences corresponding to all RNA features - * - `report?`: Tab-delimited text file reporting assembly unit names, roles, and relationships - * - `stats?`: Tab-delimited text file reporting assembly statistics - * - `accessions?`: The generated accession list files - */ -nextflow.enable.types = true - -// bactopia-lint: ignore M017,M026 -process NCBIGENOMEDOWNLOAD { - label 'process_low' - - conda "${task.ext.condaDir}/${task.ext.toolName}" - container "${task.ext.container}" - - input: - accessions : Path? - - output: - record( - // Named fields (used downstream) - meta: meta, - gbff: files("*_genomic.gbff.gz", optional: true), - fna: files("*_genomic.fna.gz", optional: true), - rm: files("*_rm.out.gz", optional: true), - features: files("*_feature_table.txt.gz", optional: true), - gff: files("*_genomic.gff.gz", optional: true), - faa: files("*_protein.faa.gz", optional: true), - gpff: files("*_protein.gpff.gz", optional: true), - wgs_gbk: files("*_wgsmaster.gbff.gz", optional: true), - cds: files("*_cds_from_genomic.fna.gz", optional: true), - rna: files("*_rna.fna.gz", optional: true), - rna_fna: files("*_rna_from_genomic.fna.gz", optional: true), - report: files("*_assembly_report.txt", optional: true), - stats: files("*_assembly_stats.txt", optional: true), - accessions: files("accession-*.txt", optional: true), - // Generic fields (used for publishing) - results: [ - files("*.gz", optional: true), - files("*.txt", optional: true) - ], - logs: files("*.{log,err}", optional: true), - nf_logs: files(".command.*"), - versions: files("versions.yml") - ) - - script: - meta = record( - id: task.ext.meta_id, - name: task.ext.meta_id, - limit: task.ext.meta_limit, - accession: task.ext.meta_accession, - species: task.ext.meta_species, - scope: task.ext.scope, - process_name: task.ext.process_name, - output_dir: task.ext.process_name, - logs_dir: "${task.ext.process_name}/logs" - ) - - def has_accessions = accessions ? true : false - def opts = "${task.ext.args} --output-folder ./ --flat-output -p ${task.cpus} -r ${task.ext.max_retry}" - """ - if [ "${meta.species}" != "null" ]; then - if [ "${meta.limit}" != "null" ]; then - ncbi-genome-download ${opts} -g "${meta.species}" --dry-run | grep -v "Considering" > accession-list.txt - shuf accession-list.txt | head -n ${meta.limit} | cut -f 1,1 > accession-subset.txt - ncbi-genome-download ${opts} -u "https://ftp.ncbi.nlm.nih.gov/genomes" -A accession-subset.txt - else - ncbi-genome-download ${opts} -g "${meta.species}" - fi - fi - - if [ "${meta.accession}" != "null" ]; then - ncbi-genome-download ${opts} -u "https://ftp.ncbi.nlm.nih.gov/genomes" -A ${meta.accession} - fi - - if [ "${has_accessions}" == "true" ]; then - ncbi-genome-download ${opts} -u "https://ftp.ncbi.nlm.nih.gov/genomes" -A ${accessions} - fi - - # Cleanup - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - ncbigenomedownload: \$(echo \$(ncbi-genome-download --version 2>&1) | sed 's/ncbi-genome-download //') - END_VERSIONS - """ -} diff --git a/modules/ncbigenomedownload/tests/main.nf.test.snap b/modules/ncbigenomedownload/tests/main.nf.test.snap deleted file mode 100644 index da429f21d..000000000 --- a/modules/ncbigenomedownload/tests/main.nf.test.snap +++ /dev/null @@ -1,25 +0,0 @@ -{ - "ncbigenomedownload - module - single accession": { - "content": [ - { - "accession": "GCF_000292685.1", - "id": "ncbigenomedownload", - "limit": null, - "logs_dir": "ncbigenomedownload/logs", - "name": "ncbigenomedownload", - "output_dir": "ncbigenomedownload", - "process_name": "ncbigenomedownload", - "scope": "run", - "species": null - }, - [ - "versions.yml:md5,d7681d23ac421c72e51b4b078d708abb" - ] - ], - "timestamp": "2026-04-29T11:15:52.438541392", - "meta": { - "nf-test": "0.9.5", - "nextflow": "26.04.0" - } - } -} \ No newline at end of file diff --git a/modules/ncbigenomedownload/tests/nextflow.config b/modules/ncbigenomedownload/tests/nextflow.config deleted file mode 100644 index dcba99ffd..000000000 --- a/modules/ncbigenomedownload/tests/nextflow.config +++ /dev/null @@ -1,39 +0,0 @@ -// Minimal config for module-level testing of NCBIGENOMEDOWNLOAD -nextflow.enable.types = true -nextflow.enable.strict = true - -params { - workflow { - name = "ncbigenomedownload" - logo_name = "bactopia-tools" - description = "Download assemblies and annotation files from NCBI's Assembly database" - ext = "fna" - } - - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" - wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" - - // ncbi-genome-download uses enable_conda in module.config - enable_conda = false -} - -includeConfig "../module.config" -includeConfig "../../../conf/base.config" -includeConfig "../../../conf/profiles.config" diff --git a/modules/ngmaster/module.config b/modules/ngmaster/module.config index da92118b2..54e483a3c 100644 --- a/modules/ngmaster/module.config +++ b/modules/ngmaster/module.config @@ -17,9 +17,9 @@ process { ].join(' ').replaceAll("\\s{2,}", " ").trim() // Environment information - ext.toolName = "bioconda::ngmaster=2.0.0".replace("=", "-").replace(":", "-").replace(" ", "-") - ext.docker = "biocontainers/ngmaster:2.0.0--pyhdfd78af_0" - ext.image = "https://depot.galaxyproject.org/singularity/ngmaster:2.0.0--pyhdfd78af_0" + ext.toolName = "bioconda::ngmaster=2.1.0".replace("=", "-").replace(":", "-").replace(" ", "-") + ext.docker = "biocontainers/ngmaster:2.1.0--pyhdfd78af_0" + ext.image = "https://depot.galaxyproject.org/singularity/ngmaster:2.1.0--pyhdfd78af_0" ext.condaDir = "${params.condadir}" } } diff --git a/modules/ngmaster/tests/main.nf.test.snap b/modules/ngmaster/tests/main.nf.test.snap index 2a4b317b3..9d6a72f1b 100644 --- a/modules/ngmaster/tests/main.nf.test.snap +++ b/modules/ngmaster/tests/main.nf.test.snap @@ -11,10 +11,10 @@ }, "GCF_001047255.tsv:md5,2be2b3dd6c45726d2a9d7f2540b34219", [ - "versions.yml:md5,141b09741c21ba1bdf441bfba28bbfa9" + "versions.yml:md5,510f19d76af81e52f423b70c5ea4a2b9" ] ], - "timestamp": "2026-04-29T11:15:47.027126264", + "timestamp": "2026-07-30T19:01:14.868849062", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -32,10 +32,10 @@ }, "GCF_001047255.tsv:md5,2be2b3dd6c45726d2a9d7f2540b34219", [ - "versions.yml:md5,141b09741c21ba1bdf441bfba28bbfa9" + "versions.yml:md5,510f19d76af81e52f423b70c5ea4a2b9" ] ], - "timestamp": "2026-04-29T11:16:23.109381544", + "timestamp": "2026-07-30T19:01:37.494870953", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/ngmaster/tests/nextflow.config b/modules/ngmaster/tests/nextflow.config index 86ea7a804..3136e325a 100644 --- a/modules/ngmaster/tests/nextflow.config +++ b/modules/ngmaster/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of NGMASTER nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/nohuman/download/module.config b/modules/nohuman/download/module.config index 8c680c3b5..cc453ec8e 100644 --- a/modules/nohuman/download/module.config +++ b/modules/nohuman/download/module.config @@ -4,6 +4,7 @@ params { nohuman_db = null nohuman_db_version = "" nohuman_save_as_tarball = false + use_nohuman = false } process { @@ -26,9 +27,9 @@ process { ].join(' ').replaceAll("\\s{2,}", " ").trim() // Environment information - ext.toolName = "bioconda::bactopia-teton=1.1.3".replace("=", "-").replace(":", "-").replace(" ", "-") - ext.docker = "biocontainers/bactopia-teton:1.1.3--hdfd78af_0" - ext.image = "https://depot.galaxyproject.org/singularity/bactopia-teton:1.1.3--hdfd78af_0" + ext.toolName = "bioconda::bactopia-teton=1.1.4".replace("=", "-").replace(":", "-").replace(" ", "-") + ext.docker = "biocontainers/bactopia-teton:1.1.4--hdfd78af_0" + ext.image = "https://depot.galaxyproject.org/singularity/bactopia-teton:1.1.4--hdfd78af_0" ext.condaDir = "${params.condadir}" } } diff --git a/modules/nohuman/run/module.config b/modules/nohuman/run/module.config index 70864337d..8348a4b3f 100644 --- a/modules/nohuman/run/module.config +++ b/modules/nohuman/run/module.config @@ -20,9 +20,9 @@ process { ].join(' ').replaceAll("\\s{2,}", " ").trim() // Environment information - ext.toolName = "bioconda::bactopia-teton=1.1.3".replace("=", "-").replace(":", "-").replace(" ", "-") - ext.docker = "biocontainers/bactopia-teton:1.1.3--hdfd78af_0" - ext.image = "https://depot.galaxyproject.org/singularity/bactopia-teton:1.1.3--hdfd78af_0" + ext.toolName = "bioconda::bactopia-teton=1.1.4".replace("=", "-").replace(":", "-").replace(" ", "-") + ext.docker = "biocontainers/bactopia-teton:1.1.4--hdfd78af_0" + ext.image = "https://depot.galaxyproject.org/singularity/bactopia-teton:1.1.4--hdfd78af_0" ext.condaDir = "${params.condadir}" // Module-specific parameters diff --git a/modules/nohuman/run/tests/main.nf.test.snap b/modules/nohuman/run/tests/main.nf.test.snap index 16e6259b3..d28bde0da 100644 --- a/modules/nohuman/run/tests/main.nf.test.snap +++ b/modules/nohuman/run/tests/main.nf.test.snap @@ -16,10 +16,10 @@ }, "SRR2838702.scrub.report.tsv:md5,4b0dcd803f7da2cc2d79b8cc5cac403c", [ - "versions.yml:md5,12c5ca2725279a466f337e5a5de7b27b" + "versions.yml:md5,795cd80ef4d2109d4aeadeaf8a025ad3" ] ], - "timestamp": "2026-04-29T11:26:46.3896525", + "timestamp": "2026-07-30T19:13:22.75625609", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -42,10 +42,10 @@ }, "SRR2838702.scrub.report.tsv:md5,0bc664ae0be37cb6ebd8490f3a11f973", [ - "versions.yml:md5,12c5ca2725279a466f337e5a5de7b27b" + "versions.yml:md5,795cd80ef4d2109d4aeadeaf8a025ad3" ] ], - "timestamp": "2026-04-29T11:30:23.430469379", + "timestamp": "2026-07-30T19:17:55.590466404", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -68,10 +68,10 @@ }, "SRR2838702.scrub.report.tsv:md5,4b0dcd803f7da2cc2d79b8cc5cac403c", [ - "versions.yml:md5,12c5ca2725279a466f337e5a5de7b27b" + "versions.yml:md5,795cd80ef4d2109d4aeadeaf8a025ad3" ] ], - "timestamp": "2026-04-29T11:22:42.057476779", + "timestamp": "2026-07-30T19:08:32.867396089", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/nohuman/run/tests/nextflow.config b/modules/nohuman/run/tests/nextflow.config index cfa8f6137..98eddee1f 100644 --- a/modules/nohuman/run/tests/nextflow.config +++ b/modules/nohuman/run/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of NOHUMAN_RUN nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/panaroo/run/module.config b/modules/panaroo/run/module.config index cfde06451..2df7a2d0d 100644 --- a/modules/panaroo/run/module.config +++ b/modules/panaroo/run/module.config @@ -33,9 +33,9 @@ process { ].join(' ').replaceAll("\\s{2,}", " ").trim() // Environment information - ext.toolName = "bioconda::panaroo=1.6.0".replace("=", "-").replace(":", "-").replace(" ", "-") - ext.docker = "biocontainers/panaroo:1.6.0--pyhdfd78af_0" - ext.image = "https://depot.galaxyproject.org/singularity/panaroo:1.6.0--pyhdfd78af_0" + ext.toolName = "bioconda::panaroo=1.8.0".replace("=", "-").replace(":", "-").replace(" ", "-") + ext.docker = "biocontainers/panaroo:1.8.0--pyhdfd78af_0" + ext.image = "https://depot.galaxyproject.org/singularity/panaroo:1.8.0--pyhdfd78af_0" ext.condaDir = "${params.condadir}" } } diff --git a/modules/panaroo/run/tests/main.nf.test.snap b/modules/panaroo/run/tests/main.nf.test.snap index bc2b39f8f..1e363902b 100644 --- a/modules/panaroo/run/tests/main.nf.test.snap +++ b/modules/panaroo/run/tests/main.nf.test.snap @@ -10,10 +10,10 @@ "scope": "run" }, [ - "versions.yml:md5,bc3e44bf3b11c0eddd36a31af1aa71a4" + "versions.yml:md5,e6a0f1e191dcfb92fab2a7d68063c31d" ] ], - "timestamp": "2026-04-29T11:17:35.290114895", + "timestamp": "2026-07-30T19:02:53.705658675", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/panaroo/run/tests/nextflow.config b/modules/panaroo/run/tests/nextflow.config index e8b6438e4..7ba79dc01 100644 --- a/modules/panaroo/run/tests/nextflow.config +++ b/modules/panaroo/run/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of PANAROO_RUN nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/pasty/tests/main.nf.test b/modules/pasty/tests/main.nf.test index 19a7ffd7d..145ea937e 100644 --- a/modules/pasty/tests/main.nf.test +++ b/modules/pasty/tests/main.nf.test @@ -26,13 +26,17 @@ nextflow_process { def record = process.out[0][0] assertAll( { assert process.success }, + // Reproducible outputs { assert snapshot( record.meta, + record.blast + ).match() }, + // Non-reproducible outputs + { assert [ record.tsv, - record.blast, - record.details, - record.versions - ).match() } + record.details + ].every { path(it).exists() } }, + { assert path(record.versions[0]).text.contains('pasty') } ) } } diff --git a/modules/pasty/tests/main.nf.test.snap b/modules/pasty/tests/main.nf.test.snap index e6d82f6a3..2e82d9485 100644 --- a/modules/pasty/tests/main.nf.test.snap +++ b/modules/pasty/tests/main.nf.test.snap @@ -9,14 +9,9 @@ "process_name": "pasty", "scope": "sample" }, - "GCF_000006765.tsv:md5,fdffd76c66ee57072cd5e8da474bba34", - "GCF_000006765.blastn.tsv:md5,dcaf63876416cd5c19d868cfbf446258", - "GCF_000006765.details.tsv:md5,1215b1d8dd346836e07404c0a13c79f1", - [ - "versions.yml:md5,275841ecfb594907dd941a31a5e5f171" - ] + "GCF_000006765.blastn.tsv:md5,dcaf63876416cd5c19d868cfbf446258" ], - "timestamp": "2026-04-29T11:15:36.307925094", + "timestamp": "2026-07-30T19:01:09.628892017", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/pasty/tests/nextflow.config b/modules/pasty/tests/nextflow.config index d1160e619..312c7d295 100644 --- a/modules/pasty/tests/nextflow.config +++ b/modules/pasty/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of PASTY nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/pbptyper/tests/main.nf.test b/modules/pbptyper/tests/main.nf.test index a7e72fe19..1c95d33c7 100644 --- a/modules/pbptyper/tests/main.nf.test +++ b/modules/pbptyper/tests/main.nf.test @@ -26,12 +26,16 @@ nextflow_process { def record = process.out[0][0] assertAll( { assert process.success }, + // Reproducible outputs { assert snapshot( record.meta, - record.tsv, - record.blast, - record.versions - ).match() } + record.blast + ).match() }, + // Non-reproducible outputs + { assert [ + record.tsv + ].every { path(it).exists() } }, + { assert path(record.versions[0]).text.contains('pbptyper') } ) } } diff --git a/modules/pbptyper/tests/main.nf.test.snap b/modules/pbptyper/tests/main.nf.test.snap index 8f849b077..c140e0e0c 100644 --- a/modules/pbptyper/tests/main.nf.test.snap +++ b/modules/pbptyper/tests/main.nf.test.snap @@ -9,13 +9,9 @@ "process_name": "pbptyper", "scope": "sample" }, - "GCF_001457635.tsv:md5,1a21879bdaf7aac85a1f4e0fb0e59989", - "GCF_001457635.tblastn.tsv:md5,ce2247715df7d40f2ada2fe27e6c3967", - [ - "versions.yml:md5,be74af83bdcf74f71056df98990fdeda" - ] + "GCF_001457635.tblastn.tsv:md5,ce2247715df7d40f2ada2fe27e6c3967" ], - "timestamp": "2026-04-29T11:16:10.533716034", + "timestamp": "2026-07-30T19:01:50.334593871", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/pbptyper/tests/nextflow.config b/modules/pbptyper/tests/nextflow.config index 4c0b7c705..be4072281 100644 --- a/modules/pbptyper/tests/nextflow.config +++ b/modules/pbptyper/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of PBPTYPER nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/phispy/module.config b/modules/phispy/module.config index 6215a7664..aca74c1e7 100644 --- a/modules/phispy/module.config +++ b/modules/phispy/module.config @@ -29,9 +29,9 @@ process { ].join(' ').replaceAll("\\s{2,}", " ").trim() // Environment information - ext.toolName = "bioconda::phispy=5.0.6".replace("=", "-").replace(":", "-").replace(" ", "-") - ext.docker = "biocontainers/phispy:5.0.6--py311h483b626_0" - ext.image = "https://depot.galaxyproject.org/singularity/phispy:5.0.6--py311h483b626_0" + ext.toolName = "bioconda::phispy=5.0.10".replace("=", "-").replace(":", "-").replace(" ", "-") + ext.docker = "biocontainers/phispy:5.0.10--py311h0e292b2_0" + ext.image = "https://depot.galaxyproject.org/singularity/phispy:5.0.10--py311h0e292b2_0" ext.condaDir = "${params.condadir}" } } diff --git a/modules/phispy/tests/main.nf.test.snap b/modules/phispy/tests/main.nf.test.snap index 2a3d1d966..f9b4cadcb 100644 --- a/modules/phispy/tests/main.nf.test.snap +++ b/modules/phispy/tests/main.nf.test.snap @@ -10,10 +10,10 @@ "scope": "sample" }, [ - "versions.yml:md5,5d58358ef1d0dba349319f20bc5c1602" + "versions.yml:md5,97542c4eb1d90b2b0a0375c916b75dc5" ] ], - "timestamp": "2026-04-29T11:18:13.916716092", + "timestamp": "2026-07-30T19:03:31.453893248", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/phispy/tests/nextflow.config b/modules/phispy/tests/nextflow.config index 1de465e6a..fac8960b7 100644 --- a/modules/phispy/tests/nextflow.config +++ b/modules/phispy/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of PHISPY nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/pirate/tests/main.nf.test.snap b/modules/pirate/tests/main.nf.test.snap index b18f1acb0..459cf9a57 100644 --- a/modules/pirate/tests/main.nf.test.snap +++ b/modules/pirate/tests/main.nf.test.snap @@ -13,7 +13,7 @@ "versions.yml:md5,ce4d40e2b87e2e5cac6e755fcb0c023b" ] ], - "timestamp": "2026-04-29T11:19:02.881672069", + "timestamp": "2026-07-30T19:04:14.89152874", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/pirate/tests/nextflow.config b/modules/pirate/tests/nextflow.config index 7fca74bff..f93c8a481 100644 --- a/modules/pirate/tests/nextflow.config +++ b/modules/pirate/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of PIRATE nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/plasmidfinder/tests/main.nf.test.snap b/modules/plasmidfinder/tests/main.nf.test.snap index 369890b85..7fe5c6d5d 100644 --- a/modules/plasmidfinder/tests/main.nf.test.snap +++ b/modules/plasmidfinder/tests/main.nf.test.snap @@ -13,7 +13,7 @@ "versions.yml:md5,2de62652dc2eb6c95f17225e88da8d70" ] ], - "timestamp": "2026-04-29T11:15:48.064199264", + "timestamp": "2026-07-30T19:02:35.403125645", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -33,7 +33,7 @@ "versions.yml:md5,2de62652dc2eb6c95f17225e88da8d70" ] ], - "timestamp": "2026-04-29T11:16:10.853956728", + "timestamp": "2026-07-30T19:02:55.239172022", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/plasmidfinder/tests/nextflow.config b/modules/plasmidfinder/tests/nextflow.config index ae6679b46..09cfcd577 100644 --- a/modules/plasmidfinder/tests/nextflow.config +++ b/modules/plasmidfinder/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of PLASMIDFINDER nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/pneumocat/tests/main.nf.test.snap b/modules/pneumocat/tests/main.nf.test.snap index 1705b880b..342593564 100644 --- a/modules/pneumocat/tests/main.nf.test.snap +++ b/modules/pneumocat/tests/main.nf.test.snap @@ -13,7 +13,7 @@ "versions.yml:md5,d8d36b1fca1892122c5a186c9e8ce9cf" ] ], - "timestamp": "2026-04-29T11:16:11.042825354", + "timestamp": "2026-07-30T19:02:49.657546906", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/pneumocat/tests/nextflow.config b/modules/pneumocat/tests/nextflow.config index f07b67537..290830ef6 100644 --- a/modules/pneumocat/tests/nextflow.config +++ b/modules/pneumocat/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of PNEUMOCAT nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/prokka/module.config b/modules/prokka/module.config index 79122eb75..3be4f7163 100644 --- a/modules/prokka/module.config +++ b/modules/prokka/module.config @@ -6,7 +6,7 @@ params { prokka_debug = false prokka_evalue = "1e-09" prokka_opts = "" - prokka_proteins = "${projectDir}/data/proteins.faa" + prokka_proteins = "${params.bactopia_dir}/data/proteins.faa" } process { diff --git a/modules/prokka/schema.json b/modules/prokka/schema.json index f2657665a..9ba072eee 100644 --- a/modules/prokka/schema.json +++ b/modules/prokka/schema.json @@ -14,7 +14,7 @@ "properties": { "prokka_proteins": { "type": "string", - "default": "${projectDir}/data/proteins.faa", + "default": "${params.bactopia_dir}/data/proteins.faa", "description": "FASTA file of trusted proteins to first annotate from", "fa_icon": "fas fa-font" }, diff --git a/modules/prokka/tests/main.nf.test b/modules/prokka/tests/main.nf.test index 916f3ed46..48867f3ad 100644 --- a/modules/prokka/tests/main.nf.test +++ b/modules/prokka/tests/main.nf.test @@ -70,4 +70,40 @@ nextflow_process { ) } } + + test("prokka - module - SRR2838702 - bundled proteins default") { + // Exercises the shipped prokka_proteins default rather than overriding it. + // The default is anchored on params.bactopia_dir, so this fails if the + // anchor is wrong or the vendored FASTA is missing. + when { + params { + test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" + } + process { + """ + input[0] = Channel.of( + record( + meta: [name: "SRR2838702"], + fna: file("${params.test_data_dir}/datasets/generic/GCF_000292685.fna") + ) + ) + input[1] = file(params.prokka_proteins, checkIfExists: true) + input[2] = null + """ + } + } + + then { + def record = process.out[0][0] + assertAll( + { assert process.success }, + { assert snapshot( + record.meta, + record.txt, + record.tsv, + record.versions + ).match() } + ) + } + } } diff --git a/modules/prokka/tests/main.nf.test.snap b/modules/prokka/tests/main.nf.test.snap index c83b3ff4a..b131e1746 100644 --- a/modules/prokka/tests/main.nf.test.snap +++ b/modules/prokka/tests/main.nf.test.snap @@ -15,7 +15,7 @@ "versions.yml:md5,edc57afe4ba0c950e15415ed95f1ff83" ] ], - "timestamp": "2026-04-29T11:16:48.191157898", + "timestamp": "2026-07-30T19:03:22.96725672", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -37,7 +37,29 @@ "versions.yml:md5,edc57afe4ba0c950e15415ed95f1ff83" ] ], - "timestamp": "2026-04-29T11:17:22.119737635", + "timestamp": "2026-07-30T19:03:55.701297764", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + }, + "prokka - module - SRR2838702 - bundled proteins default": { + "content": [ + { + "id": "SRR2838702-PROKKA", + "logs_dir": "SRR2838702/main/annotator/prokka/logs/", + "name": "SRR2838702", + "output_dir": "SRR2838702/main/annotator/prokka/", + "process_name": "prokka", + "scope": "sample" + }, + "SRR2838702.txt:md5,09c05b70e569b8397697494b799fe2b0", + "SRR2838702.tsv:md5,64e127d52999b87519920aaf519c6947", + [ + "versions.yml:md5,edc57afe4ba0c950e15415ed95f1ff83" + ] + ], + "timestamp": "2026-07-30T19:04:41.090391416", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/prokka/tests/nextflow.config b/modules/prokka/tests/nextflow.config index b294bc373..ff2763d44 100644 --- a/modules/prokka/tests/nextflow.config +++ b/modules/prokka/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of PROKKA nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -10,25 +11,9 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" + // Under nf-test, projectDir is this tests/ directory + bactopia_dir = "${projectDir}/../../.." wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/quast/tests/main.nf.test b/modules/quast/tests/main.nf.test index 767a9673e..3fcb71eb2 100644 --- a/modules/quast/tests/main.nf.test +++ b/modules/quast/tests/main.nf.test @@ -27,11 +27,13 @@ nextflow_process { def record = process.out[0][0] assertAll( { assert process.success }, + // Reproducible outputs { assert snapshot( record.meta, - record.tsv, - record.versions - ).match() } + record.tsv + ).match() }, + // Non-reproducible outputs + { assert path(record.versions[0]).text.contains('quast') } ) } } @@ -58,11 +60,13 @@ nextflow_process { def record = process.out[0][0] assertAll( { assert process.success }, + // Reproducible outputs { assert snapshot( record.meta, - record.tsv, - record.versions - ).match() } + record.tsv + ).match() }, + // Non-reproducible outputs + { assert path(record.versions[0]).text.contains('quast') } ) } } @@ -89,11 +93,13 @@ nextflow_process { def record = process.out[0][0] assertAll( { assert process.success }, + // Reproducible outputs { assert snapshot( record.meta, - record.tsv, - record.versions - ).match() } + record.tsv + ).match() }, + // Non-reproducible outputs + { assert path(record.versions[0]).text.contains('quast') } ) } } diff --git a/modules/quast/tests/main.nf.test.snap b/modules/quast/tests/main.nf.test.snap index fd7455f79..4a6cd2fac 100644 --- a/modules/quast/tests/main.nf.test.snap +++ b/modules/quast/tests/main.nf.test.snap @@ -9,12 +9,9 @@ "process_name": "quast", "scope": "sample" }, - "SRR2838702.tsv:md5,79fa78c69537697be5eee30f630833d7", - [ - "versions.yml:md5,951ec08af8a1a4466340060a5c95b6c5" - ] + "SRR2838702.tsv:md5,79fa78c69537697be5eee30f630833d7" ], - "timestamp": "2026-04-29T11:17:08.770591985", + "timestamp": "2026-07-30T19:03:36.110797121", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -30,12 +27,9 @@ "process_name": "quast", "scope": "sample" }, - "SRR2838702.tsv:md5,a02f798379d9982810a198ec9b389079", - [ - "versions.yml:md5,951ec08af8a1a4466340060a5c95b6c5" - ] + "SRR2838702.tsv:md5,a02f798379d9982810a198ec9b389079" ], - "timestamp": "2026-04-29T11:16:46.344863097", + "timestamp": "2026-07-30T19:03:16.886391528", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -51,12 +45,9 @@ "process_name": "quast", "scope": "sample" }, - "SRR2838702.tsv:md5,2e31a6f1283ca3a7aa253ab81266b85f", - [ - "versions.yml:md5,951ec08af8a1a4466340060a5c95b6c5" - ] + "SRR2838702.tsv:md5,2e31a6f1283ca3a7aa253ab81266b85f" ], - "timestamp": "2026-04-29T11:16:20.405215733", + "timestamp": "2026-07-30T19:02:54.643753786", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/quast/tests/nextflow.config b/modules/quast/tests/nextflow.config index 613929103..cab070af7 100644 --- a/modules/quast/tests/nextflow.config +++ b/modules/quast/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of QUAST nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/rgi/heatmap/module.config b/modules/rgi/heatmap/module.config index ef292b45d..df6c71fb2 100644 --- a/modules/rgi/heatmap/module.config +++ b/modules/rgi/heatmap/module.config @@ -19,9 +19,9 @@ process { ].join(' ').replaceAll("\\s{2,}", " ").trim() // Environment information - ext.toolName = "bioconda::rgi=6.0.5".replace("=", "-").replace(":", "-").replace(" ", "-") - ext.docker = "biocontainers/rgi:6.0.5--pyh05cac1d_0" - ext.image = "https://depot.galaxyproject.org/singularity/rgi:6.0.5--pyh05cac1d_0" + ext.toolName = "bioconda::rgi=6.0.8".replace("=", "-").replace(":", "-").replace(" ", "-") + ext.docker = "biocontainers/rgi:6.0.8--pyh05cac1d_0" + ext.image = "https://depot.galaxyproject.org/singularity/rgi:6.0.8--pyh05cac1d_0" ext.condaDir = "${params.condadir}" } } diff --git a/modules/rgi/heatmap/tests/main.nf.test.snap b/modules/rgi/heatmap/tests/main.nf.test.snap index 905e6605f..1e55b183d 100644 --- a/modules/rgi/heatmap/tests/main.nf.test.snap +++ b/modules/rgi/heatmap/tests/main.nf.test.snap @@ -10,10 +10,10 @@ "scope": "run" }, [ - "versions.yml:md5,632aee3b4ff52c9313a58f423eeed956" + "versions.yml:md5,85fd687a901fef3c05e188fe49391c68" ] ], - "timestamp": "2026-04-29T11:16:27.891122241", + "timestamp": "2026-07-30T19:02:57.820482255", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/rgi/heatmap/tests/nextflow.config b/modules/rgi/heatmap/tests/nextflow.config index d70b3befe..17421413a 100644 --- a/modules/rgi/heatmap/tests/nextflow.config +++ b/modules/rgi/heatmap/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of RGI_HEATMAP nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" // RGI heatmap parameters (referenced in module.config) rgi_frequency = false diff --git a/modules/rgi/main/main.nf b/modules/rgi/main/main.nf index dead66576..f5392f595 100644 --- a/modules/rgi/main/main.nf +++ b/modules/rgi/main/main.nf @@ -68,7 +68,7 @@ process RGI_MAIN { ${task.ext.args} \\ --clean \\ --data wgs \\ - --num_threads ${task.cpus} \\ + --threads ${task.cpus} \\ --output_file ${prefix} \\ --input_sequence ${fna} diff --git a/modules/rgi/main/module.config b/modules/rgi/main/module.config index 310d070c8..e622fd5a0 100644 --- a/modules/rgi/main/module.config +++ b/modules/rgi/main/module.config @@ -3,9 +3,9 @@ params { rgi_category = "" rgi_cluster = "" rgi_display = "plain" - rgi_exclude_nudge = false rgi_frequency = false rgi_include_loose = false + rgi_include_nudge = false rgi_use_diamond = false } @@ -21,13 +21,13 @@ process { ext.args = [ params.rgi_use_diamond ? "--alignment_tool DIAMOND" : "--alignment_tool BLAST", params.rgi_include_loose ? "--include_loose" : "", - params.rgi_exclude_nudge ? "--exclude_nudge" : "" + params.rgi_include_nudge ? "--include_nudge" : "" ].join(' ').replaceAll("\\s{2,}", " ").trim() // Environment information - ext.toolName = "bioconda::rgi=6.0.5".replace("=", "-").replace(":", "-").replace(" ", "-") - ext.docker = "biocontainers/rgi:6.0.5--pyh05cac1d_0" - ext.image = "https://depot.galaxyproject.org/singularity/rgi:6.0.5--pyh05cac1d_0" + ext.toolName = "bioconda::rgi=6.0.8".replace("=", "-").replace(":", "-").replace(" ", "-") + ext.docker = "biocontainers/rgi:6.0.8--pyh05cac1d_0" + ext.image = "https://depot.galaxyproject.org/singularity/rgi:6.0.8--pyh05cac1d_0" ext.condaDir = "${params.condadir}" } } diff --git a/modules/rgi/main/schema.json b/modules/rgi/main/schema.json index ed7854372..094475622 100644 --- a/modules/rgi/main/schema.json +++ b/modules/rgi/main/schema.json @@ -25,10 +25,10 @@ "fa_icon": "fas fa-toggle-on", "hidden": true }, - "rgi_exclude_nudge": { + "rgi_include_nudge": { "type": "boolean", "default": false, - "description": "Exclude hits nudged from loose to strict hits", + "description": "Include hits nudged from loose to strict hits", "fa_icon": "fas fa-toggle-on", "hidden": true }, diff --git a/modules/rgi/main/tests/main.nf.test b/modules/rgi/main/tests/main.nf.test index 84ae4cf4e..5ff1c770e 100644 --- a/modules/rgi/main/tests/main.nf.test +++ b/modules/rgi/main/tests/main.nf.test @@ -65,4 +65,35 @@ nextflow_process { ) } } + + test("rgi - module - GCF_900478275 - include_nudge") { + when { + params { + test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" + rgi_include_nudge = true + } + process { + """ + input[0] = Channel.of( + record( + meta: [name: "GCF_900478275"], + fna: file("${params.test_data_dir}/species/haemophilus_influenzae/compressed/GCF_900478275/main/assembler/GCF_900478275.fna.gz") + ) + ) + """ + } + } + + then { + def record = process.out[0][0] + assertAll( + { assert process.success }, + { assert snapshot( + record.meta, + record.tsv, + record.versions + ).match() } + ) + } + } } diff --git a/modules/rgi/main/tests/main.nf.test.snap b/modules/rgi/main/tests/main.nf.test.snap index 61dff38a6..8911831bb 100644 --- a/modules/rgi/main/tests/main.nf.test.snap +++ b/modules/rgi/main/tests/main.nf.test.snap @@ -9,12 +9,33 @@ "process_name": "rgi_main", "scope": "sample" }, - "GCF_900478275.tsv:md5,9d7754551163e020beed52a8bc14ce83", + "GCF_900478275.tsv:md5,9dd0afe6946da9c6608e775f954813a1", [ - "versions.yml:md5,238ddd7a4b55d8797a1d5bfc111ebbfd" + "versions.yml:md5,05dc31bdfb77fca95ad95c899ac55679" ] ], - "timestamp": "2026-04-29T11:17:22.355042061", + "timestamp": "2026-07-30T19:03:51.30412458", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + }, + "rgi - module - GCF_900478275 - include_nudge": { + "content": [ + { + "id": "GCF_900478275-RGI_MAIN", + "logs_dir": "GCF_900478275/tools/rgi_main//logs/", + "name": "GCF_900478275", + "output_dir": "GCF_900478275/tools/rgi_main/", + "process_name": "rgi_main", + "scope": "sample" + }, + "GCF_900478275.tsv:md5,9dd0afe6946da9c6608e775f954813a1", + [ + "versions.yml:md5,05dc31bdfb77fca95ad95c899ac55679" + ] + ], + "timestamp": "2026-07-30T19:06:21.639037039", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -30,12 +51,12 @@ "process_name": "rgi_main", "scope": "sample" }, - "GCA_000027305.tsv:md5,4207abf2986a420c0fb15b33e77144a6", + "GCA_000027305.tsv:md5,9af9b3e370a908d6b86a21c2cecad254", [ - "versions.yml:md5,238ddd7a4b55d8797a1d5bfc111ebbfd" + "versions.yml:md5,05dc31bdfb77fca95ad95c899ac55679" ] ], - "timestamp": "2026-04-29T11:18:41.325231847", + "timestamp": "2026-07-30T19:05:05.837709411", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/rgi/main/tests/nextflow.config b/modules/rgi/main/tests/nextflow.config index 157f73837..45cc8dde0 100644 --- a/modules/rgi/main/tests/nextflow.config +++ b/modules/rgi/main/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of RGI_MAIN nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/roary/tests/main.nf.test.snap b/modules/roary/tests/main.nf.test.snap index 25e67cba3..0207b1540 100644 --- a/modules/roary/tests/main.nf.test.snap +++ b/modules/roary/tests/main.nf.test.snap @@ -13,7 +13,7 @@ "versions.yml:md5,80c99c1b38b33ebcb7925eabba7ca2eb" ] ], - "timestamp": "2026-04-29T11:17:54.404327622", + "timestamp": "2026-07-30T19:04:20.772233767", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/roary/tests/nextflow.config b/modules/roary/tests/nextflow.config index be29306b1..b5ea61f7d 100644 --- a/modules/roary/tests/nextflow.config +++ b/modules/roary/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of ROARY nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/sccmec/tests/main.nf.test b/modules/sccmec/tests/main.nf.test index 6a7c43bdc..171c1f9d7 100644 --- a/modules/sccmec/tests/main.nf.test +++ b/modules/sccmec/tests/main.nf.test @@ -26,15 +26,19 @@ nextflow_process { def record = process.out[0][0] assertAll( { assert process.success }, + // Reproducible outputs { assert snapshot( record.meta, - record.tsv, record.targets, + record.regions + ).match() }, + // Non-reproducible outputs + { assert [ + record.tsv, record.target_details, - record.regions, - record.regions_details, - record.versions - ).match() } + record.regions_details + ].every { path(it).exists() } }, + { assert path(record.versions[0]).text.contains('sccmec') } ) } } @@ -60,15 +64,19 @@ nextflow_process { def record = process.out[0][0] assertAll( { assert process.success }, + // Reproducible outputs { assert snapshot( record.meta, - record.tsv, record.targets, + record.regions + ).match() }, + // Non-reproducible outputs + { assert [ + record.tsv, record.target_details, - record.regions, - record.regions_details, - record.versions - ).match() } + record.regions_details + ].every { path(it).exists() } }, + { assert path(record.versions[0]).text.contains('sccmec') } ) } } diff --git a/modules/sccmec/tests/main.nf.test.snap b/modules/sccmec/tests/main.nf.test.snap index 9a494cd0a..2f7af20c3 100644 --- a/modules/sccmec/tests/main.nf.test.snap +++ b/modules/sccmec/tests/main.nf.test.snap @@ -9,16 +9,10 @@ "process_name": "sccmec", "scope": "sample" }, - "GCF_000017085.tsv:md5,da49131b3619e12fac7c1efef5e109d0", "GCF_000017085.targets.blastn.tsv:md5,5cd7054ed50c7d360feac0e51db54ac6", - "GCF_000017085.targets.details.tsv:md5,8938065005a5f984229c09cd4d9f91e2", - "GCF_000017085.regions.blastn.tsv:md5,ca426de41052a9f0bdcfb538610e5aa6", - "GCF_000017085.regions.details.tsv:md5,d8568654b8455ddebf37283918805b46", - [ - "versions.yml:md5,be2d2b5a56d601fba136df419d536c4a" - ] + "GCF_000017085.regions.blastn.tsv:md5,ca426de41052a9f0bdcfb538610e5aa6" ], - "timestamp": "2026-04-29T11:16:25.913673101", + "timestamp": "2026-07-30T19:02:57.064252528", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -34,16 +28,10 @@ "process_name": "sccmec", "scope": "sample" }, - "GCF_000017085.tsv:md5,da49131b3619e12fac7c1efef5e109d0", "GCF_000017085.targets.blastn.tsv:md5,5cd7054ed50c7d360feac0e51db54ac6", - "GCF_000017085.targets.details.tsv:md5,8938065005a5f984229c09cd4d9f91e2", - "GCF_000017085.regions.blastn.tsv:md5,ca426de41052a9f0bdcfb538610e5aa6", - "GCF_000017085.regions.details.tsv:md5,d8568654b8455ddebf37283918805b46", - [ - "versions.yml:md5,be2d2b5a56d601fba136df419d536c4a" - ] + "GCF_000017085.regions.blastn.tsv:md5,ca426de41052a9f0bdcfb538610e5aa6" ], - "timestamp": "2026-04-29T11:16:45.324766261", + "timestamp": "2026-07-30T19:03:14.979579813", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/sccmec/tests/nextflow.config b/modules/sccmec/tests/nextflow.config index 66595a4fc..331192f56 100644 --- a/modules/sccmec/tests/nextflow.config +++ b/modules/sccmec/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of SCCMEC nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/scoary/tests/main.nf.test.snap b/modules/scoary/tests/main.nf.test.snap index 04319727a..e598be570 100644 --- a/modules/scoary/tests/main.nf.test.snap +++ b/modules/scoary/tests/main.nf.test.snap @@ -13,7 +13,7 @@ "versions.yml:md5,f8f8a2300f84de4e8184c9dd33579ccd" ] ], - "timestamp": "2026-04-29T11:16:20.893786706", + "timestamp": "2026-07-30T19:02:53.210307337", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/scoary/tests/nextflow.config b/modules/scoary/tests/nextflow.config index 7a3abcfce..e65e7b643 100644 --- a/modules/scoary/tests/nextflow.config +++ b/modules/scoary/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of SCOARY nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/seqsero2/tests/main.nf.test.snap b/modules/seqsero2/tests/main.nf.test.snap index ebea9c714..117e1d560 100644 --- a/modules/seqsero2/tests/main.nf.test.snap +++ b/modules/seqsero2/tests/main.nf.test.snap @@ -13,7 +13,7 @@ "versions.yml:md5,5eae062ed95e0fb2e1bd8d268e0e1cdf" ] ], - "timestamp": "2026-04-29T11:16:38.436546661", + "timestamp": "2026-07-30T19:03:08.774122348", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -33,7 +33,7 @@ "versions.yml:md5,5eae062ed95e0fb2e1bd8d268e0e1cdf" ] ], - "timestamp": "2026-04-29T11:16:24.056038097", + "timestamp": "2026-07-30T19:02:54.875039583", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/seqsero2/tests/nextflow.config b/modules/seqsero2/tests/nextflow.config index 4db50f9d3..e81bf8a99 100644 --- a/modules/seqsero2/tests/nextflow.config +++ b/modules/seqsero2/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of SEQSERO2 nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/seroba/run/tests/main.nf.test.snap b/modules/seroba/run/tests/main.nf.test.snap index 90c0502ca..a08c3d084 100644 --- a/modules/seroba/run/tests/main.nf.test.snap +++ b/modules/seroba/run/tests/main.nf.test.snap @@ -14,7 +14,7 @@ "versions.yml:md5,e485bb335ccae3f5e5f24f35690633d3" ] ], - "timestamp": "2026-04-29T11:17:01.34899278", + "timestamp": "2026-07-30T19:03:26.894145021", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/seroba/run/tests/nextflow.config b/modules/seroba/run/tests/nextflow.config index 1388b8558..6b1c8fcd3 100644 --- a/modules/seroba/run/tests/nextflow.config +++ b/modules/seroba/run/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of SEROBA_RUN nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/shigapass/tests/main.nf.test.snap b/modules/shigapass/tests/main.nf.test.snap index 1308cac22..8b6fa536a 100644 --- a/modules/shigapass/tests/main.nf.test.snap +++ b/modules/shigapass/tests/main.nf.test.snap @@ -15,7 +15,7 @@ "versions.yml:md5,dc87229b4755a3bb75942178c557e81f" ] ], - "timestamp": "2026-04-29T11:16:40.848025485", + "timestamp": "2026-07-30T19:03:29.660208062", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -37,7 +37,7 @@ "versions.yml:md5,dc87229b4755a3bb75942178c557e81f" ] ], - "timestamp": "2026-04-29T11:17:08.640530652", + "timestamp": "2026-07-30T19:03:55.808071331", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/shigapass/tests/nextflow.config b/modules/shigapass/tests/nextflow.config index e1b288aa1..d1730ad32 100644 --- a/modules/shigapass/tests/nextflow.config +++ b/modules/shigapass/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of SHIGAPASS nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/shigatyper/tests/main.nf.test.snap b/modules/shigatyper/tests/main.nf.test.snap index 7fed17c83..d3ef0ee79 100644 --- a/modules/shigatyper/tests/main.nf.test.snap +++ b/modules/shigatyper/tests/main.nf.test.snap @@ -15,7 +15,7 @@ "versions.yml:md5,5546505c7719718340a0cd98ece587d8" ] ], - "timestamp": "2026-04-29T11:16:34.193573039", + "timestamp": "2026-07-30T19:03:21.41731488", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/shigatyper/tests/nextflow.config b/modules/shigatyper/tests/nextflow.config index 6503f2cf6..a5f6991f7 100644 --- a/modules/shigatyper/tests/nextflow.config +++ b/modules/shigatyper/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of SHIGATYPER nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/shigeifinder/module.config b/modules/shigeifinder/module.config index 8018dc92f..4eedb72c0 100644 --- a/modules/shigeifinder/module.config +++ b/modules/shigeifinder/module.config @@ -14,7 +14,7 @@ process { ext.args = "" // Environment information - ext.toolName = "bioconda::shigeifinder=1.3.5".replace("=", "-").replace(":", "-").replace(" ", "-") + ext.toolName = "bioconda::shigeifinder=1.3.5 conda-forge::setuptools=80".replace("=", "-").replace(":", "-").replace(" ", "-") ext.docker = "biocontainers/shigeifinder:1.3.5--pyhdfd78af_0" ext.image = "https://depot.galaxyproject.org/singularity/shigeifinder:1.3.5--pyhdfd78af_0" ext.condaDir = "${params.condadir}" diff --git a/modules/shigeifinder/tests/main.nf.test.snap b/modules/shigeifinder/tests/main.nf.test.snap index 79781bf30..9c27733ed 100644 --- a/modules/shigeifinder/tests/main.nf.test.snap +++ b/modules/shigeifinder/tests/main.nf.test.snap @@ -14,7 +14,7 @@ "versions.yml:md5,3aa6f0d34a8c44bd11c7d989667bd6f1" ] ], - "timestamp": "2026-04-29T11:16:45.805440428", + "timestamp": "2026-07-30T19:03:30.769067653", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -35,7 +35,7 @@ "versions.yml:md5,3aa6f0d34a8c44bd11c7d989667bd6f1" ] ], - "timestamp": "2026-04-29T11:16:31.145144861", + "timestamp": "2026-07-30T19:03:17.614857836", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/shigeifinder/tests/nextflow.config b/modules/shigeifinder/tests/nextflow.config index afe392eee..b43094903 100644 --- a/modules/shigeifinder/tests/nextflow.config +++ b/modules/shigeifinder/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of SHIGEIFINDER nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/sistr/module.config b/modules/sistr/module.config index f33e3c34f..f03c1d101 100644 --- a/modules/sistr/module.config +++ b/modules/sistr/module.config @@ -17,7 +17,7 @@ process { ].join(' ').replaceAll("\\s{2,}", " ").trim() // Environment information - ext.toolName = "bioconda::sistr_cmd=1.1.3".replace("=", "-").replace(":", "-").replace(" ", "-") + ext.toolName = "bioconda::sistr_cmd=1.1.3 conda-forge::setuptools=80".replace("=", "-").replace(":", "-").replace(" ", "-") ext.docker = "biocontainers/sistr_cmd:1.1.3--pyhdc42f0e_2" ext.image = "https://depot.galaxyproject.org/singularity/sistr_cmd:1.1.3--pyhdc42f0e_2" ext.condaDir = "${params.condadir}" diff --git a/modules/sistr/tests/main.nf.test.snap b/modules/sistr/tests/main.nf.test.snap index 4ea1e6c7f..270afd6dc 100644 --- a/modules/sistr/tests/main.nf.test.snap +++ b/modules/sistr/tests/main.nf.test.snap @@ -13,7 +13,7 @@ "versions.yml:md5,9cd2b041e26756435a56098355b5a2ca" ] ], - "timestamp": "2026-04-29T11:17:03.830490041", + "timestamp": "2026-07-30T19:04:06.595709409", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -33,7 +33,7 @@ "versions.yml:md5,9cd2b041e26756435a56098355b5a2ca" ] ], - "timestamp": "2026-04-29T11:17:46.465617002", + "timestamp": "2026-07-30T19:04:43.68397046", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/sistr/tests/nextflow.config b/modules/sistr/tests/nextflow.config index 6ccd4ab70..3ae4c9503 100644 --- a/modules/sistr/tests/nextflow.config +++ b/modules/sistr/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of SISTR nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/snippy/core/tests/main.nf.test.snap b/modules/snippy/core/tests/main.nf.test.snap index 39efb184a..9f93b5ee9 100644 --- a/modules/snippy/core/tests/main.nf.test.snap +++ b/modules/snippy/core/tests/main.nf.test.snap @@ -13,7 +13,7 @@ "versions.yml:md5,af05caa4daa181fbe9d7bf82d3383d93" ] ], - "timestamp": "2026-04-29T11:16:41.365495425", + "timestamp": "2026-07-30T19:03:50.222610599", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/snippy/core/tests/nextflow.config b/modules/snippy/core/tests/nextflow.config index 3dc05b65b..26bc1b8b0 100644 --- a/modules/snippy/core/tests/nextflow.config +++ b/modules/snippy/core/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of SNIPPY_CORE nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -10,27 +11,9 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true run_name = "snippy" - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" - // Module-specific defaults skip_compression = false } diff --git a/modules/snippy/run/module.config b/modules/snippy/run/module.config index 018caec7e..a48ee2869 100644 --- a/modules/snippy/run/module.config +++ b/modules/snippy/run/module.config @@ -38,7 +38,7 @@ process { ].join(' ').replaceAll("\\s{2,}", " ").trim() // Environment information - ext.toolName = "bioconda::bactopia-variants=1.0.4".replace("=", "-").replace(":", "-").replace(" ", "-") + ext.toolName = "bioconda::bactopia-variants=1.0.4 bioconda::htslib=1.14".replace("=", "-").replace(":", "-").replace(" ", "-") ext.docker = "biocontainers/bactopia-variants:1.0.4--hdfd78af_0" ext.image = "https://depot.galaxyproject.org/singularity/bactopia-variants:1.0.4--hdfd78af_0" ext.condaDir = "${params.condadir}" diff --git a/modules/snippy/run/tests/main.nf.test.snap b/modules/snippy/run/tests/main.nf.test.snap index bdfcd9fe6..e06490996 100644 --- a/modules/snippy/run/tests/main.nf.test.snap +++ b/modules/snippy/run/tests/main.nf.test.snap @@ -14,7 +14,7 @@ "versions.yml:md5,f9e5c81ae82caf719b7ce57287dad4f4" ] ], - "timestamp": "2026-04-29T11:17:53.084972353", + "timestamp": "2026-07-30T19:04:49.535080607", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -35,7 +35,7 @@ "versions.yml:md5,f9e5c81ae82caf719b7ce57287dad4f4" ] ], - "timestamp": "2026-04-29T11:17:11.210462885", + "timestamp": "2026-07-30T19:04:16.394330099", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/snippy/run/tests/nextflow.config b/modules/snippy/run/tests/nextflow.config index 9090849dd..1fba30717 100644 --- a/modules/snippy/run/tests/nextflow.config +++ b/modules/snippy/run/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of SNIPPY_RUN nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -10,27 +11,9 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true run_name = "snippy" - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" - // Module-specific defaults skip_compression = false } diff --git a/modules/snpdists/tests/main.nf.test.snap b/modules/snpdists/tests/main.nf.test.snap index a90886d43..d377a9876 100644 --- a/modules/snpdists/tests/main.nf.test.snap +++ b/modules/snpdists/tests/main.nf.test.snap @@ -14,7 +14,7 @@ "versions.yml:md5,944b6ecf9bf11c38b608ae08b36d5e2d" ] ], - "timestamp": "2026-04-29T11:16:44.89235401", + "timestamp": "2026-07-30T19:03:50.180977938", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/snpdists/tests/nextflow.config b/modules/snpdists/tests/nextflow.config index 0d9d0caca..b5ee788a7 100644 --- a/modules/snpdists/tests/nextflow.config +++ b/modules/snpdists/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of SNPDISTS nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/spatyper/tests/main.nf.test.snap b/modules/spatyper/tests/main.nf.test.snap index 7e1fc41c0..94093fe3f 100644 --- a/modules/spatyper/tests/main.nf.test.snap +++ b/modules/spatyper/tests/main.nf.test.snap @@ -14,7 +14,7 @@ "versions.yml:md5,07c621229eb9346a10efc0afe9d15e42" ] ], - "timestamp": "2026-04-29T11:17:14.808148328", + "timestamp": "2026-07-30T19:04:15.484233021", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -35,7 +35,7 @@ "versions.yml:md5,07c621229eb9346a10efc0afe9d15e42" ] ], - "timestamp": "2026-04-29T11:16:54.28753732", + "timestamp": "2026-07-30T19:03:56.714025736", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/spatyper/tests/nextflow.config b/modules/spatyper/tests/nextflow.config index 5474aeeec..ea51695d7 100644 --- a/modules/spatyper/tests/nextflow.config +++ b/modules/spatyper/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of SPATYPER nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/srahumanscrubber/initdb/main.nf b/modules/srahumanscrubber/initdb/main.nf index 782a989c6..0655d55d3 100644 --- a/modules/srahumanscrubber/initdb/main.nf +++ b/modules/srahumanscrubber/initdb/main.nf @@ -27,7 +27,7 @@ process SRAHUMANSCRUBBER_INITDB { output: record( - db: files("${prefix}/*human_filter.db*"), + db: file("${prefix}/sra-human-filter.db"), logs: files("${prefix}/logs/*", optional: true) ) @@ -36,7 +36,7 @@ process SRAHUMANSCRUBBER_INITDB { """ mkdir -p ${prefix}/logs DBVERSION=\$(curl "https://ftp.ncbi.nlm.nih.gov/sra/dbs/human_filter/current/version.txt") - curl -f "https://ftp.ncbi.nlm.nih.gov/sra/dbs/human_filter/human_filter.db.\${DBVERSION}" -o "${prefix}/\${DBVERSION}.human_filter.db" + curl -f "https://ftp.ncbi.nlm.nih.gov/sra/dbs/human_filter/human_filter.db.\${DBVERSION}" -o "${prefix}/sra-human-filter.db" # Move outputs to tool specific folder cp .command.begin ${prefix}/logs/nf.command.begin diff --git a/modules/srahumanscrubber/scrub/module.config b/modules/srahumanscrubber/scrub/module.config index e186baed7..0ecf49139 100644 --- a/modules/srahumanscrubber/scrub/module.config +++ b/modules/srahumanscrubber/scrub/module.config @@ -15,9 +15,9 @@ process { ext.args = "" // Environment information - ext.toolName = "bioconda::bactopia-teton=1.1.3".replace("=", "-").replace(":", "-").replace(" ", "-") - ext.docker = "biocontainers/bactopia-teton:1.1.3--hdfd78af_0" - ext.image = "https://depot.galaxyproject.org/singularity/bactopia-teton:1.1.3--hdfd78af_0" + ext.toolName = "bioconda::bactopia-teton=1.1.4".replace("=", "-").replace(":", "-").replace(" ", "-") + ext.docker = "biocontainers/bactopia-teton:1.1.4--hdfd78af_0" + ext.image = "https://depot.galaxyproject.org/singularity/bactopia-teton:1.1.4--hdfd78af_0" ext.condaDir = "${params.condadir}" } } diff --git a/modules/srahumanscrubber/scrub/tests/main.nf.test.snap b/modules/srahumanscrubber/scrub/tests/main.nf.test.snap index 2322ac9d0..98b168f89 100644 --- a/modules/srahumanscrubber/scrub/tests/main.nf.test.snap +++ b/modules/srahumanscrubber/scrub/tests/main.nf.test.snap @@ -16,7 +16,7 @@ "versions.yml:md5,78ab09ff9e54f2fbad4aa04b12b33c6d" ] ], - "timestamp": "2026-04-29T11:18:53.83883245", + "timestamp": "2026-07-30T19:05:52.828604552", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -39,7 +39,7 @@ "versions.yml:md5,78ab09ff9e54f2fbad4aa04b12b33c6d" ] ], - "timestamp": "2026-04-29T11:18:00.849936857", + "timestamp": "2026-07-30T19:05:01.738781786", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/srahumanscrubber/scrub/tests/nextflow.config b/modules/srahumanscrubber/scrub/tests/nextflow.config index cb859d08a..45c27ca5d 100644 --- a/modules/srahumanscrubber/scrub/tests/nextflow.config +++ b/modules/srahumanscrubber/scrub/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of SRAHUMANSCRUBBER_SCRUB nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/ssuissero/tests/main.nf.test.snap b/modules/ssuissero/tests/main.nf.test.snap index 12d3d22ce..93ae02492 100644 --- a/modules/ssuissero/tests/main.nf.test.snap +++ b/modules/ssuissero/tests/main.nf.test.snap @@ -14,7 +14,7 @@ "versions.yml:md5,1343a6174c619ccf3c2469b19ab0a757" ] ], - "timestamp": "2026-04-29T11:16:48.923659704", + "timestamp": "2026-07-30T19:03:54.329996588", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -35,7 +35,7 @@ "versions.yml:md5,1343a6174c619ccf3c2469b19ab0a757" ] ], - "timestamp": "2026-04-29T11:17:04.393761797", + "timestamp": "2026-07-30T19:04:06.814354767", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/ssuissero/tests/nextflow.config b/modules/ssuissero/tests/nextflow.config index b31f6d479..2309866e1 100644 --- a/modules/ssuissero/tests/nextflow.config +++ b/modules/ssuissero/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of SSUISSERO nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/staphopiasccmec/tests/main.nf.test.snap b/modules/staphopiasccmec/tests/main.nf.test.snap index 338d96c60..23b024fa0 100644 --- a/modules/staphopiasccmec/tests/main.nf.test.snap +++ b/modules/staphopiasccmec/tests/main.nf.test.snap @@ -14,7 +14,7 @@ "versions.yml:md5,efa986cf837fac5b6e3bdd3dab8b424c" ] ], - "timestamp": "2026-04-29T11:16:51.320618453", + "timestamp": "2026-07-30T19:03:57.11173782", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -35,7 +35,7 @@ "versions.yml:md5,efa986cf837fac5b6e3bdd3dab8b424c" ] ], - "timestamp": "2026-04-29T11:17:06.354030176", + "timestamp": "2026-07-30T19:04:10.609380077", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/staphopiasccmec/tests/nextflow.config b/modules/staphopiasccmec/tests/nextflow.config index c56f134cd..3cfb5710b 100644 --- a/modules/staphopiasccmec/tests/nextflow.config +++ b/modules/staphopiasccmec/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of STAPHOPIASCCMEC nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/staphscan/main.nf b/modules/staphscan/main.nf new file mode 100644 index 000000000..3fefb284f --- /dev/null +++ b/modules/staphscan/main.nf @@ -0,0 +1,92 @@ +/** + * Genome-based surveillance analysis of Staphylococcus aureus. + * + * Uses [StaphSCAN](https://github.com/riccabolla/StaphSCAN) to perform genome-based + * surveillance of *Staphylococcus aureus*, integrating species identification, MLST, + * *spa* typing, SCCmec typing, capsular typing, and detection of virulence, biofilm, + * and antimicrobial resistance genes. + * + * @status stable + * @keywords staphylococcus aureus, surveillance, mlst, spa typing, sccmec, amr, virulence + * @tags complexity:simple input-type:single output-type:single features:compression,conditional-logic + * @citation staphscan + * + * @input record(meta, fna) + * - `meta`: Groovy Record containing sample information + * - `fna`: Assembled contigs in FASTA format + * + * @input db? + * Custom MLST database directory + * + * @output record(meta, tsv, results, logs, nf_logs, versions) + * - `tsv`: Per-sample surveillance summary with MLST, spa type, SCCmec, capsule, AGR, resistance, biofilm, and virulence results + */ +nextflow.enable.types = true + +process STAPHSCAN { + tag "${prefix}" + label 'process_low' + + conda "${task.ext.condaDir}/${task.ext.toolName}" + container "${task.ext.container}" + + input: + record ( + meta: Record, + fna: Path + ) + db: Path? + + output: + record( + // Named fields (used downstream) + meta: meta, + tsv: file("${prefix}.tsv"), + // Generic fields (used for publishing) + results: [ + files("${prefix}.tsv") + ], + logs: files("*.{log,err}", optional: true), + nf_logs: files(".command.*"), + versions: files("versions.yml") + ) + + script: + def _meta = meta + prefix = task.ext.prefix ?: "${_meta.name}" + + // Create a new meta record + meta = record( + id: "${prefix}-${task.process}", + name: prefix, + scope: task.ext.scope, + output_dir: "${prefix}/tools/${task.ext.process_name}/${task.ext.subdir}", + logs_dir: "${prefix}/tools/${task.ext.process_name}/${task.ext.subdir}/logs/${task.ext.logs_subdir}", + process_name: task.ext.process_name + ) + + def is_compressed = fna.getName().endsWith(".gz") ? true : false + def fna_name = fna.getName().replace(".gz", "") + def db_args = db ? "--db_mlst ${db}" : "" + """ + if [ "${is_compressed}" == "true" ]; then + gzip -c -d ${fna} > ${fna_name} + fi + + staphscan \\ + -i ${fna_name} \\ + -o . \\ + --report ${prefix} \\ + ${db_args} ${task.ext.args} + + # Cleanup + if [ "${is_compressed}" == "true" ]; then + rm -rf ${fna_name} + fi + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + staphscan: \$( staphscan --version 2>&1 | sed 's/^.*staphscan //' ) + END_VERSIONS + """ +} diff --git a/modules/staphscan/module.config b/modules/staphscan/module.config new file mode 100644 index 000000000..a15f3d49e --- /dev/null +++ b/modules/staphscan/module.config @@ -0,0 +1,25 @@ +params { + // staphscan + staphscan_modules = "" +} + +process { + withName: 'STAPHSCAN' { + ext.wf = params.wf + ext.scope = "sample" + ext.subdir = "" + ext.logs_subdir = "" + ext.process_name = "staphscan" + + // Tool arguments + ext.args = [ + params.staphscan_modules ? "--modules ${params.staphscan_modules}" : "", + ].join(' ').replaceAll("\\s{2,}", " ").trim() + + // Environment information + ext.toolName = "bioconda::staphscan=0.4.1".replace("=", "-").replace(":", "-").replace(" ", "-") + ext.docker = "biocontainers/staphscan:0.4.1--pyhdfd78af_0" + ext.image = "https://depot.galaxyproject.org/singularity/staphscan:0.4.1--pyhdfd78af_0" + ext.condaDir = "${params.condadir}" + } +} diff --git a/modules/staphscan/schema.json b/modules/staphscan/schema.json new file mode 100644 index 000000000..16642091e --- /dev/null +++ b/modules/staphscan/schema.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/bactopia/bactopia/master/modules/staphscan/schema.json", + "title": "StaphSCAN Module", + "description": "A module for genome-based surveillance analysis of staphylococcus aureus", + "type": "object", + "$defs": { + "staphscan_parameters": { + "title": "StaphSCAN Parameters", + "type": "object", + "description": "", + "default": "", + "fa_icon": "fas fa-exclamation-circle", + "properties": { + "staphscan_modules": { + "type": "string", + "default": "", + "description": "Comma-separated list of modules to run", + "fa_icon": "fas fa-font" + }, + "staphscan_db_mlst": { + "type": "string", + "description": "Path or tarball to custom MLST database", + "fa_icon": "fas fa-font", + "hidden": true + } + } + } + }, + "allOf": [ + { + "$ref": "#/$defs/staphscan_parameters" + } + ] +} diff --git a/modules/staphscan/tests/main.nf.test b/modules/staphscan/tests/main.nf.test new file mode 100644 index 000000000..50f6927b3 --- /dev/null +++ b/modules/staphscan/tests/main.nf.test @@ -0,0 +1,38 @@ +nextflow_process { + name "Test STAPHSCAN" + script "../main.nf" + process "STAPHSCAN" + tag "modules" + tag "staphscan" + + test("staphscan - module - GCF_000017085") { + when { + params { + test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" + } + process { + """ + input[0] = Channel.of( + record( + meta: [name: "GCF_000017085"], + fna: file("${params.test_data_dir}/species/staphylococcus_aureus/uncompressed/GCF_000017085/main/assembler/GCF_000017085.fna") + ) + ) + input[1] = null + """ + } + } + + then { + def record = process.out[0][0] + assertAll( + { assert process.success }, + { assert snapshot( + record.meta, + record.tsv, + record.versions + ).match() } + ) + } + } +} diff --git a/modules/staphscan/tests/main.nf.test.snap b/modules/staphscan/tests/main.nf.test.snap new file mode 100644 index 000000000..ad1ad6072 --- /dev/null +++ b/modules/staphscan/tests/main.nf.test.snap @@ -0,0 +1,23 @@ +{ + "staphscan - module - GCF_000017085": { + "content": [ + { + "id": "GCF_000017085-STAPHSCAN", + "logs_dir": "GCF_000017085/tools/staphscan//logs/", + "name": "GCF_000017085", + "output_dir": "GCF_000017085/tools/staphscan/", + "process_name": "staphscan", + "scope": "sample" + }, + "GCF_000017085.tsv:md5,f13bc8d8aba4cf0f801e04a8d6148e1e", + [ + "versions.yml:md5,251f3e6b35be5f660d5fc8bc8456bde6" + ] + ], + "timestamp": "2026-07-30T19:04:11.404109887", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + } +} \ No newline at end of file diff --git a/modules/staphscan/tests/nextflow.config b/modules/staphscan/tests/nextflow.config new file mode 100644 index 000000000..df04b2b63 --- /dev/null +++ b/modules/staphscan/tests/nextflow.config @@ -0,0 +1,19 @@ +// Minimal config for module-level testing of STAPHSCAN +nextflow.enable.types = true +nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" + +params { + workflow { + name = "staphscan" + logo_name = "bactopia-tools" + description = "Genome-based surveillance analysis of Staphylococcus aureus" + ext = "fna" + } + + wf = params.workflow.name +} + +includeConfig "../module.config" +includeConfig "../../../conf/base.config" +includeConfig "../../../conf/profiles.config" diff --git a/modules/staphscan/tests/nf-test.config b/modules/staphscan/tests/nf-test.config new file mode 100644 index 000000000..1f765f697 --- /dev/null +++ b/modules/staphscan/tests/nf-test.config @@ -0,0 +1,11 @@ +config { + testsDir "." + workDir System.getenv("NFT_WORKDIR") ?: ".nf-test" + configFile "nextflow.config" + profile "docker" + options "--is_ci --max_memory 8.GB" + + plugins { + load "nft-utils@0.0.5" + } +} diff --git a/modules/stecfinder/tests/main.nf.test.snap b/modules/stecfinder/tests/main.nf.test.snap index a09453759..618b7eb2e 100644 --- a/modules/stecfinder/tests/main.nf.test.snap +++ b/modules/stecfinder/tests/main.nf.test.snap @@ -14,7 +14,7 @@ "versions.yml:md5,2c48214785500e9b7a54d6ce8949a1c1" ] ], - "timestamp": "2026-04-29T11:17:24.705508456", + "timestamp": "2026-07-31T13:21:56.221033981", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -35,7 +35,7 @@ "versions.yml:md5,2c48214785500e9b7a54d6ce8949a1c1" ] ], - "timestamp": "2026-04-29T11:17:09.146129519", + "timestamp": "2026-07-31T13:21:49.985962768", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -56,7 +56,7 @@ "versions.yml:md5,2c48214785500e9b7a54d6ce8949a1c1" ] ], - "timestamp": "2026-04-29T11:16:54.388692462", + "timestamp": "2026-07-31T13:21:42.832614002", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/stecfinder/tests/nextflow.config b/modules/stecfinder/tests/nextflow.config index ad70d6b3f..d63587108 100644 --- a/modules/stecfinder/tests/nextflow.config +++ b/modules/stecfinder/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of STECFINDER nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/stxtyper/main.nf b/modules/stxtyper/main.nf new file mode 100644 index 000000000..30025e2d0 --- /dev/null +++ b/modules/stxtyper/main.nf @@ -0,0 +1,84 @@ +/** + * Identify and type Stx operons from assembled genomic sequences + * + * Uses [StxTyper](https://github.com/ncbi/stxtyper) to identify and type stx operons from assembled genomic sequences. + * + * @status stable + * @keywords stx, shiga toxin, typing, stec, virulence + * @tags complexity:simple input-type:single output-type:single features:conditional-logic + * @citation stxtyper + * + * @input record(meta, fna) + * - `meta`: Groovy Record containing sample information + * - `fna`: Assembled contigs in FASTA format + * + * @output record(meta, tsv, results, logs, nf_logs, versions) + * - `tsv`: Tab-delimited Stx operon typing results + */ +nextflow.enable.types = true + +process STXTYPER { + tag "${prefix}" + label 'process_low' + + conda "${task.ext.condaDir}/${task.ext.toolName}" + container "${task.ext.container}" + + input: + record ( + meta: Record, + fna: Path + ) + + output: + record( + // Named fields (used downstream) + meta: meta, + tsv: file("${prefix}.tsv"), + // Generic fields (used for publishing) + results: [ + files("${prefix}.tsv") + ], + logs: files("*.{log,err}", optional: true), + nf_logs: files(".command.*"), + versions: files("versions.yml") + ) + + script: + def _meta = meta + prefix = task.ext.prefix ?: "${_meta.name}" + + // Create a new meta record + meta = record( + id: "${prefix}-${task.process}", + name: prefix, + scope: task.ext.scope, + output_dir: "${prefix}/tools/${task.ext.process_name}/${task.ext.subdir}", + logs_dir: "${prefix}/tools/${task.ext.process_name}/${task.ext.subdir}/logs/${task.ext.logs_subdir}", + process_name: task.ext.process_name + ) + + def is_compressed = fna.getName().endsWith(".gz") ? true : false + def fna_name = fna.getName().replace(".gz", "") + """ + if [ "${is_compressed}" == "true" ]; then + gzip -c -d ${fna} > ${fna_name} + fi + + stxtyper \\ + -n ${fna_name} \\ + --name ${prefix} \\ + ${task.ext.args} \\ + -o ${prefix}.tsv + + # Cleanup + if [ "${is_compressed}" == "true" ]; then + rm -rf ${fna_name} + fi + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + stxtyper: \$( stxtyper --version 2>&1 ) + END_VERSIONS + """ +} diff --git a/modules/stxtyper/module.config b/modules/stxtyper/module.config new file mode 100644 index 000000000..84ab82fdd --- /dev/null +++ b/modules/stxtyper/module.config @@ -0,0 +1,23 @@ +params { + // stxtyper +} + +process { + withName: 'STXTYPER' { + ext.wf = params.wf + ext.scope = "sample" + ext.subdir = "" + ext.logs_subdir = "" + ext.process_name = "stxtyper" + + // Tool arguments + ext.args = [ + ].join(' ').replaceAll("\\s{2,}", " ").trim() + + // Environment information + ext.toolName = "bioconda::ncbi-stxtyper=1.0.45".replace("=", "-").replace(":", "-").replace(" ", "-") + ext.docker = "biocontainers/ncbi-stxtyper:1.0.45--h9948957_0" + ext.image = "https://depot.galaxyproject.org/singularity/ncbi-stxtyper:1.0.45--h9948957_0" + ext.condaDir = "${params.condadir}" + } +} diff --git a/modules/stxtyper/schema.json b/modules/stxtyper/schema.json new file mode 100644 index 000000000..e9337f0a1 --- /dev/null +++ b/modules/stxtyper/schema.json @@ -0,0 +1,23 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/bactopia/bactopia/master/modules/stxtyper/schema.json", + "title": "StxTyper Module", + "description": "A module for identify and type stx operons from assembled genomic sequences", + "type": "object", + "$defs": { + "stxtyper_parameters": { + "title": "StxTyper Parameters", + "type": "object", + "description": "", + "default": "", + "fa_icon": "fas fa-exclamation-circle", + "properties": { + } + } + }, + "allOf": [ + { + "$ref": "#/$defs/stxtyper_parameters" + } + ] +} diff --git a/modules/ncbigenomedownload/tests/main.nf.test b/modules/stxtyper/tests/main.nf.test similarity index 55% rename from modules/ncbigenomedownload/tests/main.nf.test rename to modules/stxtyper/tests/main.nf.test index 06aba434c..dd3e95f8d 100644 --- a/modules/ncbigenomedownload/tests/main.nf.test +++ b/modules/stxtyper/tests/main.nf.test @@ -1,23 +1,23 @@ nextflow_process { - name "Test NCBIGENOMEDOWNLOAD" + name "Test STXTYPER" script "../main.nf" - process "NCBIGENOMEDOWNLOAD" + process "STXTYPER" tag "modules" - tag "ncbigenomedownload" - - test("ncbigenomedownload - module - single accession") { + tag "stxtyper" + test("stxtyper - module - GCF_001695515") { when { params { test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - // Use a small genome for fast testing - accession = "GCF_000292685.1" - format = "fasta" - keep_downloads = true } process { """ - input[0] = null + input[0] = Channel.of( + record( + meta: [name: "GCF_001695515"], + fna: file("${params.test_data_dir}/species/escherichia_coli/uncompressed/GCF_001695515/main/assembler/GCF_001695515.fna") + ) + ) """ } } @@ -28,6 +28,7 @@ nextflow_process { { assert process.success }, { assert snapshot( record.meta, + record.tsv, record.versions ).match() } ) diff --git a/modules/stxtyper/tests/main.nf.test.snap b/modules/stxtyper/tests/main.nf.test.snap new file mode 100644 index 000000000..1c8e66b56 --- /dev/null +++ b/modules/stxtyper/tests/main.nf.test.snap @@ -0,0 +1,23 @@ +{ + "stxtyper - module - GCF_001695515": { + "content": [ + { + "id": "GCF_001695515-STXTYPER", + "logs_dir": "GCF_001695515/tools/stxtyper//logs/", + "name": "GCF_001695515", + "output_dir": "GCF_001695515/tools/stxtyper/", + "process_name": "stxtyper", + "scope": "sample" + }, + "GCF_001695515.tsv:md5,001feff7db6e3fad984fdc36327122cc", + [ + "versions.yml:md5,f9ebd9c1f28e4ce3da541f707abeaa52" + ] + ], + "timestamp": "2026-07-30T19:04:10.423071062", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + } +} \ No newline at end of file diff --git a/modules/stxtyper/tests/nextflow.config b/modules/stxtyper/tests/nextflow.config new file mode 100644 index 000000000..aff4b77b5 --- /dev/null +++ b/modules/stxtyper/tests/nextflow.config @@ -0,0 +1,19 @@ +// Minimal config for module-level testing of STXTYPER +nextflow.enable.types = true +nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" + +params { + workflow { + name = "stxtyper" + logo_name = "bactopia-tools" + description = "Identify and type Stx operons from assembled genomic sequences" + ext = "fna" + } + + wf = params.workflow.name +} + +includeConfig "../module.config" +includeConfig "../../../conf/base.config" +includeConfig "../../../conf/profiles.config" diff --git a/modules/stxtyper/tests/nf-test.config b/modules/stxtyper/tests/nf-test.config new file mode 100644 index 000000000..1f765f697 --- /dev/null +++ b/modules/stxtyper/tests/nf-test.config @@ -0,0 +1,11 @@ +config { + testsDir "." + workDir System.getenv("NFT_WORKDIR") ?: ".nf-test" + configFile "nextflow.config" + profile "docker" + options "--is_ci --max_memory 8.GB" + + plugins { + load "nft-utils@0.0.5" + } +} diff --git a/modules/sylph/profile/tests/main.nf.test.snap b/modules/sylph/profile/tests/main.nf.test.snap index cddad7329..af54fac7f 100644 --- a/modules/sylph/profile/tests/main.nf.test.snap +++ b/modules/sylph/profile/tests/main.nf.test.snap @@ -15,7 +15,7 @@ "versions.yml:md5,375b8094ea3bcac7fbc91f023399030c" ] ], - "timestamp": "2026-04-29T11:19:04.101178065", + "timestamp": "2026-07-30T19:06:21.556178856", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -37,7 +37,7 @@ "versions.yml:md5,375b8094ea3bcac7fbc91f023399030c" ] ], - "timestamp": "2026-04-29T11:17:52.980299022", + "timestamp": "2026-07-30T19:05:11.357725295", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/sylph/profile/tests/nextflow.config b/modules/sylph/profile/tests/nextflow.config index 2f52ae289..5fc47b72f 100644 --- a/modules/sylph/profile/tests/nextflow.config +++ b/modules/sylph/profile/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of SYLPH_PROFILE nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -10,25 +11,10 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB max_cpus = 12 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/tbprofiler/collate/tests/main.nf.test.snap b/modules/tbprofiler/collate/tests/main.nf.test.snap index b48ccf877..cd9504248 100644 --- a/modules/tbprofiler/collate/tests/main.nf.test.snap +++ b/modules/tbprofiler/collate/tests/main.nf.test.snap @@ -13,7 +13,7 @@ "versions.yml:md5,3c3d5fbb783c5cb96c154683bf56699a" ] ], - "timestamp": "2026-04-29T11:16:59.178764406", + "timestamp": "2026-07-30T19:04:29.486545933", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/tbprofiler/collate/tests/nextflow.config b/modules/tbprofiler/collate/tests/nextflow.config index 44b8d4888..9b4c1ed10 100644 --- a/modules/tbprofiler/collate/tests/nextflow.config +++ b/modules/tbprofiler/collate/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of TBPROFILER_COLLATE nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/tbprofiler/profile/tests/main.nf.test.snap b/modules/tbprofiler/profile/tests/main.nf.test.snap index fbaabbd27..c790b2cf3 100644 --- a/modules/tbprofiler/profile/tests/main.nf.test.snap +++ b/modules/tbprofiler/profile/tests/main.nf.test.snap @@ -14,7 +14,7 @@ "versions.yml:md5,f1c3cd99e94db777ec4d6163026785c3" ] ], - "timestamp": "2026-04-29T11:17:48.441284413", + "timestamp": "2026-07-30T19:05:14.950783052", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -35,7 +35,7 @@ "versions.yml:md5,f1c3cd99e94db777ec4d6163026785c3" ] ], - "timestamp": "2026-04-29T11:18:45.03550605", + "timestamp": "2026-07-30T19:06:09.887964917", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -56,7 +56,7 @@ "versions.yml:md5,f1c3cd99e94db777ec4d6163026785c3" ] ], - "timestamp": "2026-04-29T11:19:51.614736697", + "timestamp": "2026-07-30T19:07:17.00960342", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/tbprofiler/profile/tests/nextflow.config b/modules/tbprofiler/profile/tests/nextflow.config index 83b690a93..e19bb6e2b 100644 --- a/modules/tbprofiler/profile/tests/nextflow.config +++ b/modules/tbprofiler/profile/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for module-level testing of TBPROFILER_PROFILE nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } includeConfig "../module.config" diff --git a/modules/traitar/download/main.nf b/modules/traitar/download/main.nf new file mode 100644 index 000000000..304fd94eb --- /dev/null +++ b/modules/traitar/download/main.nf @@ -0,0 +1,58 @@ +/** + * Download the Pfam database required by Traitar. + * + * Fetches the pre-compiled Pfam database required by [Traitar](https://github.com/nick-youngblut/traitar3/) + * for microbial phenotype prediction. The database contains Pfam HMM models used for + * protein family annotation during trait prediction. + * + * @status stable + * @keywords phenotype, traits, pfam, database, download + * @tags complexity:simple input-type:none output-type:single features:internet-access,resource-download,no-test + * @citation traitar + * + * @note Internet & Storage Required + * This process requires an active internet connection and significant disk space + * to store the Pfam database files (~1.2GB). + * + * @output record(db, logs) + * - `db`: The Pfam-A HMM file for Traitar + */ +nextflow.enable.types = true + +// bactopia-lint: ignore M012,M017,M018,M023,M024,M025,M026,M028,M033 +process TRAITAR_DOWNLOAD { + label 'process_low' + label 'process_long' + + conda "${task.ext.condaDir}/${task.ext.toolName}" + container "${task.ext.container}" + + output: + record( + db: file("Pfam-A.hmm"), + logs: files("logs/*", optional: true) + ) + + script: + """ + traitar pfam pfam_data + mv pfam_data/Pfam-A.hmm Pfam-A.hmm + + # Move outputs to tool specific folder + mkdir -p logs + cp .command.begin logs/nf.command.begin + cp .command.err logs/nf.command.err + cp .command.log logs/nf.command.log + cp .command.out logs/nf.command.out + cp .command.run logs/nf.command.run + cp .command.sh logs/nf.command.sh + cp .command.trace logs/nf.command.trace + + # Cleanup + + cat <<-END_VERSIONS > logs/versions.yml + "${task.process}": + traitar: \$( traitar --version 2>&1 | tail -1 ) + END_VERSIONS + """ +} diff --git a/modules/traitar/download/module.config b/modules/traitar/download/module.config new file mode 100644 index 000000000..5d9a75b74 --- /dev/null +++ b/modules/traitar/download/module.config @@ -0,0 +1,28 @@ +params { + // traitar_download + download_traitar = false +} + +process { + withName: 'TRAITAR_DOWNLOAD' { + ext.wf = params.wf + ext.scope = "run" + ext.subdir = "" + ext.logs_subdir = "" + ext.process_name = "traitar_download" + publishDir = [[ + path: params.traitar_db, + mode: params.publish_dir_mode, + overwrite: true + ]] + + // Tool arguments + ext.args = "" + + // Environment information + ext.toolName = "bioconda::traitar=3.0.1".replace("=", "-").replace(":", "-").replace(" ", "-") + ext.docker = "biocontainers/traitar:3.0.1--pyhdfd78af_1" + ext.image = "https://depot.galaxyproject.org/singularity/traitar:3.0.1--pyhdfd78af_1" + ext.condaDir = "${params.condadir}" + } +} diff --git a/modules/traitar/download/schema.json b/modules/traitar/download/schema.json new file mode 100644 index 000000000..fdc687ddb --- /dev/null +++ b/modules/traitar/download/schema.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/bactopia/bactopia/master/modules/traitar/download/schema.json", + "title": "Traitar Download Module", + "description": "A module for downloading the Pfam database required by Traitar", + "type": "object", + "$defs": { + "traitar_download_parameters": { + "title": "Traitar Download Parameters", + "type": "object", + "description": "", + "default": "", + "fa_icon": "fas fa-exclamation-circle", + "properties": { + "traitar_db": { + "type": "string", + "description": "Path a Traitar database (should contain the Pfam-A.hmm file)", + "fa_icon": "fas fa-font", + "is_required": true + }, + "download_traitar": { + "type": "boolean", + "description": "Download the Pfam database to the path given by --traitar_db", + "default": false, + "fa_icon": "fas fa-toggle-on" + } + } + } + }, + "allOf": [ + { + "$ref": "#/$defs/traitar_download_parameters" + } + ] +} diff --git a/modules/traitar/run/main.nf b/modules/traitar/run/main.nf new file mode 100644 index 000000000..d0611bdbd --- /dev/null +++ b/modules/traitar/run/main.nf @@ -0,0 +1,118 @@ +/** + * Predict phenotypic traits from microbial genomes. + * + * Uses [Traitar](https://github.com/nick-youngblut/traitar3/) to predict phenotypic + * traits from nucleotide sequences. Traitar annotates protein families using Pfam and + * applies machine learning models to predict 67 diverse microbial traits. + * + * @status stable + * @keywords phenotype, traits, pfam + * @tags complexity:simple input-type:single output-type:single features:database-dependent,conditional-logic + * @citation traitar + * + * @note Database Required + * Requires a Pfam database directory (downloaded via `traitar pfam` or the download module). + * + * @input record(meta, fna) + * - `meta`: Groovy Record containing sample information + * - `fna`: Assembled contigs in FASTA format + * + * @input db + * Pfam-A HMM file for Traitar + * + * @output record(meta, majority_tsv, single_tsv, results, logs, nf_logs, versions) + * - `majority_tsv`: Majority-vote combined phenotype trait predictions + * - `single_tsv`: Single-votes combined phenotype trait predictions + */ +nextflow.enable.types = true + +process TRAITAR_RUN { + tag "${prefix}" + label 'process_low' + + conda "${task.ext.condaDir}/${task.ext.toolName}" + container "${task.ext.container}" + + input: + record ( + meta: Record, + fna: Path + ) + db: Path + + stage: + stageAs db, 'staging/db/*' + + output: + record( + // Named fields (used downstream) + meta: meta, + majority_tsv: file("${prefix}.majority.tsv"), + single_tsv: file("${prefix}.single_votes.tsv"), + // Generic fields (used for publishing) + results: [ + files("${prefix}.majority.tsv"), + files("${prefix}.single_votes.tsv"), + files("supplemental/*") + ], + logs: files("*.{log,err}", optional: true), + nf_logs: files(".command.*"), + versions: files("versions.yml") + ) + + script: + def _meta = meta + prefix = task.ext.prefix ?: "${_meta.name}" + + // Create a new meta record + meta = record( + id: "${prefix}-${task.process}", + name: prefix, + scope: task.ext.scope, + output_dir: "${prefix}/tools/${task.ext.process_name}/${task.ext.subdir}", + logs_dir: "${prefix}/tools/${task.ext.process_name}/${task.ext.subdir}/logs/${task.ext.logs_subdir}", + process_name: task.ext.process_name + ) + + def is_compressed = fna.fileName.name.endsWith(".gz") ? true : false + def fna_name = fna.fileName.name.replace(".gz", "") + """ + # Materialize a real (non-symlink) copy of the input inside the traitar input directory + mkdir -p input_dir + if [ "${is_compressed}" == "true" ]; then + gzip -c -d ${fna} > input_dir/${fna_name} + else + cp -L ${fna} input_dir/${fna_name} + fi + + cat > samples.tsv <<-SAMPLE_EOF + sample_file_name\tsample_name + ${fna_name}\t${prefix} + SAMPLE_EOF + + # Run traitar phenotype prediction + traitar phenotype \\ + ${db} \\ + input_dir \\ + samples.tsv \\ + from_nucleotides \\ + ${prefix} \\ + -c ${task.cpus} \\ + --overwrite \\ + ${task.ext.args} + + # Rename primary output for consistency + mkdir supplemental + mv ${prefix}/* supplemental/ + mv supplemental/phenotype_prediction/predictions_majority-vote_combined.txt ${prefix}.majority.tsv + mv supplemental/phenotype_prediction/predictions_single-votes_combined.txt ${prefix}.single_votes.tsv + + # Cleanup + rm -rf input_dir/ samples.tsv ${prefix}/ + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + traitar: \$( traitar --version 2>&1 | tail -1 ) + END_VERSIONS + """ +} diff --git a/modules/traitar/run/module.config b/modules/traitar/run/module.config new file mode 100644 index 000000000..ffdf6e8b2 --- /dev/null +++ b/modules/traitar/run/module.config @@ -0,0 +1,22 @@ +params { + // traitar_run +} + +process { + withName: 'TRAITAR_RUN' { + ext.wf = params.wf + ext.scope = "sample" + ext.subdir = "" + ext.logs_subdir = "" + ext.process_name = "traitar" + + // Tool arguments + ext.args = "" + + // Environment information + ext.toolName = "bioconda::traitar=3.0.1".replace("=", "-").replace(":", "-").replace(" ", "-") + ext.docker = "biocontainers/traitar:3.0.1--pyhdfd78af_1" + ext.image = "https://depot.galaxyproject.org/singularity/traitar:3.0.1--pyhdfd78af_1" + ext.condaDir = "${params.condadir}" + } +} diff --git a/modules/amrfinderplus/update/schema.json b/modules/traitar/run/schema.json similarity index 55% rename from modules/amrfinderplus/update/schema.json rename to modules/traitar/run/schema.json index 47572fbbb..c059cfb6d 100644 --- a/modules/amrfinderplus/update/schema.json +++ b/modules/traitar/run/schema.json @@ -1,12 +1,12 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://raw.githubusercontent.com/bactopia/bactopia/master/modules/amrfinderplus/update/schema.json", - "title": "AMRFinderPlus Update Module", - "description": "Download the latest AMRFinderPlus database", + "$id": "https://raw.githubusercontent.com/bactopia/bactopia/master/modules/traitar/run/schema.json", + "title": "Traitar Module", + "description": "A module for predicting phenotypic traits from microbial genomes", "type": "object", "$defs": { - "amrfinderplus_update_parameters": { - "title": "AMRFinderPlus Update Parameters", + "traitar_parameters": { + "title": "Traitar Parameters", "type": "object", "description": "", "default": "", @@ -16,7 +16,7 @@ }, "allOf": [ { - "$ref": "#/$defs/amrfinderplus_update_parameters" + "$ref": "#/$defs/traitar_parameters" } ] } diff --git a/modules/traitar/run/tests/main.nf.test b/modules/traitar/run/tests/main.nf.test new file mode 100644 index 000000000..21172d8eb --- /dev/null +++ b/modules/traitar/run/tests/main.nf.test @@ -0,0 +1,74 @@ +nextflow_process { + name "Test TRAITAR_RUN" + script "../main.nf" + process "TRAITAR_RUN" + tag "modules" + tag "traitar" + tag "traitar_run" + + test("traitar - module - GCF_000017085") { + when { + params { + test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" + } + process { + """ + input[0] = Channel.of( + record( + meta: [name: "GCF_000017085"], + fna: file("${params.test_data_dir}/species/staphylococcus_aureus/uncompressed/GCF_000017085/main/assembler/GCF_000017085.fna") + ) + ) + input[1] = file("${params.test_data_dir}/datasets/traitar") + """ + } + } + + then { + def record = process.out[0][0] + assertAll( + { assert process.success }, + { assert snapshot( + record.meta, + record.versions + ).match() }, + { assert record.majority_tsv != null }, + { assert record.single_tsv != null }, + { assert record.results != null } + ) + } + } + + test("traitar - module - GCF_000017085 - gz") { + when { + params { + test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" + } + process { + """ + input[0] = Channel.of( + record( + meta: [name: "GCF_000017085"], + fna: file("${params.test_data_dir}/species/staphylococcus_aureus/compressed/GCF_000017085/main/assembler/GCF_000017085.fna.gz") + ) + ) + input[1] = file("${params.test_data_dir}/datasets/traitar") + """ + } + } + + then { + def record = process.out[0][0] + assertAll( + { assert process.success }, + { assert snapshot( + record.meta, + record.versions + ).match() }, + { assert record.majority_tsv != null }, + { assert record.single_tsv != null }, + { assert record.results != null } + ) + } + } +} diff --git a/modules/traitar/run/tests/main.nf.test.snap b/modules/traitar/run/tests/main.nf.test.snap new file mode 100644 index 000000000..14fdb2857 --- /dev/null +++ b/modules/traitar/run/tests/main.nf.test.snap @@ -0,0 +1,42 @@ +{ + "traitar - module - GCF_000017085": { + "content": [ + { + "id": "GCF_000017085-TRAITAR_RUN", + "logs_dir": "GCF_000017085/tools/traitar//logs/", + "name": "GCF_000017085", + "output_dir": "GCF_000017085/tools/traitar/", + "process_name": "traitar", + "scope": "sample" + }, + [ + "versions.yml:md5,54ab86ba7bfee8eefdc6e365ae52fa34" + ] + ], + "timestamp": "2026-07-30T19:10:34.745900564", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + }, + "traitar - module - GCF_000017085 - gz": { + "content": [ + { + "id": "GCF_000017085-TRAITAR_RUN", + "logs_dir": "GCF_000017085/tools/traitar//logs/", + "name": "GCF_000017085", + "output_dir": "GCF_000017085/tools/traitar/", + "process_name": "traitar", + "scope": "sample" + }, + [ + "versions.yml:md5,54ab86ba7bfee8eefdc6e365ae52fa34" + ] + ], + "timestamp": "2026-07-30T19:16:14.650770468", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + } +} \ No newline at end of file diff --git a/modules/traitar/run/tests/nextflow.config b/modules/traitar/run/tests/nextflow.config new file mode 100644 index 000000000..1c3597475 --- /dev/null +++ b/modules/traitar/run/tests/nextflow.config @@ -0,0 +1,19 @@ +// Minimal config for module-level testing of TRAITAR_RUN +nextflow.enable.types = true +nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" + +params { + workflow { + name = "traitar" + logo_name = "bactopia-tools" + description = "Predict phenotypic traits from microbial genomes" + ext = "fna" + } + + wf = params.workflow.name +} + +includeConfig "../module.config" +includeConfig "../../../../conf/base.config" +includeConfig "../../../../conf/profiles.config" diff --git a/modules/traitar/run/tests/nf-test.config b/modules/traitar/run/tests/nf-test.config new file mode 100644 index 000000000..1f765f697 --- /dev/null +++ b/modules/traitar/run/tests/nf-test.config @@ -0,0 +1,11 @@ +config { + testsDir "." + workDir System.getenv("NFT_WORKDIR") ?: ".nf-test" + configFile "nextflow.config" + profile "docker" + options "--is_ci --max_memory 8.GB" + + plugins { + load "nft-utils@0.0.5" + } +} diff --git a/nextflow.config b/nextflow.config index fbb55d5b4..0bb910de5 100644 --- a/nextflow.config +++ b/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -18,11 +18,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}" includeConfig "./conf/params.config" includeConfig "./conf/params/bactopia.config" @@ -62,6 +65,7 @@ includeConfig "./modules/ssuissero/module.config" includeConfig "./modules/agrvate/module.config" includeConfig "./modules/spatyper/module.config" includeConfig "./modules/sccmec/module.config" +includeConfig "./modules/staphscan/module.config" includeConfig "./modules/stecfinder/module.config" includeConfig "./modules/tbprofiler/profile/module.config" includeConfig "./modules/tbprofiler/collate/module.config" @@ -118,7 +122,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/nextflow_schema.json b/nextflow_schema.json index 84fb0c788..96336430d 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -188,7 +188,6 @@ }, "amrfinderplus_db": { "type": "string", - "default": "", "description": "A custom AMRFinder+ database to use, either a tarball or a folder", "fa_icon": "fas fa-font", "hidden": true @@ -245,6 +244,7 @@ }, "use_unicycler": { "type": "boolean", + "default": false, "description": "Use unicycler for paired end assembly", "fa_icon": "fas fa-toggle-on", "hidden": true @@ -365,18 +365,21 @@ }, "no_polish": { "type": "boolean", + "default": false, "description": "Skip the assembly polishing step", "fa_icon": "fas fa-toggle-on", "hidden": true }, "no_miniasm": { "type": "boolean", + "default": false, "description": "Skip miniasm+Racon bridging", "fa_icon": "fas fa-toggle-on", "hidden": true }, "no_rotate": { "type": "boolean", + "default": false, "description": "Do not rotate completed replicons to start at a standard gene", "fa_icon": "fas fa-toggle-on", "hidden": true @@ -413,6 +416,7 @@ "properties": { "skip_fastq_check": { "type": "boolean", + "default": false, "description": "Skip minimum requirement checks for input FASTQs", "help": "This parameter is useful if you are confident your sequences will pass the minimum requirements.", "fa_icon": "fas fa-toggle-on", @@ -470,15 +474,10 @@ }, "use_ena": { "type": "boolean", + "default": false, "description": "Download FASTQs from ENA", "fa_icon": "fas fa-toggle-on", "hidden": true - }, - "no_cache": { - "type": "boolean", - "description": "Skip caching the assembly summary file from ncbi-genome-download", - "fa_icon": "fas fa-toggle-on", - "hidden": true } } }, @@ -505,6 +504,7 @@ }, "no_winner_take_all": { "type": "boolean", + "default": false, "description": "Disable winner-takes-all strategy for identity estimates", "help": "winner-take-all description: After counting hashes for each query, hashes that appear in multiple queries will be removed from all except the one with the best identity (ties broken by larger query), and other identities will be reduced. This removes output redundancy, providing a rough compositional outline.", "fa_icon": "fas fa-toggle-on", @@ -564,7 +564,6 @@ }, "mlst_db": { "type": "string", - "default": "", "description": "A custom MLST database to use, either a tarball or a directory", "fa_icon": "fas fa-font", "hidden": true @@ -580,6 +579,7 @@ "properties": { "use_bbmap": { "type": "boolean", + "default": false, "description": "Illumina reads will be QC'd using BBMap", "help": "", "fa_icon": "fas fa-toggle-on", @@ -595,6 +595,7 @@ }, "skip_qc": { "type": "boolean", + "default": false, "description": "The QC step will be skipped and it will be assumed the inputs sequences have already been QCed.", "help": "This is really only useful if you have already QC'd your reads, or have a specific need", "fa_icon": "fas fa-toggle-on", @@ -602,12 +603,14 @@ }, "skip_qc_plots": { "type": "boolean", + "default": false, "description": "QC Plot creation by FastQC or Nanoplot will be skipped", "fa_icon": "fas fa-toggle-on", "hidden": true }, "skip_error_correction": { "type": "boolean", + "default": false, "description": "FLASH error correction of reads will be skipped.", "fa_icon": "fas fa-toggle-on", "hidden": true @@ -1008,7 +1011,7 @@ "properties": { "prokka_proteins": { "type": "string", - "default": "${projectDir}/data/proteins.faa", + "default": "${params.bactopia_dir}/data/proteins.faa", "description": "FASTA file of trusted proteins to first annotate from", "fa_icon": "fas fa-font", "hidden": true @@ -1761,6 +1764,28 @@ } } }, + "staphscan_parameters": { + "title": "StaphSCAN Parameters", + "type": "object", + "description": "", + "default": "", + "fa_icon": "fas fa-exclamation-circle", + "properties": { + "staphscan_modules": { + "type": "string", + "default": "", + "description": "Comma-separated list of modules to run", + "fa_icon": "fas fa-font", + "hidden": true + }, + "staphscan_db_mlst": { + "type": "string", + "description": "Path or tarball to custom MLST database", + "fa_icon": "fas fa-font", + "hidden": true + } + } + }, "stecfinder_parameters": { "title": "STECFinder Parameters", "type": "object", @@ -2264,13 +2289,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", @@ -2402,6 +2420,9 @@ { "$ref": "#/$defs/sccmec_parameters" }, + { + "$ref": "#/$defs/staphscan_parameters" + }, { "$ref": "#/$defs/stecfinder_parameters" }, diff --git a/subworkflows/abricate/tests/main.nf.test.snap b/subworkflows/abricate/tests/main.nf.test.snap index 8bcd7df8d..af3b46770 100644 --- a/subworkflows/abricate/tests/main.nf.test.snap +++ b/subworkflows/abricate/tests/main.nf.test.snap @@ -31,7 +31,7 @@ "versions.yml:md5,c6b552151ca3a9ccc54d58594e65789b" ] ], - "timestamp": "2026-04-29T11:17:01.332607084", + "timestamp": "2026-07-30T19:05:03.864721907", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/abricate/tests/nextflow.config b/subworkflows/abricate/tests/nextflow.config index 0b3ce3cc2..fdebc9d67 100644 --- a/subworkflows/abricate/tests/nextflow.config +++ b/subworkflows/abricate/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of ABRICATE nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Mass screening of contigs for antimicrobial and virulence genes" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for both processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/abricate/summary/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/abritamr/tests/main.nf.test.snap b/subworkflows/abritamr/tests/main.nf.test.snap index c8e2a1826..0732b25cb 100644 --- a/subworkflows/abritamr/tests/main.nf.test.snap +++ b/subworkflows/abritamr/tests/main.nf.test.snap @@ -10,7 +10,7 @@ "scope": "sample" }, [ - "versions.yml:md5,aa30fa16abc1d1a9baefd6defd920a32" + "versions.yml:md5,ef1b96216865ffadde25334b59f3361c" ], { "id": "abritamr-ABRITAMR:CSVTK_CONCAT", @@ -24,7 +24,7 @@ "versions.yml:md5,31f7f5153ed3b9aa6a6e432ec7939e0b" ] ], - "timestamp": "2026-04-29T11:21:12.012980197", + "timestamp": "2026-07-30T19:09:19.846381875", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/abritamr/tests/nextflow.config b/subworkflows/abritamr/tests/nextflow.config index 2a9a3ab77..1a92ac855 100644 --- a/subworkflows/abritamr/tests/nextflow.config +++ b/subworkflows/abritamr/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of ABRITAMR nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "AMR gene detection using AMRFinderPlus" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/agrvate/tests/main.nf.test.snap b/subworkflows/agrvate/tests/main.nf.test.snap index 9d6a12271..58aba764e 100644 --- a/subworkflows/agrvate/tests/main.nf.test.snap +++ b/subworkflows/agrvate/tests/main.nf.test.snap @@ -31,7 +31,7 @@ "versions.yml:md5,bff857ba4a2070f0d89b811a8050494e" ] ], - "timestamp": "2026-04-29T11:17:03.806343444", + "timestamp": "2026-07-30T19:05:08.098446398", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/agrvate/tests/nextflow.config b/subworkflows/agrvate/tests/nextflow.config index d5d1dce4d..db4afbe2f 100644 --- a/subworkflows/agrvate/tests/nextflow.config +++ b/subworkflows/agrvate/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of AGRVATE nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Rapid identification of agr locus type and agr operon variants" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/amrfinderplus/tests/main.nf.test.snap b/subworkflows/amrfinderplus/tests/main.nf.test.snap index c0e408756..c4c96abf4 100644 --- a/subworkflows/amrfinderplus/tests/main.nf.test.snap +++ b/subworkflows/amrfinderplus/tests/main.nf.test.snap @@ -31,7 +31,7 @@ "versions.yml:md5,c18211bbb02304cba7b3e93cbcaa44c6" ] ], - "timestamp": "2026-04-29T11:17:16.329849997", + "timestamp": "2026-07-30T19:05:14.825890533", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/amrfinderplus/tests/nextflow.config b/subworkflows/amrfinderplus/tests/nextflow.config index 395685991..1820cd945 100644 --- a/subworkflows/amrfinderplus/tests/nextflow.config +++ b/subworkflows/amrfinderplus/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of AMRFINDERPLUS nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Identify AMR genes and mutations" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/ariba/tests/main.nf.test.snap b/subworkflows/ariba/tests/main.nf.test.snap index 4fd59133d..ef161881c 100644 --- a/subworkflows/ariba/tests/main.nf.test.snap +++ b/subworkflows/ariba/tests/main.nf.test.snap @@ -13,7 +13,7 @@ "versions.yml:md5,aaa688e30363067240a27dcbe85f29c6" ] ], - "timestamp": "2026-04-29T11:25:44.116364415", + "timestamp": "2026-08-04T21:04:45.138370394", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/ariba/tests/nextflow.config b/subworkflows/ariba/tests/nextflow.config index 86efc8794..57e6d83eb 100644 --- a/subworkflows/ariba/tests/nextflow.config +++ b/subworkflows/ariba/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of ARIBA nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Antimicrobial resistance gene identification by assembly" ext = "fastq" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -34,8 +21,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/bactopia/assembler/tests/nextflow.config b/subworkflows/bactopia/assembler/tests/nextflow.config index e07318408..5a5bbb4f7 100644 --- a/subworkflows/bactopia/assembler/tests/nextflow.config +++ b/subworkflows/bactopia/assembler/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of ASSEMBLER nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -10,26 +11,11 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB max_cpus = 12 - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" - // Module-specific defaults contig_namefmt = "contig%05d" dragonflye_assembler = "flye" @@ -65,7 +51,3 @@ includeConfig "../../../../modules/bactopia/assembler/module.config" includeConfig "../../../../modules/csvtk/concat/module.config" includeConfig "../../../../conf/base.config" includeConfig "../../../../conf/profiles.config" - -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/bactopia/datasets/tests/nextflow.config b/subworkflows/bactopia/datasets/tests/nextflow.config index 2168f2b7d..b3cad7d4d 100644 --- a/subworkflows/bactopia/datasets/tests/nextflow.config +++ b/subworkflows/bactopia/datasets/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of DATASETS nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -10,30 +11,12 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" // Module-specific defaults datasets_cache = "${params.bactopia_cache}/datasets" amrfinderplus_url = "https://datasets.bactopia.com/datasets/v${params.bactopia_version}/amrfinderplus.tar.gz" - mlst_url = "https://datasets.bactopia.com/datasets/v${params.bactopia_version}/mlst.tar.gz" + mlst_url = "https://datasets.bactopia.com/datasets/mlst.tar.gz" mash_url = "https://datasets.bactopia.com/datasets/mash-refseq88.k21.msh.xz" sourmash_url = "https://datasets.bactopia.com/datasets/gtdb-rs207.genomic-reps.dna.k31.lca.json.gz" } diff --git a/subworkflows/bactopia/gather/main.nf b/subworkflows/bactopia/gather/main.nf index f08005c64..8c61b6798 100644 --- a/subworkflows/bactopia/gather/main.nf +++ b/subworkflows/bactopia/gather/main.nf @@ -13,7 +13,7 @@ * @status stable * @keywords validation, download, merging, simulation, metadata, fastq, sra, ena, art * @tags complexity:complex input-type:single output-type:multiple features:aggregation,resource-download,conditional-logic,no-test - * @citation art, fastq_dl, fastq_scan, ncbigenomedownload, pigz + * @citation art, fastq_dl, fastq_scan, genome_dl, pigz * * @modules bactopia_gather, csvtk_concat * diff --git a/subworkflows/bactopia/qc/tests/nextflow.config b/subworkflows/bactopia/qc/tests/nextflow.config index 853220898..608dfe256 100644 --- a/subworkflows/bactopia/qc/tests/nextflow.config +++ b/subworkflows/bactopia/qc/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of QC nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -10,25 +11,7 @@ params { ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - - // Max Job Request Parameters - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - - // Nextflow Profile Parameters - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" // Module-specific defaults adapter_k = 23 @@ -71,7 +54,3 @@ params { includeConfig "../../../../modules/bactopia/qc/module.config" includeConfig "../../../../conf/base.config" includeConfig "../../../../conf/profiles.config" - -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/bactopia/sketcher/tests/main.nf.test.snap b/subworkflows/bactopia/sketcher/tests/main.nf.test.snap index fbe36d796..1a16de005 100644 --- a/subworkflows/bactopia/sketcher/tests/main.nf.test.snap +++ b/subworkflows/bactopia/sketcher/tests/main.nf.test.snap @@ -15,7 +15,7 @@ "versions.yml:md5,e46de3078794860a978e2dd0b390c27c" ] ], - "timestamp": "2026-04-29T11:18:38.450245363", + "timestamp": "2026-07-30T19:06:43.855105932", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/bactopia/sketcher/tests/nextflow.config b/subworkflows/bactopia/sketcher/tests/nextflow.config index 7cd818360..54d2c1894 100644 --- a/subworkflows/bactopia/sketcher/tests/nextflow.config +++ b/subworkflows/bactopia/sketcher/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of SKETCHER nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Sketch sequences for rapid comparisons" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -32,8 +19,3 @@ includeConfig "../../../../modules/bactopia/sketcher/module.config" // Base config (container resolution + resource labels) includeConfig "../../../../conf/base.config" includeConfig "../../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/bakta/tests/main.nf.test.snap b/subworkflows/bakta/tests/main.nf.test.snap index bb807384e..a3a75fa0f 100644 --- a/subworkflows/bakta/tests/main.nf.test.snap +++ b/subworkflows/bakta/tests/main.nf.test.snap @@ -15,7 +15,7 @@ "versions.yml:md5,e8bb3b82f221298fc735072f579e992b" ] ], - "timestamp": "2026-04-29T11:21:33.858162803", + "timestamp": "2026-07-30T19:09:35.223715848", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/bakta/tests/nextflow.config b/subworkflows/bakta/tests/nextflow.config index 71d3d9506..5f12005da 100644 --- a/subworkflows/bakta/tests/nextflow.config +++ b/subworkflows/bakta/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of BAKTA nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Rapid annotation of bacterial genomes" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/bakta/run/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/blastn/tests/main.nf.test.snap b/subworkflows/blastn/tests/main.nf.test.snap index d48a73c72..cc052fec3 100644 --- a/subworkflows/blastn/tests/main.nf.test.snap +++ b/subworkflows/blastn/tests/main.nf.test.snap @@ -25,7 +25,7 @@ "versions.yml:md5,83da7e0cc2656aa0959a8b41dc452417" ] ], - "timestamp": "2026-04-29T11:17:32.153667352", + "timestamp": "2026-07-30T19:05:37.725284844", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/blastn/tests/nextflow.config b/subworkflows/blastn/tests/nextflow.config index 68bc0f28a..172f1963a 100644 --- a/subworkflows/blastn/tests/nextflow.config +++ b/subworkflows/blastn/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of BLASTN nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "BLAST blastn search" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/blastp/tests/main.nf.test.snap b/subworkflows/blastp/tests/main.nf.test.snap index b0571c9c3..662ad341b 100644 --- a/subworkflows/blastp/tests/main.nf.test.snap +++ b/subworkflows/blastp/tests/main.nf.test.snap @@ -25,7 +25,7 @@ "versions.yml:md5,f96b9474386d395c01c2be97c4c63fea" ] ], - "timestamp": "2026-04-29T11:17:32.89753947", + "timestamp": "2026-07-30T19:05:49.487214821", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/blastp/tests/nextflow.config b/subworkflows/blastp/tests/nextflow.config index e1dc5cb6e..9edf79625 100644 --- a/subworkflows/blastp/tests/nextflow.config +++ b/subworkflows/blastp/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of BLASTP nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "BLAST blastp search" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/blastx/tests/main.nf.test.snap b/subworkflows/blastx/tests/main.nf.test.snap index 83d29f22e..6e89da84e 100644 --- a/subworkflows/blastx/tests/main.nf.test.snap +++ b/subworkflows/blastx/tests/main.nf.test.snap @@ -25,7 +25,7 @@ "versions.yml:md5,8634f578eba8a3c37f4edffd83aad444" ] ], - "timestamp": "2026-04-29T11:17:32.589699334", + "timestamp": "2026-07-30T19:05:58.487129005", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/blastx/tests/nextflow.config b/subworkflows/blastx/tests/nextflow.config index 841fabf7c..09d62505e 100644 --- a/subworkflows/blastx/tests/nextflow.config +++ b/subworkflows/blastx/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of BLASTX nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "BLAST blastx search" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/bracken/tests/nextflow.config b/subworkflows/bracken/tests/nextflow.config index e080d94d2..8e2f8357b 100644 --- a/subworkflows/bracken/tests/nextflow.config +++ b/subworkflows/bracken/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of BRACKEN nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Bayesian reestimation of abundance with KrakEN" ext = "fastq" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/btyper3/tests/main.nf.test.snap b/subworkflows/btyper3/tests/main.nf.test.snap index 6d5b7a6c3..53e24aa9a 100644 --- a/subworkflows/btyper3/tests/main.nf.test.snap +++ b/subworkflows/btyper3/tests/main.nf.test.snap @@ -25,7 +25,7 @@ "versions.yml:md5,40ee298a3f689113440883cada3337aa" ] ], - "timestamp": "2026-04-29T11:19:27.531463029", + "timestamp": "2026-07-30T19:07:45.274792455", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/btyper3/tests/nextflow.config b/subworkflows/btyper3/tests/nextflow.config index 5e89054c2..151b5b2dc 100644 --- a/subworkflows/btyper3/tests/nextflow.config +++ b/subworkflows/btyper3/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of BTYPER3 nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Virulence typing of Bacillus cereus group isolates" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/busco/tests/main.nf.test.snap b/subworkflows/busco/tests/main.nf.test.snap index fefc16b56..4d240c8b9 100644 --- a/subworkflows/busco/tests/main.nf.test.snap +++ b/subworkflows/busco/tests/main.nf.test.snap @@ -11,7 +11,7 @@ }, "SRR2838702-summary.txt:md5,d1cbbfb9ab7dee0204bfa26f3b982620", [ - "versions.yml:md5,84a39022a8e62bb5b3eb9c860e79d49f" + "versions.yml:md5,bfe8448c1dd05af49ff6b67f38a9db01" ], { "id": "busco-bacteria_odb10-BUSCO:CSVTK_CONCAT", @@ -25,7 +25,7 @@ "versions.yml:md5,06546ad8c9dee85b74317666718ef698" ] ], - "timestamp": "2026-04-29T11:18:05.722136134", + "timestamp": "2026-07-30T19:06:28.211435154", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/busco/tests/nextflow.config b/subworkflows/busco/tests/nextflow.config index c4db5f68e..667987685 100644 --- a/subworkflows/busco/tests/nextflow.config +++ b/subworkflows/busco/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of BUSCO nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Assembly quality assessment using BUSCO" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/checkm/tests/main.nf.test.snap b/subworkflows/checkm/tests/main.nf.test.snap index 4fab1c018..5f49137d1 100644 --- a/subworkflows/checkm/tests/main.nf.test.snap +++ b/subworkflows/checkm/tests/main.nf.test.snap @@ -25,7 +25,7 @@ "versions.yml:md5,9f9cdf7e89a396b859a6aec91820283a" ] ], - "timestamp": "2026-04-29T11:19:47.690709387", + "timestamp": "2026-07-30T19:08:13.133953984", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/checkm/tests/nextflow.config b/subworkflows/checkm/tests/nextflow.config index e5332305b..a725c3858 100644 --- a/subworkflows/checkm/tests/nextflow.config +++ b/subworkflows/checkm/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of CHECKM nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Assess the quality of microbial genomes" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/checkm2/tests/main.nf.test.snap b/subworkflows/checkm2/tests/main.nf.test.snap index dfb0c3731..bcac33b27 100644 --- a/subworkflows/checkm2/tests/main.nf.test.snap +++ b/subworkflows/checkm2/tests/main.nf.test.snap @@ -25,7 +25,7 @@ "versions.yml:md5,b7cf6dd33e2fefeb729064b0d46f2081" ] ], - "timestamp": "2026-04-29T11:22:31.986367958", + "timestamp": "2026-07-30T19:10:36.485568906", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/checkm2/tests/nextflow.config b/subworkflows/checkm2/tests/nextflow.config index c725faa6d..50865cc51 100644 --- a/subworkflows/checkm2/tests/nextflow.config +++ b/subworkflows/checkm2/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of CHECKM2 nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Rapid quality assessment of metagenome-assembled genomes" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -34,8 +21,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/clermontyping/tests/main.nf.test.snap b/subworkflows/clermontyping/tests/main.nf.test.snap index e55ed7a70..2c4be6e99 100644 --- a/subworkflows/clermontyping/tests/main.nf.test.snap +++ b/subworkflows/clermontyping/tests/main.nf.test.snap @@ -25,7 +25,7 @@ "versions.yml:md5,867a114cb8d26e2302391ce5a5a0a959" ] ], - "timestamp": "2026-04-29T11:18:11.723431368", + "timestamp": "2026-07-30T19:06:55.148178691", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/clermontyping/tests/nextflow.config b/subworkflows/clermontyping/tests/nextflow.config index b127dba38..9a5cf0771 100644 --- a/subworkflows/clermontyping/tests/nextflow.config +++ b/subworkflows/clermontyping/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of CLERMONTYPING nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "In silico Clermont typing of Escherichia coli" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/clonalframeml/tests/main.nf.test.snap b/subworkflows/clonalframeml/tests/main.nf.test.snap index 30db0a4d4..2ebd3f0ad 100644 --- a/subworkflows/clonalframeml/tests/main.nf.test.snap +++ b/subworkflows/clonalframeml/tests/main.nf.test.snap @@ -25,7 +25,7 @@ "scope": "run" }, [ - "versions.yml:md5,2998af40c25f65e228af5938ff93448e" + "versions.yml:md5,a8001abd80c493ec7ae6d20498bcd5bf" ], { "id": "core-genome.masked.distance-snpdists", @@ -40,7 +40,7 @@ "versions.yml:md5,77f64a20eeab9152a61953ec5203b926" ] ], - "timestamp": "2026-04-29T11:19:01.237617004", + "timestamp": "2026-07-30T19:07:48.007411247", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/clonalframeml/tests/nextflow.config b/subworkflows/clonalframeml/tests/nextflow.config index 785fcccc8..57c15b588 100644 --- a/subworkflows/clonalframeml/tests/nextflow.config +++ b/subworkflows/clonalframeml/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of CLONALFRAMEML nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Recombination detection in bacterial genomes" ext = "aln" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -34,8 +21,3 @@ includeConfig "../../../modules/snpdists/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/deacon/main.nf b/subworkflows/deacon/main.nf new file mode 100644 index 000000000..a19efae9b --- /dev/null +++ b/subworkflows/deacon/main.nf @@ -0,0 +1,63 @@ +/** + * Remove host reads from sequencing data using deacon. + * + * This subworkflow uses [deacon](https://github.com/bede/deacon) to identify and remove + * host reads from FASTQ files using SIMD-accelerated minimizer comparison against a + * pre-built reference index (default: panhuman-1). It optionally downloads the index + * if not already available. + * + * @status stable + * @keywords host, contamination, decontamination, depletion, filtering, minimizer, reads, deacon + * @tags complexity:moderate input-type:single output-type:single features:database-dependent,conditional-logic,resource-download + * @citation deacon + * + * @modules deacon_fetch, deacon_filter + * + * @input record(meta, r1?, r2?, se?, lr?) + * - `meta`: Groovy Record containing sample information + * - `r1?`: Illumina R1 reads (paired-end forward) + * - `r2?`: Illumina R2 reads (paired-end reverse) + * - `se?`: Single-end Illumina reads + * - `lr?`: Long reads (ONT/PacBio) + * + * @input database + * Path to deacon minimizer index file (.idx) (ignored if download_deacon is true) + * + * @input download_deacon + * Boolean flag to download the index instead of using the provided path + * + * @output sample_outputs + * - `special_meta`: Simplified metadata record for downstream report joining + * - `r1?`: Filtered paired-end forward reads + * - `r2?`: Filtered paired-end reverse reads + * - `se?`: Filtered single-end reads + * - `lr?`: Filtered long reads + * - `scrub_report`: Read filtering statistics report + * + * @output run_outputs + */ +nextflow.enable.types = true + +include { DEACON_FETCH } from '../../modules/deacon/fetch/main' +include { DEACON_FILTER as DEACON_MODULE } from '../../modules/deacon/filter/main' + +workflow DEACON { + take: + reads: Channel + database: Path? + download_deacon: Boolean + + main: + ch_deacon = channel.empty() + if (download_deacon) { + ch_deacon_fetch = DEACON_FETCH() + ch_deacon = DEACON_MODULE(reads, ch_deacon_fetch.map { r -> r.db }) + } else { + ch_deacon = DEACON_MODULE(reads, database) + } + + emit: + // Published outputs + sample_outputs = ch_deacon + run_outputs = channel.empty() +} diff --git a/subworkflows/deacon/tests/main.nf.test b/subworkflows/deacon/tests/main.nf.test new file mode 100644 index 000000000..8ab57366a --- /dev/null +++ b/subworkflows/deacon/tests/main.nf.test @@ -0,0 +1,44 @@ +nextflow_workflow { + name "Test DEACON Subworkflow" + script "../main.nf" + workflow "DEACON" + tag "subworkflows" + tag "deacon" + + test("deacon - subworkflow - SRR2838702") { + when { + params { + test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" + } + workflow { + """ + input[0] = Channel.of( + record( + meta: [name: "SRR2838702"], + r1: file("${params.test_data_dir}/species/portiera/reads/illumina/SRR2838702_R1.fastq.gz"), + r2: file("${params.test_data_dir}/species/portiera/reads/illumina/SRR2838702_R2.fastq.gz"), + se: null, + lr: null + ) + ) + input[1] = file("${params.test_data_dir}/datasets/deacon/panhuman-1.idx") + input[2] = false + """ + } + } + + then { + def sample = workflow.out.sample_outputs[0] + assertAll( + { assert workflow.success }, + { assert workflow.out.sample_outputs != null }, + { assert sample.r1 != null }, + { assert sample.r2 != null }, + { assert snapshot( + sample.meta, + sample.versions + ).match() } + ) + } + } +} diff --git a/subworkflows/deacon/tests/main.nf.test.snap b/subworkflows/deacon/tests/main.nf.test.snap new file mode 100644 index 000000000..ac424cc3a --- /dev/null +++ b/subworkflows/deacon/tests/main.nf.test.snap @@ -0,0 +1,24 @@ +{ + "deacon - subworkflow - SRR2838702": { + "content": [ + { + "id": "SRR2838702-DEACON:DEACON_MODULE", + "logs_dir": "SRR2838702/tools/deacon/logs/", + "name": "SRR2838702", + "output_dir": "SRR2838702/tools/deacon", + "process_name": "deacon", + "runtype": "paired-end", + "scope": "sample", + "single_end": false + }, + [ + "versions.yml:md5,9d3e1c1b5110e0048698861366ed5151" + ] + ], + "timestamp": "2026-07-30T19:07:04.699052478", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + } +} \ No newline at end of file diff --git a/subworkflows/deacon/tests/nextflow.config b/subworkflows/deacon/tests/nextflow.config new file mode 100644 index 000000000..b01461736 --- /dev/null +++ b/subworkflows/deacon/tests/nextflow.config @@ -0,0 +1,22 @@ +// Minimal config for subworkflow-level testing of DEACON +nextflow.enable.types = true +nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" + +params { + workflow { + name = "deacon" + logo_name = "bactopia-tools" + description = "Remove host reads from sequencing data" + ext = "fna" + } + wf = params.workflow.name +} + +// Load module configs for ALL processes used by this subworkflow +includeConfig "../../../modules/deacon/fetch/module.config" +includeConfig "../../../modules/deacon/filter/module.config" + +// Base config (container resolution + resource labels) +includeConfig "../../../conf/base.config" +includeConfig "../../../conf/profiles.config" diff --git a/subworkflows/deacon/tests/nf-test.config b/subworkflows/deacon/tests/nf-test.config new file mode 100644 index 000000000..1f765f697 --- /dev/null +++ b/subworkflows/deacon/tests/nf-test.config @@ -0,0 +1,11 @@ +config { + testsDir "." + workDir System.getenv("NFT_WORKDIR") ?: ".nf-test" + configFile "nextflow.config" + profile "docker" + options "--is_ci --max_memory 8.GB" + + plugins { + load "nft-utils@0.0.5" + } +} diff --git a/subworkflows/defensefinder/tests/main.nf.test.snap b/subworkflows/defensefinder/tests/main.nf.test.snap index ffcdddfe2..88919e36d 100644 --- a/subworkflows/defensefinder/tests/main.nf.test.snap +++ b/subworkflows/defensefinder/tests/main.nf.test.snap @@ -13,7 +13,7 @@ "versions.yml:md5,cac1e24b64c152890e712ac2077fc111" ] ], - "timestamp": "2026-04-29T11:18:49.743429096", + "timestamp": "2026-07-30T19:07:26.270786073", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/defensefinder/tests/nextflow.config b/subworkflows/defensefinder/tests/nextflow.config index faa12ff5e..9c7177fb1 100644 --- a/subworkflows/defensefinder/tests/nextflow.config +++ b/subworkflows/defensefinder/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of DEFENSEFINDER nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Systematic search of defense systems in bacterial genomes" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -34,8 +21,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/ectyper/tests/main.nf.test.snap b/subworkflows/ectyper/tests/main.nf.test.snap index e25ecb430..9efe8dfc4 100644 --- a/subworkflows/ectyper/tests/main.nf.test.snap +++ b/subworkflows/ectyper/tests/main.nf.test.snap @@ -26,7 +26,7 @@ "versions.yml:md5,c8ed62b01b9e766b6ba10622c55a02e1" ] ], - "timestamp": "2026-04-29T11:18:18.668546291", + "timestamp": "2026-07-30T19:07:14.029195354", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/ectyper/tests/nextflow.config b/subworkflows/ectyper/tests/nextflow.config index f0439c881..5e1faa243 100644 --- a/subworkflows/ectyper/tests/nextflow.config +++ b/subworkflows/ectyper/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of ECTYPER nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "In silico serotyping of E. coli" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/eggnog/tests/main.nf.test b/subworkflows/eggnog/tests/main.nf.test index dc42fac9c..b4e1834ea 100644 --- a/subworkflows/eggnog/tests/main.nf.test +++ b/subworkflows/eggnog/tests/main.nf.test @@ -30,10 +30,12 @@ nextflow_workflow { assertAll( { assert workflow.success }, { assert workflow.out.sample_outputs != null }, + // Reproducible outputs { assert snapshot( - sample.meta, - sample.versions + sample.meta ).match() }, + // Non-reproducible outputs + { assert path(sample.versions[0]).text.contains('eggnog-mapper') }, { assert sample.hits != null }, { assert sample.seed_orthologs != null }, { assert sample.annotations != null }, diff --git a/subworkflows/eggnog/tests/main.nf.test.snap b/subworkflows/eggnog/tests/main.nf.test.snap index 39861bf5d..0b5ce71bc 100644 --- a/subworkflows/eggnog/tests/main.nf.test.snap +++ b/subworkflows/eggnog/tests/main.nf.test.snap @@ -8,12 +8,9 @@ "output_dir": "SRR2838702/tools/eggnog/", "process_name": "eggnog", "scope": "sample" - }, - [ - "versions.yml:md5,1b179e895ab51b7321ae747976b92b31" - ] + } ], - "timestamp": "2026-04-29T11:32:14.279719669", + "timestamp": "2026-07-30T19:22:52.015336258", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/eggnog/tests/nextflow.config b/subworkflows/eggnog/tests/nextflow.config index c1ee171a9..dc21f606b 100644 --- a/subworkflows/eggnog/tests/nextflow.config +++ b/subworkflows/eggnog/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of EGGNOG nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Functional annotation of proteins" ext = "faa" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/eggnog/mapper/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/emmtyper/tests/main.nf.test.snap b/subworkflows/emmtyper/tests/main.nf.test.snap index 7d6297552..6f8c10824 100644 --- a/subworkflows/emmtyper/tests/main.nf.test.snap +++ b/subworkflows/emmtyper/tests/main.nf.test.snap @@ -25,7 +25,7 @@ "versions.yml:md5,f181bc0c0ea82cc9859e47cd3254e8d4" ] ], - "timestamp": "2026-04-29T11:17:58.904730441", + "timestamp": "2026-07-30T19:07:04.056726262", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/emmtyper/tests/nextflow.config b/subworkflows/emmtyper/tests/nextflow.config index bf51a5802..801a493b2 100644 --- a/subworkflows/emmtyper/tests/nextflow.config +++ b/subworkflows/emmtyper/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of EMMTYPER nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "emm typing of Streptococcus pyogenes" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/fastani/tests/main.nf.test.snap b/subworkflows/fastani/tests/main.nf.test.snap index 2acf006dd..b97ca1883 100644 --- a/subworkflows/fastani/tests/main.nf.test.snap +++ b/subworkflows/fastani/tests/main.nf.test.snap @@ -25,7 +25,7 @@ "versions.yml:md5,ec1c87c7160d76617e82583ad5b7740d" ] ], - "timestamp": "2026-04-29T11:18:02.732052682", + "timestamp": "2026-07-30T19:07:09.027992467", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/fastani/tests/nextflow.config b/subworkflows/fastani/tests/nextflow.config index 5863b98c8..2d2f7a5b5 100644 --- a/subworkflows/fastani/tests/nextflow.config +++ b/subworkflows/fastani/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of FASTANI nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Fast whole-genome similarity estimation" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/gamma/tests/main.nf.test.snap b/subworkflows/gamma/tests/main.nf.test.snap index ca7a9853f..099595eb6 100644 --- a/subworkflows/gamma/tests/main.nf.test.snap +++ b/subworkflows/gamma/tests/main.nf.test.snap @@ -26,7 +26,7 @@ "versions.yml:md5,d05d2269217aebb5587ece87b0666cf1" ] ], - "timestamp": "2026-04-29T11:18:06.233770567", + "timestamp": "2026-07-30T19:07:17.199659091", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/gamma/tests/nextflow.config b/subworkflows/gamma/tests/nextflow.config index 7fc6183d2..2bf7bcbb7 100644 --- a/subworkflows/gamma/tests/nextflow.config +++ b/subworkflows/gamma/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of GAMMA nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Gene Allele Mutation Microbial Assessment" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/genomedl/main.nf b/subworkflows/genomedl/main.nf new file mode 100644 index 000000000..d949d30f9 --- /dev/null +++ b/subworkflows/genomedl/main.nf @@ -0,0 +1,75 @@ +/** + * Download genome assemblies from NCBI Datasets. + * + * This subworkflow downloads genome assemblies using + * [genome-dl](https://github.com/rpetit3/genome-dl), which resolves accessions to their latest + * version and subsamples species queries before fetching files from the NCBI FTP site. The + * downloaded assemblies are fanned out into per-genome records for downstream analysis, and the + * first assembly is exposed separately for use as a reference genome. + * + * @status stable + * @keywords download, ncbi, datasets, genome, assembly, refseq + * @tags complexity:moderate input-type:single output-type:multiple features:resource-download,internet-access + * @citation genome_dl + * + * @modules genomedl as genomedl_module + * + * @input accessions + * A file containing NCBI Assembly accessions, one per line. May be combined with the `--accession` and `--species` parameters. + * + * @output sample_outputs + * - `fna`: Genomic nucleotide sequences in FASTA format + * - `gbff`: GenBank format genome sequences + * - `wgs_gbk`: WGS master records in GenBank format + * - `gff`: Genome annotations in GFF3 format + * - `gtf`: Genome annotations in GTF format + * - `faa`: Protein sequences in FASTA format + * - `gpff`: Protein sequences in GenPept format + * - `cds`: CDS nucleotide sequences in FASTA format + * - `translated_cds`: CDS protein sequences in FASTA format + * - `rna`: RNA feature nucleotide sequences in FASTA format + * - `features`: Feature table with locations and attributes + * - `report`: Assembly report with unit and sequence relationships + * - `stats`: Assembly statistics + * - `metadata`: NCBI Datasets metadata for each downloaded assembly + * - `summary`: Human-readable run summary of the version, parameters, and results + * - `json`: Machine-readable run report of the parameters, results, and per-assembly metadata + * + * @output run_outputs + * + * @output assemblies + * - `fna`: Individual downloaded assembly in FASTA format + * + * @output reference + * First downloaded genome for use as a reference. Prefers GenBank (`--format genbank`) over + * FASTA, since annotation-aware consumers such as Snippy require a GenBank reference. + */ +nextflow.enable.types = true + +include { GENOMEDL as GENOMEDL_MODULE } from '../../modules/genomedl/main' + +workflow GENOMEDL { + + take: + accessions: Path? + + main: + ch_genomedl = GENOMEDL_MODULE(accessions) + // Fan out on the named `fna` field rather than `results`, which also carries the metadata + // TSV, run summary, and JSON report that genome-dl always writes + ch_assemblies = ch_genomedl.map { r -> r.fna }.flatten().map { path -> + def sample_name = file(path).getSimpleName() + record(meta: record(id: sample_name, name: sample_name), fna: path) + } + // Prefer GenBank over FASTA: consumers of `reference` (Snippy) need the annotations, and + // `--format` decides which of the two genome-dl actually wrote + ch_reference = ch_genomedl.map { r -> r.gbff ? r.gbff : r.fna }.flatten().first() + + emit: + // Downstream inputs + assemblies = ch_assemblies + reference = ch_reference + // Published outputs + sample_outputs = ch_genomedl + run_outputs = channel.empty() +} diff --git a/subworkflows/ncbigenomedownload/tests/.nftignore b/subworkflows/genomedl/tests/.nftignore similarity index 100% rename from subworkflows/ncbigenomedownload/tests/.nftignore rename to subworkflows/genomedl/tests/.nftignore diff --git a/subworkflows/genomedl/tests/main.nf.test b/subworkflows/genomedl/tests/main.nf.test new file mode 100644 index 000000000..372f5ae7c --- /dev/null +++ b/subworkflows/genomedl/tests/main.nf.test @@ -0,0 +1,131 @@ +nextflow_workflow { + name "Test GENOMEDL Subworkflow" + script "../main.nf" + workflow "GENOMEDL" + tag "subworkflows" + tag "genomedl" + + test("genomedl - subworkflow - single accession") { + when { + params { + test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" + // Portiera aleyrodidarum (~360 kb), version-less to test accession resolution + accession = "GCF_000292685" + format = "fasta" + } + workflow { + """ + input[0] = null + """ + } + } + + then { + def sample = workflow.out.sample_outputs[0] + def assemblies = workflow.out.assemblies + assertAll( + { assert workflow.success }, + { assert snapshot( + sample.meta, + sample.versions + ).match() }, + // One downloaded genome fans out to one assembly record + { assert assemblies.size() == 1 }, + { assert assemblies[0].meta.name == "GCF_000292685" }, + { assert workflow.out.reference != null } + ) + } + } + + test("genomedl - subworkflow - accessions file") { + when { + params { + test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" + format = "fasta" + } + workflow { + """ + input[0] = file("${params.test_data_dir}/datasets/generic/test-assembly-accessions.txt") + """ + } + } + + then { + def sample = workflow.out.sample_outputs[0] + def assemblies = workflow.out.assemblies + def names = assemblies.collect { r -> r.meta.name }.sort() + assertAll( + { assert workflow.success }, + { assert snapshot( + sample.meta, + sample.versions + ).match() }, + // Two accessions in the file fan out to two assembly records + { assert assemblies.size() == 2 }, + { assert names == ["GCF_002849975", "GCF_002849995"] } + ) + } + } + + test("genomedl - subworkflow - species with limit") { + when { + params { + test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" + // The taxon has 14 complete RefSeq assemblies, --limit trims the download to two + species = "Candidatus Portiera aleyrodidarum" + assembly_level = "complete" + format = "fasta" + limit = 2 + } + workflow { + """ + input[0] = null + """ + } + } + + then { + def sample = workflow.out.sample_outputs[0] + def assemblies = workflow.out.assemblies + assertAll( + { assert workflow.success }, + { assert snapshot( + sample.meta, + sample.versions + ).match() }, + // NCBI relevance order is not stable, so assert the shape rather than accessions + { assert assemblies.size() == 2 }, + { assert assemblies.every { r -> r.meta.name.startsWith("GCF_") } }, + { assert assemblies.every { r -> r.meta.name == r.meta.id } } + ) + } + } + + test("genomedl - subworkflow - genbank reference") { + when { + params { + test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" + accession = "GCF_000292685" + format = "genbank" + } + workflow { + """ + input[0] = null + """ + } + } + + then { + def reference = workflow.out.reference + assertAll( + { assert workflow.success }, + // Snippy needs the annotations, so `reference` must resolve to the GenBank + // download rather than falling back to an empty `fna` field + { assert reference != null }, + { assert file(reference[0]).name.endsWith(".gbff.gz") }, + // `--format genbank` writes no FASTA, so nothing fans out to `assemblies` + { assert workflow.out.assemblies.size() == 0 } + ) + } + } +} diff --git a/subworkflows/genomedl/tests/main.nf.test.snap b/subworkflows/genomedl/tests/main.nf.test.snap new file mode 100644 index 000000000..95561ccd1 --- /dev/null +++ b/subworkflows/genomedl/tests/main.nf.test.snap @@ -0,0 +1,71 @@ +{ + "genomedl - subworkflow - accessions file": { + "content": [ + { + "accession": null, + "id": "genomedl", + "limit": 100, + "logs_dir": "genomedl/logs", + "name": "genomedl", + "output_dir": "genomedl", + "process_name": "genomedl", + "scope": "run", + "species": null + }, + [ + "versions.yml:md5,df087e43d695dee0f2bfffa1d15991e8" + ] + ], + "timestamp": "2026-07-30T19:07:30.869572426", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + }, + "genomedl - subworkflow - species with limit": { + "content": [ + { + "accession": null, + "id": "genomedl", + "limit": 2, + "logs_dir": "genomedl/logs", + "name": "genomedl", + "output_dir": "genomedl", + "process_name": "genomedl", + "scope": "run", + "species": "Candidatus Portiera aleyrodidarum" + }, + [ + "versions.yml:md5,df087e43d695dee0f2bfffa1d15991e8" + ] + ], + "timestamp": "2026-07-30T19:07:46.945271158", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + }, + "genomedl - subworkflow - single accession": { + "content": [ + { + "accession": "GCF_000292685", + "id": "genomedl", + "limit": 100, + "logs_dir": "genomedl/logs", + "name": "genomedl", + "output_dir": "genomedl", + "process_name": "genomedl", + "scope": "run", + "species": null + }, + [ + "versions.yml:md5,df087e43d695dee0f2bfffa1d15991e8" + ] + ], + "timestamp": "2026-07-30T19:07:17.057077214", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + } +} \ No newline at end of file diff --git a/subworkflows/genomedl/tests/nextflow.config b/subworkflows/genomedl/tests/nextflow.config new file mode 100644 index 000000000..77789e7f3 --- /dev/null +++ b/subworkflows/genomedl/tests/nextflow.config @@ -0,0 +1,21 @@ +// Minimal config for subworkflow-level testing of GENOMEDL +nextflow.enable.types = true +nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" + +params { + workflow { + name = "genomedl" + logo_name = "bactopia-tools" + description = "Download genome assemblies from NCBI Datasets" + ext = "fna" + } + wf = params.workflow.name +} + +// Load module configs for processes in this subworkflow +includeConfig "../../../modules/genomedl/module.config" + +// Base config (container resolution + resource labels) +includeConfig "../../../conf/base.config" +includeConfig "../../../conf/profiles.config" diff --git a/subworkflows/genomedl/tests/nf-test.config b/subworkflows/genomedl/tests/nf-test.config new file mode 100644 index 000000000..1f765f697 --- /dev/null +++ b/subworkflows/genomedl/tests/nf-test.config @@ -0,0 +1,11 @@ +config { + testsDir "." + workDir System.getenv("NFT_WORKDIR") ?: ".nf-test" + configFile "nextflow.config" + profile "docker" + options "--is_ci --max_memory 8.GB" + + plugins { + load "nft-utils@0.0.5" + } +} diff --git a/subworkflows/genotyphi/tests/main.nf.test.snap b/subworkflows/genotyphi/tests/main.nf.test.snap index 7331bd078..840cb8a68 100644 --- a/subworkflows/genotyphi/tests/main.nf.test.snap +++ b/subworkflows/genotyphi/tests/main.nf.test.snap @@ -25,7 +25,7 @@ "versions.yml:md5,1e61ab9091b0ddd88b14c86fa3488bea" ] ], - "timestamp": "2026-04-29T11:18:18.066146142", + "timestamp": "2026-07-30T19:07:34.831040245", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/genotyphi/tests/nextflow.config b/subworkflows/genotyphi/tests/nextflow.config index b3d07fc56..c4dd6070c 100644 --- a/subworkflows/genotyphi/tests/nextflow.config +++ b/subworkflows/genotyphi/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of GENOTYPHI nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Genotyping of Salmonella Typhi" ext = "fastq" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -34,8 +21,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/gigatyper/tests/main.nf.test.snap b/subworkflows/gigatyper/tests/main.nf.test.snap index a55a9cfd3..ad69e237e 100644 --- a/subworkflows/gigatyper/tests/main.nf.test.snap +++ b/subworkflows/gigatyper/tests/main.nf.test.snap @@ -25,7 +25,7 @@ "versions.yml:md5,59922891ac61f5298b927f8e43eb5ae6" ] ], - "timestamp": "2026-04-29T11:18:25.429358789", + "timestamp": "2026-07-30T19:07:45.380812777", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/gigatyper/tests/nextflow.config b/subworkflows/gigatyper/tests/nextflow.config index 801dce6a4..28228fc18 100644 --- a/subworkflows/gigatyper/tests/nextflow.config +++ b/subworkflows/gigatyper/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of GIGATYPER nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Run all available MLST schemes for a species against an assembly" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/gtdb/tests/main.nf.test.snap b/subworkflows/gtdb/tests/main.nf.test.snap index fab16dd53..d2791f09c 100644 --- a/subworkflows/gtdb/tests/main.nf.test.snap +++ b/subworkflows/gtdb/tests/main.nf.test.snap @@ -10,7 +10,7 @@ "scope": "sample" }, [ - "versions.yml:md5,738ac1f744a77df263f3b25b97a2748d" + "versions.yml:md5,07e1a7fe67e8f4acb512d2f15e50f6c3" ], { "id": "gtdb-GTDB:CSVTK_CONCAT", @@ -24,7 +24,7 @@ "versions.yml:md5,ec94f157437c25058fdce9d4346342a2" ] ], - "timestamp": "2026-04-29T11:23:21.173815412", + "timestamp": "2026-07-30T19:12:33.027397678", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/gtdb/tests/nextflow.config b/subworkflows/gtdb/tests/nextflow.config index af89ab35b..19a778a33 100644 --- a/subworkflows/gtdb/tests/nextflow.config +++ b/subworkflows/gtdb/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of GTDB nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "GTDB-Tk classification of bacterial genomes" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -34,8 +21,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/gubbins/tests/main.nf.test b/subworkflows/gubbins/tests/main.nf.test index 7c7a1b3f6..7e9be1c4c 100644 --- a/subworkflows/gubbins/tests/main.nf.test +++ b/subworkflows/gubbins/tests/main.nf.test @@ -29,14 +29,16 @@ nextflow_workflow { assertAll( { assert workflow.success }, { assert workflow.out.run_outputs != null }, + // Reproducible outputs { assert snapshot( gubbins.meta, gubbins.masked_aln, - gubbins.versions, snpdists.meta, snpdists.tsv, snpdists.versions ).match() }, + // Non-reproducible outputs + { assert path(gubbins.versions[0]).text.contains('gubbins') }, { assert gubbins.results != null }, { assert snpdists.results != null } ) diff --git a/subworkflows/gubbins/tests/main.nf.test.snap b/subworkflows/gubbins/tests/main.nf.test.snap index 098d18076..02178e7b4 100644 --- a/subworkflows/gubbins/tests/main.nf.test.snap +++ b/subworkflows/gubbins/tests/main.nf.test.snap @@ -10,9 +10,6 @@ "scope": "run" }, "portiera.masked.aln.gz:md5,0aa89f5b52d36f88d6bbf52b9015a719", - [ - "versions.yml:md5,99bfa6c29403a77acf3449315065c245" - ], { "id": "core-snp.masked.distance-snpdists", "logs_dir": "snpdists-masked/logs/", @@ -26,7 +23,7 @@ "versions.yml:md5,a8d93e0d6a006b32c088567301fe66c4" ] ], - "timestamp": "2026-04-29T11:18:39.624854003", + "timestamp": "2026-07-30T19:08:21.377346175", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/gubbins/tests/nextflow.config b/subworkflows/gubbins/tests/nextflow.config index c863e8c48..e1f0b5796 100644 --- a/subworkflows/gubbins/tests/nextflow.config +++ b/subworkflows/gubbins/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of GUBBINS nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Recombination detection in bacteria" ext = "aln" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/snpdists/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/hicap/tests/main.nf.test.snap b/subworkflows/hicap/tests/main.nf.test.snap index ac7c7a0f6..2e827487a 100644 --- a/subworkflows/hicap/tests/main.nf.test.snap +++ b/subworkflows/hicap/tests/main.nf.test.snap @@ -25,7 +25,7 @@ "versions.yml:md5,0c84033bcf201f320a96434ff2545e4a" ] ], - "timestamp": "2026-04-29T11:18:43.986977664", + "timestamp": "2026-07-30T19:08:09.508478543", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/hicap/tests/nextflow.config b/subworkflows/hicap/tests/nextflow.config index 3c0e28ec4..321e35486 100644 --- a/subworkflows/hicap/tests/nextflow.config +++ b/subworkflows/hicap/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of HICAP nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "In silico cap locus typing of H. influenzae" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/hpsuissero/tests/main.nf.test.snap b/subworkflows/hpsuissero/tests/main.nf.test.snap index 322785506..a3a45c73c 100644 --- a/subworkflows/hpsuissero/tests/main.nf.test.snap +++ b/subworkflows/hpsuissero/tests/main.nf.test.snap @@ -25,7 +25,7 @@ "versions.yml:md5,f6953ae2271fe2a3415f7a5450e4f046" ] ], - "timestamp": "2026-04-29T11:18:19.038869937", + "timestamp": "2026-07-30T19:07:59.700450636", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/hpsuissero/tests/nextflow.config b/subworkflows/hpsuissero/tests/nextflow.config index 88d1d8beb..cb1756fb4 100644 --- a/subworkflows/hpsuissero/tests/nextflow.config +++ b/subworkflows/hpsuissero/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of HPSUISSERO nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Serotype prediction of Haemophilus parasuis" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/iqtree/tests/main.nf.test.snap b/subworkflows/iqtree/tests/main.nf.test.snap index 5c84b331b..21bfe90d3 100644 --- a/subworkflows/iqtree/tests/main.nf.test.snap +++ b/subworkflows/iqtree/tests/main.nf.test.snap @@ -10,10 +10,10 @@ "scope": "run" }, [ - "versions.yml:md5,e01256842798c2b435032141a36e34a4" + "versions.yml:md5,35bdf120a286dc0efcc97ccb06895c0f" ] ], - "timestamp": "2026-04-29T11:18:25.12719433", + "timestamp": "2026-07-30T19:08:11.780210852", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/iqtree/tests/nextflow.config b/subworkflows/iqtree/tests/nextflow.config index bd648d6e1..be3dcb3ed 100644 --- a/subworkflows/iqtree/tests/nextflow.config +++ b/subworkflows/iqtree/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of IQTREE nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Maximum likelihood phylogenetic analysis" ext = "aln" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -32,8 +19,3 @@ includeConfig "../../../modules/iqtree/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/ismapper/tests/main.nf.test.snap b/subworkflows/ismapper/tests/main.nf.test.snap index b2016d504..298de654e 100644 --- a/subworkflows/ismapper/tests/main.nf.test.snap +++ b/subworkflows/ismapper/tests/main.nf.test.snap @@ -13,7 +13,7 @@ "versions.yml:md5,5c8653f3402a5a6792c554eea616f71c" ] ], - "timestamp": "2026-04-29T11:19:34.723180074", + "timestamp": "2026-07-30T19:09:31.040678879", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/ismapper/tests/nextflow.config b/subworkflows/ismapper/tests/nextflow.config index b84c2ce06..e577bf125 100644 --- a/subworkflows/ismapper/tests/nextflow.config +++ b/subworkflows/ismapper/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of ISMAPPER nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Insertion sequence mapping" ext = "fastq" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -32,8 +19,3 @@ includeConfig "../../../modules/ismapper/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/kleborate/tests/main.nf.test.snap b/subworkflows/kleborate/tests/main.nf.test.snap index 8b8c9d1bc..43f46df07 100644 --- a/subworkflows/kleborate/tests/main.nf.test.snap +++ b/subworkflows/kleborate/tests/main.nf.test.snap @@ -24,7 +24,7 @@ "versions.yml:md5,2351aac91e4aee5e9cfa2bd7a6a1bda0" ] ], - "timestamp": "2026-04-29T11:18:56.739504497", + "timestamp": "2026-07-30T19:09:15.449844749", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/kleborate/tests/nextflow.config b/subworkflows/kleborate/tests/nextflow.config index 18248573d..84f2c5b23 100644 --- a/subworkflows/kleborate/tests/nextflow.config +++ b/subworkflows/kleborate/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of KLEBORATE nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Screening of Klebsiella genome assemblies" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/kraken2/tests/main.nf.test.snap b/subworkflows/kraken2/tests/main.nf.test.snap index af04065dc..481fc74d7 100644 --- a/subworkflows/kraken2/tests/main.nf.test.snap +++ b/subworkflows/kraken2/tests/main.nf.test.snap @@ -12,10 +12,10 @@ }, "SRR2838702.kraken2.report.txt:md5,29a9ad9bb9b9b17a43e969f82c6e3e9f", [ - "versions.yml:md5,64abaf13d756f2c9443d3b814985e107" + "versions.yml:md5,121005727d1dfbf01116529f9640d2c5" ] ], - "timestamp": "2026-04-29T11:18:54.186202424", + "timestamp": "2026-07-30T19:09:32.267782138", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/kraken2/tests/nextflow.config b/subworkflows/kraken2/tests/nextflow.config index f054a2279..2a52eff9f 100644 --- a/subworkflows/kraken2/tests/nextflow.config +++ b/subworkflows/kraken2/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of KRAKEN2 nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Taxonomic classification of reads" ext = "fastq" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -32,8 +19,3 @@ includeConfig "../../../modules/kraken2/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/legsta/tests/main.nf.test.snap b/subworkflows/legsta/tests/main.nf.test.snap index 4ae8f7aac..da7ecd81a 100644 --- a/subworkflows/legsta/tests/main.nf.test.snap +++ b/subworkflows/legsta/tests/main.nf.test.snap @@ -25,7 +25,7 @@ "versions.yml:md5,f5386e7ff032be488d34b8bb980ba73b" ] ], - "timestamp": "2026-04-29T11:18:34.859965515", + "timestamp": "2026-07-30T19:09:04.379096665", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/legsta/tests/nextflow.config b/subworkflows/legsta/tests/nextflow.config index e3aa9f973..7cb9bff09 100644 --- a/subworkflows/legsta/tests/nextflow.config +++ b/subworkflows/legsta/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of LEGSTA nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "In silico Legionella pneumophila Sequence Based Typing" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/lissero/tests/main.nf.test.snap b/subworkflows/lissero/tests/main.nf.test.snap index 76160d4f0..cc62737e9 100644 --- a/subworkflows/lissero/tests/main.nf.test.snap +++ b/subworkflows/lissero/tests/main.nf.test.snap @@ -25,7 +25,7 @@ "versions.yml:md5,f3f10093536274480dfa04035ebfbca2" ] ], - "timestamp": "2026-04-29T11:18:39.706405826", + "timestamp": "2026-07-30T19:09:11.25598244", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/lissero/tests/nextflow.config b/subworkflows/lissero/tests/nextflow.config index a0125a434..c6d51ac8a 100644 --- a/subworkflows/lissero/tests/nextflow.config +++ b/subworkflows/lissero/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of LISSERO nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "In silico serotyping of Listeria monocytogenes" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/mashdist/tests/main.nf.test.snap b/subworkflows/mashdist/tests/main.nf.test.snap index 1676438ee..322d68f38 100644 --- a/subworkflows/mashdist/tests/main.nf.test.snap +++ b/subworkflows/mashdist/tests/main.nf.test.snap @@ -25,7 +25,7 @@ "versions.yml:md5,fa387a5652585c181be4884eb12f37b0" ] ], - "timestamp": "2026-04-29T11:18:36.780964862", + "timestamp": "2026-07-30T19:09:35.313603632", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/mashdist/tests/nextflow.config b/subworkflows/mashdist/tests/nextflow.config index 440b7cb90..9c284894d 100644 --- a/subworkflows/mashdist/tests/nextflow.config +++ b/subworkflows/mashdist/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of MASHDIST nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Calculate Mash distances between sequences" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/mashtree/tests/main.nf.test.snap b/subworkflows/mashtree/tests/main.nf.test.snap index d404ac84e..d34dbdf8a 100644 --- a/subworkflows/mashtree/tests/main.nf.test.snap +++ b/subworkflows/mashtree/tests/main.nf.test.snap @@ -13,7 +13,7 @@ "versions.yml:md5,d8cd0c9b6f670d5ae21fda6592e85d32" ] ], - "timestamp": "2026-04-29T11:18:40.057093321", + "timestamp": "2026-07-30T19:09:55.83613098", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/mashtree/tests/nextflow.config b/subworkflows/mashtree/tests/nextflow.config index 6e2696539..c7d72e3cf 100644 --- a/subworkflows/mashtree/tests/nextflow.config +++ b/subworkflows/mashtree/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of MASHTREE nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Create a tree using Mash distances" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -32,8 +19,3 @@ includeConfig "../../../modules/mashtree/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/mcroni/tests/main.nf.test.snap b/subworkflows/mcroni/tests/main.nf.test.snap index 74a4491d4..06a83255e 100644 --- a/subworkflows/mcroni/tests/main.nf.test.snap +++ b/subworkflows/mcroni/tests/main.nf.test.snap @@ -26,7 +26,7 @@ "versions.yml:md5,6eecf339ecef6511e62beca33a4b3fc6" ] ], - "timestamp": "2026-04-29T11:18:50.133272766", + "timestamp": "2026-07-30T19:10:00.448865968", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/mcroni/tests/nextflow.config b/subworkflows/mcroni/tests/nextflow.config index b2272b413..ad3450ae2 100644 --- a/subworkflows/mcroni/tests/nextflow.config +++ b/subworkflows/mcroni/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of MCRONI nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Sequence variation in mcr-1 bearing plasmids" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/meningotype/tests/main.nf.test.snap b/subworkflows/meningotype/tests/main.nf.test.snap index 560502e0a..e52f6a130 100644 --- a/subworkflows/meningotype/tests/main.nf.test.snap +++ b/subworkflows/meningotype/tests/main.nf.test.snap @@ -25,7 +25,7 @@ "versions.yml:md5,2210210917992673f792050a55c95b2e" ] ], - "timestamp": "2026-04-29T11:18:51.444103279", + "timestamp": "2026-07-30T19:10:02.368707231", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/meningotype/tests/nextflow.config b/subworkflows/meningotype/tests/nextflow.config index b4609696f..f7b04c290 100644 --- a/subworkflows/meningotype/tests/nextflow.config +++ b/subworkflows/meningotype/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of MENINGOTYPE nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Serotyping of Neisseria meningitidis" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/merlin/main.nf b/subworkflows/merlin/main.nf index c4ae1cf36..d16a87275 100644 --- a/subworkflows/merlin/main.nf +++ b/subworkflows/merlin/main.nf @@ -12,8 +12,8 @@ * @tags complexity:complex input-type:single output-type:multiple features:conditional-logic,components * @citation mash * - * @subworkflows merlindist, clermontyping, ectyper, emmtyper, genotyphi, hicap, hpsuissero, kleborate, - * legsta, lissero, ngmaster, pasty, pbptyper, seqsero2, seroba, shigapass, + * @subworkflows clermontyping, ectyper, emmtyper, genotyphi, hicap, hpsuissero, kleborate, + * legsta, lissero, merlindist, ngmaster, pasty, pbptyper, seqsero2, seroba, shigapass, * shigatyper, shigeifinder, sistr, ssuissero, staphtyper, stecfinder, tbprofiler * * @input record(meta, fna, r1?, r2?, se?, lr?) @@ -42,6 +42,9 @@ * @input staphtyper_repeat_order * Staphylococcus aureus repeat order file for spa typing (optional) * + * @input staphscan_db_mlst + * Custom MLST database directory for StaphSCAN surveillance (optional) + * * @output sample_outputs * Mixed per-sample records from merlindist and all activated species-specific typing * subworkflows (e.g., ectyper, sistr, kleborate). Each record carries tool-specific fields. @@ -85,6 +88,7 @@ workflow MERLIN { hicap_model_fp: Path? staphtyper_repeats: Path? staphtyper_repeat_order: Path? + staphscan_db_mlst: Path? main: // ID potential species @@ -141,7 +145,7 @@ workflow MERLIN { // Staphylococcus ch_staphylococcus = ch_merlindist.sample_outputs.filter { r -> r.staphylococcus != null } - ch_staphtyper = STAPHTYPER(ch_staphylococcus.map(forAssembly), staphtyper_repeats, staphtyper_repeat_order) + ch_staphtyper = STAPHTYPER(ch_staphylococcus.map(forAssembly), staphtyper_repeats, staphtyper_repeat_order, staphscan_db_mlst) // Streptococcus ch_streptococcus = ch_merlindist.sample_outputs.filter { r -> r.streptococcus != null } diff --git a/subworkflows/merlin/tests/main.nf.test b/subworkflows/merlin/tests/main.nf.test index 219bcc192..a7f344669 100644 --- a/subworkflows/merlin/tests/main.nf.test +++ b/subworkflows/merlin/tests/main.nf.test @@ -28,6 +28,7 @@ nextflow_workflow { input[4] = null input[5] = null input[6] = null + input[7] = null """ } } diff --git a/subworkflows/merlin/tests/nextflow.config b/subworkflows/merlin/tests/nextflow.config index 5f1e849df..d5228213a 100644 --- a/subworkflows/merlin/tests/nextflow.config +++ b/subworkflows/merlin/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of MERLIN nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Species-specific typing via Mash distance" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -55,13 +42,9 @@ includeConfig "../../../modules/tbprofiler/collate/module.config" includeConfig "../../../modules/agrvate/module.config" includeConfig "../../../modules/spatyper/module.config" includeConfig "../../../modules/sccmec/module.config" +includeConfig "../../../modules/staphscan/module.config" includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/merlindist/tests/main.nf.test.snap b/subworkflows/merlindist/tests/main.nf.test.snap index c84bb6cf9..3f9f68a99 100644 --- a/subworkflows/merlindist/tests/main.nf.test.snap +++ b/subworkflows/merlindist/tests/main.nf.test.snap @@ -16,7 +16,7 @@ "versions.yml:md5,a714676ea5e603813de6640079a3f847" ] ], - "timestamp": "2026-04-29T11:20:03.900973384", + "timestamp": "2026-07-30T19:11:35.428250317", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/merlindist/tests/nextflow.config b/subworkflows/merlindist/tests/nextflow.config index 46617f18d..8cac69c76 100644 --- a/subworkflows/merlindist/tests/nextflow.config +++ b/subworkflows/merlindist/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of MERLINDIST nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Species identification via Mash distances" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -32,8 +19,3 @@ includeConfig "../../../modules/merlin/dist/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/midas/tests/main.nf.test.snap b/subworkflows/midas/tests/main.nf.test.snap index 975c974ba..f00954f5b 100644 --- a/subworkflows/midas/tests/main.nf.test.snap +++ b/subworkflows/midas/tests/main.nf.test.snap @@ -27,7 +27,7 @@ "versions.yml:md5,66c2179f6d22e371b66b5d12ec5b0af1" ] ], - "timestamp": "2026-04-29T11:26:15.831138628", + "timestamp": "2026-07-30T19:19:54.855510421", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/midas/tests/nextflow.config b/subworkflows/midas/tests/nextflow.config index 9df718d07..4160a2cb5 100644 --- a/subworkflows/midas/tests/nextflow.config +++ b/subworkflows/midas/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of MIDAS nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Metagenomic Intra-species Diversity Analysis" ext = "fastq" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/mlst/tests/main.nf.test.snap b/subworkflows/mlst/tests/main.nf.test.snap index e10b99110..846746aeb 100644 --- a/subworkflows/mlst/tests/main.nf.test.snap +++ b/subworkflows/mlst/tests/main.nf.test.snap @@ -11,7 +11,7 @@ }, "GCF_000017085.tsv:md5,c2faf73735d4ebc6fb0d8f4b263eb5b6", [ - "versions.yml:md5,feb26d507cd4d8f25033d4950ba463ee" + "versions.yml:md5,55b934f1c8a9ffdd523a01a6e4d87a5e" ], { "id": "mlst-MLST:CSVTK_CONCAT", @@ -25,7 +25,7 @@ "versions.yml:md5,082ad51a2f3d2c0b3a158586edc08efc" ] ], - "timestamp": "2026-04-29T11:19:20.491288912", + "timestamp": "2026-07-30T19:10:37.070143123", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/mlst/tests/nextflow.config b/subworkflows/mlst/tests/nextflow.config index 1d604e4c3..ed49e43ea 100644 --- a/subworkflows/mlst/tests/nextflow.config +++ b/subworkflows/mlst/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of MLST nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Multi-Locus Sequence Typing" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/mobsuite/tests/main.nf.test.snap b/subworkflows/mobsuite/tests/main.nf.test.snap index 402199b25..a736afb0f 100644 --- a/subworkflows/mobsuite/tests/main.nf.test.snap +++ b/subworkflows/mobsuite/tests/main.nf.test.snap @@ -26,7 +26,7 @@ "versions.yml:md5,e586a98fe29a48792ce661d2649ada18" ] ], - "timestamp": "2026-04-29T11:20:32.622459663", + "timestamp": "2026-07-30T19:11:47.082890937", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/mobsuite/tests/nextflow.config b/subworkflows/mobsuite/tests/nextflow.config index 16a0d65d6..bcfc8a60c 100644 --- a/subworkflows/mobsuite/tests/nextflow.config +++ b/subworkflows/mobsuite/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of MOBSUITE nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Reconstruct and annotate plasmids in draft assemblies" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/mykrobe/tests/main.nf.test b/subworkflows/mykrobe/tests/main.nf.test index 626d6c675..89cddbc0d 100644 --- a/subworkflows/mykrobe/tests/main.nf.test +++ b/subworkflows/mykrobe/tests/main.nf.test @@ -33,14 +33,18 @@ nextflow_workflow { { assert workflow.success }, { assert workflow.out.sample_outputs != null }, { assert workflow.out.run_outputs != null }, + // Reproducible outputs { assert snapshot( sample.meta, - sample.csv, - sample.json, sample.versions, run.meta, run.versions ).match() }, + // Non-reproducible outputs + { assert [ + sample.csv, + sample.json + ].every { path(it).exists() } }, { assert sample.results != null }, { assert run.csv != null }, { assert run.results != null } diff --git a/subworkflows/mykrobe/tests/main.nf.test.snap b/subworkflows/mykrobe/tests/main.nf.test.snap index e1f1021d9..0c5a4dcd0 100644 --- a/subworkflows/mykrobe/tests/main.nf.test.snap +++ b/subworkflows/mykrobe/tests/main.nf.test.snap @@ -10,8 +10,6 @@ "scope": "sample", "single_end": false }, - "SRR2838702.csv:md5,a27c093fe0789e56a7100d16ae757766", - "SRR2838702.json:md5,c27fd2ccc9ffc107511fa83ef4920897", [ "versions.yml:md5,0bb4264d1e075a8c456f1cb32275d24e" ], @@ -27,7 +25,7 @@ "versions.yml:md5,b61c6df6bd9d4c4092a94b7ebb604057" ] ], - "timestamp": "2026-04-29T11:19:25.950112659", + "timestamp": "2026-07-30T19:10:55.57576539", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/mykrobe/tests/nextflow.config b/subworkflows/mykrobe/tests/nextflow.config index 451a95599..328871eb7 100644 --- a/subworkflows/mykrobe/tests/nextflow.config +++ b/subworkflows/mykrobe/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of MYKROBE nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Antimicrobial resistance prediction" ext = "fastq" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/ncbigenomedownload/main.nf b/subworkflows/ncbigenomedownload/main.nf deleted file mode 100644 index 880ba1f4b..000000000 --- a/subworkflows/ncbigenomedownload/main.nf +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Download bacterial genomes from NCBI's RefSeq database. - * - * This subworkflow downloads complete and draft bacterial genomes using the - * [ncbi-genome-download](https://github.com/kblin/ncbi-genome-download) tool. It fetches - * genome assemblies in various formats including GenBank, GFF, and FASTA files - * along with associated annotation files and statistics. - * - * @status stable - * @keywords download, ncbi, refseq, genome, assembly, database - * @tags complexity:moderate input-type:single output-type:multiple features:resource-download,database-dependent - * @citation ncbigenomedownload - * - * @modules ncbigenomedownload as ncbigenomedownload_module - * - * @input accessions - * A file containing NCBI accession numbers, one per line. If empty, will download all genomes matching the specified criteria. - * - * @output sample_outputs - * - `gbff`: GenBank format genome sequences - * - `fna`: Genomic nucleotide sequences in FASTA format - * - `gff`: Genome annotations in GFF3 format - * - `faa`: Protein sequences in FASTA format - * - `gpff`: Protein sequences in GenPept format - * - `wgs_gbk`: WGS master records in GenBank format - * - `cds`: CDS nucleotide sequences in FASTA format - * - `rna`: RNA product sequences in FASTA format - * - `rna_fna`: RNA feature nucleotide sequences in FASTA format - * - `features`: Feature table with locations and attributes - * - `rm`: RepeatMasker output (optional) - * - `report`: Assembly report with unit and sequence relationships - * - `stats`: Assembly statistics - * - `accessions`: Generated accession list files - * @output bactopia_tools Downloaded files formatted for Bactopia Tools workflows - * - * @output run_outputs - * - * @output assemblies - * - `fna`: Individual downloaded assembly in FASTA format - * - * @output reference - * First downloaded assembly file for use as a reference genome - */ -nextflow.enable.types = true - -include { NCBIGENOMEDOWNLOAD as NCBIGENOMEDOWNLOAD_MODULE } from '../../modules/ncbigenomedownload/main' - -workflow NCBIGENOMEDOWNLOAD { - - take: - accessions: Path? - - main: - ch_ncbigenomedownload = NCBIGENOMEDOWNLOAD_MODULE(accessions) - ch_assemblies = ch_ncbigenomedownload.map { r -> r.results }.flatten().map { path -> - record(meta: record(id: file(path).getSimpleName()), fna: path) - } - ch_reference = ch_ncbigenomedownload.map { r -> r.results }.flatten().first() - - emit: // bactopia-lint: ignore S005, S010 - // Downstream inputs - assemblies = ch_assemblies - reference = ch_reference - // Published outputs - sample_outputs = ch_ncbigenomedownload - run_outputs = channel.empty() -} diff --git a/subworkflows/ncbigenomedownload/tests/main.nf.test b/subworkflows/ncbigenomedownload/tests/main.nf.test deleted file mode 100644 index 4d168632e..000000000 --- a/subworkflows/ncbigenomedownload/tests/main.nf.test +++ /dev/null @@ -1,35 +0,0 @@ -nextflow_workflow { - name "Test NCBIGENOMEDOWNLOAD Subworkflow" - script "../main.nf" - workflow "NCBIGENOMEDOWNLOAD" - tag "subworkflows" - tag "ncbigenomedownload" - - test("ncbigenomedownload - subworkflow - single accession") { - when { - params { - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - // Use a small genome for fast testing (requires internet access) - accession = "GCF_000292685.1" - format = "fasta" - keep_downloads = true - } - workflow { - """ - input[0] = null - """ - } - } - - then { - def sample = workflow.out.sample_outputs[0] - assertAll( - { assert workflow.success }, - { assert snapshot( - sample.meta, - sample.versions - ).match() } - ) - } - } -} diff --git a/subworkflows/ncbigenomedownload/tests/main.nf.test.snap b/subworkflows/ncbigenomedownload/tests/main.nf.test.snap deleted file mode 100644 index 67bc3b80c..000000000 --- a/subworkflows/ncbigenomedownload/tests/main.nf.test.snap +++ /dev/null @@ -1,25 +0,0 @@ -{ - "ncbigenomedownload - subworkflow - single accession": { - "content": [ - { - "accession": "GCF_000292685.1", - "id": "ncbigenomedownload", - "limit": null, - "logs_dir": "ncbigenomedownload/logs", - "name": "ncbigenomedownload", - "output_dir": "ncbigenomedownload", - "process_name": "ncbigenomedownload", - "scope": "run", - "species": null - }, - [ - "versions.yml:md5,6ecc191283714fbb0fbc752c9911bf44" - ] - ], - "timestamp": "2026-04-29T11:19:37.454604971", - "meta": { - "nf-test": "0.9.5", - "nextflow": "26.04.0" - } - } -} \ No newline at end of file diff --git a/subworkflows/ncbigenomedownload/tests/nextflow.config b/subworkflows/ncbigenomedownload/tests/nextflow.config deleted file mode 100644 index 9cda874af..000000000 --- a/subworkflows/ncbigenomedownload/tests/nextflow.config +++ /dev/null @@ -1,39 +0,0 @@ -// Minimal config for subworkflow-level testing of NCBIGENOMEDOWNLOAD -nextflow.enable.types = true -nextflow.enable.strict = true - -params { - workflow { - name = "ncbigenomedownload" - logo_name = "bactopia-tools" - description = "Download genomes from NCBI" - ext = "fna" - } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" - wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" -} - -// Load module configs for processes in this subworkflow -includeConfig "../../../modules/ncbigenomedownload/module.config" - -// Base config (container resolution + resource labels) -includeConfig "../../../conf/base.config" -includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/ngmaster/tests/main.nf.test.snap b/subworkflows/ngmaster/tests/main.nf.test.snap index 055ceb63b..ae147ca96 100644 --- a/subworkflows/ngmaster/tests/main.nf.test.snap +++ b/subworkflows/ngmaster/tests/main.nf.test.snap @@ -11,7 +11,7 @@ }, "GCF_001047255.tsv:md5,2be2b3dd6c45726d2a9d7f2540b34219", [ - "versions.yml:md5,dcc7b71de52c4fe65e10147be956aa05" + "versions.yml:md5,67ed215f25e8d088f830fb7d63ab9df5" ], { "id": "ngmaster-NGMASTER:CSVTK_CONCAT", @@ -25,7 +25,7 @@ "versions.yml:md5,9dbc0e8b7902e955ec10c94c11074f06" ] ], - "timestamp": "2026-04-29T11:19:44.012480256", + "timestamp": "2026-07-30T19:10:56.782220351", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/ngmaster/tests/nextflow.config b/subworkflows/ngmaster/tests/nextflow.config index d79cb5fb2..64927ecf1 100644 --- a/subworkflows/ngmaster/tests/nextflow.config +++ b/subworkflows/ngmaster/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of NGMASTER nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Multi-antigen sequence typing of Neisseria gonorrhoeae" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/nohuman/tests/main.nf.test.snap b/subworkflows/nohuman/tests/main.nf.test.snap index eb213570a..a1eec105d 100644 --- a/subworkflows/nohuman/tests/main.nf.test.snap +++ b/subworkflows/nohuman/tests/main.nf.test.snap @@ -12,10 +12,10 @@ "single_end": false }, [ - "versions.yml:md5,c7ccc6b38aecf3c08c8bc7c50814a452" + "versions.yml:md5,75d067d7ecc44ec6c90a321b8103c997" ] ], - "timestamp": "2026-04-29T11:24:05.709375483", + "timestamp": "2026-07-30T19:15:29.943725377", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/nohuman/tests/nextflow.config b/subworkflows/nohuman/tests/nextflow.config index 98c21cdf3..a36cf1ddf 100644 --- a/subworkflows/nohuman/tests/nextflow.config +++ b/subworkflows/nohuman/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of NOHUMAN nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Remove human reads from sequencing data" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for ALL processes used by this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/nohuman/download/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/panaroo/tests/main.nf.test.snap b/subworkflows/panaroo/tests/main.nf.test.snap index ef2b2c328..8f67e8061 100644 --- a/subworkflows/panaroo/tests/main.nf.test.snap +++ b/subworkflows/panaroo/tests/main.nf.test.snap @@ -10,10 +10,10 @@ "scope": "run" }, [ - "versions.yml:md5,6718c12232ea2c193a98b9723d0a2791" + "versions.yml:md5,0e38cb68a88a1a2911e751e9a8ffd648" ] ], - "timestamp": "2026-04-29T11:21:04.223957933", + "timestamp": "2026-07-30T19:12:37.415429867", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/panaroo/tests/nextflow.config b/subworkflows/panaroo/tests/nextflow.config index 2b2c5706f..4d4f3b047 100644 --- a/subworkflows/panaroo/tests/nextflow.config +++ b/subworkflows/panaroo/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of PANAROO nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Pan-genome analysis with error correction" ext = "gff" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -32,8 +19,3 @@ includeConfig "../../../modules/panaroo/run/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/pangenome/tests/main.nf.test.snap b/subworkflows/pangenome/tests/main.nf.test.snap index 76da74e4b..ac5f50a6d 100644 --- a/subworkflows/pangenome/tests/main.nf.test.snap +++ b/subworkflows/pangenome/tests/main.nf.test.snap @@ -10,7 +10,7 @@ "scope": "run" }, [ - "versions.yml:md5,5514295ba35a95ebb8417acd05766159" + "versions.yml:md5,709f42df442c9f6cc5132ad147bd334e" ], { "id": "core-genome.distance-snpdists", @@ -24,7 +24,7 @@ "versions.yml:md5,3d37a0edadfd11d1e7e95ff8201e7f2a" ] ], - "timestamp": "2026-04-29T11:21:06.006285694", + "timestamp": "2026-07-30T19:12:40.800419458", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/pangenome/tests/nextflow.config b/subworkflows/pangenome/tests/nextflow.config index 74a4728b3..19a2abfdf 100644 --- a/subworkflows/pangenome/tests/nextflow.config +++ b/subworkflows/pangenome/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of PANGENOME nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Pan-genome analysis with multiple tools" ext = "gff" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -35,8 +22,3 @@ includeConfig "../../../modules/snpdists/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/pasty/tests/main.nf.test b/subworkflows/pasty/tests/main.nf.test index ea932ec9e..d557e98ee 100644 --- a/subworkflows/pasty/tests/main.nf.test +++ b/subworkflows/pasty/tests/main.nf.test @@ -29,15 +29,19 @@ nextflow_workflow { { assert workflow.success }, { assert workflow.out.sample_outputs != null }, { assert workflow.out.run_outputs != null }, + // Reproducible outputs { assert snapshot( sample.meta, - sample.tsv, sample.blast, - sample.details, - sample.versions, run.meta, run.versions ).match() }, + // Non-reproducible outputs + { assert [ + sample.tsv, + sample.details + ].every { path(it).exists() } }, + { assert path(sample.versions[0]).text.contains('pasty') }, { assert sample.results != null }, { assert run.csv != null }, { assert run.results != null } diff --git a/subworkflows/pasty/tests/main.nf.test.snap b/subworkflows/pasty/tests/main.nf.test.snap index cd047518f..27e165302 100644 --- a/subworkflows/pasty/tests/main.nf.test.snap +++ b/subworkflows/pasty/tests/main.nf.test.snap @@ -9,12 +9,7 @@ "process_name": "pasty", "scope": "sample" }, - "GCF_000006765.tsv:md5,fdffd76c66ee57072cd5e8da474bba34", "GCF_000006765.blastn.tsv:md5,dcaf63876416cd5c19d868cfbf446258", - "GCF_000006765.details.tsv:md5,1215b1d8dd346836e07404c0a13c79f1", - [ - "versions.yml:md5,0356132ceb204ae511870a5e1fcb6d17" - ], { "id": "pasty-PASTY:CSVTK_CONCAT", "logs_dir": "merged-results/logs/pasty-concat/", @@ -27,7 +22,7 @@ "versions.yml:md5,d806f451289eb221f11075799712603e" ] ], - "timestamp": "2026-04-29T11:19:34.599267238", + "timestamp": "2026-07-30T19:11:28.31262834", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/pasty/tests/nextflow.config b/subworkflows/pasty/tests/nextflow.config index eec4f6c00..44ecfbbe7 100644 --- a/subworkflows/pasty/tests/nextflow.config +++ b/subworkflows/pasty/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of PASTY nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "In silico serogrouping of Pseudomonas aeruginosa" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/pbptyper/tests/main.nf.test b/subworkflows/pbptyper/tests/main.nf.test index a40e6f86a..61edf746a 100644 --- a/subworkflows/pbptyper/tests/main.nf.test +++ b/subworkflows/pbptyper/tests/main.nf.test @@ -29,14 +29,18 @@ nextflow_workflow { { assert workflow.success }, { assert workflow.out.sample_outputs != null }, { assert workflow.out.run_outputs != null }, + // Reproducible outputs { assert snapshot( sample.meta, - sample.tsv, sample.blast, - sample.versions, run.meta, run.versions ).match() }, + // Non-reproducible outputs + { assert [ + sample.tsv + ].every { path(it).exists() } }, + { assert path(sample.versions[0]).text.contains('pbptyper') }, { assert sample.results != null }, { assert run.csv != null }, { assert run.results != null } diff --git a/subworkflows/pbptyper/tests/main.nf.test.snap b/subworkflows/pbptyper/tests/main.nf.test.snap index 355d8e616..921044cab 100644 --- a/subworkflows/pbptyper/tests/main.nf.test.snap +++ b/subworkflows/pbptyper/tests/main.nf.test.snap @@ -9,11 +9,7 @@ "process_name": "pbptyper", "scope": "sample" }, - "GCF_001457635.tsv:md5,1a21879bdaf7aac85a1f4e0fb0e59989", "GCF_001457635.tblastn.tsv:md5,ce2247715df7d40f2ada2fe27e6c3967", - [ - "versions.yml:md5,47bb164e7435b20fe6e3e392e1bf06db" - ], { "id": "pbptyper-PBPTYPER:CSVTK_CONCAT", "logs_dir": "merged-results/logs/pbptyper-concat/", @@ -26,7 +22,7 @@ "versions.yml:md5,f52169fdc42464f8ece8fcb1e5591a18" ] ], - "timestamp": "2026-04-29T11:20:06.049259888", + "timestamp": "2026-07-30T19:12:11.60428864", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/pbptyper/tests/nextflow.config b/subworkflows/pbptyper/tests/nextflow.config index 53c7bbe6a..c7cdf49e8 100644 --- a/subworkflows/pbptyper/tests/nextflow.config +++ b/subworkflows/pbptyper/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of PBPTYPER nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "In silico PBP typing of Streptococcus pneumoniae" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/phispy/tests/main.nf.test.snap b/subworkflows/phispy/tests/main.nf.test.snap index 80d2771da..44377db50 100644 --- a/subworkflows/phispy/tests/main.nf.test.snap +++ b/subworkflows/phispy/tests/main.nf.test.snap @@ -10,7 +10,7 @@ "scope": "sample" }, [ - "versions.yml:md5,6487fa342391eda548b492a099ee91ed" + "versions.yml:md5,5e1425957e8a8025744f6a4d4dbb24cf" ], { "id": "phispy-PHISPY:CSVTK_CONCAT", @@ -24,7 +24,7 @@ "versions.yml:md5,07d57bb6615d099e188c1aad39da5c83" ] ], - "timestamp": "2026-04-29T11:21:53.943104496", + "timestamp": "2026-07-30T19:13:56.210712488", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/phispy/tests/nextflow.config b/subworkflows/phispy/tests/nextflow.config index 3623c73c4..9a05308f7 100644 --- a/subworkflows/phispy/tests/nextflow.config +++ b/subworkflows/phispy/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of PHISPY nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Prophage identification in bacterial genomes" ext = "gbk" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/pirate/tests/main.nf.test.snap b/subworkflows/pirate/tests/main.nf.test.snap index 6e0577624..67d1c9606 100644 --- a/subworkflows/pirate/tests/main.nf.test.snap +++ b/subworkflows/pirate/tests/main.nf.test.snap @@ -13,7 +13,7 @@ "versions.yml:md5,424257d69beae21355dee29eac16ca77" ] ], - "timestamp": "2026-04-29T11:22:26.662137554", + "timestamp": "2026-07-30T19:14:38.42119919", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/pirate/tests/nextflow.config b/subworkflows/pirate/tests/nextflow.config index 00b6ea0ff..4548d6cdd 100644 --- a/subworkflows/pirate/tests/nextflow.config +++ b/subworkflows/pirate/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of PIRATE nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Pangenome analysis and threshold evaluation" ext = "gff" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -32,8 +19,3 @@ includeConfig "../../../modules/pirate/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/plasmidfinder/tests/main.nf.test.snap b/subworkflows/plasmidfinder/tests/main.nf.test.snap index 7f075128a..83504d858 100644 --- a/subworkflows/plasmidfinder/tests/main.nf.test.snap +++ b/subworkflows/plasmidfinder/tests/main.nf.test.snap @@ -24,7 +24,7 @@ "versions.yml:md5,4f95221cf6912e60932c0c0c6982fba5" ] ], - "timestamp": "2026-04-29T11:19:45.384910888", + "timestamp": "2026-07-30T19:12:01.881148662", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/plasmidfinder/tests/nextflow.config b/subworkflows/plasmidfinder/tests/nextflow.config index 796f701a5..936b3573a 100644 --- a/subworkflows/plasmidfinder/tests/nextflow.config +++ b/subworkflows/plasmidfinder/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of PLASMIDFINDER nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Identification of plasmids in bacterial sequences" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/pneumocat/tests/main.nf.test.snap b/subworkflows/pneumocat/tests/main.nf.test.snap index a7a7fe895..2c83ab2fd 100644 --- a/subworkflows/pneumocat/tests/main.nf.test.snap +++ b/subworkflows/pneumocat/tests/main.nf.test.snap @@ -13,7 +13,7 @@ "versions.yml:md5,4c8b3e01e7425c78f2849d2e585f9cec" ] ], - "timestamp": "2026-04-29T11:20:04.755813798", + "timestamp": "2026-07-30T19:12:25.102986681", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/pneumocat/tests/nextflow.config b/subworkflows/pneumocat/tests/nextflow.config index 86597966f..719435be2 100644 --- a/subworkflows/pneumocat/tests/nextflow.config +++ b/subworkflows/pneumocat/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of PNEUMOCAT nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Pneumococcal capsular typing from reads" ext = "fastq" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -32,8 +19,3 @@ includeConfig "../../../modules/pneumocat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/prokka/tests/main.nf.test.snap b/subworkflows/prokka/tests/main.nf.test.snap index 70af7edae..505bbb25d 100644 --- a/subworkflows/prokka/tests/main.nf.test.snap +++ b/subworkflows/prokka/tests/main.nf.test.snap @@ -15,7 +15,7 @@ "versions.yml:md5,27f053a0892518f8b0fb60e2100e922e" ] ], - "timestamp": "2026-04-29T11:19:54.417731097", + "timestamp": "2026-07-30T19:12:14.800317482", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/prokka/tests/nextflow.config b/subworkflows/prokka/tests/nextflow.config index bc3a922dc..ce120e650 100644 --- a/subworkflows/prokka/tests/nextflow.config +++ b/subworkflows/prokka/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of PROKKA nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,9 @@ params { description = "Rapid prokaryotic genome annotation" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" + // Under nf-test, projectDir is this tests/ directory + bactopia_dir = "${projectDir}/../../.." wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -32,8 +21,3 @@ includeConfig "../../../modules/prokka/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/quast/tests/main.nf.test b/subworkflows/quast/tests/main.nf.test index 656e69b93..29934cab5 100644 --- a/subworkflows/quast/tests/main.nf.test +++ b/subworkflows/quast/tests/main.nf.test @@ -30,13 +30,15 @@ nextflow_workflow { { assert workflow.success }, { assert workflow.out.sample_outputs != null }, { assert workflow.out.run_outputs != null }, + // Reproducible outputs { assert snapshot( sample.meta, sample.tsv, - sample.versions, run.meta, run.versions ).match() }, + // Non-reproducible outputs + { assert path(sample.versions[0]).text.contains('quast') }, { assert sample.results != null }, { assert run.csv != null }, { assert run.results != null } diff --git a/subworkflows/quast/tests/main.nf.test.snap b/subworkflows/quast/tests/main.nf.test.snap index 726d4bfe4..64d852785 100644 --- a/subworkflows/quast/tests/main.nf.test.snap +++ b/subworkflows/quast/tests/main.nf.test.snap @@ -10,9 +10,6 @@ "scope": "sample" }, "SRR2838702.tsv:md5,a02f798379d9982810a198ec9b389079", - [ - "versions.yml:md5,83128d552544124c01b8b5502f773fc6" - ], { "id": "quast-QUAST:CSVTK_CONCAT", "logs_dir": "merged-results/logs/quast-concat/", @@ -25,7 +22,7 @@ "versions.yml:md5,f6625779099decc901ee6311371b1230" ] ], - "timestamp": "2026-04-29T11:19:50.023328945", + "timestamp": "2026-07-30T19:12:21.738672492", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/quast/tests/nextflow.config b/subworkflows/quast/tests/nextflow.config index ae879db4c..7801d8151 100644 --- a/subworkflows/quast/tests/nextflow.config +++ b/subworkflows/quast/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of QUAST nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Quality assessment of genome assemblies" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/rgi/tests/main.nf.test.snap b/subworkflows/rgi/tests/main.nf.test.snap index e7726ac15..5be6d52bd 100644 --- a/subworkflows/rgi/tests/main.nf.test.snap +++ b/subworkflows/rgi/tests/main.nf.test.snap @@ -9,9 +9,9 @@ "process_name": "rgi_main", "scope": "sample" }, - "GCF_900478275.tsv:md5,9d7754551163e020beed52a8bc14ce83", + "GCF_900478275.tsv:md5,9dd0afe6946da9c6608e775f954813a1", [ - "versions.yml:md5,4a19310417d04abb9e1eeec05629f944" + "versions.yml:md5,6a43ca3ba925940f762a035f862fc657" ], { "id": "rgi-RGI:CSVTK_CONCAT", @@ -25,7 +25,7 @@ "versions.yml:md5,c1294552ba205b057bd368875a4eac93" ] ], - "timestamp": "2026-04-29T11:20:52.07740056", + "timestamp": "2026-07-30T19:13:40.096773406", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/rgi/tests/nextflow.config b/subworkflows/rgi/tests/nextflow.config index 30f267901..53b8559f7 100644 --- a/subworkflows/rgi/tests/nextflow.config +++ b/subworkflows/rgi/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of RGI nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Resistance Gene Identifier" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -34,8 +21,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/roary/tests/main.nf.test.snap b/subworkflows/roary/tests/main.nf.test.snap index da8924638..f77af90cd 100644 --- a/subworkflows/roary/tests/main.nf.test.snap +++ b/subworkflows/roary/tests/main.nf.test.snap @@ -13,7 +13,7 @@ "versions.yml:md5,d5496a62b5ffe9e5af444bfc53221551" ] ], - "timestamp": "2026-04-29T11:21:14.562495592", + "timestamp": "2026-07-30T19:13:59.378067522", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/roary/tests/nextflow.config b/subworkflows/roary/tests/nextflow.config index f551f4674..08661b91a 100644 --- a/subworkflows/roary/tests/nextflow.config +++ b/subworkflows/roary/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of ROARY nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Rapid large-scale prokaryote pan genome analysis" ext = "gff" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -32,8 +19,3 @@ includeConfig "../../../modules/roary/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/sccmec/tests/main.nf.test b/subworkflows/sccmec/tests/main.nf.test index 7ecaf7869..483cfc21d 100644 --- a/subworkflows/sccmec/tests/main.nf.test +++ b/subworkflows/sccmec/tests/main.nf.test @@ -29,17 +29,21 @@ nextflow_workflow { { assert workflow.success }, { assert workflow.out.sample_outputs != null }, { assert workflow.out.run_outputs != null }, + // Reproducible outputs { assert snapshot( sample.meta, - sample.tsv, sample.targets, - sample.target_details, sample.regions, - sample.regions_details, - sample.versions, run.meta, run.versions ).match() }, + // Non-reproducible outputs + { assert [ + sample.tsv, + sample.target_details, + sample.regions_details + ].every { path(it).exists() } }, + { assert path(sample.versions[0]).text.contains('sccmec') }, { assert sample.results != null }, { assert run.csv != null }, { assert run.results != null } diff --git a/subworkflows/sccmec/tests/main.nf.test.snap b/subworkflows/sccmec/tests/main.nf.test.snap index 5ae0a6f61..bacc45455 100644 --- a/subworkflows/sccmec/tests/main.nf.test.snap +++ b/subworkflows/sccmec/tests/main.nf.test.snap @@ -9,14 +9,8 @@ "process_name": "sccmec", "scope": "sample" }, - "GCF_000017085.tsv:md5,da49131b3619e12fac7c1efef5e109d0", "GCF_000017085.targets.blastn.tsv:md5,5cd7054ed50c7d360feac0e51db54ac6", - "GCF_000017085.targets.details.tsv:md5,8938065005a5f984229c09cd4d9f91e2", "GCF_000017085.regions.blastn.tsv:md5,ca426de41052a9f0bdcfb538610e5aa6", - "GCF_000017085.regions.details.tsv:md5,d8568654b8455ddebf37283918805b46", - [ - "versions.yml:md5,cd9ded724580f921a03643bfaece66ee" - ], { "id": "sccmec-SCCMEC:CSVTK_CONCAT", "logs_dir": "merged-results/logs/sccmec-concat/", @@ -29,7 +23,7 @@ "versions.yml:md5,c6ede7b0533855a33c127cafa29de747" ] ], - "timestamp": "2026-04-29T11:20:09.177950088", + "timestamp": "2026-07-30T19:12:54.160041131", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/sccmec/tests/nextflow.config b/subworkflows/sccmec/tests/nextflow.config index 58d97b1be..469738434 100644 --- a/subworkflows/sccmec/tests/nextflow.config +++ b/subworkflows/sccmec/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of SCCMEC nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "SCCmec typing of Staphylococcus aureus" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/scoary/tests/main.nf.test.snap b/subworkflows/scoary/tests/main.nf.test.snap index 833cf8a38..f4ac6ca3e 100644 --- a/subworkflows/scoary/tests/main.nf.test.snap +++ b/subworkflows/scoary/tests/main.nf.test.snap @@ -13,7 +13,7 @@ "versions.yml:md5,36d9b366d4941f258a248bf7a31aecc7" ] ], - "timestamp": "2026-04-29T11:20:05.143988308", + "timestamp": "2026-07-30T19:12:49.541013549", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/scoary/tests/nextflow.config b/subworkflows/scoary/tests/nextflow.config index e529e369f..68bea521d 100644 --- a/subworkflows/scoary/tests/nextflow.config +++ b/subworkflows/scoary/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of SCOARY nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Pan-genome-wide association studies" ext = "csv" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -32,8 +19,3 @@ includeConfig "../../../modules/scoary/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/scrubber/main.nf b/subworkflows/scrubber/main.nf index 44a6168cb..ece173fe3 100644 --- a/subworkflows/scrubber/main.nf +++ b/subworkflows/scrubber/main.nf @@ -1,18 +1,18 @@ /** * Remove contaminant sequences from metagenomic data. * - * This subworkflow removes human and other contaminant sequences from metagenomic reads using either - * the [SRA Human Scrubber](https://github.com/ncbi/sra-human-scrubber) or [nohuman](https://github.com/mbhall88/nohuman) - * with the HPRC human database. It provides flexible contamination removal with detailed reporting - * and aggregates results across multiple samples. + * This subworkflow removes human and other contaminant sequences from metagenomic reads using + * [deacon](https://github.com/bede/deacon) (default), [nohuman](https://github.com/mbhall88/nohuman), + * or the [SRA Human Scrubber](https://github.com/ncbi/sra-human-scrubber). It provides flexible + * contamination removal with detailed reporting and aggregates results across multiple samples. * * @status stable * @keywords metagenomics, decontamination, human removal, read filtering * @tags complexity:moderate input-type:single output-type:multiple features:conditional-logic,aggregation - * @citation kraken2, srahumanscrubber + * @citation deacon, kraken2, srahumanscrubber * * @modules csvtk_concat - * @subworkflows srahumanscrubber, nohuman + * @subworkflows deacon, srahumanscrubber, nohuman * * @input record(meta, r1?, r2?, se?, lr?) * - `meta`: Groovy Record containing sample information @@ -22,10 +22,13 @@ * - `lr?`: Long reads (ONT/PacBio) * * @input use_srascrubber - * Boolean flag to choose between SRA Human Scrubber (true) or nohuman (false) for decontamination. + * Boolean flag to use SRA Human Scrubber for decontamination + * + * @input use_nohuman + * Boolean flag to use nohuman for decontamination * * @input nohuman_db - * Path to nohuman database directory or tarball (used when use_srascrubber is false) + * Path to nohuman database directory or tarball (used when use_nohuman is true) * * @input download_nohuman * Boolean flag to download the nohuman database instead of using the provided path @@ -33,6 +36,12 @@ * @input nohuman_save_as_tarball * Boolean flag to save downloaded nohuman database as tarball * + * @input deacon_db + * Path to deacon minimizer index file (.idx) (used when deacon is selected) + * + * @input download_deacon + * Boolean flag to download the deacon index instead of using the provided path + * * @output sample_outputs * - `special_meta`: Simplified metadata record for downstream report joining * - `r1?`: Scrubbed paired-end forward reads @@ -65,6 +74,7 @@ nextflow.enable.types = true include { SRAHUMANSCRUBBER } from '../srahumanscrubber/main' include { NOHUMAN } from '../nohuman/main' +include { DEACON } from '../deacon/main' include { CSVTK_CONCAT } from '../../modules/csvtk/concat/main' include { gatherCsvtk } from 'plugin/nf-bactopia' include { filterWithData } from 'plugin/nf-bactopia' @@ -73,22 +83,30 @@ workflow SCRUBBER { take: reads: Channel use_srascrubber: Boolean + use_nohuman: Boolean nohuman_db: Path? download_nohuman: Boolean nohuman_save_as_tarball: Boolean + deacon_db: Path? + download_deacon: Boolean main: ch_sample_outputs = channel.empty() ch_special_report = channel.empty() + ch_reads = filterWithData(reads, ['r1', 'r2', 'se', 'lr']) if (use_srascrubber) { - ch_srahumanscrubber = SRAHUMANSCRUBBER(reads) + ch_srahumanscrubber = SRAHUMANSCRUBBER(ch_reads) ch_sample_outputs = ch_srahumanscrubber.sample_outputs ch_special_report = ch_srahumanscrubber.sample_outputs.map { r -> record(special_meta: r.special_meta, scrub_report: r.scrub_report) } - } else { - ch_nohuman = NOHUMAN(reads, nohuman_db, download_nohuman, nohuman_save_as_tarball) + } else if (use_nohuman) { + ch_nohuman = NOHUMAN(ch_reads, nohuman_db, download_nohuman, nohuman_save_as_tarball) ch_sample_outputs = ch_nohuman.sample_outputs ch_special_report = ch_nohuman.sample_outputs.map { r -> record(special_meta: r.special_meta, scrub_report: r.scrub_report) } + } else { + ch_deacon = DEACON(ch_reads, deacon_db, download_deacon) + ch_sample_outputs = ch_deacon.sample_outputs + ch_special_report = ch_deacon.sample_outputs.map { r -> record(special_meta: r.special_meta, scrub_report: r.scrub_report) } } ch_csvtk_concat = CSVTK_CONCAT(gatherCsvtk(ch_sample_outputs, 'scrub_report', [name: 'scrubber']), 'tsv', 'tsv') diff --git a/subworkflows/scrubber/tests/main.nf.test b/subworkflows/scrubber/tests/main.nf.test index 93b6fc7f2..2db5a3253 100644 --- a/subworkflows/scrubber/tests/main.nf.test +++ b/subworkflows/scrubber/tests/main.nf.test @@ -5,7 +5,7 @@ nextflow_workflow { tag "subworkflows" tag "scrubber" - test("scrubber - subworkflow - SRR2838702") { + test("scrubber - subworkflow - SRR2838702 - nohuman") { when { params { test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" @@ -22,9 +22,61 @@ nextflow_workflow { ) ) input[1] = false - input[2] = file("${params.test_data_dir}/datasets/nohuman/HPRC.r2") - input[3] = false + input[2] = true + input[3] = file("${params.test_data_dir}/datasets/nohuman/HPRC.r2") input[4] = false + input[5] = false + input[6] = null + input[7] = false + """ + } + } + + then { + def sample = workflow.out.sample_outputs[0] + def run = workflow.out.run_outputs[0] + assertAll( + { assert workflow.success }, + { assert workflow.out.sample_outputs != null }, + { assert workflow.out.run_outputs != null }, + { assert workflow.out.scrubbed != null }, + { assert workflow.out.special_tsv != null }, + { assert snapshot( + sample.meta, + sample.versions, + run.meta, + run.versions + ).match() }, + { assert sample.scrub_report != null }, + { assert sample.results != null }, + { assert run.results != null } + ) + } + } + + test("scrubber - subworkflow - SRR2838702 - deacon") { + when { + params { + test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" + } + workflow { + """ + input[0] = Channel.of( + record( + meta: [name: "SRR2838702", runtype: "paired-end"], + r1: file("${params.test_data_dir}/species/portiera/reads/illumina/SRR2838702_R1.fastq.gz"), + r2: file("${params.test_data_dir}/species/portiera/reads/illumina/SRR2838702_R2.fastq.gz"), + se: null, + lr: null + ) + ) + input[1] = false + input[2] = false + input[3] = null + input[4] = false + input[5] = false + input[6] = file("${params.test_data_dir}/datasets/deacon/panhuman-1.idx") + input[7] = false """ } } diff --git a/subworkflows/scrubber/tests/main.nf.test.snap b/subworkflows/scrubber/tests/main.nf.test.snap index 9aadd8252..844812451 100644 --- a/subworkflows/scrubber/tests/main.nf.test.snap +++ b/subworkflows/scrubber/tests/main.nf.test.snap @@ -1,5 +1,5 @@ { - "scrubber - subworkflow - SRR2838702": { + "scrubber - subworkflow - SRR2838702 - nohuman": { "content": [ { "id": "SRR2838702-SCRUBBER:NOHUMAN:NOHUMAN_MODULE", @@ -12,7 +12,7 @@ "single_end": false }, [ - "versions.yml:md5,a8320e62273b53dca9cfffcb088d3ebb" + "versions.yml:md5,02561307297f583bd0d158052302fcf0" ], { "id": "scrubber-SCRUBBER:CSVTK_CONCAT", @@ -26,7 +26,40 @@ "versions.yml:md5,7c379989d6fecf5c9291326ac25be5e5" ] ], - "timestamp": "2026-04-29T11:25:01.657945097", + "timestamp": "2026-07-30T19:17:27.153424719", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + }, + "scrubber - subworkflow - SRR2838702 - deacon": { + "content": [ + { + "id": "SRR2838702-SCRUBBER:DEACON:DEACON_MODULE", + "logs_dir": "SRR2838702/tools/scrubber/logs/", + "name": "SRR2838702", + "output_dir": "SRR2838702/tools/scrubber", + "process_name": "deacon", + "runtype": "paired-end", + "scope": "sample", + "single_end": false + }, + [ + "versions.yml:md5,e07f44b8fe13644174f75b5cc7193f10" + ], + { + "id": "scrubber-SCRUBBER:CSVTK_CONCAT", + "logs_dir": "merged-results/logs/scrubber-concat/", + "name": "scrubber", + "output_dir": "merged-results", + "process_name": "scrubber-concat", + "scope": "run" + }, + [ + "versions.yml:md5,7c379989d6fecf5c9291326ac25be5e5" + ] + ], + "timestamp": "2026-07-30T19:17:56.811494688", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/scrubber/tests/nextflow.config b/subworkflows/scrubber/tests/nextflow.config index a4f739e9b..ac492ff12 100644 --- a/subworkflows/scrubber/tests/nextflow.config +++ b/subworkflows/scrubber/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of SCRUBBER nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Host read removal" ext = "fastq" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" // Nohuman params (used when use_srascrubber = false) nohuman_db = "${params.test_data_dir}/datasets/nohuman/HPRC.r2" @@ -36,13 +23,10 @@ includeConfig "../../../modules/srahumanscrubber/initdb/module.config" includeConfig "../../../modules/srahumanscrubber/scrub/module.config" includeConfig "../../../modules/nohuman/run/module.config" includeConfig "../../../modules/nohuman/download/module.config" +includeConfig "../../../modules/deacon/fetch/module.config" +includeConfig "../../../modules/deacon/filter/module.config" includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/seqsero2/tests/main.nf.test.snap b/subworkflows/seqsero2/tests/main.nf.test.snap index 7257097b6..bfa647db6 100644 --- a/subworkflows/seqsero2/tests/main.nf.test.snap +++ b/subworkflows/seqsero2/tests/main.nf.test.snap @@ -24,7 +24,7 @@ "versions.yml:md5,407bddfba34298df26d7fa5880a564e6" ] ], - "timestamp": "2026-04-29T11:20:11.602680544", + "timestamp": "2026-07-30T19:12:54.293196556", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/seqsero2/tests/nextflow.config b/subworkflows/seqsero2/tests/nextflow.config index 118a2f158..c2ec5e982 100644 --- a/subworkflows/seqsero2/tests/nextflow.config +++ b/subworkflows/seqsero2/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of SEQSERO2 nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Salmonella serotype determination" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/seroba/tests/main.nf.test.snap b/subworkflows/seroba/tests/main.nf.test.snap index e40f44c00..2474e5607 100644 --- a/subworkflows/seroba/tests/main.nf.test.snap +++ b/subworkflows/seroba/tests/main.nf.test.snap @@ -25,7 +25,7 @@ "versions.yml:md5,4fd4f724e2f19016eff39a2b524a9007" ] ], - "timestamp": "2026-04-29T11:21:01.497216213", + "timestamp": "2026-07-30T19:13:54.522408867", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/seroba/tests/nextflow.config b/subworkflows/seroba/tests/nextflow.config index 91bb0ea19..d90b833f5 100644 --- a/subworkflows/seroba/tests/nextflow.config +++ b/subworkflows/seroba/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of SEROBA nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Serotyping of Streptococcus pneumoniae from reads" ext = "fastq" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/shigapass/tests/main.nf.test.snap b/subworkflows/shigapass/tests/main.nf.test.snap index c18ff1eb2..27aaf0ae5 100644 --- a/subworkflows/shigapass/tests/main.nf.test.snap +++ b/subworkflows/shigapass/tests/main.nf.test.snap @@ -26,7 +26,7 @@ "versions.yml:md5,f481607e2b7526fd798b2375bb3cc9c4" ] ], - "timestamp": "2026-04-29T11:20:24.235477607", + "timestamp": "2026-07-30T19:13:15.113506712", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/shigapass/tests/nextflow.config b/subworkflows/shigapass/tests/nextflow.config index 09216b315..8e82f8766 100644 --- a/subworkflows/shigapass/tests/nextflow.config +++ b/subworkflows/shigapass/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of SHIGAPASS nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Shigella serotyping from assemblies" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/shigatyper/tests/main.nf.test.snap b/subworkflows/shigatyper/tests/main.nf.test.snap index 5d916f968..78ef9174f 100644 --- a/subworkflows/shigatyper/tests/main.nf.test.snap +++ b/subworkflows/shigatyper/tests/main.nf.test.snap @@ -26,7 +26,7 @@ "versions.yml:md5,c4954fe5c276fcd3b66857bacafa932e" ] ], - "timestamp": "2026-04-29T11:20:18.516664959", + "timestamp": "2026-07-30T19:13:22.196281372", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/shigatyper/tests/nextflow.config b/subworkflows/shigatyper/tests/nextflow.config index 384c44c5d..5b6b839b5 100644 --- a/subworkflows/shigatyper/tests/nextflow.config +++ b/subworkflows/shigatyper/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of SHIGATYPER nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Shigella serotyping from reads" ext = "fastq" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/shigeifinder/tests/main.nf.test.snap b/subworkflows/shigeifinder/tests/main.nf.test.snap index 6b196be3a..6e0763a13 100644 --- a/subworkflows/shigeifinder/tests/main.nf.test.snap +++ b/subworkflows/shigeifinder/tests/main.nf.test.snap @@ -25,7 +25,7 @@ "versions.yml:md5,bb067649d1cb0b7cc78ced0baa36bf0e" ] ], - "timestamp": "2026-04-29T11:20:18.806924242", + "timestamp": "2026-07-30T19:13:28.074432021", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/shigeifinder/tests/nextflow.config b/subworkflows/shigeifinder/tests/nextflow.config index d0ae8e0ee..b9af16118 100644 --- a/subworkflows/shigeifinder/tests/nextflow.config +++ b/subworkflows/shigeifinder/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of SHIGEIFINDER nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Shigella and EIEC serotype identification" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/sistr/tests/main.nf.test.snap b/subworkflows/sistr/tests/main.nf.test.snap index 9cf6f7154..5e8ccec03 100644 --- a/subworkflows/sistr/tests/main.nf.test.snap +++ b/subworkflows/sistr/tests/main.nf.test.snap @@ -24,7 +24,7 @@ "versions.yml:md5,683c9c1a0fff623520a6d84e3a7d0210" ] ], - "timestamp": "2026-04-29T11:20:54.656801118", + "timestamp": "2026-07-30T19:13:53.704450358", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/sistr/tests/nextflow.config b/subworkflows/sistr/tests/nextflow.config index fd7ee410c..a9e4ef673 100644 --- a/subworkflows/sistr/tests/nextflow.config +++ b/subworkflows/sistr/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of SISTR nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Serovar predictions for Salmonella species" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/snippy/core/tests/main.nf.test.snap b/subworkflows/snippy/core/tests/main.nf.test.snap index 4d86ae056..813d7cda2 100644 --- a/subworkflows/snippy/core/tests/main.nf.test.snap +++ b/subworkflows/snippy/core/tests/main.nf.test.snap @@ -25,7 +25,7 @@ "versions.yml:md5,8705955ac30d91d4bcce3b0571be3147" ] ], - "timestamp": "2026-04-29T11:20:33.46198183", + "timestamp": "2026-07-30T19:13:58.134716292", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/snippy/core/tests/nextflow.config b/subworkflows/snippy/core/tests/nextflow.config index 50f97a2c5..695be9b00 100644 --- a/subworkflows/snippy/core/tests/nextflow.config +++ b/subworkflows/snippy/core/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of SNIPPY_CORE nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Core SNP alignment from Snippy outputs" ext = "aln" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" // Module-specific defaults skip_compression = false @@ -36,8 +23,3 @@ includeConfig "../../../../modules/snpdists/module.config" // Base config (container resolution + resource labels) includeConfig "../../../../conf/base.config" includeConfig "../../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/snippy/run/tests/main.nf.test.snap b/subworkflows/snippy/run/tests/main.nf.test.snap index b08f68bf3..51d63773b 100644 --- a/subworkflows/snippy/run/tests/main.nf.test.snap +++ b/subworkflows/snippy/run/tests/main.nf.test.snap @@ -14,7 +14,7 @@ "versions.yml:md5,3a20f15dd89e01a265cbbae4bacd7f30" ] ], - "timestamp": "2026-04-29T11:21:00.828251895", + "timestamp": "2026-07-30T19:14:26.280572044", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/snippy/run/tests/nextflow.config b/subworkflows/snippy/run/tests/nextflow.config index 746334a74..ce42ee3cd 100644 --- a/subworkflows/snippy/run/tests/nextflow.config +++ b/subworkflows/snippy/run/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of SNIPPY nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Variant calling from reads against a reference" ext = "fastq" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" // Module-specific defaults skip_compression = false @@ -35,8 +22,3 @@ includeConfig "../../../../modules/snippy/run/module.config" // Base config (container resolution + resource labels) includeConfig "../../../../conf/base.config" includeConfig "../../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/snpdists/tests/main.nf.test.snap b/subworkflows/snpdists/tests/main.nf.test.snap index bfa2ca447..099e80537 100644 --- a/subworkflows/snpdists/tests/main.nf.test.snap +++ b/subworkflows/snpdists/tests/main.nf.test.snap @@ -14,7 +14,7 @@ "versions.yml:md5,b7c9ec6305cc1637c144c82ba20a94d6" ] ], - "timestamp": "2026-04-29T11:20:37.293805741", + "timestamp": "2026-07-30T19:13:55.920195882", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/snpdists/tests/nextflow.config b/subworkflows/snpdists/tests/nextflow.config index 125078bbb..70f3974fc 100644 --- a/subworkflows/snpdists/tests/nextflow.config +++ b/subworkflows/snpdists/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of SNPDISTS nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Pairwise SNP distance matrix from a FASTA alignment" ext = "aln" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -32,8 +19,3 @@ includeConfig "../../../modules/snpdists/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/spatyper/tests/main.nf.test.snap b/subworkflows/spatyper/tests/main.nf.test.snap index 0eb21b06b..2984f2d75 100644 --- a/subworkflows/spatyper/tests/main.nf.test.snap +++ b/subworkflows/spatyper/tests/main.nf.test.snap @@ -25,7 +25,7 @@ "versions.yml:md5,2be001b7db8743258dd915dfe57337f4" ] ], - "timestamp": "2026-04-29T11:20:47.919788605", + "timestamp": "2026-07-30T19:14:09.528299458", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/spatyper/tests/nextflow.config b/subworkflows/spatyper/tests/nextflow.config index 4b78174bd..b2e5d2b5f 100644 --- a/subworkflows/spatyper/tests/nextflow.config +++ b/subworkflows/spatyper/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of SPATYPER nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Computational typing of spa repeats" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/srahumanscrubber/tests/main.nf.test.snap b/subworkflows/srahumanscrubber/tests/main.nf.test.snap index 649ff5a41..3883e2f69 100644 --- a/subworkflows/srahumanscrubber/tests/main.nf.test.snap +++ b/subworkflows/srahumanscrubber/tests/main.nf.test.snap @@ -16,7 +16,7 @@ "versions.yml:md5,ca8ec5702526f2d59b7e3c5068c1c400" ] ], - "timestamp": "2026-04-29T11:21:28.474469716", + "timestamp": "2026-07-30T19:16:09.070609573", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/srahumanscrubber/tests/nextflow.config b/subworkflows/srahumanscrubber/tests/nextflow.config index 98c0e97a1..bef149551 100644 --- a/subworkflows/srahumanscrubber/tests/nextflow.config +++ b/subworkflows/srahumanscrubber/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of SRAHUMANSCRUBBER nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Host read removal using SRA Human Scrubber" ext = "fastq" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/srahumanscrubber/scrub/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/ssuissero/tests/main.nf.test.snap b/subworkflows/ssuissero/tests/main.nf.test.snap index f92a28e65..92ee4b54a 100644 --- a/subworkflows/ssuissero/tests/main.nf.test.snap +++ b/subworkflows/ssuissero/tests/main.nf.test.snap @@ -25,7 +25,7 @@ "versions.yml:md5,b273046b082dd70970b8f4e189aa5498" ] ], - "timestamp": "2026-04-29T11:20:47.810631649", + "timestamp": "2026-07-30T19:14:39.43459786", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/ssuissero/tests/nextflow.config b/subworkflows/ssuissero/tests/nextflow.config index 230885a5a..2fefd9e8d 100644 --- a/subworkflows/ssuissero/tests/nextflow.config +++ b/subworkflows/ssuissero/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of SSUISSERO nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Serotype prediction of Streptococcus suis" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/staphopiasccmec/tests/main.nf.test.snap b/subworkflows/staphopiasccmec/tests/main.nf.test.snap index 9d8d2d3b8..70a78ed97 100644 --- a/subworkflows/staphopiasccmec/tests/main.nf.test.snap +++ b/subworkflows/staphopiasccmec/tests/main.nf.test.snap @@ -25,7 +25,7 @@ "versions.yml:md5,f59d6534316ffe1998c60f98b212d80f" ] ], - "timestamp": "2026-04-29T11:20:51.447164522", + "timestamp": "2026-07-30T19:14:41.33671548", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/staphopiasccmec/tests/nextflow.config b/subworkflows/staphopiasccmec/tests/nextflow.config index f8782bcfa..85867db07 100644 --- a/subworkflows/staphopiasccmec/tests/nextflow.config +++ b/subworkflows/staphopiasccmec/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of STAPHOPIASCCMEC nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "SCCmec typing for Staphylococcus aureus" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/staphscan/main.nf b/subworkflows/staphscan/main.nf new file mode 100644 index 000000000..131af8d70 --- /dev/null +++ b/subworkflows/staphscan/main.nf @@ -0,0 +1,49 @@ +/** + * Genome-based surveillance analysis of Staphylococcus aureus. + * + * This subworkflow uses [StaphSCAN](https://github.com/riccabolla/StaphSCAN) to perform + * genome-based surveillance of *Staphylococcus aureus*, integrating species identification, + * MLST, *spa* typing, SCCmec typing, capsular typing, and detection of virulence, biofilm, + * and antimicrobial resistance genes. It processes each sample individually and aggregates + * the results into a single consolidated report. + * + * @status stable + * @keywords staphylococcus aureus, surveillance, mlst, spa typing, sccmec, amr, virulence + * @tags complexity:moderate input-type:single output-type:multiple features:aggregation + * @citation staphscan + * + * @modules csvtk_concat, staphscan + * + * @input record(meta, fna) + * - `meta`: Groovy Record containing sample information + * - `fna`: Assembled contigs in FASTA format + * + * @input db + * Custom MLST database directory + * + * @output sample_outputs + * - `tsv`: Per-sample surveillance summary with MLST, spa type, SCCmec, capsule, AGR, resistance, biofilm, and virulence results + * + * @output run_outputs + * - `csv`: A merged TSV file with staphscan results from all samples + */ +nextflow.enable.types = true + +include { STAPHSCAN as STAPHSCAN_MODULE } from '../../modules/staphscan/main' +include { CSVTK_CONCAT } from '../../modules/csvtk/concat/main' +include { gatherCsvtk } from 'plugin/nf-bactopia' + +workflow STAPHSCAN { + take: + fna: Channel + db: Path? + + main: + ch_staphscan = STAPHSCAN_MODULE(fna, db) + ch_csvtk_concat = CSVTK_CONCAT(gatherCsvtk(ch_staphscan, 'tsv', [name: 'staphscan']), 'tsv', 'tsv') + + emit: + // Published outputs + sample_outputs = ch_staphscan + run_outputs = ch_csvtk_concat +} diff --git a/subworkflows/staphscan/tests/.nftignore b/subworkflows/staphscan/tests/.nftignore new file mode 100644 index 000000000..7b276dee3 --- /dev/null +++ b/subworkflows/staphscan/tests/.nftignore @@ -0,0 +1,2 @@ +**/*.{err,log,stderr,stdout} +**/*.command.* diff --git a/subworkflows/staphscan/tests/main.nf.test b/subworkflows/staphscan/tests/main.nf.test new file mode 100644 index 000000000..29f3f4873 --- /dev/null +++ b/subworkflows/staphscan/tests/main.nf.test @@ -0,0 +1,46 @@ +nextflow_workflow { + name "Test STAPHSCAN Subworkflow" + script "../main.nf" + workflow "STAPHSCAN" + tag "subworkflows" + tag "staphscan" + + test("staphscan - subworkflow - GCF_000017085") { + when { + params { + test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" + } + workflow { + """ + input[0] = Channel.of( + record( + meta: [name: "GCF_000017085"], + fna: file("${params.test_data_dir}/species/staphylococcus_aureus/compressed/GCF_000017085/main/assembler/GCF_000017085.fna.gz") + ) + ) + input[1] = null + """ + } + } + + then { + def sample = workflow.out.sample_outputs[0] + def run = workflow.out.run_outputs[0] + assertAll( + { assert workflow.success }, + { assert workflow.out.sample_outputs != null }, + { assert workflow.out.run_outputs != null }, + { assert snapshot( + sample.meta, + sample.tsv, + sample.versions, + run.meta, + run.versions + ).match() }, + { assert sample.results != null }, + { assert run.csv != null }, + { assert run.results != null } + ) + } + } +} diff --git a/subworkflows/staphscan/tests/main.nf.test.snap b/subworkflows/staphscan/tests/main.nf.test.snap new file mode 100644 index 000000000..1ffe48e82 --- /dev/null +++ b/subworkflows/staphscan/tests/main.nf.test.snap @@ -0,0 +1,34 @@ +{ + "staphscan - subworkflow - GCF_000017085": { + "content": [ + { + "id": "GCF_000017085-STAPHSCAN:STAPHSCAN_MODULE", + "logs_dir": "GCF_000017085/tools/staphscan//logs/", + "name": "GCF_000017085", + "output_dir": "GCF_000017085/tools/staphscan/", + "process_name": "staphscan", + "scope": "sample" + }, + "GCF_000017085.tsv:md5,f13bc8d8aba4cf0f801e04a8d6148e1e", + [ + "versions.yml:md5,794f66edfdb0127b7c9b08a1bb6d3231" + ], + { + "id": "staphscan-STAPHSCAN:CSVTK_CONCAT", + "logs_dir": "merged-results/logs/staphscan-concat/", + "name": "staphscan", + "output_dir": "merged-results", + "process_name": "staphscan-concat", + "scope": "run" + }, + [ + "versions.yml:md5,3848bf66b301b2b06d040f81eaac7e9b" + ] + ], + "timestamp": "2026-07-30T19:14:53.926203839", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + } +} \ No newline at end of file diff --git a/subworkflows/staphscan/tests/nextflow.config b/subworkflows/staphscan/tests/nextflow.config new file mode 100644 index 000000000..ad0f82bf6 --- /dev/null +++ b/subworkflows/staphscan/tests/nextflow.config @@ -0,0 +1,22 @@ +// Minimal config for subworkflow-level testing of STAPHSCAN +nextflow.enable.types = true +nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" + +params { + workflow { + name = "staphscan" + logo_name = "bactopia-tools" + description = "Genome-based surveillance analysis of Staphylococcus aureus" + ext = "fna" + } + wf = params.workflow.name +} + +// Load module configs for processes in this subworkflow +includeConfig "../../../modules/staphscan/module.config" +includeConfig "../../../modules/csvtk/concat/module.config" + +// Base config (container resolution + resource labels) +includeConfig "../../../conf/base.config" +includeConfig "../../../conf/profiles.config" diff --git a/subworkflows/staphscan/tests/nf-test.config b/subworkflows/staphscan/tests/nf-test.config new file mode 100644 index 000000000..1f765f697 --- /dev/null +++ b/subworkflows/staphscan/tests/nf-test.config @@ -0,0 +1,11 @@ +config { + testsDir "." + workDir System.getenv("NFT_WORKDIR") ?: ".nf-test" + configFile "nextflow.config" + profile "docker" + options "--is_ci --max_memory 8.GB" + + plugins { + load "nft-utils@0.0.5" + } +} diff --git a/subworkflows/staphtyper/main.nf b/subworkflows/staphtyper/main.nf index 72177699c..3340b59e1 100644 --- a/subworkflows/staphtyper/main.nf +++ b/subworkflows/staphtyper/main.nf @@ -1,18 +1,19 @@ /** - * Determine the agr, spa and SCCmec types for _Staphylococcus aureus_ genomes. + * Determine the agr, spa, SCCmec types and perform genome-based surveillance for _Staphylococcus aureus_ genomes. * * This subworkflow performs comprehensive typing of *Staphylococcus aureus* genomes by * determining the agr locus type using [AgrVATE](https://github.com/VishnuRaghuram94/AgrVATE), - * spa repeat type using [spaTyper](https://github.com/HCGB-IGTP/spaTyper), and SCCmec element - * type using SCCmec typing. It combines results from multiple typing methods to provide - * a complete characterization of *S. aureus* strains. + * spa repeat type using [spaTyper](https://github.com/HCGB-IGTP/spaTyper), SCCmec element + * type using SCCmec typing, and genome-based surveillance using + * [StaphSCAN](https://github.com/riccabolla/StaphSCAN). It combines results from multiple + * typing and surveillance methods to provide a complete characterization of *S. aureus* strains. * * @status stable - * @keywords staphylococcus aureus, agr typing, spa typing, sccmec, strain characterization + * @keywords staphylococcus aureus, agr typing, spa typing, sccmec, surveillance, strain characterization * @tags complexity:moderate input-type:multiple output-type:multiple features:aggregation,database-dependent - * @citation agrvate, spatyper, sccmec + * @citation agrvate, sccmec, spatyper, staphscan * - * @subworkflows agrvate, spatyper, sccmec + * @subworkflows agrvate, sccmec, spatyper, staphscan * * @input record(meta, assembly) * - `meta`: Groovy Record containing sample information @@ -24,6 +25,9 @@ * @input repeat_order * Optional spa repeat order file for improved spa typing * + * @input staphscan_db_mlst + * Custom MLST database directory for StaphSCAN (optional) + * * @output sample_outputs * * @output run_outputs @@ -31,15 +35,17 @@ */ nextflow.enable.types = true -include { AGRVATE } from '../agrvate/main' -include { SPATYPER } from '../spatyper/main' -include { SCCMEC } from '../sccmec/main' +include { AGRVATE } from '../agrvate/main' +include { SPATYPER } from '../spatyper/main' +include { SCCMEC } from '../sccmec/main' +include { STAPHSCAN } from '../staphscan/main' workflow STAPHTYPER { take: assembly: Channel repeats: Path? repeat_order: Path? + staphscan_db_mlst: Path? main: // agrvate - agr locus type and agr operon variants @@ -51,8 +57,11 @@ workflow STAPHTYPER { // sccmec - SCCmec type based on targets and full cassettes ch_sccmec = SCCMEC(assembly) + // staphscan - genome-based surveillance + ch_staphscan = STAPHSCAN(assembly, staphscan_db_mlst) + emit: // Published outputs - sample_outputs = ch_agrvate.sample_outputs.mix(ch_spatyper.sample_outputs, ch_sccmec.sample_outputs) - run_outputs = ch_agrvate.run_outputs.mix(ch_spatyper.run_outputs, ch_sccmec.run_outputs) + sample_outputs = ch_agrvate.sample_outputs.mix(ch_sccmec.sample_outputs, ch_spatyper.sample_outputs, ch_staphscan.sample_outputs) + run_outputs = ch_agrvate.run_outputs.mix(ch_sccmec.run_outputs, ch_spatyper.run_outputs, ch_staphscan.run_outputs) } diff --git a/subworkflows/staphtyper/tests/main.nf.test b/subworkflows/staphtyper/tests/main.nf.test index 7d2adee99..97a08e61d 100644 --- a/subworkflows/staphtyper/tests/main.nf.test +++ b/subworkflows/staphtyper/tests/main.nf.test @@ -20,6 +20,7 @@ nextflow_workflow { ) input[1] = null input[2] = null + input[3] = null """ } } diff --git a/subworkflows/staphtyper/tests/nextflow.config b/subworkflows/staphtyper/tests/nextflow.config index 13d1016ea..46534c66a 100644 --- a/subworkflows/staphtyper/tests/nextflow.config +++ b/subworkflows/staphtyper/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of STAPHTYPER nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,34 +10,16 @@ params { description = "S. aureus typing (agrvate + spatyper + sccmec)" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow includeConfig "../../../modules/agrvate/module.config" includeConfig "../../../modules/spatyper/module.config" includeConfig "../../../modules/sccmec/module.config" +includeConfig "../../../modules/staphscan/module.config" includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/stecfinder/main.nf b/subworkflows/stecfinder/main.nf index e893afd5b..912641ac0 100644 --- a/subworkflows/stecfinder/main.nf +++ b/subworkflows/stecfinder/main.nf @@ -38,7 +38,12 @@ workflow STECFINDER { seqs: Channel main: - ch_stecfinder = STECFINDER_MODULE(seqs) + // If user passes --stecfinder_use_reads, we have to filter out any samples without reads. + def ch_seqs = (params.stecfinder_use_reads + ? seqs.filter { r -> [r.r1, r.r2, r.se, r.lr].any { seq -> seq != null } } + : seqs + ).map { r -> record(meta: r.meta, fna: r.fna, r1: r.r1, r2: r.r2, se: r.se, lr: r.lr) } + ch_stecfinder = STECFINDER_MODULE(ch_seqs) ch_csvtk_concat = CSVTK_CONCAT(gatherCsvtk(ch_stecfinder, 'tsv', [name: 'stecfinder']), 'tsv', 'tsv') emit: diff --git a/subworkflows/stecfinder/tests/main.nf.test b/subworkflows/stecfinder/tests/main.nf.test index d28972ccb..988367576 100644 --- a/subworkflows/stecfinder/tests/main.nf.test +++ b/subworkflows/stecfinder/tests/main.nf.test @@ -46,4 +46,43 @@ nextflow_workflow { ) } } + + test("stecfinder - subworkflow - reads mode drops read-less samples") { + when { + params { + test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" + stecfinder_use_reads = true + } + workflow { + """ + input[0] = Channel.of( + record( + meta: [name: "GCF_002949675"], + fna: file("${params.test_data_dir}/species/shigella_dysenteriae/assembly/GCF_002949675/main/assembler/GCF_002949675.fna.gz"), + r1: file("${params.test_data_dir}/species/shigella_dysenteriae/reads/ERR6005894/main/qc/ERR6005894_R1.fastq.gz"), + r2: file("${params.test_data_dir}/species/shigella_dysenteriae/reads/ERR6005894/main/qc/ERR6005894_R2.fastq.gz"), + se: null, + lr: null + ), + record( + meta: [name: "NOREADS"], + fna: file("${params.test_data_dir}/species/shigella_dysenteriae/assembly/GCF_002949675/main/assembler/GCF_002949675.fna.gz"), + r1: null, + r2: null, + se: null, + lr: null + ) + ) + """ + } + } + + then { + assertAll( + { assert workflow.success }, + { assert workflow.out.sample_outputs.size() == 1 }, + { assert workflow.out.sample_outputs[0].meta.name == "GCF_002949675" } + ) + } + } } diff --git a/subworkflows/stecfinder/tests/main.nf.test.snap b/subworkflows/stecfinder/tests/main.nf.test.snap index 2675535b1..202c52d51 100644 --- a/subworkflows/stecfinder/tests/main.nf.test.snap +++ b/subworkflows/stecfinder/tests/main.nf.test.snap @@ -25,7 +25,7 @@ "versions.yml:md5,a4e0bfe59670d712011a3dc00f3abeb5" ] ], - "timestamp": "2026-04-29T11:20:57.771873873", + "timestamp": "2026-07-31T13:21:44.075556482", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/stecfinder/tests/nextflow.config b/subworkflows/stecfinder/tests/nextflow.config index e0f76c23d..59b6f6f6a 100644 --- a/subworkflows/stecfinder/tests/nextflow.config +++ b/subworkflows/stecfinder/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of STECFINDER nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "STEC serotyping and virulence detection" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/stxtyper/main.nf b/subworkflows/stxtyper/main.nf new file mode 100644 index 000000000..9a11d344d --- /dev/null +++ b/subworkflows/stxtyper/main.nf @@ -0,0 +1,43 @@ +/** + * Identify and type Stx operons from assembled genomic sequences + * + * This subworkflow uses [StxTyper](https://github.com/ncbi/stxtyper) to identify and type stx operons from assembled genomic sequences. + * It processes each sample individually and aggregates the results into + * a single consolidated report. + * + * @status stable + * @keywords stx, shiga toxin, typing, stec, virulence + * @tags complexity:moderate input-type:single output-type:multiple features:aggregation + * @citation stxtyper + * + * @modules csvtk_concat, stxtyper + * + * @input record(meta, fna) + * - `meta`: Groovy Record containing sample information + * - `fna`: Assembled contigs in FASTA format + * + * @output sample_outputs + * - `tsv`: Tab-delimited Stx operon typing results + * + * @output run_outputs + * - `csv`: A merged TSV file with stxtyper results from all samples + */ +nextflow.enable.types = true + +include { STXTYPER as STXTYPER_MODULE } from '../../modules/stxtyper/main' +include { CSVTK_CONCAT } from '../../modules/csvtk/concat/main' +include { gatherCsvtk } from 'plugin/nf-bactopia' + +workflow STXTYPER { + take: + fna: Channel + + main: + ch_stxtyper = STXTYPER_MODULE(fna) + ch_csvtk_concat = CSVTK_CONCAT(gatherCsvtk(ch_stxtyper, 'tsv', [name: 'stxtyper']), 'tsv', 'tsv') + + emit: + // Published outputs + sample_outputs = ch_stxtyper + run_outputs = ch_csvtk_concat +} diff --git a/subworkflows/stxtyper/tests/.nftignore b/subworkflows/stxtyper/tests/.nftignore new file mode 100644 index 000000000..7b276dee3 --- /dev/null +++ b/subworkflows/stxtyper/tests/.nftignore @@ -0,0 +1,2 @@ +**/*.{err,log,stderr,stdout} +**/*.command.* diff --git a/subworkflows/stxtyper/tests/main.nf.test b/subworkflows/stxtyper/tests/main.nf.test new file mode 100644 index 000000000..cfec066a4 --- /dev/null +++ b/subworkflows/stxtyper/tests/main.nf.test @@ -0,0 +1,45 @@ +nextflow_workflow { + name "Test STXTYPER Subworkflow" + script "../main.nf" + workflow "STXTYPER" + tag "subworkflows" + tag "stxtyper" + + test("stxtyper - subworkflow - GCF_001695515") { + when { + params { + test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" + } + workflow { + """ + input[0] = Channel.of( + record( + meta: [name: "GCF_001695515"], + fna: file("${params.test_data_dir}/species/escherichia_coli/compressed/GCF_001695515/main/assembler/GCF_001695515.fna.gz") + ) + ) + """ + } + } + + then { + def sample = workflow.out.sample_outputs[0] + def run = workflow.out.run_outputs[0] + assertAll( + { assert workflow.success }, + { assert workflow.out.sample_outputs != null }, + { assert workflow.out.run_outputs != null }, + { assert snapshot( + sample.meta, + sample.tsv, + sample.versions, + run.meta, + run.versions + ).match() }, + { assert sample.results != null }, + { assert run.csv != null }, + { assert run.results != null } + ) + } + } +} diff --git a/subworkflows/stxtyper/tests/main.nf.test.snap b/subworkflows/stxtyper/tests/main.nf.test.snap new file mode 100644 index 000000000..627b22eed --- /dev/null +++ b/subworkflows/stxtyper/tests/main.nf.test.snap @@ -0,0 +1,34 @@ +{ + "stxtyper - subworkflow - GCF_001695515": { + "content": [ + { + "id": "GCF_001695515-STXTYPER:STXTYPER_MODULE", + "logs_dir": "GCF_001695515/tools/stxtyper//logs/", + "name": "GCF_001695515", + "output_dir": "GCF_001695515/tools/stxtyper/", + "process_name": "stxtyper", + "scope": "sample" + }, + "GCF_001695515.tsv:md5,001feff7db6e3fad984fdc36327122cc", + [ + "versions.yml:md5,32d442d87815f24b2b14886add947195" + ], + { + "id": "stxtyper-STXTYPER:CSVTK_CONCAT", + "logs_dir": "merged-results/logs/stxtyper-concat/", + "name": "stxtyper", + "output_dir": "merged-results", + "process_name": "stxtyper-concat", + "scope": "run" + }, + [ + "versions.yml:md5,3eac79f1285e1d758e61e2f98bc6a78c" + ] + ], + "timestamp": "2026-07-30T19:15:08.802639631", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + } +} \ No newline at end of file diff --git a/subworkflows/stxtyper/tests/nextflow.config b/subworkflows/stxtyper/tests/nextflow.config new file mode 100644 index 000000000..65152df7f --- /dev/null +++ b/subworkflows/stxtyper/tests/nextflow.config @@ -0,0 +1,22 @@ +// Minimal config for subworkflow-level testing of STXTYPER +nextflow.enable.types = true +nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" + +params { + workflow { + name = "stxtyper" + logo_name = "bactopia-tools" + description = "Identify and type Stx operons from assembled genomic sequences" + ext = "fna" + } + wf = params.workflow.name +} + +// Load module configs for processes in this subworkflow +includeConfig "../../../modules/stxtyper/module.config" +includeConfig "../../../modules/csvtk/concat/module.config" + +// Base config (container resolution + resource labels) +includeConfig "../../../conf/base.config" +includeConfig "../../../conf/profiles.config" diff --git a/subworkflows/stxtyper/tests/nf-test.config b/subworkflows/stxtyper/tests/nf-test.config new file mode 100644 index 000000000..1f765f697 --- /dev/null +++ b/subworkflows/stxtyper/tests/nf-test.config @@ -0,0 +1,11 @@ +config { + testsDir "." + workDir System.getenv("NFT_WORKDIR") ?: ".nf-test" + configFile "nextflow.config" + profile "docker" + options "--is_ci --max_memory 8.GB" + + plugins { + load "nft-utils@0.0.5" + } +} diff --git a/subworkflows/sylph/tests/main.nf.test.snap b/subworkflows/sylph/tests/main.nf.test.snap index 20c2c6642..75906bfbb 100644 --- a/subworkflows/sylph/tests/main.nf.test.snap +++ b/subworkflows/sylph/tests/main.nf.test.snap @@ -15,7 +15,7 @@ "versions.yml:md5,2a85d1cd25d2a88c77d90030e05e17cf" ] ], - "timestamp": "2026-04-29T11:22:08.970225804", + "timestamp": "2026-07-30T19:16:19.889738558", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/sylph/tests/nextflow.config b/subworkflows/sylph/tests/nextflow.config index 048901603..bd6bae64c 100644 --- a/subworkflows/sylph/tests/nextflow.config +++ b/subworkflows/sylph/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of SYLPH nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Ultra-fast taxonomic profiling" ext = "fastq" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/tblastn/tests/main.nf.test.snap b/subworkflows/tblastn/tests/main.nf.test.snap index 964fa6242..30518cfb7 100644 --- a/subworkflows/tblastn/tests/main.nf.test.snap +++ b/subworkflows/tblastn/tests/main.nf.test.snap @@ -25,7 +25,7 @@ "versions.yml:md5,413650f494aaf14a524501ce6dc5c959" ] ], - "timestamp": "2026-04-29T11:20:57.898688227", + "timestamp": "2026-07-30T19:15:20.703520807", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/tblastn/tests/nextflow.config b/subworkflows/tblastn/tests/nextflow.config index 7f163b904..e2d33ff9f 100644 --- a/subworkflows/tblastn/tests/nextflow.config +++ b/subworkflows/tblastn/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of TBLASTN nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "BLAST tblastn search" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/tblastx/tests/main.nf.test.snap b/subworkflows/tblastx/tests/main.nf.test.snap index 7220bd41d..bc384691c 100644 --- a/subworkflows/tblastx/tests/main.nf.test.snap +++ b/subworkflows/tblastx/tests/main.nf.test.snap @@ -25,7 +25,7 @@ "versions.yml:md5,8ebdf55bc992d797630ad6f81b6cbe3d" ] ], - "timestamp": "2026-04-29T11:21:01.772173648", + "timestamp": "2026-07-30T19:15:26.801611766", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/tblastx/tests/nextflow.config b/subworkflows/tblastx/tests/nextflow.config index 8978c25ee..f02ff2e5a 100644 --- a/subworkflows/tblastx/tests/nextflow.config +++ b/subworkflows/tblastx/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of TBLASTX nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "BLAST tblastx search" ext = "fna" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/csvtk/concat/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/tbprofiler/tests/main.nf.test.snap b/subworkflows/tbprofiler/tests/main.nf.test.snap index a55e9c93a..831b151c5 100644 --- a/subworkflows/tbprofiler/tests/main.nf.test.snap +++ b/subworkflows/tbprofiler/tests/main.nf.test.snap @@ -25,7 +25,7 @@ "versions.yml:md5,d1d08404b1d56899be9ae1cf3c3aff3e" ] ], - "timestamp": "2026-04-29T11:22:01.745237267", + "timestamp": "2026-07-30T19:16:24.652824615", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/tbprofiler/tests/nextflow.config b/subworkflows/tbprofiler/tests/nextflow.config index 477b5bdf7..dae8ea1b8 100644 --- a/subworkflows/tbprofiler/tests/nextflow.config +++ b/subworkflows/tbprofiler/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of TBPROFILER nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Profiling of Mycobacterium tuberculosis" ext = "fastq" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -33,8 +20,3 @@ includeConfig "../../../modules/tbprofiler/collate/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/teton/main.nf b/subworkflows/teton/main.nf index 21192d76b..963be1584 100644 --- a/subworkflows/teton/main.nf +++ b/subworkflows/teton/main.nf @@ -13,7 +13,7 @@ * @status stable * @keywords metagenomics, taxonomy, classification, kraken, bracken, genome size * @tags complexity:complex input-type:single output-type:multiple features:aggregation,database-dependent,conditional-logic - * @citation kraken2, bracken + * @citation deacon, kraken2, bracken * * @modules bactopia_teton, csvtk_join, csvtk_concat * @subworkflows scrubber, bracken @@ -31,6 +31,24 @@ * @input use_srascrubber * Boolean flag to use SRA scrubber for host read removal * + * @input use_nohuman + * Boolean flag to use nohuman for host read removal + * + * @input nohuman_db + * Path to nohuman database directory or tarball + * + * @input download_nohuman + * Boolean flag to download the nohuman database + * + * @input nohuman_save_as_tarball + * Boolean flag to save downloaded nohuman database as tarball + * + * @input deacon_db + * Path to deacon minimizer index file (.idx) + * + * @input download_deacon + * Boolean flag to download the deacon index + * * @output sample_outputs * * @output run_outputs @@ -53,13 +71,16 @@ workflow TETON { reads: Channel db: Path? use_srascrubber: Boolean + use_nohuman: Boolean nohuman_db: Path? download_nohuman: Boolean nohuman_save_as_tarball: Boolean + deacon_db: Path? + download_deacon: Boolean main: // Remove host reads - ch_scrubber = SCRUBBER(reads, use_srascrubber, nohuman_db, download_nohuman, nohuman_save_as_tarball) + ch_scrubber = SCRUBBER(reads, use_srascrubber, use_nohuman, nohuman_db, download_nohuman, nohuman_save_as_tarball, deacon_db, download_deacon) // Taxon Classification & Abundance ch_bracken = BRACKEN(ch_scrubber.scrubbed, db) diff --git a/subworkflows/teton/tests/main.nf.test b/subworkflows/teton/tests/main.nf.test index aae8ce84e..58465aa45 100644 --- a/subworkflows/teton/tests/main.nf.test +++ b/subworkflows/teton/tests/main.nf.test @@ -23,9 +23,12 @@ nextflow_workflow { ) input[1] = file("${params.test_data_dir}/datasets/kraken2/k2_standard_08_GB_20251015") input[2] = false - input[3] = file("${params.test_data_dir}/datasets/nohuman/HPRC.r2") - input[4] = false + input[3] = true + input[4] = file("${params.test_data_dir}/datasets/nohuman/HPRC.r2") input[5] = false + input[6] = false + input[7] = null + input[8] = false """ } } @@ -38,12 +41,14 @@ nextflow_workflow { { assert workflow.success }, { assert workflow.out.sample_outputs != null }, { assert workflow.out.run_outputs != null }, + // Reproducible outputs { assert snapshot( scrubber.meta, scrubber.versions, - bracken.meta, - bracken.versions + bracken.meta ).match() }, + // Non-reproducible outputs + { assert path(bracken.versions[0]).text.contains('bracken') }, { assert scrubber.results != null }, { assert bracken.results != null } ) diff --git a/subworkflows/teton/tests/main.nf.test.snap b/subworkflows/teton/tests/main.nf.test.snap index b73729afc..88a1c8ce7 100644 --- a/subworkflows/teton/tests/main.nf.test.snap +++ b/subworkflows/teton/tests/main.nf.test.snap @@ -12,7 +12,7 @@ "single_end": false }, [ - "versions.yml:md5,0e919355c3b46201c37e019227934b1b" + "versions.yml:md5,14feb3b47ba66dc6b247bdd7debcc18c" ], { "id": "SRR2838702-TETON:BRACKEN:BRACKEN_MODULE", @@ -23,12 +23,9 @@ "scope": "sample", "single_end": false, "teton_reads": "SRR2838702_R1.scrubbed.fastq.gz,SRR2838702_R2.scrubbed.fastq.gz" - }, - [ - "versions.yml:md5,8dc4d8979e0dba7fc7b975f9953a3161" - ] + } ], - "timestamp": "2026-04-29T11:30:25.229414267", + "timestamp": "2026-07-30T19:21:55.28532386", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/subworkflows/teton/tests/nextflow.config b/subworkflows/teton/tests/nextflow.config index fb1c18aaa..71448a8c9 100644 --- a/subworkflows/teton/tests/nextflow.config +++ b/subworkflows/teton/tests/nextflow.config @@ -1,6 +1,7 @@ // Minimal config for subworkflow-level testing of TETON nextflow.enable.types = true nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" params { workflow { @@ -9,21 +10,7 @@ params { description = "Meta-analysis of reads" ext = "fastq" } - bactopia_version = '4.0.0' - bactopia_cache = System.getenv("BACTOPIA_CACHEDIR") ?: "${System.getenv('HOME')}/.bactopia" - condadir = "${params.bactopia_cache}/conda" wf = params.workflow.name - merge_folder = "merged-results" - test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" - is_ci = true - max_retry = 1 - max_time = 2.h - max_memory = 8.GB - max_cpus = 2 - registry = "quay.io" - singularity_cache = "${params.bactopia_cache}/singularity" - singularity_pull_docker_container = false - container_opts = "" } // Load module configs for processes in this subworkflow @@ -39,8 +26,3 @@ includeConfig "../../../modules/bactopia/teton/module.config" // Base config (container resolution + resource labels) includeConfig "../../../conf/base.config" includeConfig "../../../conf/profiles.config" - -// Plugin -plugins { - id 'nf-bactopia@2.1.1' -} diff --git a/subworkflows/traitar/main.nf b/subworkflows/traitar/main.nf new file mode 100644 index 000000000..8111886db --- /dev/null +++ b/subworkflows/traitar/main.nf @@ -0,0 +1,62 @@ +/** + * Predict phenotypic traits from microbial genomes + * + * This subworkflow uses [Traitar](https://github.com/nick-youngblut/traitar3/) to predict phenotypic traits from microbial genomes. + * It can download and prepare the Pfam database on-demand or use a pre-existing database. + * It processes each sample individually and aggregates the results into + * a single consolidated report. + * + * @status stable + * @keywords phenotype, traits, pfam + * @tags complexity:moderate input-type:single output-type:multiple features:aggregation,database-dependent,conditional-logic,resource-download + * @citation traitar + * + * @modules csvtk_concat, traitar_download, traitar_run + * + * @input record(meta, fna) + * - `meta`: Groovy Record containing sample information + * - `fna`: Assembled contigs in FASTA format + * + * @input database + * Optional pre-existing Pfam-A HMM file + * + * @input download_traitar + * Boolean flag to trigger automatic database download + * + * @output sample_outputs + * - `majority_tsv`: Majority-vote combined phenotype trait predictions + * - `single_tsv`: Single-votes combined phenotype trait predictions + * + * @output run_outputs + * - `csv`: Merged TSV files with traitar majority-vote and single-vote results from all samples + */ +nextflow.enable.types = true + +include { TRAITAR_DOWNLOAD } from '../../modules/traitar/download/main' +include { TRAITAR_RUN } from '../../modules/traitar/run/main' +include { CSVTK_CONCAT as CSVTK_CONCAT_MAJORITY } from '../../modules/csvtk/concat/main' +include { CSVTK_CONCAT as CSVTK_CONCAT_SINGLE } from '../../modules/csvtk/concat/main' +include { gatherCsvtk } from 'plugin/nf-bactopia' + +workflow TRAITAR { + take: + fna: Channel + database: Path? + download_traitar: Boolean + + main: + ch_traitar_run = channel.empty() + if (download_traitar) { + ch_traitar_download = TRAITAR_DOWNLOAD() + ch_traitar_run = TRAITAR_RUN(fna, ch_traitar_download.map { r -> r.db }) + } else { + ch_traitar_run = TRAITAR_RUN(fna, database) + } + ch_majority_concat = CSVTK_CONCAT_MAJORITY(gatherCsvtk(ch_traitar_run, 'majority_tsv', [name: 'traitar-majority']), 'tsv', 'tsv') + ch_single_concat = CSVTK_CONCAT_SINGLE(gatherCsvtk(ch_traitar_run, 'single_tsv', [name: 'traitar-single']), 'tsv', 'tsv') + + emit: + // Published outputs + sample_outputs = ch_traitar_run + run_outputs = ch_majority_concat.mix(ch_single_concat) +} diff --git a/subworkflows/traitar/tests/.nftignore b/subworkflows/traitar/tests/.nftignore new file mode 100644 index 000000000..7b276dee3 --- /dev/null +++ b/subworkflows/traitar/tests/.nftignore @@ -0,0 +1,2 @@ +**/*.{err,log,stderr,stdout} +**/*.command.* diff --git a/subworkflows/traitar/tests/main.nf.test b/subworkflows/traitar/tests/main.nf.test new file mode 100644 index 000000000..a0e8bab61 --- /dev/null +++ b/subworkflows/traitar/tests/main.nf.test @@ -0,0 +1,54 @@ +nextflow_workflow { + name "Test TRAITAR Subworkflow" + script "../main.nf" + workflow "TRAITAR" + tag "subworkflows" + tag "traitar" + + test("traitar - subworkflow - GCF_000017085") { + when { + params { + test_data_dir = System.getenv("BACTOPIA_TESTS") ?: "" + } + workflow { + """ + input[0] = Channel.of( + record( + meta: [name: "GCF_000017085"], + fna: file("${params.test_data_dir}/species/staphylococcus_aureus/compressed/GCF_000017085/main/assembler/GCF_000017085.fna.gz") + ) + ) + input[1] = file("${params.test_data_dir}/datasets/traitar") + input[2] = false + """ + } + } + + then { + def sample = workflow.out.sample_outputs[0] + def runs = workflow.out.run_outputs + def majority = runs.find { it.meta.process_name == 'traitar-majority-concat' } + def single = runs.find { it.meta.process_name == 'traitar-single-concat' } + assertAll( + { assert workflow.success }, + { assert workflow.out.sample_outputs != null }, + { assert workflow.out.run_outputs != null }, + { assert snapshot( + sample.meta, + sample.versions, + majority.meta, + majority.versions, + single.meta, + single.versions + ).match() }, + { assert sample.majority_tsv != null }, + { assert sample.single_tsv != null }, + { assert sample.results != null }, + { assert majority.csv != null }, + { assert majority.results != null }, + { assert single.csv != null }, + { assert single.results != null } + ) + } + } +} diff --git a/subworkflows/traitar/tests/main.nf.test.snap b/subworkflows/traitar/tests/main.nf.test.snap new file mode 100644 index 000000000..f1ae2ba2c --- /dev/null +++ b/subworkflows/traitar/tests/main.nf.test.snap @@ -0,0 +1,44 @@ +{ + "traitar - subworkflow - GCF_000017085": { + "content": [ + { + "id": "GCF_000017085-TRAITAR:TRAITAR_RUN", + "logs_dir": "GCF_000017085/tools/traitar//logs/", + "name": "GCF_000017085", + "output_dir": "GCF_000017085/tools/traitar/", + "process_name": "traitar", + "scope": "sample" + }, + [ + "versions.yml:md5,f25ec232bc89b44f8f431a04aee60879" + ], + { + "id": "traitar-majority-TRAITAR:CSVTK_CONCAT_MAJORITY", + "logs_dir": "merged-results/logs/traitar-majority-concat/", + "name": "traitar-majority", + "output_dir": "merged-results", + "process_name": "traitar-majority-concat", + "scope": "run" + }, + [ + "versions.yml:md5,0876b2d126e96f86b158fe8dddf4f05f" + ], + { + "id": "traitar-single-TRAITAR:CSVTK_CONCAT_SINGLE", + "logs_dir": "merged-results/logs/traitar-single-concat/", + "name": "traitar-single", + "output_dir": "merged-results", + "process_name": "traitar-single-concat", + "scope": "run" + }, + [ + "versions.yml:md5,ec4bec02bbfd8002cdc3229b98111f6a" + ] + ], + "timestamp": "2026-07-30T19:21:11.431373717", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + } +} \ No newline at end of file diff --git a/subworkflows/traitar/tests/nextflow.config b/subworkflows/traitar/tests/nextflow.config new file mode 100644 index 000000000..ef1105525 --- /dev/null +++ b/subworkflows/traitar/tests/nextflow.config @@ -0,0 +1,23 @@ +// Minimal config for subworkflow-level testing of TRAITAR +nextflow.enable.types = true +nextflow.enable.strict = true +includeConfig "../../../conf/test_base.config" + +params { + workflow { + name = "traitar" + logo_name = "bactopia-tools" + description = "Predict phenotypic traits from microbial genomes" + ext = "fna" + } + wf = params.workflow.name +} + +// Load module configs for processes in this subworkflow +includeConfig "../../../modules/traitar/run/module.config" +includeConfig "../../../modules/traitar/download/module.config" +includeConfig "../../../modules/csvtk/concat/module.config" + +// Base config (container resolution + resource labels) +includeConfig "../../../conf/base.config" +includeConfig "../../../conf/profiles.config" diff --git a/subworkflows/traitar/tests/nf-test.config b/subworkflows/traitar/tests/nf-test.config new file mode 100644 index 000000000..1f765f697 --- /dev/null +++ b/subworkflows/traitar/tests/nf-test.config @@ -0,0 +1,11 @@ +config { + testsDir "." + workDir System.getenv("NFT_WORKDIR") ?: ".nf-test" + configFile "nextflow.config" + profile "docker" + options "--is_ci --max_memory 8.GB" + + plugins { + load "nft-utils@0.0.5" + } +} diff --git a/tests/.nftignore b/tests/.nftignore index c83e71878..feb766962 100644 --- a/tests/.nftignore +++ b/tests/.nftignore @@ -2,4 +2,4 @@ **/nf.command.* bactopia-runs/**/nf-reports/*.{dot,html} -**/*.{corrections,hist,histogram,json,msh,sig,txt,tsv,zip} +**/*.{corrections,hist,histogram,json,msh,sig,txt,tsv,yml,zip} diff --git a/tests/main.nf.test.snap b/tests/main.nf.test.snap index 10e194ca5..7c09193aa 100644 --- a/tests/main.nf.test.snap +++ b/tests/main.nf.test.snap @@ -165,20 +165,10 @@ "bactopia-runs/bactopia/nf-reports/bactopia-timeline.html" ], [ - "versions.yml:md5,27f053a0892518f8b0fb60e2100e922e", - "versions.yml:md5,5d00225a5ad24de728e651fdd0d7d1e3", - "versions.yml:md5,cd4830d4b299d4776ea68dce5a1c9e73", - "versions.yml:md5,d86b6a7bb7117ed6a86a0bd9f45e0377", - "versions.yml:md5,e46de3078794860a978e2dd0b390c27c", - "versions.yml:md5,d4aac41b9e2c72836a9b2a1dfed2226c", - "versions.yml:md5,feb26d507cd4d8f25033d4950ba463ee", - "versions.yml:md5,c18211bbb02304cba7b3e93cbcaa44c6", - "versions.yml:md5,1913efda4329af168df4ab88555dbeb4", - "versions.yml:md5,61924107a406c136f55c445d470721f7", - "versions.yml:md5,082ad51a2f3d2c0b3a158586edc08efc" + ] ], - "timestamp": "2026-04-29T11:34:19.510530167", + "timestamp": "2026-07-30T19:31:16.008311548", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -268,13 +258,10 @@ "bactopia-runs/bactopia/nf-reports/bactopia-timeline.html" ], [ - "versions.yml:md5,5d00225a5ad24de728e651fdd0d7d1e3", - "versions.yml:md5,cd4830d4b299d4776ea68dce5a1c9e73", - "versions.yml:md5,d86b6a7bb7117ed6a86a0bd9f45e0377", - "versions.yml:md5,61924107a406c136f55c445d470721f7" + ] ], - "timestamp": "2026-04-29T11:54:53.770105154", + "timestamp": "2026-07-30T19:55:01.74615677", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -461,20 +448,10 @@ "bactopia-runs/bactopia/nf-reports/bactopia-timeline.html" ], [ - "versions.yml:md5,27f053a0892518f8b0fb60e2100e922e", - "versions.yml:md5,5d00225a5ad24de728e651fdd0d7d1e3", - "versions.yml:md5,cd4830d4b299d4776ea68dce5a1c9e73", - "versions.yml:md5,d86b6a7bb7117ed6a86a0bd9f45e0377", - "versions.yml:md5,e46de3078794860a978e2dd0b390c27c", - "versions.yml:md5,d4aac41b9e2c72836a9b2a1dfed2226c", - "versions.yml:md5,feb26d507cd4d8f25033d4950ba463ee", - "versions.yml:md5,c18211bbb02304cba7b3e93cbcaa44c6", - "versions.yml:md5,1913efda4329af168df4ab88555dbeb4", - "versions.yml:md5,61924107a406c136f55c445d470721f7", - "versions.yml:md5,082ad51a2f3d2c0b3a158586edc08efc" + ] ], - "timestamp": "2026-04-29T11:46:42.824548983", + "timestamp": "2026-07-30T19:45:20.929483058", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -662,20 +639,10 @@ "bactopia-runs/bactopia/nf-reports/bactopia-timeline.html" ], [ - "versions.yml:md5,27f053a0892518f8b0fb60e2100e922e", - "versions.yml:md5,5d00225a5ad24de728e651fdd0d7d1e3", - "versions.yml:md5,cd4830d4b299d4776ea68dce5a1c9e73", - "versions.yml:md5,d86b6a7bb7117ed6a86a0bd9f45e0377", - "versions.yml:md5,e46de3078794860a978e2dd0b390c27c", - "versions.yml:md5,d4aac41b9e2c72836a9b2a1dfed2226c", - "versions.yml:md5,feb26d507cd4d8f25033d4950ba463ee", - "versions.yml:md5,c18211bbb02304cba7b3e93cbcaa44c6", - "versions.yml:md5,1913efda4329af168df4ab88555dbeb4", - "versions.yml:md5,61924107a406c136f55c445d470721f7", - "versions.yml:md5,082ad51a2f3d2c0b3a158586edc08efc" + ] ], - "timestamp": "2026-04-29T11:52:17.954751264", + "timestamp": "2026-07-30T19:51:41.483948316", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -748,12 +715,10 @@ "bactopia-runs/bactopia/nf-reports/bactopia-timeline.html" ], [ - "versions.yml:md5,cd4830d4b299d4776ea68dce5a1c9e73", - "versions.yml:md5,d86b6a7bb7117ed6a86a0bd9f45e0377", - "versions.yml:md5,61924107a406c136f55c445d470721f7" + ] ], - "timestamp": "2026-04-29T11:52:58.985162251", + "timestamp": "2026-07-30T19:52:35.190860588", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -937,21 +902,10 @@ "bactopia-runs/bactopia/nf-reports/bactopia-timeline.html" ], [ - "SRR2838702.png:md5,90cfbd53df590d7542498269d4dda97a", - "versions.yml:md5,e8bb3b82f221298fc735072f579e992b", - "versions.yml:md5,5d00225a5ad24de728e651fdd0d7d1e3", - "versions.yml:md5,cd4830d4b299d4776ea68dce5a1c9e73", - "versions.yml:md5,d86b6a7bb7117ed6a86a0bd9f45e0377", - "versions.yml:md5,e46de3078794860a978e2dd0b390c27c", - "versions.yml:md5,d4aac41b9e2c72836a9b2a1dfed2226c", - "versions.yml:md5,feb26d507cd4d8f25033d4950ba463ee", - "versions.yml:md5,c18211bbb02304cba7b3e93cbcaa44c6", - "versions.yml:md5,1913efda4329af168df4ab88555dbeb4", - "versions.yml:md5,61924107a406c136f55c445d470721f7", - "versions.yml:md5,082ad51a2f3d2c0b3a158586edc08efc" + "SRR2838702.png:md5,90cfbd53df590d7542498269d4dda97a" ] ], - "timestamp": "2026-04-29T11:31:33.095335298", + "timestamp": "2026-07-30T19:27:53.525188399", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -1013,12 +967,10 @@ "bactopia-runs/bactopia/nf-reports/bactopia-timeline.html" ], [ - "versions.yml:md5,cd4830d4b299d4776ea68dce5a1c9e73", - "versions.yml:md5,d86b6a7bb7117ed6a86a0bd9f45e0377", - "versions.yml:md5,61924107a406c136f55c445d470721f7" + ] ], - "timestamp": "2026-04-29T11:55:24.978165937", + "timestamp": "2026-07-30T19:55:40.866556785", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -1189,20 +1141,10 @@ "bactopia-runs/bactopia/nf-reports/bactopia-timeline.html" ], [ - "versions.yml:md5,27f053a0892518f8b0fb60e2100e922e", - "versions.yml:md5,5d00225a5ad24de728e651fdd0d7d1e3", - "versions.yml:md5,cd4830d4b299d4776ea68dce5a1c9e73", - "versions.yml:md5,d86b6a7bb7117ed6a86a0bd9f45e0377", - "versions.yml:md5,e46de3078794860a978e2dd0b390c27c", - "versions.yml:md5,d4aac41b9e2c72836a9b2a1dfed2226c", - "versions.yml:md5,feb26d507cd4d8f25033d4950ba463ee", - "versions.yml:md5,c18211bbb02304cba7b3e93cbcaa44c6", - "versions.yml:md5,1913efda4329af168df4ab88555dbeb4", - "versions.yml:md5,61924107a406c136f55c445d470721f7", - "versions.yml:md5,082ad51a2f3d2c0b3a158586edc08efc" + ] ], - "timestamp": "2026-04-29T11:39:34.253436144", + "timestamp": "2026-07-30T19:36:11.058832397", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -1383,20 +1325,10 @@ "bactopia-runs/bactopia/nf-reports/bactopia-timeline.html" ], [ - "versions.yml:md5,27f053a0892518f8b0fb60e2100e922e", - "versions.yml:md5,5d00225a5ad24de728e651fdd0d7d1e3", - "versions.yml:md5,cd4830d4b299d4776ea68dce5a1c9e73", - "versions.yml:md5,d86b6a7bb7117ed6a86a0bd9f45e0377", - "versions.yml:md5,e46de3078794860a978e2dd0b390c27c", - "versions.yml:md5,d4aac41b9e2c72836a9b2a1dfed2226c", - "versions.yml:md5,feb26d507cd4d8f25033d4950ba463ee", - "versions.yml:md5,c18211bbb02304cba7b3e93cbcaa44c6", - "versions.yml:md5,1913efda4329af168df4ab88555dbeb4", - "versions.yml:md5,61924107a406c136f55c445d470721f7", - "versions.yml:md5,082ad51a2f3d2c0b3a158586edc08efc" + ] ], - "timestamp": "2026-04-29T11:27:11.243153114", + "timestamp": "2026-07-30T19:21:32.093797996", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/versions.yml b/versions.yml new file mode 100644 index 000000000..37b402698 --- /dev/null +++ b/versions.yml @@ -0,0 +1,2 @@ +bactopia: 4.1.0 +nf-bactopia: 2.1.7 diff --git a/workflows/bactopia-tools/abricate/nextflow.config b/workflows/bactopia-tools/abricate/nextflow.config index b352b72a3..dc33d0cf0 100644 --- a/workflows/bactopia-tools/abricate/nextflow.config +++ b/workflows/bactopia-tools/abricate/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/abricate/nextflow_schema.json b/workflows/bactopia-tools/abricate/nextflow_schema.json index 0bcf5b52a..4e9b9570c 100644 --- a/workflows/bactopia-tools/abricate/nextflow_schema.json +++ b/workflows/bactopia-tools/abricate/nextflow_schema.json @@ -367,13 +367,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/abricate/tests/main.nf.test.snap b/workflows/bactopia-tools/abricate/tests/main.nf.test.snap index 9d028293a..f79f54ddd 100644 --- a/workflows/bactopia-tools/abricate/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/abricate/tests/main.nf.test.snap @@ -44,7 +44,7 @@ "versions.yml:md5,c6b552151ca3a9ccc54d58594e65789b" ] ], - "timestamp": "2026-04-29T11:21:24.857027075", + "timestamp": "2026-07-30T19:16:03.786653869", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/abritamr/nextflow.config b/workflows/bactopia-tools/abritamr/nextflow.config index 52f43f263..d3afa3a4b 100644 --- a/workflows/bactopia-tools/abritamr/nextflow.config +++ b/workflows/bactopia-tools/abritamr/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/abritamr/nextflow_schema.json b/workflows/bactopia-tools/abritamr/nextflow_schema.json index cd36c99c1..53e30292b 100644 --- a/workflows/bactopia-tools/abritamr/nextflow_schema.json +++ b/workflows/bactopia-tools/abritamr/nextflow_schema.json @@ -375,13 +375,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/abritamr/tests/main.nf.test.snap b/workflows/bactopia-tools/abritamr/tests/main.nf.test.snap index b50b57dbf..565176816 100644 --- a/workflows/bactopia-tools/abritamr/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/abritamr/tests/main.nf.test.snap @@ -47,12 +47,12 @@ "GCF_001682305.summary_matches.tsv:md5,2da0b6cb548413f2721a95e55e17e295", "GCF_001682305.summary_partials.tsv:md5,db0255b99826900ecf4616eef7494806", "GCF_001682305.summary_virulence.tsv:md5,439b76b76818cbe8ec06bc82bd2711fe", - "versions.yml:md5,aa30fa16abc1d1a9baefd6defd920a32", + "versions.yml:md5,ef1b96216865ffadde25334b59f3361c", "abritamr.tsv:md5,18df68afa95e104c8f418efedd9146cf", "versions.yml:md5,31f7f5153ed3b9aa6a6e432ec7939e0b" ] ], - "timestamp": "2026-04-29T11:22:41.756272676", + "timestamp": "2026-07-30T19:17:21.788788979", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/agrvate/nextflow.config b/workflows/bactopia-tools/agrvate/nextflow.config index c57c2c9ac..6307a2434 100644 --- a/workflows/bactopia-tools/agrvate/nextflow.config +++ b/workflows/bactopia-tools/agrvate/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/agrvate/nextflow_schema.json b/workflows/bactopia-tools/agrvate/nextflow_schema.json index e8c7e8803..24611862d 100644 --- a/workflows/bactopia-tools/agrvate/nextflow_schema.json +++ b/workflows/bactopia-tools/agrvate/nextflow_schema.json @@ -371,13 +371,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/agrvate/tests/main.nf.test.snap b/workflows/bactopia-tools/agrvate/tests/main.nf.test.snap index 029ea2729..183386bc9 100644 --- a/workflows/bactopia-tools/agrvate/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/agrvate/tests/main.nf.test.snap @@ -49,7 +49,7 @@ "versions.yml:md5,bff857ba4a2070f0d89b811a8050494e" ] ], - "timestamp": "2026-04-29T11:21:27.682147015", + "timestamp": "2026-07-30T19:16:17.269503309", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -105,7 +105,7 @@ "versions.yml:md5,bff857ba4a2070f0d89b811a8050494e" ] ], - "timestamp": "2026-04-29T11:21:51.115735364", + "timestamp": "2026-07-30T19:16:41.929272582", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/amrfinderplus/nextflow.config b/workflows/bactopia-tools/amrfinderplus/nextflow.config index 7450f678a..82ea2ac95 100644 --- a/workflows/bactopia-tools/amrfinderplus/nextflow.config +++ b/workflows/bactopia-tools/amrfinderplus/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -84,7 +87,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/amrfinderplus/nextflow_schema.json b/workflows/bactopia-tools/amrfinderplus/nextflow_schema.json index 411823d37..1e1713ca0 100644 --- a/workflows/bactopia-tools/amrfinderplus/nextflow_schema.json +++ b/workflows/bactopia-tools/amrfinderplus/nextflow_schema.json @@ -104,7 +104,6 @@ }, "amrfinderplus_db": { "type": "string", - "default": "", "description": "A custom AMRFinder+ database to use, either a tarball or a folder", "fa_icon": "fas fa-font", "hidden": true @@ -425,13 +424,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/amrfinderplus/tests/main.nf.test.snap b/workflows/bactopia-tools/amrfinderplus/tests/main.nf.test.snap index b6513c433..f3648d40b 100644 --- a/workflows/bactopia-tools/amrfinderplus/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/amrfinderplus/tests/main.nf.test.snap @@ -42,7 +42,7 @@ "versions.yml:md5,c18211bbb02304cba7b3e93cbcaa44c6" ] ], - "timestamp": "2026-04-29T11:22:00.752046724", + "timestamp": "2026-07-30T19:16:59.997651863", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -86,12 +86,12 @@ ], [ "SRR2838702.tsv:md5,376a8991c8eb010ea64c796115fb9b8d", - "versions.yml:md5,d4aac41b9e2c72836a9b2a1dfed2226c", + "versions.yml:md5,9ca3ec85a3c0993ed41a25321fd6d423", "amrfinderplus.tsv:md5,376a8991c8eb010ea64c796115fb9b8d", "versions.yml:md5,c18211bbb02304cba7b3e93cbcaa44c6" ] ], - "timestamp": "2026-04-29T11:21:33.198613166", + "timestamp": "2026-07-30T19:16:34.688081586", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/ariba/nextflow.config b/workflows/bactopia-tools/ariba/nextflow.config index 2d2aae657..cb39d553b 100644 --- a/workflows/bactopia-tools/ariba/nextflow.config +++ b/workflows/bactopia-tools/ariba/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -84,7 +87,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/ariba/nextflow_schema.json b/workflows/bactopia-tools/ariba/nextflow_schema.json index c0ce0705c..2caa42dd0 100644 --- a/workflows/bactopia-tools/ariba/nextflow_schema.json +++ b/workflows/bactopia-tools/ariba/nextflow_schema.json @@ -129,6 +129,7 @@ }, "ariba_no_clean": { "type": "boolean", + "default": false, "description": "Do not clean up intermediate files created by Ariba.", "fa_icon": "fas fa-toggle-on", "hidden": true @@ -449,13 +450,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/ariba/tests/main.nf.test.snap b/workflows/bactopia-tools/ariba/tests/main.nf.test.snap index 47394c223..925c4df52 100644 --- a/workflows/bactopia-tools/ariba/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/ariba/tests/main.nf.test.snap @@ -56,16 +56,16 @@ "bactopia-runs/ariba-card/nf-reports/ariba-timeline.html" ], [ - "SRR2838702-report.tsv:md5,3d4492a0da3197a00e7a5da818e4c1ea", - "SRR2838702-summary.csv:md5,b6735bd13bad29a22a5c99fcabb1959f", + "SRR2838702-report.tsv:md5,963488ef79fccc1a281498f4700c2250", + "SRR2838702-summary.csv:md5,c61c9e5e1534314b727333f7fbd31571", "versions.yml:md5,aaa688e30363067240a27dcbe85f29c6", - "card-report.tsv:md5,3d4492a0da3197a00e7a5da818e4c1ea", - "card-summary.csv:md5,b6735bd13bad29a22a5c99fcabb1959f", + "card-report.tsv:md5,963488ef79fccc1a281498f4700c2250", + "card-summary.csv:md5,c61c9e5e1534314b727333f7fbd31571", "versions.yml:md5,ff3a06461ce07f813e0b9e2739bb05ca", "versions.yml:md5,1a4d97856cb563f9b6c84132cd60d481" ] ], - "timestamp": "2026-04-29T11:21:57.975492018", + "timestamp": "2026-08-04T21:01:00.564375661", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/bakta/nextflow.config b/workflows/bactopia-tools/bakta/nextflow.config index 3bcc83f95..a8a5c73c3 100644 --- a/workflows/bactopia-tools/bakta/nextflow.config +++ b/workflows/bactopia-tools/bakta/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/bakta/nextflow_schema.json b/workflows/bactopia-tools/bakta/nextflow_schema.json index 761d16105..f3d9480e2 100644 --- a/workflows/bactopia-tools/bakta/nextflow_schema.json +++ b/workflows/bactopia-tools/bakta/nextflow_schema.json @@ -500,13 +500,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/bakta/tests/main.nf.test.snap b/workflows/bactopia-tools/bakta/tests/main.nf.test.snap index 644275918..6631e3832 100644 --- a/workflows/bactopia-tools/bakta/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/bakta/tests/main.nf.test.snap @@ -48,7 +48,7 @@ "versions.yml:md5,e8bb3b82f221298fc735072f579e992b" ] ], - "timestamp": "2026-04-29T11:27:21.862622123", + "timestamp": "2026-07-30T19:22:51.889397801", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -103,7 +103,7 @@ "versions.yml:md5,e8bb3b82f221298fc735072f579e992b" ] ], - "timestamp": "2026-04-29T11:23:54.843530718", + "timestamp": "2026-07-30T19:18:47.954805677", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/blastn/nextflow.config b/workflows/bactopia-tools/blastn/nextflow.config index 34a05df62..41686ab5e 100644 --- a/workflows/bactopia-tools/blastn/nextflow.config +++ b/workflows/bactopia-tools/blastn/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/blastn/nextflow_schema.json b/workflows/bactopia-tools/blastn/nextflow_schema.json index 7dac1817b..ab60faa4f 100644 --- a/workflows/bactopia-tools/blastn/nextflow_schema.json +++ b/workflows/bactopia-tools/blastn/nextflow_schema.json @@ -407,13 +407,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/blastn/tests/main.nf.test.snap b/workflows/bactopia-tools/blastn/tests/main.nf.test.snap index cc8430b62..4646cea8f 100644 --- a/workflows/bactopia-tools/blastn/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/blastn/tests/main.nf.test.snap @@ -42,7 +42,7 @@ "versions.yml:md5,83da7e0cc2656aa0959a8b41dc452417" ] ], - "timestamp": "2026-04-29T11:21:55.226735741", + "timestamp": "2026-07-30T19:17:00.329804837", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -91,7 +91,7 @@ "versions.yml:md5,83da7e0cc2656aa0959a8b41dc452417" ] ], - "timestamp": "2026-04-29T11:21:33.528060213", + "timestamp": "2026-07-30T19:16:41.669872794", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -140,7 +140,7 @@ "versions.yml:md5,83da7e0cc2656aa0959a8b41dc452417" ] ], - "timestamp": "2026-04-29T11:22:21.802394026", + "timestamp": "2026-07-30T19:17:18.680727326", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/blastp/nextflow.config b/workflows/bactopia-tools/blastp/nextflow.config index e6efae22b..5cf5e2337 100644 --- a/workflows/bactopia-tools/blastp/nextflow.config +++ b/workflows/bactopia-tools/blastp/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/blastp/nextflow_schema.json b/workflows/bactopia-tools/blastp/nextflow_schema.json index 3b2006eb3..61b841f84 100644 --- a/workflows/bactopia-tools/blastp/nextflow_schema.json +++ b/workflows/bactopia-tools/blastp/nextflow_schema.json @@ -394,13 +394,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/blastp/tests/main.nf.test.snap b/workflows/bactopia-tools/blastp/tests/main.nf.test.snap index 945b0730a..03b15a706 100644 --- a/workflows/bactopia-tools/blastp/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/blastp/tests/main.nf.test.snap @@ -42,7 +42,7 @@ "versions.yml:md5,f96b9474386d395c01c2be97c4c63fea" ] ], - "timestamp": "2026-04-29T11:21:36.868171773", + "timestamp": "2026-07-30T19:16:43.63776288", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -91,7 +91,7 @@ "versions.yml:md5,f96b9474386d395c01c2be97c4c63fea" ] ], - "timestamp": "2026-04-29T11:21:59.31536322", + "timestamp": "2026-07-30T19:17:07.057310122", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -140,7 +140,7 @@ "versions.yml:md5,f96b9474386d395c01c2be97c4c63fea" ] ], - "timestamp": "2026-04-29T11:22:34.423215856", + "timestamp": "2026-07-30T19:17:25.176574423", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/blastx/nextflow.config b/workflows/bactopia-tools/blastx/nextflow.config index bab6722f9..c81fe3e3b 100644 --- a/workflows/bactopia-tools/blastx/nextflow.config +++ b/workflows/bactopia-tools/blastx/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/blastx/nextflow_schema.json b/workflows/bactopia-tools/blastx/nextflow_schema.json index f0dc6192b..7072c9625 100644 --- a/workflows/bactopia-tools/blastx/nextflow_schema.json +++ b/workflows/bactopia-tools/blastx/nextflow_schema.json @@ -394,13 +394,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/blastx/tests/main.nf.test.snap b/workflows/bactopia-tools/blastx/tests/main.nf.test.snap index 52e39f45e..0536ba612 100644 --- a/workflows/bactopia-tools/blastx/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/blastx/tests/main.nf.test.snap @@ -42,7 +42,7 @@ "versions.yml:md5,8634f578eba8a3c37f4edffd83aad444" ] ], - "timestamp": "2026-04-29T11:22:02.723228807", + "timestamp": "2026-07-30T19:17:07.552368311", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -91,7 +91,7 @@ "versions.yml:md5,8634f578eba8a3c37f4edffd83aad444" ] ], - "timestamp": "2026-04-29T11:22:34.420589616", + "timestamp": "2026-07-30T19:17:25.894415558", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -140,7 +140,7 @@ "versions.yml:md5,8634f578eba8a3c37f4edffd83aad444" ] ], - "timestamp": "2026-04-29T11:21:42.592357708", + "timestamp": "2026-07-30T19:16:46.787202051", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/bracken/nextflow.config b/workflows/bactopia-tools/bracken/nextflow.config index acb6912e0..26b97af9c 100644 --- a/workflows/bactopia-tools/bracken/nextflow.config +++ b/workflows/bactopia-tools/bracken/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/bracken/nextflow_schema.json b/workflows/bactopia-tools/bracken/nextflow_schema.json index b9dbce839..86c0e698a 100644 --- a/workflows/bactopia-tools/bracken/nextflow_schema.json +++ b/workflows/bactopia-tools/bracken/nextflow_schema.json @@ -480,13 +480,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/bracken/tests/.nftignore b/workflows/bactopia-tools/bracken/tests/.nftignore index 72a5fcb38..e5b4181b4 100644 --- a/workflows/bactopia-tools/bracken/tests/.nftignore +++ b/workflows/bactopia-tools/bracken/tests/.nftignore @@ -1,3 +1,7 @@ **/*.{err,gz,html,log,pdf,stderr,stdout} **/nf.command.* bactopia-runs/**/nf-reports/*.{dot,html} + +**/*.abundances.txt +**/bracken-adjusted.tsv +**/*.yml diff --git a/workflows/bactopia-tools/bracken/tests/main.nf.test.snap b/workflows/bactopia-tools/bracken/tests/main.nf.test.snap index 785dc2ca2..48c236208 100644 --- a/workflows/bactopia-tools/bracken/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/bracken/tests/main.nf.test.snap @@ -53,20 +53,14 @@ "bactopia-runs/bracken/nf-reports/bracken-timeline.html" ], [ - "SRR2838702.bracken.abundances.txt:md5,f487d0ca3b1139b5ea9cbad2272ab03e", - "SRR2838702.bracken.adjusted.abundances.txt:md5,9d34ce09aac2ebb8afb257e86581ada9", "SRR2838702.bracken.classification.txt:md5,92291be35925612b304a82ad8e42fcea", - "SRR2838702.bracken.report.txt:md5,184d13c4f0d3248a311a0e9105e5561c", + "SRR2838702.bracken.report.txt:md5,a83588a7c0a33f4f869ed6343419e6d2", "SRR2838702.bracken.tsv:md5,9f9ef5bab54b3cb593886171a47ed7b9", - "SRR2838702.kraken2.report.txt:md5,dbc13f97657d22326cabf4bd19564174", - "versions.yml:md5,12f0eff32d10516cc48aea7f50e0fe2f", - "bracken-adjusted.tsv:md5,9d34ce09aac2ebb8afb257e86581ada9", - "bracken-species-abundance.tsv:md5,9f9ef5bab54b3cb593886171a47ed7b9", - "versions.yml:md5,95656d5394117a5e9ab88c7503bd2e8f", - "versions.yml:md5,eac83c8fd922f581ce913311a557ad9d" + "SRR2838702.kraken2.report.txt:md5,0d7991cf80613ba55baf774b0f1140e4", + "bracken-species-abundance.tsv:md5,9f9ef5bab54b3cb593886171a47ed7b9" ] ], - "timestamp": "2026-04-29T11:33:27.491520486", + "timestamp": "2026-07-30T19:30:27.996338535", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -126,20 +120,14 @@ "bactopia-runs/bracken/nf-reports/bracken-timeline.html" ], [ - "SRR2838702.bracken.abundances.txt:md5,f487d0ca3b1139b5ea9cbad2272ab03e", - "SRR2838702.bracken.adjusted.abundances.txt:md5,9d34ce09aac2ebb8afb257e86581ada9", "SRR2838702.bracken.classification.txt:md5,92291be35925612b304a82ad8e42fcea", - "SRR2838702.bracken.report.txt:md5,184d13c4f0d3248a311a0e9105e5561c", + "SRR2838702.bracken.report.txt:md5,a83588a7c0a33f4f869ed6343419e6d2", "SRR2838702.bracken.tsv:md5,9f9ef5bab54b3cb593886171a47ed7b9", - "SRR2838702.kraken2.report.txt:md5,dbc13f97657d22326cabf4bd19564174", - "versions.yml:md5,12f0eff32d10516cc48aea7f50e0fe2f", - "bracken-adjusted.tsv:md5,9d34ce09aac2ebb8afb257e86581ada9", - "bracken-species-abundance.tsv:md5,9f9ef5bab54b3cb593886171a47ed7b9", - "versions.yml:md5,95656d5394117a5e9ab88c7503bd2e8f", - "versions.yml:md5,eac83c8fd922f581ce913311a557ad9d" + "SRR2838702.kraken2.report.txt:md5,0d7991cf80613ba55baf774b0f1140e4", + "bracken-species-abundance.tsv:md5,9f9ef5bab54b3cb593886171a47ed7b9" ] ], - "timestamp": "2026-04-29T11:27:09.464659358", + "timestamp": "2026-07-30T19:21:50.924466611", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/btyper3/nextflow.config b/workflows/bactopia-tools/btyper3/nextflow.config index bb6cff889..b6538ab64 100644 --- a/workflows/bactopia-tools/btyper3/nextflow.config +++ b/workflows/bactopia-tools/btyper3/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/btyper3/nextflow_schema.json b/workflows/bactopia-tools/btyper3/nextflow_schema.json index 80f738097..7beaa7596 100644 --- a/workflows/bactopia-tools/btyper3/nextflow_schema.json +++ b/workflows/bactopia-tools/btyper3/nextflow_schema.json @@ -404,13 +404,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/btyper3/tests/main.nf.test.snap b/workflows/bactopia-tools/btyper3/tests/main.nf.test.snap index 234ea0ac9..e66a14e02 100644 --- a/workflows/bactopia-tools/btyper3/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/btyper3/tests/main.nf.test.snap @@ -66,7 +66,7 @@ "versions.yml:md5,40ee298a3f689113440883cada3337aa" ] ], - "timestamp": "2026-04-29T11:23:27.775940628", + "timestamp": "2026-07-30T19:18:45.598803657", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/busco/nextflow.config b/workflows/bactopia-tools/busco/nextflow.config index d9e817f35..a65d8f8df 100644 --- a/workflows/bactopia-tools/busco/nextflow.config +++ b/workflows/bactopia-tools/busco/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/busco/nextflow_schema.json b/workflows/bactopia-tools/busco/nextflow_schema.json index 1488924fa..41f5d5a73 100644 --- a/workflows/bactopia-tools/busco/nextflow_schema.json +++ b/workflows/bactopia-tools/busco/nextflow_schema.json @@ -425,13 +425,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/busco/tests/main.nf.test.snap b/workflows/bactopia-tools/busco/tests/main.nf.test.snap index 0d1350326..eefb75cab 100644 --- a/workflows/bactopia-tools/busco/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/busco/tests/main.nf.test.snap @@ -280,14 +280,14 @@ ], [ "SRR2838702-summary.txt:md5,d1cbbfb9ab7dee0204bfa26f3b982620", - "versions.yml:md5,84a39022a8e62bb5b3eb9c860e79d49f", - "full_table.tsv:md5,395616b19c70bb4ff67982cfc4c32511", - "missing_busco_list.tsv:md5,05d02e7e8108d122094d4f90d5dc624b", + "versions.yml:md5,bfe8448c1dd05af49ff6b67f38a9db01", + "full_table.tsv:md5,3b9475a17a9dbfb5b605817bafd464f7", + "missing_busco_list.tsv:md5,e7b37790235c44f6491ed71a98e8e24d", "busco-bacteria_odb10.tsv:md5,d1cbbfb9ab7dee0204bfa26f3b982620", "versions.yml:md5,06546ad8c9dee85b74317666718ef698" ] ], - "timestamp": "2026-04-29T11:22:08.887451241", + "timestamp": "2026-07-30T19:17:30.444141942", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/checkm/nextflow.config b/workflows/bactopia-tools/checkm/nextflow.config index db8cd0d06..7573b945d 100644 --- a/workflows/bactopia-tools/checkm/nextflow.config +++ b/workflows/bactopia-tools/checkm/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/checkm/nextflow_schema.json b/workflows/bactopia-tools/checkm/nextflow_schema.json index a381efadc..643eba90c 100644 --- a/workflows/bactopia-tools/checkm/nextflow_schema.json +++ b/workflows/bactopia-tools/checkm/nextflow_schema.json @@ -443,13 +443,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/checkm/tests/main.nf.test.snap b/workflows/bactopia-tools/checkm/tests/main.nf.test.snap index 6bbea94a0..12ba8dd7c 100644 --- a/workflows/bactopia-tools/checkm/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/checkm/tests/main.nf.test.snap @@ -91,7 +91,7 @@ "versions.yml:md5,9f9cdf7e89a396b859a6aec91820283a" ] ], - "timestamp": "2026-04-29T11:23:57.599966838", + "timestamp": "2026-07-30T19:18:56.636549921", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/checkm2/nextflow.config b/workflows/bactopia-tools/checkm2/nextflow.config index 10f3f8b09..f5234ef49 100644 --- a/workflows/bactopia-tools/checkm2/nextflow.config +++ b/workflows/bactopia-tools/checkm2/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -84,7 +87,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/checkm2/nextflow_schema.json b/workflows/bactopia-tools/checkm2/nextflow_schema.json index 1e736d9e4..4c9603405 100644 --- a/workflows/bactopia-tools/checkm2/nextflow_schema.json +++ b/workflows/bactopia-tools/checkm2/nextflow_schema.json @@ -416,13 +416,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/checkm2/tests/main.nf.test.snap b/workflows/bactopia-tools/checkm2/tests/main.nf.test.snap index 431b2e828..7ca495949 100644 --- a/workflows/bactopia-tools/checkm2/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/checkm2/tests/main.nf.test.snap @@ -48,7 +48,7 @@ "versions.yml:md5,b7cf6dd33e2fefeb729064b0d46f2081" ] ], - "timestamp": "2026-04-29T11:25:59.277809912", + "timestamp": "2026-07-30T19:21:06.180579199", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/clermontyping/nextflow.config b/workflows/bactopia-tools/clermontyping/nextflow.config index c449fee6d..8ee64dfe9 100644 --- a/workflows/bactopia-tools/clermontyping/nextflow.config +++ b/workflows/bactopia-tools/clermontyping/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/clermontyping/nextflow_schema.json b/workflows/bactopia-tools/clermontyping/nextflow_schema.json index 811b47683..74f1058ab 100644 --- a/workflows/bactopia-tools/clermontyping/nextflow_schema.json +++ b/workflows/bactopia-tools/clermontyping/nextflow_schema.json @@ -371,13 +371,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/clermontyping/tests/main.nf.test.snap b/workflows/bactopia-tools/clermontyping/tests/main.nf.test.snap index 009e3d545..874e6b526 100644 --- a/workflows/bactopia-tools/clermontyping/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/clermontyping/tests/main.nf.test.snap @@ -46,7 +46,7 @@ "versions.yml:md5,867a114cb8d26e2302391ce5a5a0a959" ] ], - "timestamp": "2026-04-29T11:22:20.687508128", + "timestamp": "2026-07-30T19:17:42.187409267", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/defensefinder/nextflow.config b/workflows/bactopia-tools/defensefinder/nextflow.config index 40dbdadd1..6e01dbd02 100644 --- a/workflows/bactopia-tools/defensefinder/nextflow.config +++ b/workflows/bactopia-tools/defensefinder/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -84,7 +87,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/defensefinder/nextflow_schema.json b/workflows/bactopia-tools/defensefinder/nextflow_schema.json index daeb607e3..d5e674aa1 100644 --- a/workflows/bactopia-tools/defensefinder/nextflow_schema.json +++ b/workflows/bactopia-tools/defensefinder/nextflow_schema.json @@ -68,12 +68,14 @@ }, "defensefinder_preserveraw": { "type": "boolean", + "default": false, "description": "Preserve raw MacsyFinder outputs alongside Defense Finder results inside the output directory", "fa_icon": "fas fa-toggle-on", "hidden": true }, "defensefinder_nocutga": { "type": "boolean", + "default": false, "description": "Advanced! Run macsyfinder in no-cut-ga mode. The validity of the genes and systems found is not guaranteed!", "fa_icon": "fas fa-toggle-on", "hidden": true @@ -394,13 +396,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/defensefinder/tests/main.nf.test.snap b/workflows/bactopia-tools/defensefinder/tests/main.nf.test.snap index 85af8342c..631f06668 100644 --- a/workflows/bactopia-tools/defensefinder/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/defensefinder/tests/main.nf.test.snap @@ -70,7 +70,7 @@ "versions.yml:md5,cb06109c537fb7ff30a68b0a1197889d" ] ], - "timestamp": "2026-04-29T11:22:23.942332991", + "timestamp": "2026-07-30T19:17:42.044716531", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/ectyper/nextflow.config b/workflows/bactopia-tools/ectyper/nextflow.config index 49cfeb69b..d3fd46f88 100644 --- a/workflows/bactopia-tools/ectyper/nextflow.config +++ b/workflows/bactopia-tools/ectyper/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/ectyper/nextflow_schema.json b/workflows/bactopia-tools/ectyper/nextflow_schema.json index 8d937cbfa..6a9a4a3de 100644 --- a/workflows/bactopia-tools/ectyper/nextflow_schema.json +++ b/workflows/bactopia-tools/ectyper/nextflow_schema.json @@ -403,13 +403,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/ectyper/tests/main.nf.test.snap b/workflows/bactopia-tools/ectyper/tests/main.nf.test.snap index cccdda070..4e96b7470 100644 --- a/workflows/bactopia-tools/ectyper/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/ectyper/tests/main.nf.test.snap @@ -45,7 +45,7 @@ "versions.yml:md5,c8ed62b01b9e766b6ba10622c55a02e1" ] ], - "timestamp": "2026-04-29T11:22:23.864434", + "timestamp": "2026-07-30T19:18:01.411582423", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/eggnog/nextflow.config b/workflows/bactopia-tools/eggnog/nextflow.config index 9df967072..0c95ec0b5 100644 --- a/workflows/bactopia-tools/eggnog/nextflow.config +++ b/workflows/bactopia-tools/eggnog/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/eggnog/nextflow_schema.json b/workflows/bactopia-tools/eggnog/nextflow_schema.json index e0e594a8c..06f135ef3 100644 --- a/workflows/bactopia-tools/eggnog/nextflow_schema.json +++ b/workflows/bactopia-tools/eggnog/nextflow_schema.json @@ -62,9 +62,10 @@ "fa_icon": "fas fa-toggle-on" }, "eggnog_save_as_tarball": { - "type": "string", + "type": "boolean", + "default": false, "description": "Save the eggNOG database as a single tarball", - "fa_icon": "fas fa-font" + "fa_icon": "fas fa-toggle-on" }, "eggnog_skip_diamond": { "type": "boolean", @@ -435,13 +436,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/eggnog/tests/.nftignore b/workflows/bactopia-tools/eggnog/tests/.nftignore index 605485627..940a46def 100644 --- a/workflows/bactopia-tools/eggnog/tests/.nftignore +++ b/workflows/bactopia-tools/eggnog/tests/.nftignore @@ -3,3 +3,4 @@ bactopia-runs/**/nf-reports/*.{dot,html} **/*.emapper.* +**/*.yml diff --git a/workflows/bactopia-tools/eggnog/tests/main.nf.test.snap b/workflows/bactopia-tools/eggnog/tests/main.nf.test.snap index 5185a8cba..9719ceb92 100644 --- a/workflows/bactopia-tools/eggnog/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/eggnog/tests/main.nf.test.snap @@ -26,10 +26,10 @@ "bactopia-runs/eggnog/nf-reports/eggnog-timeline.html" ], [ - "versions.yml:md5,1b179e895ab51b7321ae747976b92b31" + ] ], - "timestamp": "2026-04-29T11:27:15.558730769", + "timestamp": "2026-07-30T19:23:16.719033924", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/emmtyper/nextflow.config b/workflows/bactopia-tools/emmtyper/nextflow.config index f214cccc0..58778b384 100644 --- a/workflows/bactopia-tools/emmtyper/nextflow.config +++ b/workflows/bactopia-tools/emmtyper/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/emmtyper/nextflow_schema.json b/workflows/bactopia-tools/emmtyper/nextflow_schema.json index 33f69e132..338b21b85 100644 --- a/workflows/bactopia-tools/emmtyper/nextflow_schema.json +++ b/workflows/bactopia-tools/emmtyper/nextflow_schema.json @@ -441,13 +441,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/emmtyper/tests/main.nf.test.snap b/workflows/bactopia-tools/emmtyper/tests/main.nf.test.snap index 5dfae657b..b323e1de8 100644 --- a/workflows/bactopia-tools/emmtyper/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/emmtyper/tests/main.nf.test.snap @@ -42,7 +42,7 @@ "versions.yml:md5,f181bc0c0ea82cc9859e47cd3254e8d4" ] ], - "timestamp": "2026-04-29T11:21:59.378233187", + "timestamp": "2026-07-30T19:18:09.689209426", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -91,7 +91,7 @@ "versions.yml:md5,f181bc0c0ea82cc9859e47cd3254e8d4" ] ], - "timestamp": "2026-04-29T11:22:34.381814729", + "timestamp": "2026-07-30T19:18:34.087009671", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/fastani/main.nf b/workflows/bactopia-tools/fastani/main.nf index 79fc98e63..be5749788 100644 --- a/workflows/bactopia-tools/fastani/main.nf +++ b/workflows/bactopia-tools/fastani/main.nf @@ -4,14 +4,21 @@ * * This Bactopia Tool uses [FastANI](https://github.com/ParBLiSS/FastANI) to calculate the average * nucleotide identity (ANI) between samples. It can also calculate ANI against reference genomes - * by downloading RefSeq assemblies using NCBI genome download. + * by downloading NCBI assemblies using genome-dl. + * + * If you do not provide `--fastani_pairwise` then you must provide at least one: + * + * - `--fastani_reference` a local FASTA file to use as a reference for ANI comparison + * - `--accession` a specific NCBI Assembly accession to download + * - `--accessions` a path to a file containing list of NCBI Assembly accessions to download + * - `--species` a species name to download all NCBI genomes for comparison * * @status stable * @keywords ani, average nucleotide identity, similarity, comparative genomics, bactopia-tool * @tags complexity:moderate input-type:parameter output-type:multiple features:bactopia-tool,comparative * @citation fastani * - * @subworkflows utils_bactopia-tools, fastani, ncbigenomedownload + * @subworkflows utils_bactopia-tools, fastani, genomedl * * @input rundir * Directory containing results from a completed Bactopia analysis run @@ -20,16 +27,16 @@ * Path to reference FASTA file for ANI comparison * * @input fastani_pairwise - * Perform pairwise ANI calculation between all samples + * Add every sample to the reference set, comparing each sample against every other sample * * @input species - * Species name to download all RefSeq genomes for comparison + * Species name to download all NCBI genomes for comparison * * @input accession - * Specific NCBI Assembly RefSeq accession to download + * Specific NCBI Assembly accession to download * * @input accessions - * Path to file containing list of NCBI accessions to download + * Path to file containing list of NCBI Assembly accessions to download * * @section Per-Sample Results * @publish *.tsv FastANI results of samples against reference @@ -59,7 +66,7 @@ params { include { BACTOPIATOOL_INIT } from '../../../subworkflows/utils/bactopia-tools/main' include { FASTANI } from '../../../subworkflows/fastani/main' -include { NCBIGENOMEDOWNLOAD } from '../../../subworkflows/ncbigenomedownload/main' +include { GENOMEDL } from '../../../subworkflows/genomedl/main' include { collectNextflowLogs } from 'plugin/nf-bactopia' workflow { @@ -77,8 +84,8 @@ workflow { // Download if applicable if (params.species || params.accession || params.accessions) { - ch_ncbigenomedownload = NCBIGENOMEDOWNLOAD(params.accessions) - ch_reference = ch_reference.mix(ch_ncbigenomedownload.assemblies) + ch_genomedl = GENOMEDL(params.accessions) + ch_reference = ch_reference.mix(ch_genomedl.assemblies) } // Add query if pairwise diff --git a/workflows/bactopia-tools/fastani/nextflow.config b/workflows/bactopia-tools/fastani/nextflow.config index 3d09685ba..a600caf11 100644 --- a/workflows/bactopia-tools/fastani/nextflow.config +++ b/workflows/bactopia-tools/fastani/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,18 +19,21 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" // Module specific config includeConfig "../../../modules/csvtk/concat/module.config" includeConfig "../../../modules/fastani/module.config" -includeConfig "../../../modules/ncbigenomedownload/module.config" +includeConfig "../../../modules/genomedl/module.config" // Set output directory outputDir = params.outdir @@ -84,7 +87,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/fastani/nextflow_schema.json b/workflows/bactopia-tools/fastani/nextflow_schema.json index 4cbf4b735..812a833c1 100644 --- a/workflows/bactopia-tools/fastani/nextflow_schema.json +++ b/workflows/bactopia-tools/fastani/nextflow_schema.json @@ -74,10 +74,10 @@ "description": "fragment length", "fa_icon": "fas fa-hashtag" }, - "fastani_skip_pairwise": { + "fastani_pairwise": { "type": "boolean", "default": false, - "description": "Only use RefSeq or local assemblies for ANI calculations", + "description": "Add every sample to the reference set, comparing each sample against every other sample in addition to any other references", "fa_icon": "fas fa-toggle-on" } } @@ -98,8 +98,8 @@ } } }, - "ncbigenomedownload_parameters": { - "title": "NCBI Genome Download Parameters", + "genomedl_parameters": { + "title": "genome-dl Parameters", "type": "object", "description": "", "default": "", @@ -113,6 +113,7 @@ "accession": { "type": "string", "description": "An NCBI Assembly accession to be downloaded", + "help": "Version-less accessions (e.g. GCF_000005845) are resolved to the latest version.", "fa_icon": "fas fa-font" }, "accessions": { @@ -124,12 +125,14 @@ "type": "string", "default": "fasta", "description": "Comma separated list of formats to download", + "help": "Choose from fasta, genbank, wgs, gff, gtf, protein, genpept, cds, translated-cds, rna, feature-table, assembly-report, assembly-stats or all.", "fa_icon": "fas fa-font" }, "section": { "type": "string", "default": "refseq", "description": "NCBI section to download", + "help": "Only applies to `--species`. Choose from refseq, genbank or all.", "fa_icon": "fas fa-font", "hidden": true }, @@ -137,26 +140,21 @@ "type": "string", "default": "complete", "description": "Comma separated list of assembly levels to download", - "fa_icon": "fas fa-font", - "hidden": true - }, - "kingdom": { - "type": "string", - "default": "bacteria", - "description": "Comma separated list of formats to download", + "help": "Only applies to `--species`. Choose from complete, chromosome, scaffold, contig or all.", "fa_icon": "fas fa-font", "hidden": true }, "limit": { - "type": "string", + "type": "integer", + "default": 100, "description": "Limit the number of assemblies to download", - "help": "If the the number of available genomes exceeds the given limit, a random subset will be selected.", - "fa_icon": "fas fa-font" + "help": "Only applies to `--species`, limit to first N assemblies returned by NCBI. Use 0 for no limit.", + "fa_icon": "fas fa-sort-numeric-up" }, - "keep_downloads": { + "genomedl_allow_outdated": { "type": "boolean", "default": false, - "description": "Save downloaded files into the bactopia-runs folder", + "description": "Download an explicitly requested outdated accession version instead of erroring", "fa_icon": "fas fa-toggle-on" } } @@ -459,13 +457,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", @@ -517,7 +508,7 @@ "$ref": "#/$defs/csvtk_concat_parameters" }, { - "$ref": "#/$defs/ncbigenomedownload_parameters" + "$ref": "#/$defs/genomedl_parameters" }, { "$ref": "#/$defs/optional_parameters" diff --git a/workflows/bactopia-tools/fastani/tests/main.nf.test.snap b/workflows/bactopia-tools/fastani/tests/main.nf.test.snap index 9ba27f3de..1f922eb7c 100644 --- a/workflows/bactopia-tools/fastani/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/fastani/tests/main.nf.test.snap @@ -5,17 +5,17 @@ [ "bactopia-runs", "bactopia-runs/fastani", - "bactopia-runs/fastani/GCF_020736045.1_ASM2073604v1_genomic", - "bactopia-runs/fastani/GCF_020736045.1_ASM2073604v1_genomic/GCF_020736045.1_ASM2073604v1_genomic.tsv", - "bactopia-runs/fastani/GCF_020736045.1_ASM2073604v1_genomic/logs", - "bactopia-runs/fastani/GCF_020736045.1_ASM2073604v1_genomic/logs/nf.command.begin", - "bactopia-runs/fastani/GCF_020736045.1_ASM2073604v1_genomic/logs/nf.command.err", - "bactopia-runs/fastani/GCF_020736045.1_ASM2073604v1_genomic/logs/nf.command.log", - "bactopia-runs/fastani/GCF_020736045.1_ASM2073604v1_genomic/logs/nf.command.out", - "bactopia-runs/fastani/GCF_020736045.1_ASM2073604v1_genomic/logs/nf.command.run", - "bactopia-runs/fastani/GCF_020736045.1_ASM2073604v1_genomic/logs/nf.command.sh", - "bactopia-runs/fastani/GCF_020736045.1_ASM2073604v1_genomic/logs/nf.command.trace", - "bactopia-runs/fastani/GCF_020736045.1_ASM2073604v1_genomic/logs/versions.yml", + "bactopia-runs/fastani/GCF_020736045.1", + "bactopia-runs/fastani/GCF_020736045.1/GCF_020736045.1.tsv", + "bactopia-runs/fastani/GCF_020736045.1/logs", + "bactopia-runs/fastani/GCF_020736045.1/logs/nf.command.begin", + "bactopia-runs/fastani/GCF_020736045.1/logs/nf.command.err", + "bactopia-runs/fastani/GCF_020736045.1/logs/nf.command.log", + "bactopia-runs/fastani/GCF_020736045.1/logs/nf.command.out", + "bactopia-runs/fastani/GCF_020736045.1/logs/nf.command.run", + "bactopia-runs/fastani/GCF_020736045.1/logs/nf.command.sh", + "bactopia-runs/fastani/GCF_020736045.1/logs/nf.command.trace", + "bactopia-runs/fastani/GCF_020736045.1/logs/versions.yml", "bactopia-runs/fastani/merged-results", "bactopia-runs/fastani/merged-results/fastani.tsv", "bactopia-runs/fastani/merged-results/logs", @@ -38,7 +38,7 @@ "versions.yml:md5,ec1c87c7160d76617e82583ad5b7740d" ] ], - "timestamp": "2026-04-29T11:23:18.750990614", + "timestamp": "2026-07-30T19:19:21.878600645", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -95,7 +95,7 @@ "versions.yml:md5,ec1c87c7160d76617e82583ad5b7740d" ] ], - "timestamp": "2026-04-29T11:22:34.677999189", + "timestamp": "2026-07-30T19:18:48.969197461", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -140,7 +140,7 @@ "versions.yml:md5,ec1c87c7160d76617e82583ad5b7740d" ] ], - "timestamp": "2026-04-29T11:22:00.063746589", + "timestamp": "2026-07-30T19:18:27.253450906", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/gamma/nextflow.config b/workflows/bactopia-tools/gamma/nextflow.config index 64c6b9aee..e0fe1bc9d 100644 --- a/workflows/bactopia-tools/gamma/nextflow.config +++ b/workflows/bactopia-tools/gamma/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/gamma/nextflow_schema.json b/workflows/bactopia-tools/gamma/nextflow_schema.json index bebfebbf7..56f0b8659 100644 --- a/workflows/bactopia-tools/gamma/nextflow_schema.json +++ b/workflows/bactopia-tools/gamma/nextflow_schema.json @@ -405,13 +405,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", @@ -478,4 +471,4 @@ "$ref": "#/$defs/generic_parameters" } ] -} +} \ No newline at end of file diff --git a/workflows/bactopia-tools/gamma/tests/main.nf.test.snap b/workflows/bactopia-tools/gamma/tests/main.nf.test.snap index fc9d551cf..7b1afada8 100644 --- a/workflows/bactopia-tools/gamma/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/gamma/tests/main.nf.test.snap @@ -45,7 +45,7 @@ "versions.yml:md5,d05d2269217aebb5587ece87b0666cf1" ] ], - "timestamp": "2026-04-29T11:22:12.28188556", + "timestamp": "2026-07-30T19:18:38.623764757", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/genotyphi/nextflow.config b/workflows/bactopia-tools/genotyphi/nextflow.config index 15da5b77c..977096f2f 100644 --- a/workflows/bactopia-tools/genotyphi/nextflow.config +++ b/workflows/bactopia-tools/genotyphi/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -84,7 +87,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/genotyphi/nextflow_schema.json b/workflows/bactopia-tools/genotyphi/nextflow_schema.json index dc3d977b0..96d00fde6 100644 --- a/workflows/bactopia-tools/genotyphi/nextflow_schema.json +++ b/workflows/bactopia-tools/genotyphi/nextflow_schema.json @@ -463,13 +463,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/genotyphi/tests/.nftignore b/workflows/bactopia-tools/genotyphi/tests/.nftignore index 72a5fcb38..6f049d6da 100644 --- a/workflows/bactopia-tools/genotyphi/tests/.nftignore +++ b/workflows/bactopia-tools/genotyphi/tests/.nftignore @@ -1,3 +1,4 @@ **/*.{err,gz,html,log,pdf,stderr,stdout} **/nf.command.* bactopia-runs/**/nf-reports/*.{dot,html} +**/tools/genotyphi/*.{csv,json} diff --git a/workflows/bactopia-tools/genotyphi/tests/main.nf.test.snap b/workflows/bactopia-tools/genotyphi/tests/main.nf.test.snap index ce806cf42..75686d50c 100644 --- a/workflows/bactopia-tools/genotyphi/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/genotyphi/tests/main.nf.test.snap @@ -48,8 +48,6 @@ "bactopia-runs/genotyphi/nf-reports/genotyphi-timeline.html" ], [ - "SRR2838702.csv:md5,643005849779eff11e0efe92802b08b7", - "SRR2838702.json:md5,11d0f10a53184817ebadd0dfaa90dee0", "SRR2838702.tsv:md5,57f85f8f41b2fb817f7693d07483d035", "versions.yml:md5,d8debae1bdcd6e4662223d9b812dd3d7", "versions.yml:md5,58cc026392506e5ec5266f0276d70c35", @@ -57,7 +55,7 @@ "versions.yml:md5,1e61ab9091b0ddd88b14c86fa3488bea" ] ], - "timestamp": "2026-04-29T11:22:18.38582236", + "timestamp": "2026-07-30T19:18:45.29927388", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/gigatyper/nextflow.config b/workflows/bactopia-tools/gigatyper/nextflow.config index 1d83174e0..6decfe009 100644 --- a/workflows/bactopia-tools/gigatyper/nextflow.config +++ b/workflows/bactopia-tools/gigatyper/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/gigatyper/nextflow_schema.json b/workflows/bactopia-tools/gigatyper/nextflow_schema.json index 7e58a0bc9..b28b1edb3 100644 --- a/workflows/bactopia-tools/gigatyper/nextflow_schema.json +++ b/workflows/bactopia-tools/gigatyper/nextflow_schema.json @@ -371,13 +371,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/gigatyper/tests/main.nf.test.snap b/workflows/bactopia-tools/gigatyper/tests/main.nf.test.snap index 6985f92f9..0fc3d83e0 100644 --- a/workflows/bactopia-tools/gigatyper/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/gigatyper/tests/main.nf.test.snap @@ -42,7 +42,7 @@ "versions.yml:md5,59922891ac61f5298b927f8e43eb5ae6" ] ], - "timestamp": "2026-04-29T11:22:29.075791227", + "timestamp": "2026-07-30T19:18:53.943082596", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/gtdb/nextflow.config b/workflows/bactopia-tools/gtdb/nextflow.config index 718df8d4a..aa2e983e0 100644 --- a/workflows/bactopia-tools/gtdb/nextflow.config +++ b/workflows/bactopia-tools/gtdb/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -84,7 +87,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/gtdb/nextflow_schema.json b/workflows/bactopia-tools/gtdb/nextflow_schema.json index f88b16a96..867c1369f 100644 --- a/workflows/bactopia-tools/gtdb/nextflow_schema.json +++ b/workflows/bactopia-tools/gtdb/nextflow_schema.json @@ -438,13 +438,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/gtdb/tests/main.nf.test.snap b/workflows/bactopia-tools/gtdb/tests/main.nf.test.snap index 975710333..8e0059bab 100644 --- a/workflows/bactopia-tools/gtdb/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/gtdb/tests/main.nf.test.snap @@ -43,11 +43,11 @@ "bactopia-runs/gtdb/nf-reports/gtdb-timeline.html" ], [ - "versions.yml:md5,738ac1f744a77df263f3b25b97a2748d", + "versions.yml:md5,07e1a7fe67e8f4acb512d2f15e50f6c3", "versions.yml:md5,ec94f157437c25058fdce9d4346342a2" ] ], - "timestamp": "2026-04-29T11:26:52.98395842", + "timestamp": "2026-07-30T19:23:50.216152542", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/hicap/nextflow.config b/workflows/bactopia-tools/hicap/nextflow.config index 3371173e6..16b04d730 100644 --- a/workflows/bactopia-tools/hicap/nextflow.config +++ b/workflows/bactopia-tools/hicap/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/hicap/nextflow_schema.json b/workflows/bactopia-tools/hicap/nextflow_schema.json index f5bbeee70..d0c7a5b0b 100644 --- a/workflows/bactopia-tools/hicap/nextflow_schema.json +++ b/workflows/bactopia-tools/hicap/nextflow_schema.json @@ -415,13 +415,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/hicap/tests/main.nf.test.snap b/workflows/bactopia-tools/hicap/tests/main.nf.test.snap index c1c3df910..1643e02e2 100644 --- a/workflows/bactopia-tools/hicap/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/hicap/tests/main.nf.test.snap @@ -61,7 +61,7 @@ "versions.yml:md5,0c84033bcf201f320a96434ff2545e4a" ] ], - "timestamp": "2026-04-29T11:22:50.299948987", + "timestamp": "2026-07-30T19:20:30.066864512", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/hpsuissero/nextflow.config b/workflows/bactopia-tools/hpsuissero/nextflow.config index c95b960c7..69359427a 100644 --- a/workflows/bactopia-tools/hpsuissero/nextflow.config +++ b/workflows/bactopia-tools/hpsuissero/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/hpsuissero/nextflow_schema.json b/workflows/bactopia-tools/hpsuissero/nextflow_schema.json index c99287759..0f44a3c61 100644 --- a/workflows/bactopia-tools/hpsuissero/nextflow_schema.json +++ b/workflows/bactopia-tools/hpsuissero/nextflow_schema.json @@ -356,13 +356,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/hpsuissero/tests/main.nf.test.snap b/workflows/bactopia-tools/hpsuissero/tests/main.nf.test.snap index 4d27f257f..cdeaf80f5 100644 --- a/workflows/bactopia-tools/hpsuissero/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/hpsuissero/tests/main.nf.test.snap @@ -42,7 +42,7 @@ "versions.yml:md5,f6953ae2271fe2a3415f7a5450e4f046" ] ], - "timestamp": "2026-04-29T11:22:34.484981045", + "timestamp": "2026-07-30T19:20:21.196535053", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/ismapper/nextflow.config b/workflows/bactopia-tools/ismapper/nextflow.config index 780214622..c0188b7ae 100644 --- a/workflows/bactopia-tools/ismapper/nextflow.config +++ b/workflows/bactopia-tools/ismapper/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -82,7 +85,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/ismapper/nextflow_schema.json b/workflows/bactopia-tools/ismapper/nextflow_schema.json index bf30899ea..c5cdfb81b 100644 --- a/workflows/bactopia-tools/ismapper/nextflow_schema.json +++ b/workflows/bactopia-tools/ismapper/nextflow_schema.json @@ -424,13 +424,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/ismapper/tests/main.nf.test.snap b/workflows/bactopia-tools/ismapper/tests/main.nf.test.snap index 8089ce537..86efd5ef9 100644 --- a/workflows/bactopia-tools/ismapper/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/ismapper/tests/main.nf.test.snap @@ -1068,7 +1068,7 @@ "versions.yml:md5,5c8653f3402a5a6792c554eea616f71c" ] ], - "timestamp": "2026-04-29T11:23:32.385928325", + "timestamp": "2026-07-30T19:21:11.372643235", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/kleborate/nextflow.config b/workflows/bactopia-tools/kleborate/nextflow.config index 680492be6..56a71ada7 100644 --- a/workflows/bactopia-tools/kleborate/nextflow.config +++ b/workflows/bactopia-tools/kleborate/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/kleborate/nextflow_schema.json b/workflows/bactopia-tools/kleborate/nextflow_schema.json index 05e4f10d3..0ce15a1c5 100644 --- a/workflows/bactopia-tools/kleborate/nextflow_schema.json +++ b/workflows/bactopia-tools/kleborate/nextflow_schema.json @@ -383,13 +383,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/kleborate/tests/main.nf.test.snap b/workflows/bactopia-tools/kleborate/tests/main.nf.test.snap index bca502e0d..182ffc397 100644 --- a/workflows/bactopia-tools/kleborate/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/kleborate/tests/main.nf.test.snap @@ -40,7 +40,7 @@ "versions.yml:md5,2351aac91e4aee5e9cfa2bd7a6a1bda0" ] ], - "timestamp": "2026-04-29T11:23:18.812152838", + "timestamp": "2026-07-30T19:21:27.104169078", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/kraken2/nextflow.config b/workflows/bactopia-tools/kraken2/nextflow.config index 628a3846e..404ec32f7 100644 --- a/workflows/bactopia-tools/kraken2/nextflow.config +++ b/workflows/bactopia-tools/kraken2/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -82,7 +85,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/kraken2/nextflow_schema.json b/workflows/bactopia-tools/kraken2/nextflow_schema.json index 4234c281c..9f1bf2bbe 100644 --- a/workflows/bactopia-tools/kraken2/nextflow_schema.json +++ b/workflows/bactopia-tools/kraken2/nextflow_schema.json @@ -422,13 +422,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/kraken2/tests/main.nf.test.snap b/workflows/bactopia-tools/kraken2/tests/main.nf.test.snap index 1b9fac9f9..4ca13a251 100644 --- a/workflows/bactopia-tools/kraken2/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/kraken2/tests/main.nf.test.snap @@ -24,11 +24,11 @@ "bactopia-runs/kraken2/nf-reports/kraken2-timeline.html" ], [ - "SRR2838702.kraken2.report.txt:md5,dbc13f97657d22326cabf4bd19564174", - "versions.yml:md5,64abaf13d756f2c9443d3b814985e107" + "SRR2838702.kraken2.report.txt:md5,0d7991cf80613ba55baf774b0f1140e4", + "versions.yml:md5,121005727d1dfbf01116529f9640d2c5" ] ], - "timestamp": "2026-04-29T11:27:56.470480451", + "timestamp": "2026-07-30T19:26:30.987425103", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -60,10 +60,10 @@ ], [ "SRR2838702.kraken2.report.txt:md5,055b6535f05d0342e7926ca9603340bf", - "versions.yml:md5,64abaf13d756f2c9443d3b814985e107" + "versions.yml:md5,121005727d1dfbf01116529f9640d2c5" ] ], - "timestamp": "2026-04-29T11:28:24.885961361", + "timestamp": "2026-07-30T19:27:19.843386225", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/legsta/nextflow.config b/workflows/bactopia-tools/legsta/nextflow.config index a46dc3fee..272dcccd5 100644 --- a/workflows/bactopia-tools/legsta/nextflow.config +++ b/workflows/bactopia-tools/legsta/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/legsta/nextflow_schema.json b/workflows/bactopia-tools/legsta/nextflow_schema.json index eb674f0ad..fae366ae8 100644 --- a/workflows/bactopia-tools/legsta/nextflow_schema.json +++ b/workflows/bactopia-tools/legsta/nextflow_schema.json @@ -371,13 +371,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/legsta/tests/main.nf.test.snap b/workflows/bactopia-tools/legsta/tests/main.nf.test.snap index f8d5c9f67..507112c00 100644 --- a/workflows/bactopia-tools/legsta/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/legsta/tests/main.nf.test.snap @@ -42,7 +42,7 @@ "versions.yml:md5,f5386e7ff032be488d34b8bb980ba73b" ] ], - "timestamp": "2026-04-29T11:22:59.111645445", + "timestamp": "2026-07-30T19:21:06.266878903", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/lissero/nextflow.config b/workflows/bactopia-tools/lissero/nextflow.config index f6464ce63..3894470d8 100644 --- a/workflows/bactopia-tools/lissero/nextflow.config +++ b/workflows/bactopia-tools/lissero/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/lissero/nextflow_schema.json b/workflows/bactopia-tools/lissero/nextflow_schema.json index a958be812..6d22146f8 100644 --- a/workflows/bactopia-tools/lissero/nextflow_schema.json +++ b/workflows/bactopia-tools/lissero/nextflow_schema.json @@ -377,13 +377,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/lissero/tests/main.nf.test.snap b/workflows/bactopia-tools/lissero/tests/main.nf.test.snap index e7c7c3131..2fdb29125 100644 --- a/workflows/bactopia-tools/lissero/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/lissero/tests/main.nf.test.snap @@ -42,7 +42,7 @@ "versions.yml:md5,f3f10093536274480dfa04035ebfbca2" ] ], - "timestamp": "2026-04-29T11:22:58.886763426", + "timestamp": "2026-07-30T19:21:06.877994198", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/mashdist/nextflow.config b/workflows/bactopia-tools/mashdist/nextflow.config index f4cf44885..9d0df5c65 100644 --- a/workflows/bactopia-tools/mashdist/nextflow.config +++ b/workflows/bactopia-tools/mashdist/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/mashdist/nextflow_schema.json b/workflows/bactopia-tools/mashdist/nextflow_schema.json index 00bb940bb..4f7d7c583 100644 --- a/workflows/bactopia-tools/mashdist/nextflow_schema.json +++ b/workflows/bactopia-tools/mashdist/nextflow_schema.json @@ -433,13 +433,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/mashdist/tests/main.nf.test.snap b/workflows/bactopia-tools/mashdist/tests/main.nf.test.snap index 48bafc325..59836480c 100644 --- a/workflows/bactopia-tools/mashdist/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/mashdist/tests/main.nf.test.snap @@ -43,7 +43,7 @@ "mashdist.tsv:md5,630500729ddf987a8f487cd409d0afce" ] ], - "timestamp": "2026-04-29T11:23:16.331571212", + "timestamp": "2026-07-30T19:21:17.345056885", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/mashtree/main.nf b/workflows/bactopia-tools/mashtree/main.nf index ed5cf085b..6a49488b9 100644 --- a/workflows/bactopia-tools/mashtree/main.nf +++ b/workflows/bactopia-tools/mashtree/main.nf @@ -4,26 +4,26 @@ * * This Bactopia Tool uses [Mashtree](https://github.com/lskatz/mashtree) to create a phylogenetic tree * of samples using [Mash](https://github.com/marbl/Mash) distances. It can include reference - * genomes from RefSeq by downloading them with NCBI genome download. + * genomes from NCBI by downloading them with genome-dl. * * @status stable * @keywords phylogeny, tree, mash, distance, comparative genomics, bactopia-tool * @tags complexity:moderate input-type:parameter output-type:multiple features:bactopia-tool,phylogeny,comparative * @citation mashtree * - * @subworkflows utils_bactopia-tools, mashtree, ncbigenomedownload + * @subworkflows utils_bactopia-tools, mashtree, genomedl * * @input rundir * Directory containing results from a completed Bactopia analysis run * * @input species - * Species name to download all RefSeq genomes for comparison + * Species name to download all NCBI genomes for comparison * * @input accession - * Specific NCBI Assembly RefSeq accession to download + * Specific NCBI Assembly accession to download * * @input accessions - * Path to file containing list of NCBI accessions to download + * Path to file containing list of NCBI Assembly accessions to download * * @section Phylogenetic Analysis * @publish mashtree.dnd Newick format tree file @@ -52,7 +52,7 @@ params { include { BACTOPIATOOL_INIT } from '../../../subworkflows/utils/bactopia-tools/main' include { MASHTREE } from '../../../subworkflows/mashtree/main' -include { NCBIGENOMEDOWNLOAD } from '../../../subworkflows/ncbigenomedownload/main' +include { GENOMEDL } from '../../../subworkflows/genomedl/main' include { gather } from 'plugin/nf-bactopia' include { collectNextflowLogs } from 'plugin/nf-bactopia' @@ -63,8 +63,8 @@ workflow { // Download if applicable if (params.species || params.accession || params.accessions) { - ch_ncbigenomedownload = NCBIGENOMEDOWNLOAD(params.accessions) - ch_samples = ch_samples.mix(ch_ncbigenomedownload.assemblies) + ch_genomedl = GENOMEDL(params.accessions) + ch_samples = ch_samples.mix(ch_genomedl.assemblies) } ch_mashtree = MASHTREE(gather(ch_samples, 'fna', [name: 'mashtree'])) diff --git a/workflows/bactopia-tools/mashtree/nextflow.config b/workflows/bactopia-tools/mashtree/nextflow.config index 66ba5acd0..6e5ac1b48 100644 --- a/workflows/bactopia-tools/mashtree/nextflow.config +++ b/workflows/bactopia-tools/mashtree/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,17 +19,20 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" // Module specific config includeConfig "../../../modules/mashtree/module.config" -includeConfig "../../../modules/ncbigenomedownload/module.config" +includeConfig "../../../modules/genomedl/module.config" // Set output directory outputDir = params.outdir @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/mashtree/nextflow_schema.json b/workflows/bactopia-tools/mashtree/nextflow_schema.json index a4a24cf8f..8a64ddc9a 100644 --- a/workflows/bactopia-tools/mashtree/nextflow_schema.json +++ b/workflows/bactopia-tools/mashtree/nextflow_schema.json @@ -101,8 +101,8 @@ } } }, - "ncbigenomedownload_parameters": { - "title": "NCBI Genome Download Parameters", + "genomedl_parameters": { + "title": "genome-dl Parameters", "type": "object", "description": "", "default": "", @@ -116,6 +116,7 @@ "accession": { "type": "string", "description": "An NCBI Assembly accession to be downloaded", + "help": "Version-less accessions (e.g. GCF_000005845) are resolved to the latest version.", "fa_icon": "fas fa-font" }, "accessions": { @@ -127,12 +128,14 @@ "type": "string", "default": "fasta", "description": "Comma separated list of formats to download", + "help": "Choose from fasta, genbank, wgs, gff, gtf, protein, genpept, cds, translated-cds, rna, feature-table, assembly-report, assembly-stats or all.", "fa_icon": "fas fa-font" }, "section": { "type": "string", "default": "refseq", "description": "NCBI section to download", + "help": "Only applies to `--species`. Choose from refseq, genbank or all.", "fa_icon": "fas fa-font", "hidden": true }, @@ -140,26 +143,21 @@ "type": "string", "default": "complete", "description": "Comma separated list of assembly levels to download", - "fa_icon": "fas fa-font", - "hidden": true - }, - "kingdom": { - "type": "string", - "default": "bacteria", - "description": "Comma separated list of formats to download", + "help": "Only applies to `--species`. Choose from complete, chromosome, scaffold, contig or all.", "fa_icon": "fas fa-font", "hidden": true }, "limit": { - "type": "string", + "type": "integer", + "default": 100, "description": "Limit the number of assemblies to download", - "help": "If the the number of available genomes exceeds the given limit, a random subset will be selected.", - "fa_icon": "fas fa-font" + "help": "Only applies to `--species`, limit to first N assemblies returned by NCBI. Use 0 for no limit.", + "fa_icon": "fas fa-sort-numeric-up" }, - "keep_downloads": { + "genomedl_allow_outdated": { "type": "boolean", "default": false, - "description": "Save downloaded files into the bactopia-runs folder", + "description": "Download an explicitly requested outdated accession version instead of erroring", "fa_icon": "fas fa-toggle-on" } } @@ -462,13 +460,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", @@ -517,7 +508,7 @@ "$ref": "#/$defs/mashtree_parameters" }, { - "$ref": "#/$defs/ncbigenomedownload_parameters" + "$ref": "#/$defs/genomedl_parameters" }, { "$ref": "#/$defs/optional_parameters" diff --git a/workflows/bactopia-tools/mashtree/tests/main.nf.test b/workflows/bactopia-tools/mashtree/tests/main.nf.test index d928b0955..adca73ce4 100644 --- a/workflows/bactopia-tools/mashtree/tests/main.nf.test +++ b/workflows/bactopia-tools/mashtree/tests/main.nf.test @@ -40,4 +40,41 @@ nextflow_pipeline { ) } } + + test("Mashtree (accession) - haemophilus_influenzae|compressed_fasta") { + when { + params { + bactopia_test = "/species/haemophilus_influenzae/compressed" + test_dataset = "" + test_dataset2 = "" + test_dataset3 = "" + test_r1 = "" + test_r2 = "" + test_se = "" + test_ont = "" + is_ci = true + outdir = "$outputDir" + // Version-less accession, genome-dl resolves it to the latest version + accession = "GCF_020736045" + } + } + + then { + // stable_name: All files + folders in ${params.outdir}/ with a stable name + def stable_name = getAllFilesFromDir(params.outdir, relative: true, includeDir: true, ignore: []) + // stable_path: All files in ${params.outdir}/ with stable content + def stable_path = getAllFilesFromDir(params.outdir, ignoreFile: '.nftignore') + assertAll( + { assert workflow.success}, + { assert snapshot( + // Number of successful tasks + workflow.trace.succeeded().size(), + // All stable path name, with a relative path + stable_name, + // All files with stable contents + stable_path + ).match() } + ) + } + } } diff --git a/workflows/bactopia-tools/mashtree/tests/main.nf.test.snap b/workflows/bactopia-tools/mashtree/tests/main.nf.test.snap index c4c13c7d1..a65c5f44f 100644 --- a/workflows/bactopia-tools/mashtree/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/mashtree/tests/main.nf.test.snap @@ -26,7 +26,40 @@ "mashtree.dnd:md5,2b2d08b0bf16e25717f5db0eca6eba6b" ] ], - "timestamp": "2026-04-29T11:23:17.010786547", + "timestamp": "2026-07-30T19:21:21.13656432", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + }, + "Mashtree (accession) - haemophilus_influenzae|compressed_fasta": { + "content": [ + 2, + [ + "bactopia-runs", + "bactopia-runs/mashtree", + "bactopia-runs/mashtree/logs", + "bactopia-runs/mashtree/logs/nf.command.begin", + "bactopia-runs/mashtree/logs/nf.command.err", + "bactopia-runs/mashtree/logs/nf.command.log", + "bactopia-runs/mashtree/logs/nf.command.out", + "bactopia-runs/mashtree/logs/nf.command.run", + "bactopia-runs/mashtree/logs/nf.command.sh", + "bactopia-runs/mashtree/logs/nf.command.trace", + "bactopia-runs/mashtree/logs/versions.yml", + "bactopia-runs/mashtree/mashtree.dnd", + "bactopia-runs/mashtree/mashtree.tsv", + "bactopia-runs/mashtree/nf-reports", + "bactopia-runs/mashtree/nf-reports/mashtree-dag.dot", + "bactopia-runs/mashtree/nf-reports/mashtree-report.html", + "bactopia-runs/mashtree/nf-reports/mashtree-timeline.html" + ], + [ + "versions.yml:md5,d8cd0c9b6f670d5ae21fda6592e85d32", + "mashtree.dnd:md5,02f89fd1a5f4a3a92df0b016061f67dd" + ] + ], + "timestamp": "2026-07-30T19:21:43.844483588", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/mcroni/nextflow.config b/workflows/bactopia-tools/mcroni/nextflow.config index 5d585a0c4..33f0fb199 100644 --- a/workflows/bactopia-tools/mcroni/nextflow.config +++ b/workflows/bactopia-tools/mcroni/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/mcroni/nextflow_schema.json b/workflows/bactopia-tools/mcroni/nextflow_schema.json index 4ec32740c..512636277 100644 --- a/workflows/bactopia-tools/mcroni/nextflow_schema.json +++ b/workflows/bactopia-tools/mcroni/nextflow_schema.json @@ -356,13 +356,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/mcroni/tests/main.nf.test.snap b/workflows/bactopia-tools/mcroni/tests/main.nf.test.snap index edfed7480..a2a424f3d 100644 --- a/workflows/bactopia-tools/mcroni/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/mcroni/tests/main.nf.test.snap @@ -44,7 +44,7 @@ "mcroni.tsv:md5,c5459d2965dfafe22f173023d0c35610" ] ], - "timestamp": "2026-04-29T11:23:26.898150496", + "timestamp": "2026-07-30T19:21:27.637231686", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/meningotype/nextflow.config b/workflows/bactopia-tools/meningotype/nextflow.config index a0c581d98..fb053fd27 100644 --- a/workflows/bactopia-tools/meningotype/nextflow.config +++ b/workflows/bactopia-tools/meningotype/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/meningotype/nextflow_schema.json b/workflows/bactopia-tools/meningotype/nextflow_schema.json index 76280e7fa..f8f599e08 100644 --- a/workflows/bactopia-tools/meningotype/nextflow_schema.json +++ b/workflows/bactopia-tools/meningotype/nextflow_schema.json @@ -395,13 +395,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/meningotype/tests/main.nf.test.snap b/workflows/bactopia-tools/meningotype/tests/main.nf.test.snap index 4c8a20213..069d4f146 100644 --- a/workflows/bactopia-tools/meningotype/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/meningotype/tests/main.nf.test.snap @@ -42,7 +42,7 @@ "meningotype.tsv:md5,cdf1cbd9f28a9ce2138f072c6d0ab391" ] ], - "timestamp": "2026-04-29T11:23:30.358881973", + "timestamp": "2026-07-30T19:21:31.081823696", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/merlin/main.nf b/workflows/bactopia-tools/merlin/main.nf index 6e881c660..3caa66281 100644 --- a/workflows/bactopia-tools/merlin/main.nf +++ b/workflows/bactopia-tools/merlin/main.nf @@ -31,6 +31,9 @@ * @input spatyper_repeat_order * Path to a custom spaTyper repeat order file * + * @input staphscan_db_mlst + * Path or tarball to custom MLST database for StaphSCAN surveillance + * * @section Species-Specific Analysis * @note Tools executed depend on detected species * @publish Analysis results from all executed species-specific tools @@ -56,6 +59,7 @@ params { hicap_model_fp : Path? spatyper_repeats : Path? spatyper_repeat_order : Path? + staphscan_db_mlst : Path? } include { BACTOPIATOOL_INIT } from '../../../subworkflows/utils/bactopia-tools/main' @@ -77,7 +81,9 @@ workflow { params.hicap_model_fp, // staphtyper params.spatyper_repeats, - params.spatyper_repeat_order + params.spatyper_repeat_order, + // staphscan + params.staphscan_db_mlst ) publish: diff --git a/workflows/bactopia-tools/merlin/nextflow.config b/workflows/bactopia-tools/merlin/nextflow.config index 0d40e6e69..a38422120 100644 --- a/workflows/bactopia-tools/merlin/nextflow.config +++ b/workflows/bactopia-tools/merlin/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -54,6 +57,7 @@ includeConfig "../../../modules/ssuissero/module.config" includeConfig "../../../modules/agrvate/module.config" includeConfig "../../../modules/spatyper/module.config" includeConfig "../../../modules/sccmec/module.config" +includeConfig "../../../modules/staphscan/module.config" includeConfig "../../../modules/stecfinder/module.config" includeConfig "../../../modules/tbprofiler/profile/module.config" includeConfig "../../../modules/tbprofiler/collate/module.config" @@ -110,7 +114,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/merlin/nextflow_schema.json b/workflows/bactopia-tools/merlin/nextflow_schema.json index 16c40261d..194501ced 100644 --- a/workflows/bactopia-tools/merlin/nextflow_schema.json +++ b/workflows/bactopia-tools/merlin/nextflow_schema.json @@ -720,6 +720,27 @@ } } }, + "staphscan_parameters": { + "title": "StaphSCAN Parameters", + "type": "object", + "description": "", + "default": "", + "fa_icon": "fas fa-exclamation-circle", + "properties": { + "staphscan_modules": { + "type": "string", + "default": "", + "description": "Comma-separated list of modules to run", + "fa_icon": "fas fa-font" + }, + "staphscan_db_mlst": { + "type": "string", + "description": "Path or tarball to custom MLST database", + "fa_icon": "fas fa-font", + "hidden": true + } + } + }, "stecfinder_parameters": { "title": "STECFinder Parameters", "type": "object", @@ -1212,13 +1233,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", @@ -1323,6 +1337,9 @@ { "$ref": "#/$defs/sccmec_parameters" }, + { + "$ref": "#/$defs/staphscan_parameters" + }, { "$ref": "#/$defs/stecfinder_parameters" }, diff --git a/workflows/bactopia-tools/merlin/tests/main.nf.test.snap b/workflows/bactopia-tools/merlin/tests/main.nf.test.snap index af31f63c9..86664ab02 100644 --- a/workflows/bactopia-tools/merlin/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/merlin/tests/main.nf.test.snap @@ -386,7 +386,7 @@ ] ], - "timestamp": "2026-04-29T11:25:22.320393361", + "timestamp": "2026-07-30T19:23:02.97683", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -394,7 +394,7 @@ }, "Merlin (--full_merlin) - portiera|compressed_fasta_and_fastq": { "content": [ - 48, + 50, [ "SRR2838702", "SRR2838702/tools", @@ -679,6 +679,17 @@ "SRR2838702/tools/ssuissero/logs/nf.command.sh", "SRR2838702/tools/ssuissero/logs/nf.command.trace", "SRR2838702/tools/ssuissero/logs/versions.yml", + "SRR2838702/tools/staphscan", + "SRR2838702/tools/staphscan/SRR2838702.tsv", + "SRR2838702/tools/staphscan/logs", + "SRR2838702/tools/staphscan/logs/nf.command.begin", + "SRR2838702/tools/staphscan/logs/nf.command.err", + "SRR2838702/tools/staphscan/logs/nf.command.log", + "SRR2838702/tools/staphscan/logs/nf.command.out", + "SRR2838702/tools/staphscan/logs/nf.command.run", + "SRR2838702/tools/staphscan/logs/nf.command.sh", + "SRR2838702/tools/staphscan/logs/nf.command.trace", + "SRR2838702/tools/staphscan/logs/versions.yml", "SRR2838702/tools/stecfinder", "SRR2838702/tools/stecfinder/SRR2838702.tsv", "SRR2838702/tools/stecfinder/logs", @@ -909,6 +920,15 @@ "bactopia-runs/merlin/merged-results/logs/ssuissero-concat/nf.command.sh", "bactopia-runs/merlin/merged-results/logs/ssuissero-concat/nf.command.trace", "bactopia-runs/merlin/merged-results/logs/ssuissero-concat/versions.yml", + "bactopia-runs/merlin/merged-results/logs/staphscan-concat", + "bactopia-runs/merlin/merged-results/logs/staphscan-concat/nf.command.begin", + "bactopia-runs/merlin/merged-results/logs/staphscan-concat/nf.command.err", + "bactopia-runs/merlin/merged-results/logs/staphscan-concat/nf.command.log", + "bactopia-runs/merlin/merged-results/logs/staphscan-concat/nf.command.out", + "bactopia-runs/merlin/merged-results/logs/staphscan-concat/nf.command.run", + "bactopia-runs/merlin/merged-results/logs/staphscan-concat/nf.command.sh", + "bactopia-runs/merlin/merged-results/logs/staphscan-concat/nf.command.trace", + "bactopia-runs/merlin/merged-results/logs/staphscan-concat/versions.yml", "bactopia-runs/merlin/merged-results/logs/stecfinder-concat", "bactopia-runs/merlin/merged-results/logs/stecfinder-concat/nf.command.begin", "bactopia-runs/merlin/merged-results/logs/stecfinder-concat/nf.command.err", @@ -939,6 +959,7 @@ "bactopia-runs/merlin/merged-results/sistr.tsv", "bactopia-runs/merlin/merged-results/spatyper.tsv", "bactopia-runs/merlin/merged-results/ssuissero.tsv", + "bactopia-runs/merlin/merged-results/staphscan.tsv", "bactopia-runs/merlin/merged-results/stecfinder.tsv", "bactopia-runs/merlin/merged-results/tbprofiler.csv", "bactopia-runs/merlin/merged-results/tbprofiler.variants.csv", @@ -952,7 +973,7 @@ ] ], - "timestamp": "2026-04-29T11:27:06.08576866", + "timestamp": "2026-07-30T19:25:20.93874873", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/midas/nextflow.config b/workflows/bactopia-tools/midas/nextflow.config index 3ab9e54a3..28f8512bf 100644 --- a/workflows/bactopia-tools/midas/nextflow.config +++ b/workflows/bactopia-tools/midas/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -84,7 +87,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/midas/nextflow_schema.json b/workflows/bactopia-tools/midas/nextflow_schema.json index af51dc363..b5c5be5a2 100644 --- a/workflows/bactopia-tools/midas/nextflow_schema.json +++ b/workflows/bactopia-tools/midas/nextflow_schema.json @@ -415,13 +415,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/midas/tests/main.nf.test.snap b/workflows/bactopia-tools/midas/tests/main.nf.test.snap index 43db30361..7edd75629 100644 --- a/workflows/bactopia-tools/midas/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/midas/tests/main.nf.test.snap @@ -46,7 +46,7 @@ "midas.tsv:md5,6078fbf9d5c44a56afeb7a42836b14d2" ] ], - "timestamp": "2026-04-29T11:24:15.40797744", + "timestamp": "2026-07-30T19:22:09.173693414", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -99,7 +99,7 @@ "midas.tsv:md5,6078fbf9d5c44a56afeb7a42836b14d2" ] ], - "timestamp": "2026-04-29T11:25:21.435687768", + "timestamp": "2026-07-30T19:23:12.153650008", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/mlst/main.nf b/workflows/bactopia-tools/mlst/main.nf index 4448e19fb..7773e83e8 100644 --- a/workflows/bactopia-tools/mlst/main.nf +++ b/workflows/bactopia-tools/mlst/main.nf @@ -12,13 +12,14 @@ * @tags complexity:simple input-type:parameter output-type:multiple features:bactopia-tool,aggregation * @citation csvtk, mlst, pubmlst * - * @subworkflows utils_bactopia-tools, mlst + * @subworkflows utils_bactopia-tools, mlst, bactopia_datasets * * @input rundir * Directory containing results from a completed Bactopia analysis run * * @input mlst_db - * Path to a pre-built MLST database directory (optional — auto-detected otherwise) + * Path to a custom MLST database, either a tarball or a directory. When omitted, the + * database is sourced from the Bactopia datasets. * * @section Per-Sample Results * @publish *.tsv Tab-delimited file with MLST results including scheme, ST, and allele profiles @@ -44,12 +45,19 @@ params { include { BACTOPIATOOL_INIT } from '../../../subworkflows/utils/bactopia-tools/main' include { MLST } from '../../../subworkflows/mlst/main' +include { DATASETS } from '../../../subworkflows/bactopia/datasets/main' include { collectNextflowLogs } from 'plugin/nf-bactopia' workflow { main: ch_bactopiatool = BACTOPIATOOL_INIT() - ch_mlst = MLST(ch_bactopiatool.assembly, params.mlst_db) + + if (params.mlst_db) { + ch_mlst = MLST(ch_bactopiatool.assembly, params.mlst_db) + } else { + ch_datasets = DATASETS() + ch_mlst = MLST(ch_bactopiatool.assembly, ch_datasets.mlst_db) + } publish: // Per-sample diff --git a/workflows/bactopia-tools/mlst/nextflow.config b/workflows/bactopia-tools/mlst/nextflow.config index cedd3ce26..01e620377 100644 --- a/workflows/bactopia-tools/mlst/nextflow.config +++ b/workflows/bactopia-tools/mlst/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,17 +19,21 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" // Module specific config includeConfig "../../../modules/csvtk/concat/module.config" includeConfig "../../../modules/mlst/module.config" +includeConfig "../../../modules/bactopia/datasets/module.config" // Set output directory outputDir = params.outdir @@ -83,7 +87,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/mlst/nextflow_schema.json b/workflows/bactopia-tools/mlst/nextflow_schema.json index 9876f9ee1..4b4554b63 100644 --- a/workflows/bactopia-tools/mlst/nextflow_schema.json +++ b/workflows/bactopia-tools/mlst/nextflow_schema.json @@ -81,7 +81,6 @@ }, "mlst_db": { "type": "string", - "default": "", "description": "A custom MLST database to use, either a tarball or a directory", "fa_icon": "fas fa-font" } @@ -401,13 +400,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/mlst/tests/main.nf.test.snap b/workflows/bactopia-tools/mlst/tests/main.nf.test.snap index ede6ba26a..73999fc88 100644 --- a/workflows/bactopia-tools/mlst/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/mlst/tests/main.nf.test.snap @@ -37,12 +37,12 @@ ], [ "GCF_000017085.tsv:md5,c2faf73735d4ebc6fb0d8f4b263eb5b6", - "versions.yml:md5,feb26d507cd4d8f25033d4950ba463ee", + "versions.yml:md5,55b934f1c8a9ffdd523a01a6e4d87a5e", "versions.yml:md5,082ad51a2f3d2c0b3a158586edc08efc", "mlst.tsv:md5,c2faf73735d4ebc6fb0d8f4b263eb5b6" ] ], - "timestamp": "2026-04-29T11:23:42.139593519", + "timestamp": "2026-07-30T19:21:36.849565541", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/mobsuite/nextflow.config b/workflows/bactopia-tools/mobsuite/nextflow.config index 78566399f..b88698c73 100644 --- a/workflows/bactopia-tools/mobsuite/nextflow.config +++ b/workflows/bactopia-tools/mobsuite/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/mobsuite/nextflow_schema.json b/workflows/bactopia-tools/mobsuite/nextflow_schema.json index e6aaced25..7a8e5d08c 100644 --- a/workflows/bactopia-tools/mobsuite/nextflow_schema.json +++ b/workflows/bactopia-tools/mobsuite/nextflow_schema.json @@ -391,13 +391,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/mobsuite/tests/main.nf.test.snap b/workflows/bactopia-tools/mobsuite/tests/main.nf.test.snap index ac8b9c171..bd4acc0e9 100644 --- a/workflows/bactopia-tools/mobsuite/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/mobsuite/tests/main.nf.test.snap @@ -46,7 +46,7 @@ "mobsuite.tsv:md5,951dbd706ab78c4d00aa28735ab34e87" ] ], - "timestamp": "2026-04-29T11:24:21.232121928", + "timestamp": "2026-07-30T19:22:27.604332423", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/mykrobe/nextflow.config b/workflows/bactopia-tools/mykrobe/nextflow.config index ba8257128..589210158 100644 --- a/workflows/bactopia-tools/mykrobe/nextflow.config +++ b/workflows/bactopia-tools/mykrobe/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/mykrobe/nextflow_schema.json b/workflows/bactopia-tools/mykrobe/nextflow_schema.json index 20ef49f35..5779168f1 100644 --- a/workflows/bactopia-tools/mykrobe/nextflow_schema.json +++ b/workflows/bactopia-tools/mykrobe/nextflow_schema.json @@ -416,13 +416,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/mykrobe/tests/main.nf.test.snap b/workflows/bactopia-tools/mykrobe/tests/main.nf.test.snap index 1a5886383..eea70d695 100644 --- a/workflows/bactopia-tools/mykrobe/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/mykrobe/tests/main.nf.test.snap @@ -41,7 +41,7 @@ "versions.yml:md5,b61c6df6bd9d4c4092a94b7ebb604057" ] ], - "timestamp": "2026-04-29T11:23:46.472023379", + "timestamp": "2026-07-30T19:21:57.914687216", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/ngmaster/nextflow.config b/workflows/bactopia-tools/ngmaster/nextflow.config index 9ea61c23d..e554dd35b 100644 --- a/workflows/bactopia-tools/ngmaster/nextflow.config +++ b/workflows/bactopia-tools/ngmaster/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/ngmaster/nextflow_schema.json b/workflows/bactopia-tools/ngmaster/nextflow_schema.json index bf2d9b474..4d5b29dcf 100644 --- a/workflows/bactopia-tools/ngmaster/nextflow_schema.json +++ b/workflows/bactopia-tools/ngmaster/nextflow_schema.json @@ -371,13 +371,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/ngmaster/tests/main.nf.test.snap b/workflows/bactopia-tools/ngmaster/tests/main.nf.test.snap index f094807e5..3cfe2a9cc 100644 --- a/workflows/bactopia-tools/ngmaster/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/ngmaster/tests/main.nf.test.snap @@ -37,12 +37,12 @@ ], [ "GCF_001047255.tsv:md5,2be2b3dd6c45726d2a9d7f2540b34219", - "versions.yml:md5,dcc7b71de52c4fe65e10147be956aa05", + "versions.yml:md5,67ed215f25e8d088f830fb7d63ab9df5", "versions.yml:md5,9dbc0e8b7902e955ec10c94c11074f06", "ngmaster.tsv:md5,2be2b3dd6c45726d2a9d7f2540b34219" ] ], - "timestamp": "2026-04-29T11:23:59.895408082", + "timestamp": "2026-07-30T19:22:04.188476944", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/pangenome/main.nf b/workflows/bactopia-tools/pangenome/main.nf index b9cdcec96..2031a1131 100644 --- a/workflows/bactopia-tools/pangenome/main.nf +++ b/workflows/bactopia-tools/pangenome/main.nf @@ -8,17 +8,17 @@ * [Roary](https://github.com/sanger-pathogens/roary). It generates core-genome alignments * and gene presence/absence matrices, followed by SNP distance calculations. * You can supplement your pangenome with completed genomes using the --species or - * --accessions parameters, which downloads genomes from RefSeq and annotates them with - * Prokka. A phylogeny based on the core-genome alignment is created by IQ-Tree, with + * --accessions parameters, which downloads genomes from NCBI with genome-dl and annotates + * them with Prokka. A phylogeny based on the core-genome alignment is created by IQ-Tree, with * optional recombination masking using ClonalFrameML. Finally, pan-genome wide * association studies can be conducted using Scoary. * * @status stable * @keywords alignment, core-genome, pan-genome, phylogeny, comparative genomics, bactopia-tool * @tags complexity:complex input-type:parameter output-type:multiple features:bactopia-tool,aggregation,conditional-logic - * @citation clonalframeml, iqtree, iqtree_modelfinder, iqtree_ufboot, ncbigenomedownload, panaroo, pirate, prokka, roary, scoary + * @citation clonalframeml, genome_dl, iqtree, iqtree_modelfinder, iqtree_ufboot, panaroo, pirate, prokka, roary, scoary * - * @subworkflows utils_bactopia-tools, pangenome, ncbigenomedownload, prokka, clonalframeml, iqtree, scoary + * @subworkflows utils_bactopia-tools, pangenome, genomedl, prokka, clonalframeml, iqtree, scoary * * @input rundir * Directory containing results from a completed Bactopia analysis run @@ -30,10 +30,10 @@ * Use Roary as the pangenome tool instead of Panaroo * * @input species - * Species name used to supplement the pangenome with RefSeq assemblies + * Species name used to supplement the pangenome with NCBI assemblies * * @input accession - * Single NCBI Assembly RefSeq accession to supplement the pangenome + * Single NCBI Assembly accession to supplement the pangenome * * @input accessions * Path to a file listing NCBI Assembly accessions to supplement the pangenome @@ -119,7 +119,7 @@ params { } include { BACTOPIATOOL_INIT } from '../../../subworkflows/utils/bactopia-tools/main' -include { NCBIGENOMEDOWNLOAD } from '../../../subworkflows/ncbigenomedownload/main' +include { GENOMEDL } from '../../../subworkflows/genomedl/main' include { PROKKA } from '../../../subworkflows/prokka/main' include { PANGENOME } from '../../../subworkflows/pangenome/main' include { CLONALFRAMEML } from '../../../subworkflows/clonalframeml/main' @@ -135,9 +135,9 @@ workflow { // Download if applicable if (params.species || params.accession || params.accessions) { - ch_ncbigenomedownload = NCBIGENOMEDOWNLOAD(params.accessions) + ch_genomedl = GENOMEDL(params.accessions) ch_prokka = PROKKA( - ch_ncbigenomedownload.assemblies, + ch_genomedl.assemblies, params.prokka_proteins, params.prokka_prodigal_tf ) diff --git a/workflows/bactopia-tools/pangenome/nextflow.config b/workflows/bactopia-tools/pangenome/nextflow.config index 7def7e46e..d60ae1cc9 100644 --- a/workflows/bactopia-tools/pangenome/nextflow.config +++ b/workflows/bactopia-tools/pangenome/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,16 +19,19 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" // Module specific config -includeConfig "../../../modules/ncbigenomedownload/module.config" +includeConfig "../../../modules/genomedl/module.config" includeConfig "../../../modules/prokka/module.config" includeConfig "../../../modules/pirate/module.config" includeConfig "../../../modules/roary/module.config" @@ -90,7 +93,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/pangenome/nextflow_schema.json b/workflows/bactopia-tools/pangenome/nextflow_schema.json index 8c4b84ab1..8e7ad3563 100644 --- a/workflows/bactopia-tools/pangenome/nextflow_schema.json +++ b/workflows/bactopia-tools/pangenome/nextflow_schema.json @@ -42,8 +42,8 @@ } } }, - "ncbigenomedownload_parameters": { - "title": "NCBI Genome Download Parameters", + "genomedl_parameters": { + "title": "genome-dl Parameters", "type": "object", "description": "", "default": "", @@ -57,6 +57,7 @@ "accession": { "type": "string", "description": "An NCBI Assembly accession to be downloaded", + "help": "Version-less accessions (e.g. GCF_000005845) are resolved to the latest version.", "fa_icon": "fas fa-font" }, "accessions": { @@ -68,12 +69,14 @@ "type": "string", "default": "fasta", "description": "Comma separated list of formats to download", + "help": "Choose from fasta, genbank, wgs, gff, gtf, protein, genpept, cds, translated-cds, rna, feature-table, assembly-report, assembly-stats or all.", "fa_icon": "fas fa-font" }, "section": { "type": "string", "default": "refseq", "description": "NCBI section to download", + "help": "Only applies to `--species`. Choose from refseq, genbank or all.", "fa_icon": "fas fa-font", "hidden": true }, @@ -81,26 +84,21 @@ "type": "string", "default": "complete", "description": "Comma separated list of assembly levels to download", - "fa_icon": "fas fa-font", - "hidden": true - }, - "kingdom": { - "type": "string", - "default": "bacteria", - "description": "Comma separated list of formats to download", + "help": "Only applies to `--species`. Choose from complete, chromosome, scaffold, contig or all.", "fa_icon": "fas fa-font", "hidden": true }, "limit": { - "type": "string", + "type": "integer", + "default": 100, "description": "Limit the number of assemblies to download", - "help": "If the the number of available genomes exceeds the given limit, a random subset will be selected.", - "fa_icon": "fas fa-font" + "help": "Only applies to `--species`, limit to first N assemblies returned by NCBI. Use 0 for no limit.", + "fa_icon": "fas fa-sort-numeric-up" }, - "keep_downloads": { + "genomedl_allow_outdated": { "type": "boolean", "default": false, - "description": "Save downloaded files into the bactopia-runs folder", + "description": "Download an explicitly requested outdated accession version instead of erroring", "fa_icon": "fas fa-toggle-on" } } @@ -114,6 +112,7 @@ "properties": { "prokka_proteins": { "type": "string", + "default": "${params.bactopia_dir}/data/proteins.faa", "description": "FASTA file of trusted proteins to first annotate from", "fa_icon": "fas fa-font" }, @@ -815,13 +814,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", @@ -867,7 +859,7 @@ "$ref": "#/$defs/filter_parameters" }, { - "$ref": "#/$defs/ncbigenomedownload_parameters" + "$ref": "#/$defs/genomedl_parameters" }, { "$ref": "#/$defs/prokka_parameters" @@ -909,4 +901,4 @@ "$ref": "#/$defs/generic_parameters" } ] -} +} \ No newline at end of file diff --git a/workflows/bactopia-tools/pangenome/tests/.nftignore b/workflows/bactopia-tools/pangenome/tests/.nftignore index 7b289fb58..d9d90783e 100644 --- a/workflows/bactopia-tools/pangenome/tests/.nftignore +++ b/workflows/bactopia-tools/pangenome/tests/.nftignore @@ -8,3 +8,4 @@ bactopia-runs/**/nf-reports/*.{dot,html} **/gene_presence_absence.csv **/gene_presence_absence_roary.csv **/pan_sequences.representative.fasta* +**/alignment_resume_state.json diff --git a/workflows/bactopia-tools/pangenome/tests/main.nf.test b/workflows/bactopia-tools/pangenome/tests/main.nf.test index 53ba11679..2db6eaaea 100644 --- a/workflows/bactopia-tools/pangenome/tests/main.nf.test +++ b/workflows/bactopia-tools/pangenome/tests/main.nf.test @@ -83,6 +83,46 @@ nextflow_pipeline { } } + test("pangenome (panaroo --skip_recombination --accession) - multiple|portiera|compressed_gff") { + when { + params { + bactopia_test = "/species/mixed/gffs" + test_dataset = "" + test_dataset2 = "" + test_dataset3 = "" + test_r1 = "" + test_r2 = "" + test_se = "" + test_ont = "" + is_ci = true + outdir = "$outputDir" + accession = "GCF_000300035" + panaroo_core_threshold = 0.80 + panaroo_threshold = 0.85 + skip_recombination = true + } + } + + then { + // stable_name: All files + folders in ${params.outdir}/ with a stable name + // Ignore aligned_gene_sequences (panaroo gene naming is non-deterministic) + def stable_name = getAllFilesFromDir(params.outdir, relative: true, includeDir: true, ignore: ['**/aligned_gene_sequences/**']) + // stable_path: All files in ${params.outdir}/ with stable content + def stable_path = getAllFilesFromDir(params.outdir, ignoreFile: '.nftignore') + assertAll( + { assert workflow.success}, + { assert snapshot( + // Number of successful tasks + workflow.trace.succeeded().size(), + // All stable path name, with a relative path + stable_name, + // All files with stable contents + stable_path + ).match() } + ) + } + } + test("pangenome (pirate) - multiple|portiera|compressed_gff") { when { params { diff --git a/workflows/bactopia-tools/pangenome/tests/main.nf.test.snap b/workflows/bactopia-tools/pangenome/tests/main.nf.test.snap index 6797f5c88..588e8b92b 100644 --- a/workflows/bactopia-tools/pangenome/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/pangenome/tests/main.nf.test.snap @@ -132,15 +132,15 @@ ], [ "versions.yml:md5,70f831abce5d4f7f4ad4177a0ad339cc", - "versions.yml:md5,2998af40c25f65e228af5938ff93448e", - "versions.yml:md5,e01256842798c2b435032141a36e34a4", + "versions.yml:md5,a8001abd80c493ec7ae6d20498bcd5bf", + "versions.yml:md5,35bdf120a286dc0efcc97ccb06895c0f", "versions.yml:md5,15428b6f6c4a355e8944a4f92f0390c7", "versions.yml:md5,36d9b366d4941f258a248bf7a31aecc7", "versions.yml:md5,77f64a20eeab9152a61953ec5203b926", "versions.yml:md5,3d37a0edadfd11d1e7e95ff8201e7f2a" ] ], - "timestamp": "2026-04-29T11:30:18.404904236", + "timestamp": "2026-07-30T19:30:46.745126115", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -307,14 +307,14 @@ ], [ "versions.yml:md5,70f831abce5d4f7f4ad4177a0ad339cc", - "versions.yml:md5,2998af40c25f65e228af5938ff93448e", - "versions.yml:md5,e01256842798c2b435032141a36e34a4", + "versions.yml:md5,a8001abd80c493ec7ae6d20498bcd5bf", + "versions.yml:md5,35bdf120a286dc0efcc97ccb06895c0f", "versions.yml:md5,826c93ad04efd1f51b1e1a009d5c0ba7", "versions.yml:md5,77f64a20eeab9152a61953ec5203b926", "versions.yml:md5,3d37a0edadfd11d1e7e95ff8201e7f2a" ] ], - "timestamp": "2026-04-29T11:27:43.40448099", + "timestamp": "2026-07-30T19:28:00.244067439", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -440,14 +440,14 @@ ], [ "versions.yml:md5,70f831abce5d4f7f4ad4177a0ad339cc", - "versions.yml:md5,2998af40c25f65e228af5938ff93448e", - "versions.yml:md5,e01256842798c2b435032141a36e34a4", + "versions.yml:md5,a8001abd80c493ec7ae6d20498bcd5bf", + "versions.yml:md5,35bdf120a286dc0efcc97ccb06895c0f", "versions.yml:md5,15428b6f6c4a355e8944a4f92f0390c7", "versions.yml:md5,77f64a20eeab9152a61953ec5203b926", "versions.yml:md5,3d37a0edadfd11d1e7e95ff8201e7f2a" ] ], - "timestamp": "2026-04-29T11:28:59.354294099", + "timestamp": "2026-07-30T19:29:29.722801387", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -524,6 +524,7 @@ "bactopia-runs/pangenome/panaroo.filtered.aln.gz", "bactopia-runs/pangenome/panaroo/aligned_gene_sequences", "bactopia-runs/pangenome/panaroo/alignment_entropy.csv", + "bactopia-runs/pangenome/panaroo/alignment_resume_state.json", "bactopia-runs/pangenome/panaroo/combined_DNA_CDS.fasta.gz", "bactopia-runs/pangenome/panaroo/combined_protein_CDS.fasta.gz", "bactopia-runs/pangenome/panaroo/combined_protein_cdhit_out.txt", @@ -571,14 +572,14 @@ ], [ "versions.yml:md5,70f831abce5d4f7f4ad4177a0ad339cc", - "versions.yml:md5,2998af40c25f65e228af5938ff93448e", - "versions.yml:md5,e01256842798c2b435032141a36e34a4", - "versions.yml:md5,5514295ba35a95ebb8417acd05766159", + "versions.yml:md5,a8001abd80c493ec7ae6d20498bcd5bf", + "versions.yml:md5,35bdf120a286dc0efcc97ccb06895c0f", + "versions.yml:md5,709f42df442c9f6cc5132ad147bd334e", "versions.yml:md5,77f64a20eeab9152a61953ec5203b926", "versions.yml:md5,3d37a0edadfd11d1e7e95ff8201e7f2a" ] ], - "timestamp": "2026-04-29T11:25:18.043114573", + "timestamp": "2026-07-30T19:23:29.45636356", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -620,6 +621,7 @@ "bactopia-runs/pangenome/panaroo.filtered.aln.gz", "bactopia-runs/pangenome/panaroo/aligned_gene_sequences", "bactopia-runs/pangenome/panaroo/alignment_entropy.csv", + "bactopia-runs/pangenome/panaroo/alignment_resume_state.json", "bactopia-runs/pangenome/panaroo/combined_DNA_CDS.fasta.gz", "bactopia-runs/pangenome/panaroo/combined_protein_CDS.fasta.gz", "bactopia-runs/pangenome/panaroo/combined_protein_cdhit_out.txt", @@ -656,12 +658,96 @@ "bactopia-runs/pangenome/snpdists/logs/versions.yml" ], [ - "versions.yml:md5,e01256842798c2b435032141a36e34a4", - "versions.yml:md5,5514295ba35a95ebb8417acd05766159", + "versions.yml:md5,35bdf120a286dc0efcc97ccb06895c0f", + "versions.yml:md5,709f42df442c9f6cc5132ad147bd334e", "versions.yml:md5,3d37a0edadfd11d1e7e95ff8201e7f2a" ] ], - "timestamp": "2026-04-29T11:26:18.912862645", + "timestamp": "2026-07-30T19:24:41.470997199", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + }, + "pangenome (panaroo --skip_recombination --accession) - multiple|portiera|compressed_gff": { + "content": [ + 5, + [ + "bactopia-runs", + "bactopia-runs/pangenome", + "bactopia-runs/pangenome/core-genome.distance.tsv", + "bactopia-runs/pangenome/core-genome.treefile", + "bactopia-runs/pangenome/iqtree", + "bactopia-runs/pangenome/iqtree/core-genome.alninfo.gz", + "bactopia-runs/pangenome/iqtree/core-genome.bionj", + "bactopia-runs/pangenome/iqtree/core-genome.ckp.gz", + "bactopia-runs/pangenome/iqtree/core-genome.contree", + "bactopia-runs/pangenome/iqtree/core-genome.iqtree", + "bactopia-runs/pangenome/iqtree/core-genome.log", + "bactopia-runs/pangenome/iqtree/core-genome.mldist", + "bactopia-runs/pangenome/iqtree/core-genome.splits.nex", + "bactopia-runs/pangenome/iqtree/core-genome.ufboot", + "bactopia-runs/pangenome/iqtree/logs", + "bactopia-runs/pangenome/iqtree/logs/nf.command.begin", + "bactopia-runs/pangenome/iqtree/logs/nf.command.err", + "bactopia-runs/pangenome/iqtree/logs/nf.command.log", + "bactopia-runs/pangenome/iqtree/logs/nf.command.out", + "bactopia-runs/pangenome/iqtree/logs/nf.command.run", + "bactopia-runs/pangenome/iqtree/logs/nf.command.sh", + "bactopia-runs/pangenome/iqtree/logs/nf.command.trace", + "bactopia-runs/pangenome/iqtree/logs/versions.yml", + "bactopia-runs/pangenome/nf-reports", + "bactopia-runs/pangenome/nf-reports/pangenome-dag.dot", + "bactopia-runs/pangenome/nf-reports/pangenome-report.html", + "bactopia-runs/pangenome/nf-reports/pangenome-timeline.html", + "bactopia-runs/pangenome/panaroo", + "bactopia-runs/pangenome/panaroo.aln.gz", + "bactopia-runs/pangenome/panaroo.filtered.aln.gz", + "bactopia-runs/pangenome/panaroo/aligned_gene_sequences", + "bactopia-runs/pangenome/panaroo/alignment_entropy.csv", + "bactopia-runs/pangenome/panaroo/alignment_resume_state.json", + "bactopia-runs/pangenome/panaroo/combined_DNA_CDS.fasta.gz", + "bactopia-runs/pangenome/panaroo/combined_protein_CDS.fasta.gz", + "bactopia-runs/pangenome/panaroo/combined_protein_cdhit_out.txt", + "bactopia-runs/pangenome/panaroo/combined_protein_cdhit_out.txt.clstr", + "bactopia-runs/pangenome/panaroo/core_alignment_filtered_header.embl", + "bactopia-runs/pangenome/panaroo/core_alignment_header.embl", + "bactopia-runs/pangenome/panaroo/final_graph.gml.gz", + "bactopia-runs/pangenome/panaroo/gene_data.csv.gz", + "bactopia-runs/pangenome/panaroo/gene_presence_absence.Rtab", + "bactopia-runs/pangenome/panaroo/gene_presence_absence.csv", + "bactopia-runs/pangenome/panaroo/gene_presence_absence_roary.csv", + "bactopia-runs/pangenome/panaroo/logs", + "bactopia-runs/pangenome/panaroo/logs/nf.command.begin", + "bactopia-runs/pangenome/panaroo/logs/nf.command.err", + "bactopia-runs/pangenome/panaroo/logs/nf.command.log", + "bactopia-runs/pangenome/panaroo/logs/nf.command.out", + "bactopia-runs/pangenome/panaroo/logs/nf.command.run", + "bactopia-runs/pangenome/panaroo/logs/nf.command.sh", + "bactopia-runs/pangenome/panaroo/logs/nf.command.trace", + "bactopia-runs/pangenome/panaroo/logs/versions.yml", + "bactopia-runs/pangenome/panaroo/pan_genome_reference.fa.gz", + "bactopia-runs/pangenome/panaroo/pre_filt_graph.gml.gz", + "bactopia-runs/pangenome/panaroo/struct_presence_absence.Rtab", + "bactopia-runs/pangenome/panaroo/summary_statistics.txt", + "bactopia-runs/pangenome/snpdists", + "bactopia-runs/pangenome/snpdists/logs", + "bactopia-runs/pangenome/snpdists/logs/nf.command.begin", + "bactopia-runs/pangenome/snpdists/logs/nf.command.err", + "bactopia-runs/pangenome/snpdists/logs/nf.command.log", + "bactopia-runs/pangenome/snpdists/logs/nf.command.out", + "bactopia-runs/pangenome/snpdists/logs/nf.command.run", + "bactopia-runs/pangenome/snpdists/logs/nf.command.sh", + "bactopia-runs/pangenome/snpdists/logs/nf.command.trace", + "bactopia-runs/pangenome/snpdists/logs/versions.yml" + ], + [ + "versions.yml:md5,35bdf120a286dc0efcc97ccb06895c0f", + "versions.yml:md5,709f42df442c9f6cc5132ad147bd334e", + "versions.yml:md5,3d37a0edadfd11d1e7e95ff8201e7f2a" + ] + ], + "timestamp": "2026-07-30T19:26:13.960498899", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/pasty/nextflow.config b/workflows/bactopia-tools/pasty/nextflow.config index 4a9fc0d4d..b708c99ed 100644 --- a/workflows/bactopia-tools/pasty/nextflow.config +++ b/workflows/bactopia-tools/pasty/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/pasty/nextflow_schema.json b/workflows/bactopia-tools/pasty/nextflow_schema.json index 8f92ff227..6a69bb254 100644 --- a/workflows/bactopia-tools/pasty/nextflow_schema.json +++ b/workflows/bactopia-tools/pasty/nextflow_schema.json @@ -377,13 +377,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/pasty/tests/.nftignore b/workflows/bactopia-tools/pasty/tests/.nftignore index 72a5fcb38..8ee23c491 100644 --- a/workflows/bactopia-tools/pasty/tests/.nftignore +++ b/workflows/bactopia-tools/pasty/tests/.nftignore @@ -1,3 +1,5 @@ **/*.{err,gz,html,log,pdf,stderr,stdout} **/nf.command.* bactopia-runs/**/nf-reports/*.{dot,html} + +**/*.{tsv,yml} diff --git a/workflows/bactopia-tools/pasty/tests/main.nf.test.snap b/workflows/bactopia-tools/pasty/tests/main.nf.test.snap index b18fcc381..925bedf64 100644 --- a/workflows/bactopia-tools/pasty/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/pasty/tests/main.nf.test.snap @@ -38,15 +38,10 @@ "bactopia-runs/pasty/nf-reports/pasty-timeline.html" ], [ - "GCF_000006765.blastn.tsv:md5,dcaf63876416cd5c19d868cfbf446258", - "GCF_000006765.details.tsv:md5,1215b1d8dd346836e07404c0a13c79f1", - "GCF_000006765.tsv:md5,fdffd76c66ee57072cd5e8da474bba34", - "versions.yml:md5,0356132ceb204ae511870a5e1fcb6d17", - "versions.yml:md5,d806f451289eb221f11075799712603e", - "pasty.tsv:md5,3f0b647b733d1c01212c1f475527aef4" + ] ], - "timestamp": "2026-04-29T11:23:50.707543844", + "timestamp": "2026-07-30T19:22:21.221326281", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/pbptyper/nextflow.config b/workflows/bactopia-tools/pbptyper/nextflow.config index ce39d0c4c..b6c41d74d 100644 --- a/workflows/bactopia-tools/pbptyper/nextflow.config +++ b/workflows/bactopia-tools/pbptyper/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/pbptyper/nextflow_schema.json b/workflows/bactopia-tools/pbptyper/nextflow_schema.json index b8261a65f..079542f60 100644 --- a/workflows/bactopia-tools/pbptyper/nextflow_schema.json +++ b/workflows/bactopia-tools/pbptyper/nextflow_schema.json @@ -377,13 +377,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/pbptyper/tests/.nftignore b/workflows/bactopia-tools/pbptyper/tests/.nftignore index 72a5fcb38..8ee23c491 100644 --- a/workflows/bactopia-tools/pbptyper/tests/.nftignore +++ b/workflows/bactopia-tools/pbptyper/tests/.nftignore @@ -1,3 +1,5 @@ **/*.{err,gz,html,log,pdf,stderr,stdout} **/nf.command.* bactopia-runs/**/nf-reports/*.{dot,html} + +**/*.{tsv,yml} diff --git a/workflows/bactopia-tools/pbptyper/tests/main.nf.test.snap b/workflows/bactopia-tools/pbptyper/tests/main.nf.test.snap index 8db1e4eb5..25b6e3fe2 100644 --- a/workflows/bactopia-tools/pbptyper/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/pbptyper/tests/main.nf.test.snap @@ -37,14 +37,10 @@ "bactopia-runs/pbptyper/nf-reports/pbptyper-timeline.html" ], [ - "GCF_001457635.tblastn.tsv:md5,ce2247715df7d40f2ada2fe27e6c3967", - "GCF_001457635.tsv:md5,1a21879bdaf7aac85a1f4e0fb0e59989", - "versions.yml:md5,47bb164e7435b20fe6e3e392e1bf06db", - "versions.yml:md5,f52169fdc42464f8ece8fcb1e5591a18", - "pbptyper.tsv:md5,34edc1f9346b74b74ef4446d270e6d57" + ] ], - "timestamp": "2026-04-29T11:24:22.709047733", + "timestamp": "2026-07-30T19:23:01.607640403", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/phispy/nextflow.config b/workflows/bactopia-tools/phispy/nextflow.config index 682020bd1..b3b120128 100644 --- a/workflows/bactopia-tools/phispy/nextflow.config +++ b/workflows/bactopia-tools/phispy/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/phispy/nextflow_schema.json b/workflows/bactopia-tools/phispy/nextflow_schema.json index 8ce9406d3..03692a1cf 100644 --- a/workflows/bactopia-tools/phispy/nextflow_schema.json +++ b/workflows/bactopia-tools/phispy/nextflow_schema.json @@ -410,13 +410,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", @@ -483,4 +476,4 @@ "$ref": "#/$defs/generic_parameters" } ] -} +} \ No newline at end of file diff --git a/workflows/bactopia-tools/phispy/tests/main.nf.test.snap b/workflows/bactopia-tools/phispy/tests/main.nf.test.snap index baf594481..4b3c82a85 100644 --- a/workflows/bactopia-tools/phispy/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/phispy/tests/main.nf.test.snap @@ -55,12 +55,12 @@ "bactopia-runs/phispy/nf-reports/phispy-timeline.html" ], [ - "versions.yml:md5,6487fa342391eda548b492a099ee91ed", - "versions.yml:md5,6487fa342391eda548b492a099ee91ed", + "versions.yml:md5,5e1425957e8a8025744f6a4d4dbb24cf", + "versions.yml:md5,5e1425957e8a8025744f6a4d4dbb24cf", "versions.yml:md5,07d57bb6615d099e188c1aad39da5c83" ] ], - "timestamp": "2026-04-29T11:24:39.747961501", + "timestamp": "2026-07-30T19:23:16.760576618", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/plasmidfinder/nextflow.config b/workflows/bactopia-tools/plasmidfinder/nextflow.config index 22642b30c..10698dbff 100644 --- a/workflows/bactopia-tools/plasmidfinder/nextflow.config +++ b/workflows/bactopia-tools/plasmidfinder/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/plasmidfinder/nextflow_schema.json b/workflows/bactopia-tools/plasmidfinder/nextflow_schema.json index 3cea2e3c8..34fca0d57 100644 --- a/workflows/bactopia-tools/plasmidfinder/nextflow_schema.json +++ b/workflows/bactopia-tools/plasmidfinder/nextflow_schema.json @@ -377,13 +377,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/plasmidfinder/tests/main.nf.test.snap b/workflows/bactopia-tools/plasmidfinder/tests/main.nf.test.snap index 792000550..50e5c6246 100644 --- a/workflows/bactopia-tools/plasmidfinder/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/plasmidfinder/tests/main.nf.test.snap @@ -44,7 +44,7 @@ "versions.yml:md5,4f95221cf6912e60932c0c0c6982fba5" ] ], - "timestamp": "2026-04-29T11:23:57.039800861", + "timestamp": "2026-07-30T19:22:40.743868219", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/pneumocat/nextflow.config b/workflows/bactopia-tools/pneumocat/nextflow.config index bae5107dd..debdbe358 100644 --- a/workflows/bactopia-tools/pneumocat/nextflow.config +++ b/workflows/bactopia-tools/pneumocat/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -82,7 +85,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/pneumocat/nextflow_schema.json b/workflows/bactopia-tools/pneumocat/nextflow_schema.json index 13031fab6..622a8677c 100644 --- a/workflows/bactopia-tools/pneumocat/nextflow_schema.json +++ b/workflows/bactopia-tools/pneumocat/nextflow_schema.json @@ -340,13 +340,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/pneumocat/tests/main.nf.test.snap b/workflows/bactopia-tools/pneumocat/tests/main.nf.test.snap index 98f83fd43..937ded31b 100644 --- a/workflows/bactopia-tools/pneumocat/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/pneumocat/tests/main.nf.test.snap @@ -31,7 +31,7 @@ "versions.yml:md5,4c8b3e01e7425c78f2849d2e585f9cec" ] ], - "timestamp": "2026-04-29T11:23:55.183229181", + "timestamp": "2026-07-30T19:22:33.509557861", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/prokka/nextflow.config b/workflows/bactopia-tools/prokka/nextflow.config index 4f09912fe..7d39d72d0 100644 --- a/workflows/bactopia-tools/prokka/nextflow.config +++ b/workflows/bactopia-tools/prokka/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -82,7 +85,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/prokka/nextflow_schema.json b/workflows/bactopia-tools/prokka/nextflow_schema.json index 17146b7be..e5b38acbf 100644 --- a/workflows/bactopia-tools/prokka/nextflow_schema.json +++ b/workflows/bactopia-tools/prokka/nextflow_schema.json @@ -51,6 +51,7 @@ "properties": { "prokka_proteins": { "type": "string", + "default": "${params.bactopia_dir}/data/proteins.faa", "description": "FASTA file of trusted proteins to first annotate from", "fa_icon": "fas fa-font" }, @@ -400,13 +401,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/prokka/tests/main.nf.test.snap b/workflows/bactopia-tools/prokka/tests/main.nf.test.snap index 781e5dca1..32e787f9e 100644 --- a/workflows/bactopia-tools/prokka/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/prokka/tests/main.nf.test.snap @@ -42,7 +42,7 @@ "versions.yml:md5,27f053a0892518f8b0fb60e2100e922e" ] ], - "timestamp": "2026-04-29T11:24:02.431203572", + "timestamp": "2026-07-30T19:22:43.125463361", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/quast/nextflow.config b/workflows/bactopia-tools/quast/nextflow.config index dee8a484d..a9e6ba3dc 100644 --- a/workflows/bactopia-tools/quast/nextflow.config +++ b/workflows/bactopia-tools/quast/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/quast/nextflow_schema.json b/workflows/bactopia-tools/quast/nextflow_schema.json index 640a2dfb8..bba3276c4 100644 --- a/workflows/bactopia-tools/quast/nextflow_schema.json +++ b/workflows/bactopia-tools/quast/nextflow_schema.json @@ -389,13 +389,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/quast/tests/.nftignore b/workflows/bactopia-tools/quast/tests/.nftignore index 72a5fcb38..f1d2aaa1d 100644 --- a/workflows/bactopia-tools/quast/tests/.nftignore +++ b/workflows/bactopia-tools/quast/tests/.nftignore @@ -1,3 +1,5 @@ **/*.{err,gz,html,log,pdf,stderr,stdout} **/nf.command.* bactopia-runs/**/nf-reports/*.{dot,html} + +**/*.yml diff --git a/workflows/bactopia-tools/quast/tests/main.nf.test.snap b/workflows/bactopia-tools/quast/tests/main.nf.test.snap index ce291c5ff..78e86e492 100644 --- a/workflows/bactopia-tools/quast/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/quast/tests/main.nf.test.snap @@ -58,18 +58,16 @@ ], [ "SRR2838702.tsv:md5,a02f798379d9982810a198ec9b389079", - "versions.yml:md5,83128d552544124c01b8b5502f773fc6", "SRR2838702_glimmer_genes.gff:md5,36b7926c51f078321f2fd6867a4de85a", "report.tex:md5,04c0dc621c59c716c7c99a57c6eba3c6", "report.tsv:md5,8c0257e77c7bb49f734e68054cb3fcdc", "report.txt:md5,d35e1ed08c41cc6e391297a2885ed278", "transposed_report.tex:md5,92a642be48f2ed8e9d45f32aed4713a2", "transposed_report.txt:md5,652a64d08ecdfe0b26fd918815575737", - "versions.yml:md5,f6625779099decc901ee6311371b1230", "quast.tsv:md5,a02f798379d9982810a198ec9b389079" ] ], - "timestamp": "2026-04-29T11:24:09.935936083", + "timestamp": "2026-07-30T19:22:43.506155874", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/rgi/nextflow.config b/workflows/bactopia-tools/rgi/nextflow.config index 805bfd5ca..dee100534 100644 --- a/workflows/bactopia-tools/rgi/nextflow.config +++ b/workflows/bactopia-tools/rgi/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -84,7 +87,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/rgi/nextflow_schema.json b/workflows/bactopia-tools/rgi/nextflow_schema.json index a4ea5d9f2..aee006e32 100644 --- a/workflows/bactopia-tools/rgi/nextflow_schema.json +++ b/workflows/bactopia-tools/rgi/nextflow_schema.json @@ -62,10 +62,10 @@ "fa_icon": "fas fa-toggle-on", "hidden": true }, - "rgi_exclude_nudge": { + "rgi_include_nudge": { "type": "boolean", "default": false, - "description": "Exclude hits nudged from loose to strict hits", + "description": "Include hits nudged from loose to strict hits", "fa_icon": "fas fa-toggle-on", "hidden": true }, @@ -428,13 +428,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/rgi/tests/main.nf.test.snap b/workflows/bactopia-tools/rgi/tests/main.nf.test.snap index e55683b9a..8e1b99836 100644 --- a/workflows/bactopia-tools/rgi/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/rgi/tests/main.nf.test.snap @@ -65,18 +65,18 @@ "bactopia-runs/rgi/rgi-heatmap/rgi-2.png" ], [ - "GCA_000027305.json:md5,e50aca7b17a080c5be68b1322809a968", - "GCA_000027305.tsv:md5,4207abf2986a420c0fb15b33e77144a6", - "versions.yml:md5,4a19310417d04abb9e1eeec05629f944", - "GCF_900478275.json:md5,6c403fb8e2f24b7c88be27ba5a30ca70", - "GCF_900478275.tsv:md5,9d7754551163e020beed52a8bc14ce83", - "versions.yml:md5,4a19310417d04abb9e1eeec05629f944", + "GCA_000027305.json:md5,d0227a9c5754923eb9b4659e216bf027", + "GCA_000027305.tsv:md5,9af9b3e370a908d6b86a21c2cecad254", + "versions.yml:md5,6a43ca3ba925940f762a035f862fc657", + "GCF_900478275.json:md5,74b89120ae465892ef013014e44a8ab4", + "GCF_900478275.tsv:md5,9dd0afe6946da9c6608e775f954813a1", + "versions.yml:md5,6a43ca3ba925940f762a035f862fc657", "versions.yml:md5,c1294552ba205b057bd368875a4eac93", - "rgi.tsv:md5,6dabb1f8c3cab56929ecab6236f6fa67", - "versions.yml:md5,84fa922dc8ecb987b4ee03caffd09c32" + "rgi.tsv:md5,29bd05873135b291069b7325cfee4561", + "versions.yml:md5,69941ec700f55e09c1a930ed36f54b0c" ] ], - "timestamp": "2026-04-29T11:25:13.539158196", + "timestamp": "2026-07-30T19:23:26.943897293", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/sccmec/nextflow.config b/workflows/bactopia-tools/sccmec/nextflow.config index 9ed7271ee..3b9627c82 100644 --- a/workflows/bactopia-tools/sccmec/nextflow.config +++ b/workflows/bactopia-tools/sccmec/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/sccmec/nextflow_schema.json b/workflows/bactopia-tools/sccmec/nextflow_schema.json index 7aef3cfec..a08980b55 100644 --- a/workflows/bactopia-tools/sccmec/nextflow_schema.json +++ b/workflows/bactopia-tools/sccmec/nextflow_schema.json @@ -389,13 +389,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/sccmec/tests/.nftignore b/workflows/bactopia-tools/sccmec/tests/.nftignore index 72a5fcb38..8ee23c491 100644 --- a/workflows/bactopia-tools/sccmec/tests/.nftignore +++ b/workflows/bactopia-tools/sccmec/tests/.nftignore @@ -1,3 +1,5 @@ **/*.{err,gz,html,log,pdf,stderr,stdout} **/nf.command.* bactopia-runs/**/nf-reports/*.{dot,html} + +**/*.{tsv,yml} diff --git a/workflows/bactopia-tools/sccmec/tests/main.nf.test.snap b/workflows/bactopia-tools/sccmec/tests/main.nf.test.snap index 8364f7598..88cdd751a 100644 --- a/workflows/bactopia-tools/sccmec/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/sccmec/tests/main.nf.test.snap @@ -40,17 +40,10 @@ "bactopia-runs/sccmec/nf-reports/sccmec-timeline.html" ], [ - "GCF_000017085.regions.blastn.tsv:md5,ca426de41052a9f0bdcfb538610e5aa6", - "GCF_000017085.regions.details.tsv:md5,d8568654b8455ddebf37283918805b46", - "GCF_000017085.targets.blastn.tsv:md5,5cd7054ed50c7d360feac0e51db54ac6", - "GCF_000017085.targets.details.tsv:md5,8938065005a5f984229c09cd4d9f91e2", - "GCF_000017085.tsv:md5,da49131b3619e12fac7c1efef5e109d0", - "versions.yml:md5,cd9ded724580f921a03643bfaece66ee", - "versions.yml:md5,c6ede7b0533855a33c127cafa29de747", - "sccmec.tsv:md5,7b28813993e6b0b48532bb2b161bc975" + ] ], - "timestamp": "2026-04-29T11:24:41.576473233", + "timestamp": "2026-07-30T19:23:17.524535618", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -97,17 +90,10 @@ "bactopia-runs/sccmec/nf-reports/sccmec-timeline.html" ], [ - "GCF_000017085.regions.blastn.tsv:md5,ca426de41052a9f0bdcfb538610e5aa6", - "GCF_000017085.regions.details.tsv:md5,d8568654b8455ddebf37283918805b46", - "GCF_000017085.targets.blastn.tsv:md5,5cd7054ed50c7d360feac0e51db54ac6", - "GCF_000017085.targets.details.tsv:md5,8938065005a5f984229c09cd4d9f91e2", - "GCF_000017085.tsv:md5,da49131b3619e12fac7c1efef5e109d0", - "versions.yml:md5,cd9ded724580f921a03643bfaece66ee", - "versions.yml:md5,c6ede7b0533855a33c127cafa29de747", - "sccmec.tsv:md5,7b28813993e6b0b48532bb2b161bc975" + ] ], - "timestamp": "2026-04-29T11:24:09.888484492", + "timestamp": "2026-07-30T19:22:49.162193084", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/scrubber/main.nf b/workflows/bactopia-tools/scrubber/main.nf index eb689cfff..011847d7c 100644 --- a/workflows/bactopia-tools/scrubber/main.nf +++ b/workflows/bactopia-tools/scrubber/main.nf @@ -3,16 +3,16 @@ * Removal of human and contaminant sequences from metagenomic reads. * * This Bactopia Tool removes human and other contaminant sequences from metagenomic reads using - * either [SRA Human Scrubber](https://github.com/ncbi/sra-human-scrubber) or - * [nohuman](https://github.com/mbhall88/nohuman) with the HPRC human database. The tool provides flexible contamination removal - * with detailed reporting of read classification and filtering statistics. It processes paired-end - * or single-end reads, producing cleaned FASTQ files with human sequences removed and comprehensive - * reports documenting the decontamination process. + * [deacon](https://github.com/bede/deacon) (default), [nohuman](https://github.com/mbhall88/nohuman), + * or [SRA Human Scrubber](https://github.com/ncbi/sra-human-scrubber). The tool provides flexible + * contamination removal with detailed reporting of read classification and filtering statistics. + * It processes paired-end or single-end reads, producing cleaned FASTQ files with human sequences + * removed and comprehensive reports documenting the decontamination process. * * @status stable * @keywords metagenomics, decontamination, human removal, read filtering, bactopia-tool * @tags complexity:moderate input-type:parameter output-type:multiple features:bactopia-tool,aggregation,conditional - * @citation kraken2, srahumanscrubber + * @citation deacon, kraken2, srahumanscrubber * * @subworkflows utils_bactopia-tools, scrubber * @@ -20,7 +20,16 @@ * Directory containing results from a completed Bactopia analysis run * * @input use_srascrubber - * Boolean flag to choose between SRA Human Scrubber (true) or nohuman (false) for decontamination + * Boolean flag to use SRA Human Scrubber for decontamination + * + * @input use_nohuman + * Boolean flag to use nohuman for decontamination + * + * @input deacon_db + * Path to a pre-existing deacon minimizer index (.idx) for host read filtering + * + * @input download_deacon + * Download the deacon index to the datasets cache * * @section Per-Sample Results * @publish *.scrubbed.fastq.gz Cleaned reads after human sequence removal @@ -43,9 +52,12 @@ params { // Tool-specific parameters use_srascrubber : Boolean + use_nohuman : Boolean nohuman_db : Path? download_nohuman : Boolean nohuman_save_as_tarball : Boolean + deacon_db : Path? + download_deacon : Boolean } include { BACTOPIATOOL_INIT } from '../../../subworkflows/utils/bactopia-tools/main' @@ -58,9 +70,12 @@ workflow { ch_scrubber = SCRUBBER( ch_bactopiatool.reads, params.use_srascrubber, + params.use_nohuman, params.nohuman_db, params.download_nohuman, - params.nohuman_save_as_tarball + params.nohuman_save_as_tarball, + params.deacon_db, + params.download_deacon ) publish: diff --git a/workflows/bactopia-tools/scrubber/nextflow.config b/workflows/bactopia-tools/scrubber/nextflow.config index a80c9cef2..64078a305 100644 --- a/workflows/bactopia-tools/scrubber/nextflow.config +++ b/workflows/bactopia-tools/scrubber/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -33,6 +36,8 @@ includeConfig "../../../modules/srahumanscrubber/initdb/module.config" includeConfig "../../../modules/srahumanscrubber/scrub/module.config" includeConfig "../../../modules/nohuman/download/module.config" includeConfig "../../../modules/nohuman/run/module.config" +includeConfig "../../../modules/deacon/fetch/module.config" +includeConfig "../../../modules/deacon/filter/module.config" // Set output directory outputDir = params.outdir @@ -86,7 +91,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/scrubber/nextflow_schema.json b/workflows/bactopia-tools/scrubber/nextflow_schema.json index 723ba7bc9..9f1cf8ea5 100644 --- a/workflows/bactopia-tools/scrubber/nextflow_schema.json +++ b/workflows/bactopia-tools/scrubber/nextflow_schema.json @@ -139,6 +139,78 @@ } } }, + "deacon_fetch_parameters": { + "title": "Deacon Fetch Parameters", + "type": "object", + "description": "", + "default": "", + "fa_icon": "fas fa-exclamation-circle", + "properties": { + "deacon_index_name": { + "type": "string", + "default": "panhuman-1", + "description": "Name of the pre-built deacon index to fetch", + "fa_icon": "fas fa-font" + }, + "download_deacon": { + "type": "boolean", + "default": false, + "description": "Download the deacon index to the datasets cache", + "fa_icon": "fas fa-toggle-on" + }, + "use_deacon": { + "type": "boolean", + "default": false, + "description": "Use deacon for host read filtering", + "fa_icon": "fas fa-toggle-on" + } + } + }, + "deacon_filter_parameters": { + "title": "Deacon Filter Parameters", + "type": "object", + "description": "", + "default": "", + "fa_icon": "fas fa-exclamation-circle", + "properties": { + "deacon_abs_threshold": { + "type": "integer", + "default": 2, + "description": "Minimum absolute number of minimizer hits for a match", + "fa_icon": "fas fa-hashtag" + }, + "deacon_db": { + "type": "string", + "default": "", + "description": "Path to a pre-existing deacon index (.idx) for host read filtering", + "fa_icon": "fas fa-font" + }, + "deacon_deplete": { + "type": "boolean", + "default": true, + "description": "Discard matching sequences instead of keeping them", + "fa_icon": "fas fa-toggle-on" + }, + "deacon_opts": { + "type": "string", + "default": "", + "description": "Additional deacon filter options not covered by other parameters", + "fa_icon": "fas fa-font" + }, + "deacon_prefix_length": { + "type": "integer", + "default": 0, + "description": "Search only the first N nucleotides per sequence (0 for all)", + "fa_icon": "fas fa-hashtag" + }, + "deacon_rel_threshold": { + "type": "number", + "default": 0.01, + "description": "Minimum relative proportion (0.0-1.0) of minimizer hits for a match", + "fa_icon": "fas fa-percentage" + } + } + }, "optional_parameters": { "title": "Optional Parameters", "type": "object", @@ -437,13 +509,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", @@ -500,6 +565,12 @@ { "$ref": "#/$defs/nohuman_run_parameters" }, + { + "$ref": "#/$defs/deacon_fetch_parameters" + }, + { + "$ref": "#/$defs/deacon_filter_parameters" + }, { "$ref": "#/$defs/optional_parameters" }, diff --git a/workflows/bactopia-tools/scrubber/tests/.nftignore b/workflows/bactopia-tools/scrubber/tests/.nftignore index 72a5fcb38..dddf0d435 100644 --- a/workflows/bactopia-tools/scrubber/tests/.nftignore +++ b/workflows/bactopia-tools/scrubber/tests/.nftignore @@ -1,3 +1,3 @@ -**/*.{err,gz,html,log,pdf,stderr,stdout} +**/*.{err,gz,html,json,log,pdf,stderr,stdout} **/nf.command.* bactopia-runs/**/nf-reports/*.{dot,html} diff --git a/workflows/bactopia-tools/scrubber/tests/main.nf.test b/workflows/bactopia-tools/scrubber/tests/main.nf.test index 4ca9d7f4a..96e571650 100644 --- a/workflows/bactopia-tools/scrubber/tests/main.nf.test +++ b/workflows/bactopia-tools/scrubber/tests/main.nf.test @@ -6,11 +6,47 @@ nextflow_pipeline { tag "bactopia-tools" tag "scrubber" + test("Scrubber (deacon) - SRR2838702|portiera|compressed_fastq") { + when { + params { + bactopia_test = "/species/portiera/compressed" + deacon_test = "/datasets/deacon/panhuman-1.idx" + test_dataset = "" + test_dataset2 = "" + test_dataset3 = "" + test_r1 = "" + test_r2 = "" + test_se = "" + test_ont = "" + is_ci = true + outdir = "$outputDir" + } + } + + then { + // stable_name: All files + folders in ${params.outdir}/ with a stable name + def stable_name = getAllFilesFromDir(params.outdir, relative: true, includeDir: true, ignore: []) + // stable_path: All files in ${params.outdir}/ with stable content + def stable_path = getAllFilesFromDir(params.outdir, ignoreFile: '.nftignore') + assertAll( + { assert workflow.success}, + { assert snapshot( + // Number of successful tasks + workflow.trace.succeeded().size(), + // All stable path name, with a relative path + stable_name, + // All files with stable contents + stable_path + ).match() } + ) + } + } + test("Scrubber (nohuman) - SRR2838702|portiera|compressed_fastq") { when { params { bactopia_test = "/species/portiera/compressed" - nohuman_test = "/datasets/nohuman/HPRC.r2" + nohuman_test = "/datasets/nohuman/HPRC.r2/db" test_dataset = "" test_dataset2 = "" test_dataset3 = "" @@ -20,6 +56,7 @@ nextflow_pipeline { test_ont = "" is_ci = true outdir = "$outputDir" + use_nohuman = true } } diff --git a/workflows/bactopia-tools/scrubber/tests/main.nf.test.snap b/workflows/bactopia-tools/scrubber/tests/main.nf.test.snap index f747af7a5..83d89f5a0 100644 --- a/workflows/bactopia-tools/scrubber/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/scrubber/tests/main.nf.test.snap @@ -1,4 +1,56 @@ { + "Scrubber (deacon) - SRR2838702|portiera|compressed_fastq": { + "content": [ + 2, + [ + "SRR2838702", + "SRR2838702/tools", + "SRR2838702/tools/scrubber", + "SRR2838702/tools/scrubber/SRR2838702.deacon.json", + "SRR2838702/tools/scrubber/SRR2838702.scrub.report.tsv", + "SRR2838702/tools/scrubber/SRR2838702_R1.scrubbed.fastq.gz", + "SRR2838702/tools/scrubber/SRR2838702_R2.scrubbed.fastq.gz", + "SRR2838702/tools/scrubber/logs", + "SRR2838702/tools/scrubber/logs/nf.command.begin", + "SRR2838702/tools/scrubber/logs/nf.command.err", + "SRR2838702/tools/scrubber/logs/nf.command.log", + "SRR2838702/tools/scrubber/logs/nf.command.out", + "SRR2838702/tools/scrubber/logs/nf.command.run", + "SRR2838702/tools/scrubber/logs/nf.command.sh", + "SRR2838702/tools/scrubber/logs/nf.command.trace", + "SRR2838702/tools/scrubber/logs/versions.yml", + "bactopia-runs", + "bactopia-runs/scrubber", + "bactopia-runs/scrubber/merged-results", + "bactopia-runs/scrubber/merged-results/logs", + "bactopia-runs/scrubber/merged-results/logs/scrubber-concat", + "bactopia-runs/scrubber/merged-results/logs/scrubber-concat/nf.command.begin", + "bactopia-runs/scrubber/merged-results/logs/scrubber-concat/nf.command.err", + "bactopia-runs/scrubber/merged-results/logs/scrubber-concat/nf.command.log", + "bactopia-runs/scrubber/merged-results/logs/scrubber-concat/nf.command.out", + "bactopia-runs/scrubber/merged-results/logs/scrubber-concat/nf.command.run", + "bactopia-runs/scrubber/merged-results/logs/scrubber-concat/nf.command.sh", + "bactopia-runs/scrubber/merged-results/logs/scrubber-concat/nf.command.trace", + "bactopia-runs/scrubber/merged-results/logs/scrubber-concat/versions.yml", + "bactopia-runs/scrubber/merged-results/scrubber.tsv", + "bactopia-runs/scrubber/nf-reports", + "bactopia-runs/scrubber/nf-reports/scrubber-dag.dot", + "bactopia-runs/scrubber/nf-reports/scrubber-report.html", + "bactopia-runs/scrubber/nf-reports/scrubber-timeline.html" + ], + [ + "SRR2838702.scrub.report.tsv:md5,c0ea3dcaa020751d8647c95a13fd362d", + "versions.yml:md5,e07f44b8fe13644174f75b5cc7193f10", + "versions.yml:md5,7c379989d6fecf5c9291326ac25be5e5", + "scrubber.tsv:md5,c0ea3dcaa020751d8647c95a13fd362d" + ] + ], + "timestamp": "2026-07-30T19:23:48.233499431", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + }, "Scrubber (nohuman) - SRR2838702|portiera|compressed_fastq": { "content": [ 2, @@ -39,12 +91,12 @@ ], [ "SRR2838702.scrub.report.tsv:md5,e957775ff85716621f5fdd536de5b417", - "versions.yml:md5,a8320e62273b53dca9cfffcb088d3ebb", + "versions.yml:md5,02561307297f583bd0d158052302fcf0", "versions.yml:md5,7c379989d6fecf5c9291326ac25be5e5", "scrubber.tsv:md5,e957775ff85716621f5fdd536de5b417" ] ], - "timestamp": "2026-04-29T11:26:47.921737698", + "timestamp": "2026-07-30T19:27:11.241723372", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -95,7 +147,7 @@ "scrubber.tsv:md5,9554a4a6929bbfd485e28acd4a716772" ] ], - "timestamp": "2026-04-29T11:27:14.371261957", + "timestamp": "2026-07-30T19:28:01.819430781", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/seqsero2/nextflow.config b/workflows/bactopia-tools/seqsero2/nextflow.config index f215844cf..43ad3d019 100644 --- a/workflows/bactopia-tools/seqsero2/nextflow.config +++ b/workflows/bactopia-tools/seqsero2/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/seqsero2/nextflow_schema.json b/workflows/bactopia-tools/seqsero2/nextflow_schema.json index 6310af987..dbbe0b4b0 100644 --- a/workflows/bactopia-tools/seqsero2/nextflow_schema.json +++ b/workflows/bactopia-tools/seqsero2/nextflow_schema.json @@ -396,13 +396,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/seqsero2/tests/main.nf.test.snap b/workflows/bactopia-tools/seqsero2/tests/main.nf.test.snap index f9e062309..d2a472090 100644 --- a/workflows/bactopia-tools/seqsero2/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/seqsero2/tests/main.nf.test.snap @@ -42,7 +42,7 @@ "versions.yml:md5,407bddfba34298df26d7fa5880a564e6" ] ], - "timestamp": "2026-04-29T11:24:08.916545738", + "timestamp": "2026-07-30T19:23:32.123704349", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/seroba/nextflow.config b/workflows/bactopia-tools/seroba/nextflow.config index f240ae87a..948b8bf0f 100644 --- a/workflows/bactopia-tools/seroba/nextflow.config +++ b/workflows/bactopia-tools/seroba/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/seroba/nextflow_schema.json b/workflows/bactopia-tools/seroba/nextflow_schema.json index dd017d2d5..5be8348b6 100644 --- a/workflows/bactopia-tools/seroba/nextflow_schema.json +++ b/workflows/bactopia-tools/seroba/nextflow_schema.json @@ -378,13 +378,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/seroba/tests/main.nf.test.snap b/workflows/bactopia-tools/seroba/tests/main.nf.test.snap index d3a69acfe..4dfc08975 100644 --- a/workflows/bactopia-tools/seroba/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/seroba/tests/main.nf.test.snap @@ -42,7 +42,7 @@ "seroba.tsv:md5,8c20690cc5ca0fd77228c830001e0b86" ] ], - "timestamp": "2026-04-29T11:24:53.825951358", + "timestamp": "2026-07-30T19:24:02.483467787", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/shigapass/nextflow.config b/workflows/bactopia-tools/shigapass/nextflow.config index 2e432909b..7d4f4748e 100644 --- a/workflows/bactopia-tools/shigapass/nextflow.config +++ b/workflows/bactopia-tools/shigapass/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/shigapass/nextflow_schema.json b/workflows/bactopia-tools/shigapass/nextflow_schema.json index e1629c921..c6b35e5e6 100644 --- a/workflows/bactopia-tools/shigapass/nextflow_schema.json +++ b/workflows/bactopia-tools/shigapass/nextflow_schema.json @@ -356,13 +356,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/shigapass/tests/main.nf.test.snap b/workflows/bactopia-tools/shigapass/tests/main.nf.test.snap index f4fd3f5b4..c42359949 100644 --- a/workflows/bactopia-tools/shigapass/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/shigapass/tests/main.nf.test.snap @@ -45,7 +45,7 @@ "shigapass.tsv:md5,9982dbc252423a0507b7c397f66164f2" ] ], - "timestamp": "2026-04-29T11:24:28.361228337", + "timestamp": "2026-07-30T19:23:56.416662829", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/shigatyper/nextflow.config b/workflows/bactopia-tools/shigatyper/nextflow.config index 8e097cd86..a20909873 100644 --- a/workflows/bactopia-tools/shigatyper/nextflow.config +++ b/workflows/bactopia-tools/shigatyper/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/shigatyper/nextflow_schema.json b/workflows/bactopia-tools/shigatyper/nextflow_schema.json index 0d3c169f0..da596446a 100644 --- a/workflows/bactopia-tools/shigatyper/nextflow_schema.json +++ b/workflows/bactopia-tools/shigatyper/nextflow_schema.json @@ -356,13 +356,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/shigatyper/tests/.nftignore b/workflows/bactopia-tools/shigatyper/tests/.nftignore index 72a5fcb38..577bb935a 100644 --- a/workflows/bactopia-tools/shigatyper/tests/.nftignore +++ b/workflows/bactopia-tools/shigatyper/tests/.nftignore @@ -1,3 +1,5 @@ **/*.{err,gz,html,log,pdf,stderr,stdout} **/nf.command.* bactopia-runs/**/nf-reports/*.{dot,html} + +**/shigatyper.tsv diff --git a/workflows/bactopia-tools/shigatyper/tests/main.nf.test.snap b/workflows/bactopia-tools/shigatyper/tests/main.nf.test.snap index 0041599d1..ecbd671cc 100644 --- a/workflows/bactopia-tools/shigatyper/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/shigatyper/tests/main.nf.test.snap @@ -74,11 +74,10 @@ "SRR13039589-hits.tsv:md5,7bdab5d495d8424b2df3005773ef1364", "SRR13039589.tsv:md5,8ab32470875fe923b8d338da4ca35d1c", "versions.yml:md5,ae04a8f8ba5f8b41af9b6af75fecfd17", - "versions.yml:md5,c4954fe5c276fcd3b66857bacafa932e", - "shigatyper.tsv:md5,6041948e454daeabef20a6f725047dca" + "versions.yml:md5,c4954fe5c276fcd3b66857bacafa932e" ] ], - "timestamp": "2026-04-29T11:24:23.343691466", + "timestamp": "2026-07-30T19:24:01.048048983", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/shigeifinder/nextflow.config b/workflows/bactopia-tools/shigeifinder/nextflow.config index 9c8fdb657..9b52ea583 100644 --- a/workflows/bactopia-tools/shigeifinder/nextflow.config +++ b/workflows/bactopia-tools/shigeifinder/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/shigeifinder/nextflow_schema.json b/workflows/bactopia-tools/shigeifinder/nextflow_schema.json index 18bd76dac..b0e253753 100644 --- a/workflows/bactopia-tools/shigeifinder/nextflow_schema.json +++ b/workflows/bactopia-tools/shigeifinder/nextflow_schema.json @@ -356,13 +356,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/shigeifinder/tests/main.nf.test.snap b/workflows/bactopia-tools/shigeifinder/tests/main.nf.test.snap index 8b041116f..ce19098b8 100644 --- a/workflows/bactopia-tools/shigeifinder/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/shigeifinder/tests/main.nf.test.snap @@ -42,7 +42,7 @@ "shigeifinder.tsv:md5,25be6cf1161e59d9a4eab8db8f9b9ebb" ] ], - "timestamp": "2026-04-29T11:24:21.227838831", + "timestamp": "2026-07-30T19:23:57.511939415", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/sistr/nextflow.config b/workflows/bactopia-tools/sistr/nextflow.config index 4b22e4d4a..39e28c745 100644 --- a/workflows/bactopia-tools/sistr/nextflow.config +++ b/workflows/bactopia-tools/sistr/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/sistr/nextflow_schema.json b/workflows/bactopia-tools/sistr/nextflow_schema.json index 167dc5d83..2914af582 100644 --- a/workflows/bactopia-tools/sistr/nextflow_schema.json +++ b/workflows/bactopia-tools/sistr/nextflow_schema.json @@ -371,13 +371,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/sistr/tests/main.nf.test.snap b/workflows/bactopia-tools/sistr/tests/main.nf.test.snap index efe65d055..b31c8e02b 100644 --- a/workflows/bactopia-tools/sistr/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/sistr/tests/main.nf.test.snap @@ -44,7 +44,7 @@ "versions.yml:md5,683c9c1a0fff623520a6d84e3a7d0210" ] ], - "timestamp": "2026-04-29T11:25:02.198301037", + "timestamp": "2026-07-30T19:24:22.423253284", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/snippy/main.nf b/workflows/bactopia-tools/snippy/main.nf index 6e3b4d78e..0b88b0eab 100644 --- a/workflows/bactopia-tools/snippy/main.nf +++ b/workflows/bactopia-tools/snippy/main.nf @@ -12,7 +12,7 @@ * @tags complexity:complex input-type:parameter output-type:multiple features:bactopia-tool,comparative,phylogeny * @citation snippy, gubbins, iqtree * - * @subworkflows utils_bactopia-tools, ncbigenomedownload, snippy_run, snippy_core, gubbins, iqtree + * @subworkflows utils_bactopia-tools, genomedl, snippy_run, snippy_core, gubbins, iqtree * * @input rundir * Directory containing results from a completed Bactopia analysis run @@ -21,7 +21,7 @@ * Path to reference FASTA file for variant calling * * @input accession - * NCBI Assembly RefSeq accession to use as reference + * NCBI Assembly accession to download with genome-dl and use as reference * * @input snippy_core_mask * Path to BED file containing core genome regions @@ -74,7 +74,7 @@ params { } include { BACTOPIATOOL_INIT } from '../../../subworkflows/utils/bactopia-tools/main' -include { NCBIGENOMEDOWNLOAD } from '../../../subworkflows/ncbigenomedownload/main' +include { GENOMEDL } from '../../../subworkflows/genomedl/main' include { SNIPPY } from '../../../subworkflows/snippy/run/main' include { SNIPPY_CORE } from '../../../subworkflows/snippy/core/main' include { GUBBINS } from '../../../subworkflows/gubbins/main' @@ -91,8 +91,8 @@ workflow { if (params.reference) { ch_reference = params.reference } else if (params.accession) { - ch_ncbigenomedownload = NCBIGENOMEDOWNLOAD(null) - ch_reference = ch_ncbigenomedownload.reference + ch_genomedl = GENOMEDL(null) + ch_reference = ch_genomedl.reference } // Run Snippy per-sample diff --git a/workflows/bactopia-tools/snippy/nextflow.config b/workflows/bactopia-tools/snippy/nextflow.config index 6255206b7..13b4b6d6a 100644 --- a/workflows/bactopia-tools/snippy/nextflow.config +++ b/workflows/bactopia-tools/snippy/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,16 +19,19 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" // Module specific config -includeConfig "../../../modules/ncbigenomedownload/module.config" +includeConfig "../../../modules/genomedl/module.config" includeConfig "../../../modules/snippy/run/module.config" includeConfig "../../../modules/snippy/core/module.config" includeConfig "../../../modules/snpdists/module.config" @@ -87,7 +90,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/snippy/nextflow_schema.json b/workflows/bactopia-tools/snippy/nextflow_schema.json index 07ce14cb2..7ce37b95f 100644 --- a/workflows/bactopia-tools/snippy/nextflow_schema.json +++ b/workflows/bactopia-tools/snippy/nextflow_schema.json @@ -42,8 +42,8 @@ } } }, - "ncbigenomedownload_parameters": { - "title": "NCBI Genome Download Parameters", + "genomedl_parameters": { + "title": "genome-dl Parameters", "type": "object", "description": "", "default": "", @@ -57,6 +57,7 @@ "accession": { "type": "string", "description": "An NCBI Assembly accession to be downloaded", + "help": "Version-less accessions (e.g. GCF_000005845) are resolved to the latest version.", "fa_icon": "fas fa-font" }, "accessions": { @@ -68,12 +69,14 @@ "type": "string", "default": "fasta", "description": "Comma separated list of formats to download", + "help": "Choose from fasta, genbank, wgs, gff, gtf, protein, genpept, cds, translated-cds, rna, feature-table, assembly-report, assembly-stats or all.", "fa_icon": "fas fa-font" }, "section": { "type": "string", "default": "refseq", "description": "NCBI section to download", + "help": "Only applies to `--species`. Choose from refseq, genbank or all.", "fa_icon": "fas fa-font", "hidden": true }, @@ -81,26 +84,21 @@ "type": "string", "default": "complete", "description": "Comma separated list of assembly levels to download", - "fa_icon": "fas fa-font", - "hidden": true - }, - "kingdom": { - "type": "string", - "default": "bacteria", - "description": "Comma separated list of formats to download", + "help": "Only applies to `--species`. Choose from complete, chromosome, scaffold, contig or all.", "fa_icon": "fas fa-font", "hidden": true }, "limit": { - "type": "string", + "type": "integer", + "default": 100, "description": "Limit the number of assemblies to download", - "help": "If the the number of available genomes exceeds the given limit, a random subset will be selected.", - "fa_icon": "fas fa-font" + "help": "Only applies to `--species`, limit to first N assemblies returned by NCBI. Use 0 for no limit.", + "fa_icon": "fas fa-sort-numeric-up" }, - "keep_downloads": { + "genomedl_allow_outdated": { "type": "boolean", "default": false, - "description": "Save downloaded files into the bactopia-runs folder", + "description": "Download an explicitly requested outdated accession version instead of erroring", "fa_icon": "fas fa-toggle-on" } } @@ -656,13 +654,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", @@ -708,7 +699,7 @@ "$ref": "#/$defs/filter_parameters" }, { - "$ref": "#/$defs/ncbigenomedownload_parameters" + "$ref": "#/$defs/genomedl_parameters" }, { "$ref": "#/$defs/snippy_run_parameters" diff --git a/workflows/bactopia-tools/snippy/tests/.nftignore b/workflows/bactopia-tools/snippy/tests/.nftignore index c066d9856..df4cdff24 100644 --- a/workflows/bactopia-tools/snippy/tests/.nftignore +++ b/workflows/bactopia-tools/snippy/tests/.nftignore @@ -5,3 +5,4 @@ bactopia-runs/**/nf-reports/*.{dot,html} **/*.{bam,bai,bionj,contree,iqtree,mldist,nex,phylip,tre,treefile,txt,ufboot} **/*.per_branch_statistics.csv **/core-snp.masked.distance.tsv +**/*.yml diff --git a/workflows/bactopia-tools/snippy/tests/main.nf.test b/workflows/bactopia-tools/snippy/tests/main.nf.test index a95ac07a1..6ff5850ed 100644 --- a/workflows/bactopia-tools/snippy/tests/main.nf.test +++ b/workflows/bactopia-tools/snippy/tests/main.nf.test @@ -226,4 +226,54 @@ nextflow_pipeline { ) } } + + test("Snippy (accession) - Mixed|compressed_fastq") { + when { + params { + bactopia_test = "/species/mixed/reads" + test_dataset = "" + test_dataset2 = "" + test_dataset3 = "" + test_r1 = "" + test_r2 = "" + test_se = "" + test_ont = "" + is_ci = true + outdir = "$outputDir" + // Take the reference from genome-dl instead of a local file. Snippy needs the + // annotations, so the download has to be GenBank rather than the default FASTA. + reference = null + accession = "GCF_000292685" + format = "genbank" + gubbins_min_window_size = 5000 + gubbins_filter_percentage = 100.0 + gubbins_iterations = 1 + snippy_mincov = 1 + snippy_minqual = 1 + snippy_basequal = 1 + snippy_mapqual = 1 + snippy_maxsoft = 1 + skip_recombination = true + skip_phylogeny = true + } + } + + then { + // stable_name: All files + folders in ${params.outdir}/ with a stable name + def stable_name = getAllFilesFromDir(params.outdir, relative: true, includeDir: true, ignore: []) + // stable_path: All files in ${params.outdir}/ with stable content + def stable_path = getAllFilesFromDir(params.outdir, ignoreFile: '.nftignore') + assertAll( + { assert workflow.success}, + { assert snapshot( + // Number of successful tasks + workflow.trace.succeeded().size(), + // All stable path name, with a relative path + stable_name, + // All files with stable contents + stable_path + ).match() } + ) + } + } } diff --git a/workflows/bactopia-tools/snippy/tests/main.nf.test.snap b/workflows/bactopia-tools/snippy/tests/main.nf.test.snap index 26797e33d..54935852e 100644 --- a/workflows/bactopia-tools/snippy/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/snippy/tests/main.nf.test.snap @@ -296,27 +296,16 @@ ], [ "ERR1438863.tab:md5,9b4987b8070848915b02b159eeac5886", - "versions.yml:md5,3a20f15dd89e01a265cbbae4bacd7f30", "ERR6005894.tab:md5,00cc7c3e06c9b26227ec6eda254ed410", - "versions.yml:md5,3a20f15dd89e01a265cbbae4bacd7f30", "ERR6005894SE.tab:md5,00cc7c3e06c9b26227ec6eda254ed410", - "versions.yml:md5,3a20f15dd89e01a265cbbae4bacd7f30", "SRR2838702.tab:md5,0cc5a62da2cd9c7c1aefa5446a7bfb4e", - "versions.yml:md5,3a20f15dd89e01a265cbbae4bacd7f30", "SRR2838702SE.tab:md5,68fc7d4fdb61ddedc72a49ff68214a86", - "versions.yml:md5,3a20f15dd89e01a265cbbae4bacd7f30", "SRR2838702SE_2.tab:md5,68fc7d4fdb61ddedc72a49ff68214a86", - "versions.yml:md5,3a20f15dd89e01a265cbbae4bacd7f30", "SRR2838702_2.tab:md5,0cc5a62da2cd9c7c1aefa5446a7bfb4e", - "versions.yml:md5,3a20f15dd89e01a265cbbae4bacd7f30", - "core-snp.distance.tsv:md5,035f4fc57bee2ee25160fe42ca8307d1", - "versions.yml:md5,99bfa6c29403a77acf3449315065c245", - "versions.yml:md5,27ed685c7bc2cfe49934a9c45b1a2735", - "versions.yml:md5,a8d93e0d6a006b32c088567301fe66c4", - "versions.yml:md5,8705955ac30d91d4bcce3b0571be3147" + "core-snp.distance.tsv:md5,035f4fc57bee2ee25160fe42ca8307d1" ] ], - "timestamp": "2026-04-29T11:25:28.294717847", + "timestamp": "2026-07-30T19:25:45.414550549", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -619,27 +608,16 @@ ], [ "ERR1438863.tab:md5,9b4987b8070848915b02b159eeac5886", - "versions.yml:md5,3a20f15dd89e01a265cbbae4bacd7f30", "ERR6005894.tab:md5,00cc7c3e06c9b26227ec6eda254ed410", - "versions.yml:md5,3a20f15dd89e01a265cbbae4bacd7f30", "ERR6005894SE.tab:md5,00cc7c3e06c9b26227ec6eda254ed410", - "versions.yml:md5,3a20f15dd89e01a265cbbae4bacd7f30", "SRR2838702.tab:md5,0cc5a62da2cd9c7c1aefa5446a7bfb4e", - "versions.yml:md5,3a20f15dd89e01a265cbbae4bacd7f30", "SRR2838702SE.tab:md5,68fc7d4fdb61ddedc72a49ff68214a86", - "versions.yml:md5,3a20f15dd89e01a265cbbae4bacd7f30", "SRR2838702SE_2.tab:md5,68fc7d4fdb61ddedc72a49ff68214a86", - "versions.yml:md5,3a20f15dd89e01a265cbbae4bacd7f30", "SRR2838702_2.tab:md5,0cc5a62da2cd9c7c1aefa5446a7bfb4e", - "versions.yml:md5,3a20f15dd89e01a265cbbae4bacd7f30", - "core-snp.distance.tsv:md5,035f4fc57bee2ee25160fe42ca8307d1", - "versions.yml:md5,99bfa6c29403a77acf3449315065c245", - "versions.yml:md5,27ed685c7bc2cfe49934a9c45b1a2735", - "versions.yml:md5,a8d93e0d6a006b32c088567301fe66c4", - "versions.yml:md5,8705955ac30d91d4bcce3b0571be3147" + "core-snp.distance.tsv:md5,035f4fc57bee2ee25160fe42ca8307d1" ] ], - "timestamp": "2026-04-29T11:26:29.494050082", + "timestamp": "2026-07-30T19:27:22.553780701", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -930,26 +908,16 @@ ], [ "ERR1438863.tab:md5,9b4987b8070848915b02b159eeac5886", - "versions.yml:md5,3a20f15dd89e01a265cbbae4bacd7f30", "ERR6005894.tab:md5,00cc7c3e06c9b26227ec6eda254ed410", - "versions.yml:md5,3a20f15dd89e01a265cbbae4bacd7f30", "ERR6005894SE.tab:md5,00cc7c3e06c9b26227ec6eda254ed410", - "versions.yml:md5,3a20f15dd89e01a265cbbae4bacd7f30", "SRR2838702.tab:md5,0cc5a62da2cd9c7c1aefa5446a7bfb4e", - "versions.yml:md5,3a20f15dd89e01a265cbbae4bacd7f30", "SRR2838702SE.tab:md5,68fc7d4fdb61ddedc72a49ff68214a86", - "versions.yml:md5,3a20f15dd89e01a265cbbae4bacd7f30", "SRR2838702SE_2.tab:md5,68fc7d4fdb61ddedc72a49ff68214a86", - "versions.yml:md5,3a20f15dd89e01a265cbbae4bacd7f30", "SRR2838702_2.tab:md5,0cc5a62da2cd9c7c1aefa5446a7bfb4e", - "versions.yml:md5,3a20f15dd89e01a265cbbae4bacd7f30", - "core-snp.distance.tsv:md5,035f4fc57bee2ee25160fe42ca8307d1", - "versions.yml:md5,e01256842798c2b435032141a36e34a4", - "versions.yml:md5,27ed685c7bc2cfe49934a9c45b1a2735", - "versions.yml:md5,8705955ac30d91d4bcce3b0571be3147" + "core-snp.distance.tsv:md5,035f4fc57bee2ee25160fe42ca8307d1" ] ], - "timestamp": "2026-04-29T11:27:24.977637504", + "timestamp": "2026-07-30T19:28:23.366290504", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -1220,25 +1188,16 @@ ], [ "ERR1438863.tab:md5,9b4987b8070848915b02b159eeac5886", - "versions.yml:md5,3a20f15dd89e01a265cbbae4bacd7f30", "ERR6005894.tab:md5,00cc7c3e06c9b26227ec6eda254ed410", - "versions.yml:md5,3a20f15dd89e01a265cbbae4bacd7f30", "ERR6005894SE.tab:md5,00cc7c3e06c9b26227ec6eda254ed410", - "versions.yml:md5,3a20f15dd89e01a265cbbae4bacd7f30", "SRR2838702.tab:md5,0cc5a62da2cd9c7c1aefa5446a7bfb4e", - "versions.yml:md5,3a20f15dd89e01a265cbbae4bacd7f30", "SRR2838702SE.tab:md5,68fc7d4fdb61ddedc72a49ff68214a86", - "versions.yml:md5,3a20f15dd89e01a265cbbae4bacd7f30", "SRR2838702SE_2.tab:md5,68fc7d4fdb61ddedc72a49ff68214a86", - "versions.yml:md5,3a20f15dd89e01a265cbbae4bacd7f30", "SRR2838702_2.tab:md5,0cc5a62da2cd9c7c1aefa5446a7bfb4e", - "versions.yml:md5,3a20f15dd89e01a265cbbae4bacd7f30", - "core-snp.distance.tsv:md5,035f4fc57bee2ee25160fe42ca8307d1", - "versions.yml:md5,27ed685c7bc2cfe49934a9c45b1a2735", - "versions.yml:md5,8705955ac30d91d4bcce3b0571be3147" + "core-snp.distance.tsv:md5,035f4fc57bee2ee25160fe42ca8307d1" ] ], - "timestamp": "2026-04-29T11:29:03.688696937", + "timestamp": "2026-07-30T19:30:36.794451447", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -1541,27 +1500,296 @@ ], [ "ERR1438863.tab:md5,9b4987b8070848915b02b159eeac5886", - "versions.yml:md5,3a20f15dd89e01a265cbbae4bacd7f30", "ERR6005894.tab:md5,00cc7c3e06c9b26227ec6eda254ed410", - "versions.yml:md5,3a20f15dd89e01a265cbbae4bacd7f30", "ERR6005894SE.tab:md5,00cc7c3e06c9b26227ec6eda254ed410", - "versions.yml:md5,3a20f15dd89e01a265cbbae4bacd7f30", "SRR2838702.tab:md5,0cc5a62da2cd9c7c1aefa5446a7bfb4e", - "versions.yml:md5,3a20f15dd89e01a265cbbae4bacd7f30", "SRR2838702SE.tab:md5,68fc7d4fdb61ddedc72a49ff68214a86", - "versions.yml:md5,3a20f15dd89e01a265cbbae4bacd7f30", "SRR2838702SE_2.tab:md5,68fc7d4fdb61ddedc72a49ff68214a86", - "versions.yml:md5,3a20f15dd89e01a265cbbae4bacd7f30", "SRR2838702_2.tab:md5,0cc5a62da2cd9c7c1aefa5446a7bfb4e", - "versions.yml:md5,3a20f15dd89e01a265cbbae4bacd7f30", - "core-snp.distance.tsv:md5,035f4fc57bee2ee25160fe42ca8307d1", - "versions.yml:md5,99bfa6c29403a77acf3449315065c245", - "versions.yml:md5,27ed685c7bc2cfe49934a9c45b1a2735", - "versions.yml:md5,a8d93e0d6a006b32c088567301fe66c4", - "versions.yml:md5,8705955ac30d91d4bcce3b0571be3147" + "core-snp.distance.tsv:md5,035f4fc57bee2ee25160fe42ca8307d1" ] ], - "timestamp": "2026-04-29T11:28:20.204763447", + "timestamp": "2026-07-30T19:29:48.613556313", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + }, + "Snippy (accession) - Mixed|compressed_fastq": { + "content": [ + 10, + [ + "ERR1438863", + "ERR1438863/tools", + "ERR1438863/tools/snippy", + "ERR1438863/tools/snippy/GCF_000292685", + "ERR1438863/tools/snippy/GCF_000292685/ERR1438863.aligned.fa.gz", + "ERR1438863/tools/snippy/GCF_000292685/ERR1438863.annotated.vcf.gz", + "ERR1438863/tools/snippy/GCF_000292685/ERR1438863.bam", + "ERR1438863/tools/snippy/GCF_000292685/ERR1438863.bam.bai", + "ERR1438863/tools/snippy/GCF_000292685/ERR1438863.bed.gz", + "ERR1438863/tools/snippy/GCF_000292685/ERR1438863.consensus.fa.gz", + "ERR1438863/tools/snippy/GCF_000292685/ERR1438863.consensus.subs.fa.gz", + "ERR1438863/tools/snippy/GCF_000292685/ERR1438863.consensus.subs.masked.fa.gz", + "ERR1438863/tools/snippy/GCF_000292685/ERR1438863.coverage.txt.gz", + "ERR1438863/tools/snippy/GCF_000292685/ERR1438863.csv.gz", + "ERR1438863/tools/snippy/GCF_000292685/ERR1438863.filt.vcf.gz", + "ERR1438863/tools/snippy/GCF_000292685/ERR1438863.gff.gz", + "ERR1438863/tools/snippy/GCF_000292685/ERR1438863.html", + "ERR1438863/tools/snippy/GCF_000292685/ERR1438863.raw.vcf.gz", + "ERR1438863/tools/snippy/GCF_000292685/ERR1438863.subs.vcf.gz", + "ERR1438863/tools/snippy/GCF_000292685/ERR1438863.tab", + "ERR1438863/tools/snippy/GCF_000292685/ERR1438863.txt", + "ERR1438863/tools/snippy/GCF_000292685/ERR1438863.vcf.gz", + "ERR1438863/tools/snippy/GCF_000292685/logs", + "ERR1438863/tools/snippy/GCF_000292685/logs/ERR1438863.log", + "ERR1438863/tools/snippy/GCF_000292685/logs/nf.command.begin", + "ERR1438863/tools/snippy/GCF_000292685/logs/nf.command.err", + "ERR1438863/tools/snippy/GCF_000292685/logs/nf.command.log", + "ERR1438863/tools/snippy/GCF_000292685/logs/nf.command.out", + "ERR1438863/tools/snippy/GCF_000292685/logs/nf.command.run", + "ERR1438863/tools/snippy/GCF_000292685/logs/nf.command.sh", + "ERR1438863/tools/snippy/GCF_000292685/logs/nf.command.trace", + "ERR1438863/tools/snippy/GCF_000292685/logs/versions.yml", + "ERR6005894", + "ERR6005894/tools", + "ERR6005894/tools/snippy", + "ERR6005894/tools/snippy/GCF_000292685", + "ERR6005894/tools/snippy/GCF_000292685/ERR6005894.aligned.fa.gz", + "ERR6005894/tools/snippy/GCF_000292685/ERR6005894.annotated.vcf.gz", + "ERR6005894/tools/snippy/GCF_000292685/ERR6005894.bam", + "ERR6005894/tools/snippy/GCF_000292685/ERR6005894.bam.bai", + "ERR6005894/tools/snippy/GCF_000292685/ERR6005894.bed.gz", + "ERR6005894/tools/snippy/GCF_000292685/ERR6005894.consensus.fa.gz", + "ERR6005894/tools/snippy/GCF_000292685/ERR6005894.consensus.subs.fa.gz", + "ERR6005894/tools/snippy/GCF_000292685/ERR6005894.consensus.subs.masked.fa.gz", + "ERR6005894/tools/snippy/GCF_000292685/ERR6005894.coverage.txt.gz", + "ERR6005894/tools/snippy/GCF_000292685/ERR6005894.csv.gz", + "ERR6005894/tools/snippy/GCF_000292685/ERR6005894.filt.vcf.gz", + "ERR6005894/tools/snippy/GCF_000292685/ERR6005894.gff.gz", + "ERR6005894/tools/snippy/GCF_000292685/ERR6005894.html", + "ERR6005894/tools/snippy/GCF_000292685/ERR6005894.raw.vcf.gz", + "ERR6005894/tools/snippy/GCF_000292685/ERR6005894.subs.vcf.gz", + "ERR6005894/tools/snippy/GCF_000292685/ERR6005894.tab", + "ERR6005894/tools/snippy/GCF_000292685/ERR6005894.txt", + "ERR6005894/tools/snippy/GCF_000292685/ERR6005894.vcf.gz", + "ERR6005894/tools/snippy/GCF_000292685/logs", + "ERR6005894/tools/snippy/GCF_000292685/logs/ERR6005894.log", + "ERR6005894/tools/snippy/GCF_000292685/logs/nf.command.begin", + "ERR6005894/tools/snippy/GCF_000292685/logs/nf.command.err", + "ERR6005894/tools/snippy/GCF_000292685/logs/nf.command.log", + "ERR6005894/tools/snippy/GCF_000292685/logs/nf.command.out", + "ERR6005894/tools/snippy/GCF_000292685/logs/nf.command.run", + "ERR6005894/tools/snippy/GCF_000292685/logs/nf.command.sh", + "ERR6005894/tools/snippy/GCF_000292685/logs/nf.command.trace", + "ERR6005894/tools/snippy/GCF_000292685/logs/versions.yml", + "ERR6005894SE", + "ERR6005894SE/tools", + "ERR6005894SE/tools/snippy", + "ERR6005894SE/tools/snippy/GCF_000292685", + "ERR6005894SE/tools/snippy/GCF_000292685/ERR6005894SE.aligned.fa.gz", + "ERR6005894SE/tools/snippy/GCF_000292685/ERR6005894SE.annotated.vcf.gz", + "ERR6005894SE/tools/snippy/GCF_000292685/ERR6005894SE.bam", + "ERR6005894SE/tools/snippy/GCF_000292685/ERR6005894SE.bam.bai", + "ERR6005894SE/tools/snippy/GCF_000292685/ERR6005894SE.bed.gz", + "ERR6005894SE/tools/snippy/GCF_000292685/ERR6005894SE.consensus.fa.gz", + "ERR6005894SE/tools/snippy/GCF_000292685/ERR6005894SE.consensus.subs.fa.gz", + "ERR6005894SE/tools/snippy/GCF_000292685/ERR6005894SE.consensus.subs.masked.fa.gz", + "ERR6005894SE/tools/snippy/GCF_000292685/ERR6005894SE.coverage.txt.gz", + "ERR6005894SE/tools/snippy/GCF_000292685/ERR6005894SE.csv.gz", + "ERR6005894SE/tools/snippy/GCF_000292685/ERR6005894SE.filt.vcf.gz", + "ERR6005894SE/tools/snippy/GCF_000292685/ERR6005894SE.gff.gz", + "ERR6005894SE/tools/snippy/GCF_000292685/ERR6005894SE.html", + "ERR6005894SE/tools/snippy/GCF_000292685/ERR6005894SE.raw.vcf.gz", + "ERR6005894SE/tools/snippy/GCF_000292685/ERR6005894SE.subs.vcf.gz", + "ERR6005894SE/tools/snippy/GCF_000292685/ERR6005894SE.tab", + "ERR6005894SE/tools/snippy/GCF_000292685/ERR6005894SE.txt", + "ERR6005894SE/tools/snippy/GCF_000292685/ERR6005894SE.vcf.gz", + "ERR6005894SE/tools/snippy/GCF_000292685/logs", + "ERR6005894SE/tools/snippy/GCF_000292685/logs/ERR6005894SE.log", + "ERR6005894SE/tools/snippy/GCF_000292685/logs/nf.command.begin", + "ERR6005894SE/tools/snippy/GCF_000292685/logs/nf.command.err", + "ERR6005894SE/tools/snippy/GCF_000292685/logs/nf.command.log", + "ERR6005894SE/tools/snippy/GCF_000292685/logs/nf.command.out", + "ERR6005894SE/tools/snippy/GCF_000292685/logs/nf.command.run", + "ERR6005894SE/tools/snippy/GCF_000292685/logs/nf.command.sh", + "ERR6005894SE/tools/snippy/GCF_000292685/logs/nf.command.trace", + "ERR6005894SE/tools/snippy/GCF_000292685/logs/versions.yml", + "SRR2838702", + "SRR2838702/tools", + "SRR2838702/tools/snippy", + "SRR2838702/tools/snippy/GCF_000292685", + "SRR2838702/tools/snippy/GCF_000292685/SRR2838702.aligned.fa.gz", + "SRR2838702/tools/snippy/GCF_000292685/SRR2838702.annotated.vcf.gz", + "SRR2838702/tools/snippy/GCF_000292685/SRR2838702.bam", + "SRR2838702/tools/snippy/GCF_000292685/SRR2838702.bam.bai", + "SRR2838702/tools/snippy/GCF_000292685/SRR2838702.bed.gz", + "SRR2838702/tools/snippy/GCF_000292685/SRR2838702.consensus.fa.gz", + "SRR2838702/tools/snippy/GCF_000292685/SRR2838702.consensus.subs.fa.gz", + "SRR2838702/tools/snippy/GCF_000292685/SRR2838702.consensus.subs.masked.fa.gz", + "SRR2838702/tools/snippy/GCF_000292685/SRR2838702.coverage.txt.gz", + "SRR2838702/tools/snippy/GCF_000292685/SRR2838702.csv.gz", + "SRR2838702/tools/snippy/GCF_000292685/SRR2838702.filt.vcf.gz", + "SRR2838702/tools/snippy/GCF_000292685/SRR2838702.gff.gz", + "SRR2838702/tools/snippy/GCF_000292685/SRR2838702.html", + "SRR2838702/tools/snippy/GCF_000292685/SRR2838702.raw.vcf.gz", + "SRR2838702/tools/snippy/GCF_000292685/SRR2838702.subs.vcf.gz", + "SRR2838702/tools/snippy/GCF_000292685/SRR2838702.tab", + "SRR2838702/tools/snippy/GCF_000292685/SRR2838702.txt", + "SRR2838702/tools/snippy/GCF_000292685/SRR2838702.vcf.gz", + "SRR2838702/tools/snippy/GCF_000292685/logs", + "SRR2838702/tools/snippy/GCF_000292685/logs/SRR2838702.log", + "SRR2838702/tools/snippy/GCF_000292685/logs/nf.command.begin", + "SRR2838702/tools/snippy/GCF_000292685/logs/nf.command.err", + "SRR2838702/tools/snippy/GCF_000292685/logs/nf.command.log", + "SRR2838702/tools/snippy/GCF_000292685/logs/nf.command.out", + "SRR2838702/tools/snippy/GCF_000292685/logs/nf.command.run", + "SRR2838702/tools/snippy/GCF_000292685/logs/nf.command.sh", + "SRR2838702/tools/snippy/GCF_000292685/logs/nf.command.trace", + "SRR2838702/tools/snippy/GCF_000292685/logs/versions.yml", + "SRR2838702SE", + "SRR2838702SE/tools", + "SRR2838702SE/tools/snippy", + "SRR2838702SE/tools/snippy/GCF_000292685", + "SRR2838702SE/tools/snippy/GCF_000292685/SRR2838702SE.aligned.fa.gz", + "SRR2838702SE/tools/snippy/GCF_000292685/SRR2838702SE.annotated.vcf.gz", + "SRR2838702SE/tools/snippy/GCF_000292685/SRR2838702SE.bam", + "SRR2838702SE/tools/snippy/GCF_000292685/SRR2838702SE.bam.bai", + "SRR2838702SE/tools/snippy/GCF_000292685/SRR2838702SE.bed.gz", + "SRR2838702SE/tools/snippy/GCF_000292685/SRR2838702SE.consensus.fa.gz", + "SRR2838702SE/tools/snippy/GCF_000292685/SRR2838702SE.consensus.subs.fa.gz", + "SRR2838702SE/tools/snippy/GCF_000292685/SRR2838702SE.consensus.subs.masked.fa.gz", + "SRR2838702SE/tools/snippy/GCF_000292685/SRR2838702SE.coverage.txt.gz", + "SRR2838702SE/tools/snippy/GCF_000292685/SRR2838702SE.csv.gz", + "SRR2838702SE/tools/snippy/GCF_000292685/SRR2838702SE.filt.vcf.gz", + "SRR2838702SE/tools/snippy/GCF_000292685/SRR2838702SE.gff.gz", + "SRR2838702SE/tools/snippy/GCF_000292685/SRR2838702SE.html", + "SRR2838702SE/tools/snippy/GCF_000292685/SRR2838702SE.raw.vcf.gz", + "SRR2838702SE/tools/snippy/GCF_000292685/SRR2838702SE.subs.vcf.gz", + "SRR2838702SE/tools/snippy/GCF_000292685/SRR2838702SE.tab", + "SRR2838702SE/tools/snippy/GCF_000292685/SRR2838702SE.txt", + "SRR2838702SE/tools/snippy/GCF_000292685/SRR2838702SE.vcf.gz", + "SRR2838702SE/tools/snippy/GCF_000292685/logs", + "SRR2838702SE/tools/snippy/GCF_000292685/logs/SRR2838702SE.log", + "SRR2838702SE/tools/snippy/GCF_000292685/logs/nf.command.begin", + "SRR2838702SE/tools/snippy/GCF_000292685/logs/nf.command.err", + "SRR2838702SE/tools/snippy/GCF_000292685/logs/nf.command.log", + "SRR2838702SE/tools/snippy/GCF_000292685/logs/nf.command.out", + "SRR2838702SE/tools/snippy/GCF_000292685/logs/nf.command.run", + "SRR2838702SE/tools/snippy/GCF_000292685/logs/nf.command.sh", + "SRR2838702SE/tools/snippy/GCF_000292685/logs/nf.command.trace", + "SRR2838702SE/tools/snippy/GCF_000292685/logs/versions.yml", + "SRR2838702SE_2", + "SRR2838702SE_2/tools", + "SRR2838702SE_2/tools/snippy", + "SRR2838702SE_2/tools/snippy/GCF_000292685", + "SRR2838702SE_2/tools/snippy/GCF_000292685/SRR2838702SE_2.aligned.fa.gz", + "SRR2838702SE_2/tools/snippy/GCF_000292685/SRR2838702SE_2.annotated.vcf.gz", + "SRR2838702SE_2/tools/snippy/GCF_000292685/SRR2838702SE_2.bam", + "SRR2838702SE_2/tools/snippy/GCF_000292685/SRR2838702SE_2.bam.bai", + "SRR2838702SE_2/tools/snippy/GCF_000292685/SRR2838702SE_2.bed.gz", + "SRR2838702SE_2/tools/snippy/GCF_000292685/SRR2838702SE_2.consensus.fa.gz", + "SRR2838702SE_2/tools/snippy/GCF_000292685/SRR2838702SE_2.consensus.subs.fa.gz", + "SRR2838702SE_2/tools/snippy/GCF_000292685/SRR2838702SE_2.consensus.subs.masked.fa.gz", + "SRR2838702SE_2/tools/snippy/GCF_000292685/SRR2838702SE_2.coverage.txt.gz", + "SRR2838702SE_2/tools/snippy/GCF_000292685/SRR2838702SE_2.csv.gz", + "SRR2838702SE_2/tools/snippy/GCF_000292685/SRR2838702SE_2.filt.vcf.gz", + "SRR2838702SE_2/tools/snippy/GCF_000292685/SRR2838702SE_2.gff.gz", + "SRR2838702SE_2/tools/snippy/GCF_000292685/SRR2838702SE_2.html", + "SRR2838702SE_2/tools/snippy/GCF_000292685/SRR2838702SE_2.raw.vcf.gz", + "SRR2838702SE_2/tools/snippy/GCF_000292685/SRR2838702SE_2.subs.vcf.gz", + "SRR2838702SE_2/tools/snippy/GCF_000292685/SRR2838702SE_2.tab", + "SRR2838702SE_2/tools/snippy/GCF_000292685/SRR2838702SE_2.txt", + "SRR2838702SE_2/tools/snippy/GCF_000292685/SRR2838702SE_2.vcf.gz", + "SRR2838702SE_2/tools/snippy/GCF_000292685/logs", + "SRR2838702SE_2/tools/snippy/GCF_000292685/logs/SRR2838702SE_2.log", + "SRR2838702SE_2/tools/snippy/GCF_000292685/logs/nf.command.begin", + "SRR2838702SE_2/tools/snippy/GCF_000292685/logs/nf.command.err", + "SRR2838702SE_2/tools/snippy/GCF_000292685/logs/nf.command.log", + "SRR2838702SE_2/tools/snippy/GCF_000292685/logs/nf.command.out", + "SRR2838702SE_2/tools/snippy/GCF_000292685/logs/nf.command.run", + "SRR2838702SE_2/tools/snippy/GCF_000292685/logs/nf.command.sh", + "SRR2838702SE_2/tools/snippy/GCF_000292685/logs/nf.command.trace", + "SRR2838702SE_2/tools/snippy/GCF_000292685/logs/versions.yml", + "SRR2838702_2", + "SRR2838702_2/tools", + "SRR2838702_2/tools/snippy", + "SRR2838702_2/tools/snippy/GCF_000292685", + "SRR2838702_2/tools/snippy/GCF_000292685/SRR2838702_2.aligned.fa.gz", + "SRR2838702_2/tools/snippy/GCF_000292685/SRR2838702_2.annotated.vcf.gz", + "SRR2838702_2/tools/snippy/GCF_000292685/SRR2838702_2.bam", + "SRR2838702_2/tools/snippy/GCF_000292685/SRR2838702_2.bam.bai", + "SRR2838702_2/tools/snippy/GCF_000292685/SRR2838702_2.bed.gz", + "SRR2838702_2/tools/snippy/GCF_000292685/SRR2838702_2.consensus.fa.gz", + "SRR2838702_2/tools/snippy/GCF_000292685/SRR2838702_2.consensus.subs.fa.gz", + "SRR2838702_2/tools/snippy/GCF_000292685/SRR2838702_2.consensus.subs.masked.fa.gz", + "SRR2838702_2/tools/snippy/GCF_000292685/SRR2838702_2.coverage.txt.gz", + "SRR2838702_2/tools/snippy/GCF_000292685/SRR2838702_2.csv.gz", + "SRR2838702_2/tools/snippy/GCF_000292685/SRR2838702_2.filt.vcf.gz", + "SRR2838702_2/tools/snippy/GCF_000292685/SRR2838702_2.gff.gz", + "SRR2838702_2/tools/snippy/GCF_000292685/SRR2838702_2.html", + "SRR2838702_2/tools/snippy/GCF_000292685/SRR2838702_2.raw.vcf.gz", + "SRR2838702_2/tools/snippy/GCF_000292685/SRR2838702_2.subs.vcf.gz", + "SRR2838702_2/tools/snippy/GCF_000292685/SRR2838702_2.tab", + "SRR2838702_2/tools/snippy/GCF_000292685/SRR2838702_2.txt", + "SRR2838702_2/tools/snippy/GCF_000292685/SRR2838702_2.vcf.gz", + "SRR2838702_2/tools/snippy/GCF_000292685/logs", + "SRR2838702_2/tools/snippy/GCF_000292685/logs/SRR2838702_2.log", + "SRR2838702_2/tools/snippy/GCF_000292685/logs/nf.command.begin", + "SRR2838702_2/tools/snippy/GCF_000292685/logs/nf.command.err", + "SRR2838702_2/tools/snippy/GCF_000292685/logs/nf.command.log", + "SRR2838702_2/tools/snippy/GCF_000292685/logs/nf.command.out", + "SRR2838702_2/tools/snippy/GCF_000292685/logs/nf.command.run", + "SRR2838702_2/tools/snippy/GCF_000292685/logs/nf.command.sh", + "SRR2838702_2/tools/snippy/GCF_000292685/logs/nf.command.trace", + "SRR2838702_2/tools/snippy/GCF_000292685/logs/versions.yml", + "bactopia-runs", + "bactopia-runs/snippy", + "bactopia-runs/snippy/GCF_000292685.samples.txt", + "bactopia-runs/snippy/core-snp-clean.full.aln.gz", + "bactopia-runs/snippy/core-snp.distance.tsv", + "bactopia-runs/snippy/core-snp.full.aln.gz", + "bactopia-runs/snippy/nf-reports", + "bactopia-runs/snippy/nf-reports/snippy-dag.dot", + "bactopia-runs/snippy/nf-reports/snippy-report.html", + "bactopia-runs/snippy/nf-reports/snippy-timeline.html", + "bactopia-runs/snippy/snippy-core", + "bactopia-runs/snippy/snippy-core/core-snp.aln.gz", + "bactopia-runs/snippy/snippy-core/core-snp.tab.gz", + "bactopia-runs/snippy/snippy-core/core-snp.txt", + "bactopia-runs/snippy/snippy-core/core-snp.vcf.gz", + "bactopia-runs/snippy/snippy-core/logs", + "bactopia-runs/snippy/snippy-core/logs/nf.command.begin", + "bactopia-runs/snippy/snippy-core/logs/nf.command.err", + "bactopia-runs/snippy/snippy-core/logs/nf.command.log", + "bactopia-runs/snippy/snippy-core/logs/nf.command.out", + "bactopia-runs/snippy/snippy-core/logs/nf.command.run", + "bactopia-runs/snippy/snippy-core/logs/nf.command.sh", + "bactopia-runs/snippy/snippy-core/logs/nf.command.trace", + "bactopia-runs/snippy/snippy-core/logs/versions.yml", + "bactopia-runs/snippy/snpdists", + "bactopia-runs/snippy/snpdists/logs", + "bactopia-runs/snippy/snpdists/logs/nf.command.begin", + "bactopia-runs/snippy/snpdists/logs/nf.command.err", + "bactopia-runs/snippy/snpdists/logs/nf.command.log", + "bactopia-runs/snippy/snpdists/logs/nf.command.out", + "bactopia-runs/snippy/snpdists/logs/nf.command.run", + "bactopia-runs/snippy/snpdists/logs/nf.command.sh", + "bactopia-runs/snippy/snpdists/logs/nf.command.trace", + "bactopia-runs/snippy/snpdists/logs/versions.yml" + ], + [ + "ERR1438863.tab:md5,9b4987b8070848915b02b159eeac5886", + "ERR6005894.tab:md5,00cc7c3e06c9b26227ec6eda254ed410", + "ERR6005894SE.tab:md5,00cc7c3e06c9b26227ec6eda254ed410", + "SRR2838702.tab:md5,67e8a9cc497b74f40fad905e9c84e494", + "SRR2838702SE.tab:md5,9b94b3377f68e6901ef3634fca10241f", + "SRR2838702SE_2.tab:md5,9b94b3377f68e6901ef3634fca10241f", + "SRR2838702_2.tab:md5,67e8a9cc497b74f40fad905e9c84e494", + "core-snp.distance.tsv:md5,035f4fc57bee2ee25160fe42ca8307d1" + ] + ], + "timestamp": "2026-07-30T19:31:27.02187471", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/spatyper/nextflow.config b/workflows/bactopia-tools/spatyper/nextflow.config index fcde5236d..46f55a58d 100644 --- a/workflows/bactopia-tools/spatyper/nextflow.config +++ b/workflows/bactopia-tools/spatyper/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/spatyper/nextflow_schema.json b/workflows/bactopia-tools/spatyper/nextflow_schema.json index 958666d80..94ad88391 100644 --- a/workflows/bactopia-tools/spatyper/nextflow_schema.json +++ b/workflows/bactopia-tools/spatyper/nextflow_schema.json @@ -383,13 +383,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/spatyper/tests/main.nf.test.snap b/workflows/bactopia-tools/spatyper/tests/main.nf.test.snap index 049610333..0b3d62ad8 100644 --- a/workflows/bactopia-tools/spatyper/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/spatyper/tests/main.nf.test.snap @@ -42,7 +42,7 @@ "spatyper.tsv:md5,6afe7a90c591e32107d86c0e81029f54" ] ], - "timestamp": "2026-04-29T11:25:16.346934706", + "timestamp": "2026-07-30T19:25:03.228802035", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -91,7 +91,7 @@ "spatyper.tsv:md5,6afe7a90c591e32107d86c0e81029f54" ] ], - "timestamp": "2026-04-29T11:24:33.661292996", + "timestamp": "2026-07-30T19:24:28.910423382", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/ssuissero/nextflow.config b/workflows/bactopia-tools/ssuissero/nextflow.config index 6f19835b8..87b86a7d9 100644 --- a/workflows/bactopia-tools/ssuissero/nextflow.config +++ b/workflows/bactopia-tools/ssuissero/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/ssuissero/nextflow_schema.json b/workflows/bactopia-tools/ssuissero/nextflow_schema.json index 94973c26e..aa2f236ee 100644 --- a/workflows/bactopia-tools/ssuissero/nextflow_schema.json +++ b/workflows/bactopia-tools/ssuissero/nextflow_schema.json @@ -356,13 +356,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/ssuissero/tests/main.nf.test.snap b/workflows/bactopia-tools/ssuissero/tests/main.nf.test.snap index 9054adb8c..9555054c6 100644 --- a/workflows/bactopia-tools/ssuissero/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/ssuissero/tests/main.nf.test.snap @@ -42,7 +42,7 @@ "ssuissero.tsv:md5,b1312d3041a6543154be554d5ec3b0b9" ] ], - "timestamp": "2026-04-29T11:24:32.770143641", + "timestamp": "2026-07-30T19:24:42.693652595", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/staphscan/main.nf b/workflows/bactopia-tools/staphscan/main.nf new file mode 100644 index 000000000..40a06ee6d --- /dev/null +++ b/workflows/bactopia-tools/staphscan/main.nf @@ -0,0 +1,86 @@ +#!/usr/bin/env nextflow +/** + * Genome-based surveillance analysis of Staphylococcus aureus. + * + * This Bactopia Tool uses [StaphSCAN](https://github.com/riccabolla/StaphSCAN) to perform + * genome-based surveillance of _Staphylococcus aureus_ for epidemiological typing and + * resistance profiling. + * + * @status stable + * @keywords staphylococcus aureus, surveillance, mlst, spa typing, sccmec, amr, virulence, bactopia-tool + * @tags complexity:simple input-type:parameter output-type:multiple features:bactopia-tool,aggregation + * @citation csvtk, staphscan + * + * @subworkflows utils_bactopia-tools, staphscan + * + * @input rundir + * Directory containing results from a completed Bactopia analysis run + * + * @input staphscan_db_mlst + * Path or tarball to custom MLST database (optional) + * + * @section Per-Sample Results + * @publish *.tsv Per-sample surveillance summary with MLST, spa type, SCCmec, capsule, AGR, resistance, biofilm, and virulence results + * + * @section Merged Results + * @publish staphscan.tsv Merged TSV file containing staphscan results from all samples + * + * @section Execution Logs + * @publish logs/staphscan/* Tool execution logs (stdout/stderr) + * @publish logs/nf-* Nextflow execution scripts and logs for debugging + * + * @section Versions + * @publish versions.yml Software version information + */ +nextflow.enable.types = true + +params { + rundir : String + + // Tool-specific parameters + staphscan_db_mlst : Path? +} + +include { BACTOPIATOOL_INIT } from '../../../subworkflows/utils/bactopia-tools/main' +include { STAPHSCAN } from '../../../subworkflows/staphscan/main' +include { collectNextflowLogs } from 'plugin/nf-bactopia' + +workflow { + main: + ch_bactopiatool = BACTOPIATOOL_INIT() + ch_staphscan = STAPHSCAN(ch_bactopiatool.assembly, params.staphscan_db_mlst) + + publish: + // Per-sample + sample_outputs = ch_staphscan.sample_outputs + sample_nf_logs = collectNextflowLogs(ch_staphscan.sample_outputs) + // Run-level + run_outputs = ch_staphscan.run_outputs + run_nf_logs = collectNextflowLogs(ch_staphscan.run_outputs) +} + +output { + // Sample-level outputs (stored in ${params.outdir}//) + sample_outputs { + path { r -> + r.results.flatten() >> "${r.meta.output_dir}/" + r.logs.flatten() >> "${r.meta.logs_dir}/" + r.versions.flatten() >> "${r.meta.logs_dir}/" + } + } + sample_nf_logs { + path { meta, f -> f >> "${meta.logs_dir}/nf${f.name}" } + } + + // Run-level outputs (stored in ${params.outdir}/bactopia-runs//) + run_outputs { + path { r -> + r.results.flatten() >> "${params.rundir}/${r.meta.output_dir}/" + r.logs.flatten() >> "${params.rundir}/${r.meta.logs_dir}/" + r.versions.flatten() >> "${params.rundir}/${r.meta.logs_dir}/" + } + } + run_nf_logs { + path { meta, f -> f >> "${params.rundir}/${meta.logs_dir}/nf${f.name}" } + } +} diff --git a/workflows/bactopia-tools/staphscan/nextflow.config b/workflows/bactopia-tools/staphscan/nextflow.config new file mode 100644 index 000000000..092f6660e --- /dev/null +++ b/workflows/bactopia-tools/staphscan/nextflow.config @@ -0,0 +1,94 @@ +// main script name +manifest { + author = 'Robert A. Petit III' + name = 'bactopia' + homePage = 'https://github.com/bactopia/bactopia' + description = 'An extensive workflow for processing sequencing of bacterial genomes.' + mainScript = 'main.nf' + version = '4.1.0' + nextflowVersion = '>=26.04.0' +} + +params { + workflow { + name = "staphscan" + logo_name = "bactopia-tools" + description = "Genome-based surveillance analysis of Staphylococcus aureus." + ext = ['fna'] + } +} + +// Version +params.bactopia_version = '4.1.0' +manifest.version = "${params.bactopia_version}" + +// Includes +params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." +includeConfig "../../../conf/params.config" +includeConfig "../../../conf/params/bactopia-tools.config" + +// Module specific config +includeConfig "../../../modules/csvtk/concat/module.config" +includeConfig "../../../modules/staphscan/module.config" + +// Set output directory +outputDir = params.outdir +workflow.output.mode = params.publish_dir_mode +workflow.output.overwrite = params.force + +// Set up run directory +params.singularity_cache = env("NXF_SINGULARITY_CACHEDIR") ? "${env('NXF_SINGULARITY_CACHEDIR')}" : "${params.singularity_cache}" +params.run_timestamp = new java.util.Date().format('yyyyMMdd-HHmmss') +params.rundir = params.is_ci ? "bactopia-runs/${params.run_name}" : "bactopia-runs/${params.run_name}-${params.run_timestamp}" +params.infodir = "${params.outdir}/${params.rundir}/nf-reports" + +// Load nf-core custom profiles from different Institutions +includeConfig !env('NXF_OFFLINE') && params.custom_config_base ? "${params.custom_config_base}/nfcore_custom.config" : "/dev/null" + +// Load Bactopia custom profiles from different institutions. +// Uncomment in the event a bactopia specific profile is added +//includeConfig !System.getenv('NXF_OFFLINE') && params.custom_config_base ? "${params.custom_config_base}/pipeline/bactopia.config" : "/dev/null" + +// Base Config +includeConfig "../../../conf/base.config" + +// Profiles +includeConfig "../../../conf/profiles.config" + +// Reporting configuration +timeline { + enabled = true + overwrite = true + file = "${params.infodir}/${params.wf}-timeline.html" +} + +report { + enabled = true + overwrite = true + file = "${params.infodir}/${params.wf}-report.html" +} + +trace { + enabled = true + overwrite = true + file = "${params.infodir}/${params.wf}-trace.txt" + fields = 'task_id,hash,native_id,process,tag,name,status,exit,module,container,cpus,time,disk,memory,attempt,start,complete,duration,realtime,queue,%cpu,%mem,rss,vmem' +} + +dag { + enabled = true + overwrite = true + file = "${params.infodir}/${params.wf}-dag.svg" +} + +// Plugins +plugins { + id 'nf-bactopia@2.1.7' +} + +bactopia { + parametersSchema = "${projectDir}/nextflow_schema.json" +} diff --git a/workflows/bactopia-tools/staphscan/nextflow_schema.json b/workflows/bactopia-tools/staphscan/nextflow_schema.json new file mode 100644 index 000000000..066e805e4 --- /dev/null +++ b/workflows/bactopia-tools/staphscan/nextflow_schema.json @@ -0,0 +1,446 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/bactopia/bactopia/master/conf/schema/bactopia-tools.json", + "title": "staphscan", + "description": "Genome-based surveillance analysis of Staphylococcus aureus.", + "type": "object", + "$defs": { + "input_parameters": { + "title": "Required Parameters", + "type": "object", + "fa_icon": "fas fa-terminal", + "description": "Define where the pipeline should find input data and save output data.", + "help_text": "", + "properties": { + "bactopia": { + "type": "string", + "description": "The path to bactopia results to use as inputs", + "help": "The required inputs will be automatically selected by the subworkflow.", + "fa_icon": "fas fa-bacterium", + "header": "Bactopia Results" + } + } + }, + "filter_parameters": { + "title": "Filtering Parameters", + "type": "object", + "description": "Use these parameters to specify which samples to include or exclude.", + "default": "", + "fa_icon": "fa-solid fa-filter", + "properties": { + "include": { + "type": "string", + "description": "A text file containing sample names (one per line) to include from the analysis", + "help": "The expected format is a single sample per line.", + "fa_icon": "far fa-square-plus" + }, + "exclude": { + "type": "string", + "description": "A text file containing sample names (one per line) to exclude from the analysis", + "help": "The expected format is a single sample per line.", + "fa_icon": "far fa-square-minus" + } + } + }, + "staphscan_parameters": { + "title": "StaphSCAN Parameters", + "type": "object", + "description": "", + "default": "", + "fa_icon": "fas fa-exclamation-circle", + "properties": { + "staphscan_modules": { + "type": "string", + "default": "", + "description": "Comma-separated list of modules to run", + "fa_icon": "fas fa-font" + }, + "staphscan_db_mlst": { + "type": "string", + "description": "Path or tarball to custom MLST database", + "fa_icon": "fas fa-font", + "hidden": true + } + } + }, + "csvtk_concat_parameters": { + "title": "csvtk concat Parameters", + "type": "object", + "description": "", + "default": "", + "fa_icon": "fas fa-exclamation-circle", + "properties": { + "csvtk_concat_opts": { + "type": "string", + "description": "Extra csvtk concat options in quotes", + "help": "", + "fa_icon": "fas fa-font", + "hidden": true + } + } + }, + "optional_parameters": { + "title": "Optional Parameters", + "type": "object", + "description": "These optional parameters can be useful in certain settings.", + "default": "", + "fa_icon": "fa-solid fa-gears", + "properties": { + "outdir": { + "type": "string", + "default": "bactopia", + "description": "Base directory to write results to", + "fa_icon": "fas fa-folder" + }, + "skip_compression": { + "type": "boolean", + "default": false, + "description": "Output files will not be compressed", + "help": "Using this parameter can lead to a significant increase in the size of the outputs", + "fa_icon": "fas fa-expand-arrows-alt", + "hidden": true + }, + "datasets": { + "type": "string", + "fa_icon": "fas fa-folder", + "description": "The path to cache datasets to", + "hidden": true + }, + "keep_all_files": { + "type": "boolean", + "default": false, + "description": "Keeps all analysis files created", + "help": "By default, intermediate files are removed. This will not affect the ability to resume Nextflow runs, and only occurs at the end of the process.", + "fa_icon": "fas fa-trash-restore", + "hidden": true + } + } + }, + "max_job_request_parameters": { + "title": "Max Job Request Parameters", + "type": "object", + "fa_icon": "fa-solid fa-arrow-up-right-dots", + "description": "Set the top limit for requested resources for any single job.", + "hidden": true, + "help_text": "If you are running on a smaller system, a pipeline step requesting more resources than are available may cause the Nextflow to stop the run with an error. These options allow you to cap the maximum resources requested by any single job so that the pipeline will run on your system.\n\nNote that you can not _increase_ the resources requested by any job using these options. For that you will need your own configuration file. See [the nf-core website](https://nf-co.re/usage/configuration) for details.", + "properties": { + "max_retry": { + "type": "integer", + "description": "Maximum times to retry a process before allowing it to fail.", + "default": 3, + "fa_icon": "fas fa-redo", + "hidden": true, + "help_text": "Use to set an upper-limit for the number of retry attempts for each process. Should be an integer e.g. `--max_retry 1`" + }, + "max_cpus": { + "type": "integer", + "description": "Maximum number of CPUs that can be requested for any single job.", + "default": 4, + "fa_icon": "fas fa-microchip", + "hidden": true, + "help_text": "Use to set an upper-limit for the CPU requirement for each process. Should be an integer e.g. `--max_cpus 1`" + }, + "max_memory": { + "type": "string", + "description": "Maximum amount of memory that can be requested for any single job.", + "default": "128.GB", + "fa_icon": "fas fa-memory", + "pattern": "^\\d+(\\.\\d+)?\\.?\\s*(K|M|G|T)?B$", + "hidden": true, + "help_text": "Use to set an upper-limit for the memory requirement for each process. Should be a string in the format integer-unit e.g. `--max_memory '8.GB'`" + }, + "max_time": { + "type": "string", + "description": "Maximum amount of time that can be requested for any single job.", + "default": "240.h", + "fa_icon": "far fa-clock", + "pattern": "^(\\d+\\.?\\s*(s|m|h|d|day)\\s*)+$", + "hidden": true, + "help_text": "Use to set an upper-limit for the time requirement for each process. Should be a string in the format integer-unit e.g. `--max_time '1.h'`" + }, + "max_downloads": { + "type": "integer", + "description": "Maximum number of samples to download at a time", + "default": 3, + "fa_icon": "fas fa-angle-double-up", + "hidden": true, + "help_text": "Use to set an upper-limit for the number of downloads at a time" + } + } + }, + "nextflow_parameters": { + "title": "Nextflow Configuration Parameters", + "type": "object", + "description": "Parameters to fine-tune your Nextflow setup.", + "default": "", + "hidden": true, + "fa_icon": "fa-solid fa-screwdriver-wrench", + "properties": { + "nfconfig": { + "type": "string", + "description": "A Nextflow compatible config file for custom profiles, loaded last and will overwrite existing variables if set.", + "help": "This allows you to create profiles specific to your environment (e.g. SGE, AWS, SLURM, etc...).", + "fa_icon": "fas fa-cog", + "hidden": true + }, + "publish_dir_mode": { + "type": "string", + "default": "copy", + "hidden": true, + "description": "Method used to save pipeline results to output directory.", + "help_text": "The Nextflow `publishDir` option specifies which intermediate files should be saved to the output directory. This option tells the pipeline what method should be used to move these files. See [Nextflow docs](https://www.nextflow.io/docs/latest/process.html#publishdir) for details.", + "fa_icon": "fas fa-copy", + "enum": [ + "symlink", + "rellink", + "link", + "copy", + "copyNoFollow", + "move" + ] + }, + "infodir": { + "type": "string", + "description": "Directory to keep pipeline Nextflow logs and reports.", + "default": "${params.outdir}/pipeline_info", + "fa_icon": "fas fa-cogs", + "hidden": true + }, + "force": { + "type": "boolean", + "default": false, + "description": "Nextflow will overwrite existing output files.", + "fa_icon": "fas fa-recycle", + "hidden": true + }, + "cleanup_workdir": { + "type": "boolean", + "default": false, + "description": "After Bactopia is successfully executed, the `work` directory will be deleted.", + "help": "Warning: by doing this you lose the ability to resume workflows.", + "fa_icon": "fas fa-trash-alt", + "hidden": true + } + } + }, + "institutional_config_options": { + "title": "Institutional config options", + "type": "object", + "fa_icon": "fas fa-university", + "description": "Parameters used to describe centralized config profiles. These should not be edited.", + "help_text": "The centralized nf-core configuration profiles use a handful of pipeline parameters to describe themselves. This information is then printed to the Nextflow log when you run a pipeline. You should not need to change these values when you run a pipeline.", + "properties": { + "custom_config_version": { + "type": "string", + "description": "Git commit id for Institutional configs.", + "default": "master", + "hidden": true, + "fa_icon": "fas fa-users-cog" + }, + "custom_config_base": { + "type": "string", + "description": "Base directory for Institutional configs.", + "default": "https://raw.githubusercontent.com/nf-core/configs/master", + "hidden": true, + "help_text": "If you're running offline, Nextflow will not be able to fetch the institutional config files from the internet. If you don't need them, then this is not a problem. If you do need them, you should download the files from the repo and tell Nextflow where to find them with this parameter.", + "fa_icon": "fas fa-users-cog" + }, + "config_profile_name": { + "type": "string", + "description": "Institutional config name.", + "hidden": true, + "fa_icon": "fas fa-users-cog" + }, + "config_profile_description": { + "type": "string", + "description": "Institutional config description.", + "hidden": true, + "fa_icon": "fas fa-users-cog" + }, + "config_profile_contact": { + "type": "string", + "description": "Institutional config contact information.", + "hidden": true, + "fa_icon": "fas fa-users-cog" + }, + "config_profile_url": { + "type": "string", + "description": "Institutional config URL link.", + "hidden": true, + "fa_icon": "fas fa-users-cog" + } + } + }, + "nextflow_profile_parameters": { + "title": "Nextflow Profile Parameters", + "type": "object", + "description": "Parameters to fine-tune your Nextflow setup.", + "default": "", + "hidden": true, + "fa_icon": "fa-regular fa-address-card", + "properties": { + "condadir": { + "type": "string", + "description": "Directory to Nextflow should use for Conda environments", + "fa_icon": "fas fa-folder", + "hidden": true + }, + "registry": { + "type": "string", + "default": "quay.io", + "hidden": true, + "description": "Registry to pull Docker containers from.", + "fa_icon": "fas fa-box" + }, + "datasets_cache": { + "type": "string", + "default": "/.bactopia/datasets", + "description": "Directory where downloaded datasets should be stored.", + "help": "", + "fa_icon": "fas fa-folder" + }, + "singularity_cache": { + "type": "string", + "description": "Directory where remote Singularity images are stored.", + "help": "If using a cluster, it must be accessible from all compute nodes. The NXF_SINGULARITY_CACHEDIR environment variable overrides this parameter", + "fa_icon": "fas fa-folder", + "hidden": true + }, + "singularity_pull_docker_container": { + "type": "boolean", + "description": "Instead of directly downloading Singularity images for use with Singularity, force the workflow to pull and convert Docker containers instead.", + "hidden": true, + "fa_icon": "fas fa-toolbox", + "help_text": "This may be useful for example if you are unable to directly pull Singularity containers to run the pipeline due to http/https proxy issues." + }, + "force_rebuild": { + "type": "boolean", + "default": false, + "description": "Force overwrite of existing pre-built environments.", + "fa_icon": "fas fa-recycle", + "hidden": true + }, + "queue": { + "type": "string", + "default": "general,high-memory", + "description": "Comma-separated name of the queue(s) to be used by a job scheduler (e.g. AWS Batch or SLURM)", + "fa_icon": "fas fa-clipboard-list", + "hidden": true + }, + "cluster_opts": { + "type": "string", + "default": "", + "description": "Additional options to pass to the executor. (e.g. SLURM: '--account=my_acct_name'", + "fa_icon": "fas fa-clipboard-list", + "hidden": true + }, + "container_opts": { + "type": "string", + "default": "", + "description": "Additional options to pass to Apptainer, Docker, or Singularity. (e.g. Singularity: '-D `pwd`'", + "fa_icon": "fas fa-clipboard-list", + "hidden": true + }, + "disable_scratch": { + "type": "boolean", + "default": false, + "description": "All intermediate files created on worker nodes of will be transferred to the head node.", + "help": "Typically with clusters intermediate results are written to a 'scratch' space and only published result files are transferred back", + "fa_icon": "fas fa-toggle-off", + "hidden": true + } + } + }, + "generic_parameters": { + "title": "Helpful Parameters", + "type": "object", + "fa_icon": "fa-solid fa-reply-all", + "description": "Uncommonly used parameters that might be useful.", + "properties": { + "monochrome_logs": { + "type": "boolean", + "description": "Do not use coloured log outputs.", + "fa_icon": "fas fa-palette", + "hidden": true, + "help_text": "Set to disable colourful command line output and live life in monochrome." + }, + "nfdir": { + "type": "boolean", + "description": "Print directory Nextflow has pulled Bactopia to", + "fa_icon": "fas fa-remove-format", + "hidden": true + }, + "sleep_time": { + "type": "integer", + "description": "The amount of time (seconds) Nextflow will wait after setting up datasets before execution.", + "default": 5, + "fa_icon": "far fa-clock", + "hidden": true + }, + "help": { + "type": "boolean", + "description": "Display help text.", + "hidden": true, + "fa_icon": "fas fa-question-circle" + }, + "wf": { + "type": "string", + "description": "Specify which workflow or Bactopia Tool to execute", + "default": "bactopia", + "fa_icon": "fas fa-bacteria" + }, + "list_wfs": { + "type": "boolean", + "description": "List the available workflows and Bactopia Tools to use with '--wf'", + "fa_icon": "fas fa-list" + }, + "show_hidden_params": { + "type": "boolean", + "help_text": "By default, parameters set as _hidden_ in the schema are not shown on the command line when a user runs with `--help`. Specifying this option will tell the pipeline to show all parameters.", + "description": "Show all params when using `--help`", + "fa_icon": "far fa-eye", + "hidden": true + }, + "help_all": { + "type": "boolean", + "description": "An alias for --help --show_hidden_params", + "fa_icon": "fas fa-question-circle" + }, + "version": { + "type": "boolean", + "description": "Display version text.", + "fa_icon": "fas fa-info" + } + } + } + }, + "allOf": [ + { + "$ref": "#/$defs/input_parameters" + }, + { + "$ref": "#/$defs/filter_parameters" + }, + { + "$ref": "#/$defs/staphscan_parameters" + }, + { + "$ref": "#/$defs/csvtk_concat_parameters" + }, + { + "$ref": "#/$defs/optional_parameters" + }, + { + "$ref": "#/$defs/max_job_request_parameters" + }, + { + "$ref": "#/$defs/nextflow_parameters" + }, + { + "$ref": "#/$defs/nextflow_profile_parameters" + }, + { + "$ref": "#/$defs/generic_parameters" + } + ] +} \ No newline at end of file diff --git a/workflows/bactopia-tools/staphscan/tests/.nftignore b/workflows/bactopia-tools/staphscan/tests/.nftignore new file mode 100644 index 000000000..72a5fcb38 --- /dev/null +++ b/workflows/bactopia-tools/staphscan/tests/.nftignore @@ -0,0 +1,3 @@ +**/*.{err,gz,html,log,pdf,stderr,stdout} +**/nf.command.* +bactopia-runs/**/nf-reports/*.{dot,html} diff --git a/workflows/bactopia-tools/staphscan/tests/main.nf.test b/workflows/bactopia-tools/staphscan/tests/main.nf.test new file mode 100644 index 000000000..b3e2e5b71 --- /dev/null +++ b/workflows/bactopia-tools/staphscan/tests/main.nf.test @@ -0,0 +1,43 @@ +nextflow_pipeline { + name "Test staphscan Workflow" + script "../main.nf" + config "../../../../conf/test.config" + tag "workflows" + tag "bactopia-tools" + tag "staphscan" + + test("staphscan - GCF_000017085|staphylococcus_aureus|compressed_fasta") { + when { + params { + bactopia_test = "/species/staphylococcus_aureus/compressed" + test_dataset = "" + test_dataset2 = "" + test_dataset3 = "" + test_r1 = "" + test_r2 = "" + test_se = "" + test_ont = "" + is_ci = true + outdir = "$outputDir" + } + } + + then { + // stable_name: All files + folders in ${params.outdir}/ with a stable name + def stable_name = getAllFilesFromDir(params.outdir, relative: true, includeDir: true, ignore: []) + // stable_path: All files in ${params.outdir}/ with stable content + def stable_path = getAllFilesFromDir(params.outdir, ignoreFile: '.nftignore') + assertAll( + { assert workflow.success}, + { assert snapshot( + // Number of successful tasks + workflow.trace.succeeded().size(), + // All stable path name, with a relative path + stable_name, + // All files with stable contents + stable_path + ).match() } + ) + } + } +} diff --git a/workflows/bactopia-tools/staphscan/tests/main.nf.test.snap b/workflows/bactopia-tools/staphscan/tests/main.nf.test.snap new file mode 100644 index 000000000..6ab64c845 --- /dev/null +++ b/workflows/bactopia-tools/staphscan/tests/main.nf.test.snap @@ -0,0 +1,51 @@ +{ + "staphscan - GCF_000017085|staphylococcus_aureus|compressed_fasta": { + "content": [ + 2, + [ + "GCF_000017085", + "GCF_000017085/tools", + "GCF_000017085/tools/staphscan", + "GCF_000017085/tools/staphscan/GCF_000017085.tsv", + "GCF_000017085/tools/staphscan/logs", + "GCF_000017085/tools/staphscan/logs/nf.command.begin", + "GCF_000017085/tools/staphscan/logs/nf.command.err", + "GCF_000017085/tools/staphscan/logs/nf.command.log", + "GCF_000017085/tools/staphscan/logs/nf.command.out", + "GCF_000017085/tools/staphscan/logs/nf.command.run", + "GCF_000017085/tools/staphscan/logs/nf.command.sh", + "GCF_000017085/tools/staphscan/logs/nf.command.trace", + "GCF_000017085/tools/staphscan/logs/versions.yml", + "bactopia-runs", + "bactopia-runs/staphscan", + "bactopia-runs/staphscan/merged-results", + "bactopia-runs/staphscan/merged-results/logs", + "bactopia-runs/staphscan/merged-results/logs/staphscan-concat", + "bactopia-runs/staphscan/merged-results/logs/staphscan-concat/nf.command.begin", + "bactopia-runs/staphscan/merged-results/logs/staphscan-concat/nf.command.err", + "bactopia-runs/staphscan/merged-results/logs/staphscan-concat/nf.command.log", + "bactopia-runs/staphscan/merged-results/logs/staphscan-concat/nf.command.out", + "bactopia-runs/staphscan/merged-results/logs/staphscan-concat/nf.command.run", + "bactopia-runs/staphscan/merged-results/logs/staphscan-concat/nf.command.sh", + "bactopia-runs/staphscan/merged-results/logs/staphscan-concat/nf.command.trace", + "bactopia-runs/staphscan/merged-results/logs/staphscan-concat/versions.yml", + "bactopia-runs/staphscan/merged-results/staphscan.tsv", + "bactopia-runs/staphscan/nf-reports", + "bactopia-runs/staphscan/nf-reports/staphscan-dag.dot", + "bactopia-runs/staphscan/nf-reports/staphscan-report.html", + "bactopia-runs/staphscan/nf-reports/staphscan-timeline.html" + ], + [ + "GCF_000017085.tsv:md5,f13bc8d8aba4cf0f801e04a8d6148e1e", + "versions.yml:md5,794f66edfdb0127b7c9b08a1bb6d3231", + "versions.yml:md5,3848bf66b301b2b06d040f81eaac7e9b", + "staphscan.tsv:md5,f13bc8d8aba4cf0f801e04a8d6148e1e" + ] + ], + "timestamp": "2026-07-30T19:25:01.709535343", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + } +} \ No newline at end of file diff --git a/workflows/bactopia-tools/staphscan/tests/nf-test.config b/workflows/bactopia-tools/staphscan/tests/nf-test.config new file mode 100644 index 000000000..8f297479d --- /dev/null +++ b/workflows/bactopia-tools/staphscan/tests/nf-test.config @@ -0,0 +1,11 @@ +config { + testsDir "." + workDir System.getenv("NFT_WORKDIR") ?: ".nf-test" + configFile "../nextflow.config" + profile "" + options "--is_ci --max_memory 8.GB" + + plugins { + load "nft-utils@0.0.5" + } +} diff --git a/workflows/bactopia-tools/staphtyper/main.nf b/workflows/bactopia-tools/staphtyper/main.nf index 94617e419..677913b49 100644 --- a/workflows/bactopia-tools/staphtyper/main.nf +++ b/workflows/bactopia-tools/staphtyper/main.nf @@ -7,11 +7,12 @@ * 1. [AgrVATE](https://github.com/VishnuRaghuram94/AgrVATE) - agr locus type and operon variants * 2. [spaTyper](https://github.com/HCGB-IGTP/spaTyper) - spa type * 3. [sccmec](https://github.com/rpetit3/sccmec) - SCCmec type + * 4. [StaphSCAN](https://github.com/riccabolla/StaphSCAN) - genome-based surveillance * * @status stable - * @keywords staphylococcus aureus, agr, spa, sccmec, typing, bactopia-tool + * @keywords staphylococcus aureus, agr, spa, sccmec, surveillance, typing, bactopia-tool * @tags complexity:moderate input-type:parameter output-type:multiple features:bactopia-tool,typing,workflow - * @citation agrvate, spatyper, sccmec + * @citation agrvate, sccmec, spatyper, staphscan * * @subworkflows utils_bactopia-tools, staphtyper * @@ -24,6 +25,9 @@ * @input spatyper_repeat_order * Path to a custom spaTyper repeat order file * + * @input staphscan_db_mlst + * Path or tarball to custom MLST database for StaphSCAN + * * @section Comprehensive Typing * @note Results from all included typing tools * @publish staphtyper.tsv Merged summary containing agr, spa, and SCCmec typing results @@ -43,6 +47,7 @@ params { // Tool-specific parameters spatyper_repeats : Path? spatyper_repeat_order : Path? + staphscan_db_mlst : Path? } include { BACTOPIATOOL_INIT } from '../../../subworkflows/utils/bactopia-tools/main' @@ -55,7 +60,8 @@ workflow { ch_staphtyper = STAPHTYPER( ch_bactopiatool.assembly, params.spatyper_repeats, - params.spatyper_repeat_order + params.spatyper_repeat_order, + params.staphscan_db_mlst ) publish: diff --git a/workflows/bactopia-tools/staphtyper/nextflow.config b/workflows/bactopia-tools/staphtyper/nextflow.config index 0d654e02e..6956e197f 100644 --- a/workflows/bactopia-tools/staphtyper/nextflow.config +++ b/workflows/bactopia-tools/staphtyper/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -32,6 +35,7 @@ includeConfig "../../../modules/csvtk/concat/module.config" includeConfig "../../../modules/agrvate/module.config" includeConfig "../../../modules/spatyper/module.config" includeConfig "../../../modules/sccmec/module.config" +includeConfig "../../../modules/staphscan/module.config" // Set output directory outputDir = params.outdir @@ -85,7 +89,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/staphtyper/nextflow_schema.json b/workflows/bactopia-tools/staphtyper/nextflow_schema.json index 2fefd780f..838b74c3a 100644 --- a/workflows/bactopia-tools/staphtyper/nextflow_schema.json +++ b/workflows/bactopia-tools/staphtyper/nextflow_schema.json @@ -133,6 +133,27 @@ } } }, + "staphscan_parameters": { + "title": "StaphSCAN Parameters", + "type": "object", + "description": "", + "default": "", + "fa_icon": "fas fa-exclamation-circle", + "properties": { + "staphscan_modules": { + "type": "string", + "default": "", + "description": "Comma-separated list of modules to run", + "fa_icon": "fas fa-font" + }, + "staphscan_db_mlst": { + "type": "string", + "description": "Path or tarball to custom MLST database", + "fa_icon": "fas fa-font", + "hidden": true + } + } + }, "optional_parameters": { "title": "Optional Parameters", "type": "object", @@ -431,13 +452,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", @@ -494,6 +508,9 @@ { "$ref": "#/$defs/sccmec_parameters" }, + { + "$ref": "#/$defs/staphscan_parameters" + }, { "$ref": "#/$defs/optional_parameters" }, diff --git a/workflows/bactopia-tools/staphtyper/tests/.nftignore b/workflows/bactopia-tools/staphtyper/tests/.nftignore index 72a5fcb38..8ee23c491 100644 --- a/workflows/bactopia-tools/staphtyper/tests/.nftignore +++ b/workflows/bactopia-tools/staphtyper/tests/.nftignore @@ -1,3 +1,5 @@ **/*.{err,gz,html,log,pdf,stderr,stdout} **/nf.command.* bactopia-runs/**/nf-reports/*.{dot,html} + +**/*.{tsv,yml} diff --git a/workflows/bactopia-tools/staphtyper/tests/main.nf.test.snap b/workflows/bactopia-tools/staphtyper/tests/main.nf.test.snap index f92fb0f65..230e20ce8 100644 --- a/workflows/bactopia-tools/staphtyper/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/staphtyper/tests/main.nf.test.snap @@ -1,7 +1,7 @@ { "staphtyper - GCF_000017085|staphylococcus_aureus|compressed_fasta": { "content": [ - 6, + 8, [ "GCF_000017085", "GCF_000017085/tools", @@ -46,6 +46,17 @@ "GCF_000017085/tools/spatyper/logs/nf.command.sh", "GCF_000017085/tools/spatyper/logs/nf.command.trace", "GCF_000017085/tools/spatyper/logs/versions.yml", + "GCF_000017085/tools/staphscan", + "GCF_000017085/tools/staphscan/GCF_000017085.tsv", + "GCF_000017085/tools/staphscan/logs", + "GCF_000017085/tools/staphscan/logs/nf.command.begin", + "GCF_000017085/tools/staphscan/logs/nf.command.err", + "GCF_000017085/tools/staphscan/logs/nf.command.log", + "GCF_000017085/tools/staphscan/logs/nf.command.out", + "GCF_000017085/tools/staphscan/logs/nf.command.run", + "GCF_000017085/tools/staphscan/logs/nf.command.sh", + "GCF_000017085/tools/staphscan/logs/nf.command.trace", + "GCF_000017085/tools/staphscan/logs/versions.yml", "bactopia-runs", "bactopia-runs/staphtyper", "bactopia-runs/staphtyper/merged-results", @@ -78,36 +89,30 @@ "bactopia-runs/staphtyper/merged-results/logs/spatyper-concat/nf.command.sh", "bactopia-runs/staphtyper/merged-results/logs/spatyper-concat/nf.command.trace", "bactopia-runs/staphtyper/merged-results/logs/spatyper-concat/versions.yml", + "bactopia-runs/staphtyper/merged-results/logs/staphscan-concat", + "bactopia-runs/staphtyper/merged-results/logs/staphscan-concat/nf.command.begin", + "bactopia-runs/staphtyper/merged-results/logs/staphscan-concat/nf.command.err", + "bactopia-runs/staphtyper/merged-results/logs/staphscan-concat/nf.command.log", + "bactopia-runs/staphtyper/merged-results/logs/staphscan-concat/nf.command.out", + "bactopia-runs/staphtyper/merged-results/logs/staphscan-concat/nf.command.run", + "bactopia-runs/staphtyper/merged-results/logs/staphscan-concat/nf.command.sh", + "bactopia-runs/staphtyper/merged-results/logs/staphscan-concat/nf.command.trace", + "bactopia-runs/staphtyper/merged-results/logs/staphscan-concat/versions.yml", "bactopia-runs/staphtyper/merged-results/sccmec.tsv", "bactopia-runs/staphtyper/merged-results/spatyper.tsv", + "bactopia-runs/staphtyper/merged-results/staphscan.tsv", "bactopia-runs/staphtyper/nf-reports", "bactopia-runs/staphtyper/nf-reports/staphtyper-dag.dot", "bactopia-runs/staphtyper/nf-reports/staphtyper-report.html", "bactopia-runs/staphtyper/nf-reports/staphtyper-timeline.html" ], [ - "GCF_000017085.tsv:md5,b483a3d6ca1908ab813427b06751e51a", - "versions.yml:md5,c0b16a8b5ea1a55c72f38545beffb659", "GCF_000017085-agr_gp.tab:md5,04031d5b20fabcc4b3ddeef707e94029", "GCF_000017085-blastn_log.txt:md5,d41d8cd98f00b204e9800998ecf8427e", - "GCF_000017085.fna-error-report.tab:md5,44907dcabe3ed848aa68e87c0c6d00b2", - "GCF_000017085.regions.blastn.tsv:md5,ca426de41052a9f0bdcfb538610e5aa6", - "GCF_000017085.regions.details.tsv:md5,d8568654b8455ddebf37283918805b46", - "GCF_000017085.targets.blastn.tsv:md5,5cd7054ed50c7d360feac0e51db54ac6", - "GCF_000017085.targets.details.tsv:md5,8938065005a5f984229c09cd4d9f91e2", - "GCF_000017085.tsv:md5,da49131b3619e12fac7c1efef5e109d0", - "versions.yml:md5,4d90b86147c4eb115fc93edc4fa484b8", - "GCF_000017085.tsv:md5,6afe7a90c591e32107d86c0e81029f54", - "versions.yml:md5,32d57feabda90e9fe6e0aeb96e5d2352", - "agrvate.tsv:md5,6acd3d01fc9d867f32435265331ff7b2", - "versions.yml:md5,d203f21af354f31f3d144e58af47cff3", - "versions.yml:md5,35f4a9f839e9fd13b2afb63fecea88b4", - "versions.yml:md5,db2a4ba0c195fd025b9a8068ad991793", - "sccmec.tsv:md5,7b28813993e6b0b48532bb2b161bc975", - "spatyper.tsv:md5,6afe7a90c591e32107d86c0e81029f54" + "GCF_000017085.fna-error-report.tab:md5,44907dcabe3ed848aa68e87c0c6d00b2" ] ], - "timestamp": "2026-04-29T11:24:45.385204274", + "timestamp": "2026-07-30T19:25:10.047316684", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/stecfinder/nextflow.config b/workflows/bactopia-tools/stecfinder/nextflow.config index aa4bd5ac3..a12e1f673 100644 --- a/workflows/bactopia-tools/stecfinder/nextflow.config +++ b/workflows/bactopia-tools/stecfinder/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/stecfinder/nextflow_schema.json b/workflows/bactopia-tools/stecfinder/nextflow_schema.json index 24efa0fd7..39871b635 100644 --- a/workflows/bactopia-tools/stecfinder/nextflow_schema.json +++ b/workflows/bactopia-tools/stecfinder/nextflow_schema.json @@ -445,13 +445,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/stecfinder/tests/.nftignore b/workflows/bactopia-tools/stecfinder/tests/.nftignore index 72a5fcb38..b207a4cd8 100644 --- a/workflows/bactopia-tools/stecfinder/tests/.nftignore +++ b/workflows/bactopia-tools/stecfinder/tests/.nftignore @@ -1,3 +1,5 @@ **/*.{err,gz,html,log,pdf,stderr,stdout} **/nf.command.* bactopia-runs/**/nf-reports/*.{dot,html} + +**/stecfinder.tsv diff --git a/workflows/bactopia-tools/stecfinder/tests/main.nf.test.snap b/workflows/bactopia-tools/stecfinder/tests/main.nf.test.snap index 5b863bda3..d6fc37acb 100644 --- a/workflows/bactopia-tools/stecfinder/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/stecfinder/tests/main.nf.test.snap @@ -68,11 +68,10 @@ "versions.yml:md5,39e1618911585279f2ad89b32f9ecfa6", "SRR13039589.tsv:md5,60b65486e8dec3be870de9504d6add63", "versions.yml:md5,39e1618911585279f2ad89b32f9ecfa6", - "versions.yml:md5,a4e0bfe59670d712011a3dc00f3abeb5", - "stecfinder.tsv:md5,d2b6d9a9ab37d918c58b4e8272e6055d" + "versions.yml:md5,a4e0bfe59670d712011a3dc00f3abeb5" ] ], - "timestamp": "2026-04-29T11:24:45.875265794", + "timestamp": "2026-07-31T13:21:50.78570325", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/stxtyper/main.nf b/workflows/bactopia-tools/stxtyper/main.nf new file mode 100644 index 000000000..4d6e2b831 --- /dev/null +++ b/workflows/bactopia-tools/stxtyper/main.nf @@ -0,0 +1,78 @@ +#!/usr/bin/env nextflow +/** + * Identify and type Stx operons from assembled genomic sequences + * + * This Bactopia Tool uses [StxTyper](https://github.com/ncbi/stxtyper) to identify and type stx operons from assembled genomic sequences. + * + * @status stable + * @keywords stx, shiga toxin, typing, stec, virulence, bactopia-tool + * @tags complexity:simple input-type:parameter output-type:multiple features:bactopia-tool,aggregation + * @citation csvtk, stxtyper + * + * @subworkflows utils_bactopia-tools, stxtyper + * + * @input rundir + * Directory containing results from a completed Bactopia analysis run + * + * @section Per-Sample Results + * @publish *.tsv Tab-delimited Stx operon typing results + * + * @section Merged Results + * @publish stxtyper.tsv Merged TSV file containing stxtyper results from all samples + * + * @section Execution Logs + * @publish logs/stxtyper/* Tool execution logs (stdout/stderr) + * @publish logs/nf-* Nextflow execution scripts and logs for debugging + * + * @section Versions + * @publish versions.yml Software version information + */ +nextflow.enable.types = true + +params { + rundir : String +} + +include { BACTOPIATOOL_INIT } from '../../../subworkflows/utils/bactopia-tools/main' +include { STXTYPER } from '../../../subworkflows/stxtyper/main' +include { collectNextflowLogs } from 'plugin/nf-bactopia' + +workflow { + main: + ch_bactopiatool = BACTOPIATOOL_INIT() + ch_stxtyper = STXTYPER(ch_bactopiatool.assembly) + + publish: + // Per-sample + sample_outputs = ch_stxtyper.sample_outputs + sample_nf_logs = collectNextflowLogs(ch_stxtyper.sample_outputs) + // Run-level + run_outputs = ch_stxtyper.run_outputs + run_nf_logs = collectNextflowLogs(ch_stxtyper.run_outputs) +} + +output { + // Sample-level outputs (stored in ${params.outdir}//) + sample_outputs { + path { r -> + r.results.flatten() >> "${r.meta.output_dir}/" + r.logs.flatten() >> "${r.meta.logs_dir}/" + r.versions.flatten() >> "${r.meta.logs_dir}/" + } + } + sample_nf_logs { + path { meta, f -> f >> "${meta.logs_dir}/nf${f.name}" } + } + + // Run-level outputs (stored in ${params.outdir}/bactopia-runs//) + run_outputs { + path { r -> + r.results.flatten() >> "${params.rundir}/${r.meta.output_dir}/" + r.logs.flatten() >> "${params.rundir}/${r.meta.logs_dir}/" + r.versions.flatten() >> "${params.rundir}/${r.meta.logs_dir}/" + } + } + run_nf_logs { + path { meta, f -> f >> "${params.rundir}/${meta.logs_dir}/nf${f.name}" } + } +} diff --git a/workflows/bactopia-tools/stxtyper/nextflow.config b/workflows/bactopia-tools/stxtyper/nextflow.config new file mode 100644 index 000000000..d28cbf713 --- /dev/null +++ b/workflows/bactopia-tools/stxtyper/nextflow.config @@ -0,0 +1,94 @@ +// main script name +manifest { + author = 'Robert A. Petit III' + name = 'bactopia' + homePage = 'https://github.com/bactopia/bactopia' + description = 'An extensive workflow for processing sequencing of bacterial genomes.' + mainScript = 'main.nf' + version = '4.1.0' + nextflowVersion = '>=26.04.0' +} + +params { + workflow { + name = "stxtyper" + logo_name = "bactopia-tools" + description = "Identify and type Stx operons from assembled genomic sequences" + ext = ['fna'] + } +} + +// Version +params.bactopia_version = '4.1.0' +manifest.version = "${params.bactopia_version}" + +// Includes +params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." +includeConfig "../../../conf/params.config" +includeConfig "../../../conf/params/bactopia-tools.config" + +// Module specific config +includeConfig "../../../modules/csvtk/concat/module.config" +includeConfig "../../../modules/stxtyper/module.config" + +// Set output directory +outputDir = params.outdir +workflow.output.mode = params.publish_dir_mode +workflow.output.overwrite = params.force + +// Set up run directory +params.singularity_cache = env("NXF_SINGULARITY_CACHEDIR") ? "${env('NXF_SINGULARITY_CACHEDIR')}" : "${params.singularity_cache}" +params.run_timestamp = new java.util.Date().format('yyyyMMdd-HHmmss') +params.rundir = params.is_ci ? "bactopia-runs/${params.run_name}" : "bactopia-runs/${params.run_name}-${params.run_timestamp}" +params.infodir = "${params.outdir}/${params.rundir}/nf-reports" + +// Load nf-core custom profiles from different Institutions +includeConfig !env('NXF_OFFLINE') && params.custom_config_base ? "${params.custom_config_base}/nfcore_custom.config" : "/dev/null" + +// Load Bactopia custom profiles from different institutions. +// Uncomment in the event a bactopia specific profile is added +//includeConfig !System.getenv('NXF_OFFLINE') && params.custom_config_base ? "${params.custom_config_base}/pipeline/bactopia.config" : "/dev/null" + +// Base Config +includeConfig "../../../conf/base.config" + +// Profiles +includeConfig "../../../conf/profiles.config" + +// Reporting configuration +timeline { + enabled = true + overwrite = true + file = "${params.infodir}/${params.wf}-timeline.html" +} + +report { + enabled = true + overwrite = true + file = "${params.infodir}/${params.wf}-report.html" +} + +trace { + enabled = true + overwrite = true + file = "${params.infodir}/${params.wf}-trace.txt" + fields = 'task_id,hash,native_id,process,tag,name,status,exit,module,container,cpus,time,disk,memory,attempt,start,complete,duration,realtime,queue,%cpu,%mem,rss,vmem' +} + +dag { + enabled = true + overwrite = true + file = "${params.infodir}/${params.wf}-dag.svg" +} + +// Plugins +plugins { + id 'nf-bactopia@2.1.7' +} + +bactopia { + parametersSchema = "${projectDir}/nextflow_schema.json" +} diff --git a/workflows/bactopia-tools/stxtyper/nextflow_schema.json b/workflows/bactopia-tools/stxtyper/nextflow_schema.json new file mode 100644 index 000000000..718972fb0 --- /dev/null +++ b/workflows/bactopia-tools/stxtyper/nextflow_schema.json @@ -0,0 +1,422 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/bactopia/bactopia/master/conf/schema/bactopia-tools.json", + "title": "stxtyper", + "description": "Identify and type Stx operons from assembled genomic sequences", + "type": "object", + "$defs": { + "input_parameters": { + "title": "Required Parameters", + "type": "object", + "fa_icon": "fas fa-terminal", + "description": "Define where the pipeline should find input data and save output data.", + "help_text": "", + "properties": { + "bactopia": { + "type": "string", + "description": "The path to bactopia results to use as inputs", + "help": "The required inputs will be automatically selected by the subworkflow.", + "fa_icon": "fas fa-bacterium", + "header": "Bactopia Results" + } + } + }, + "filter_parameters": { + "title": "Filtering Parameters", + "type": "object", + "description": "Use these parameters to specify which samples to include or exclude.", + "default": "", + "fa_icon": "fa-solid fa-filter", + "properties": { + "include": { + "type": "string", + "description": "A text file containing sample names (one per line) to include from the analysis", + "help": "The expected format is a single sample per line.", + "fa_icon": "far fa-square-plus" + }, + "exclude": { + "type": "string", + "description": "A text file containing sample names (one per line) to exclude from the analysis", + "help": "The expected format is a single sample per line.", + "fa_icon": "far fa-square-minus" + } + } + }, + "csvtk_concat_parameters": { + "title": "csvtk concat Parameters", + "type": "object", + "description": "", + "default": "", + "fa_icon": "fas fa-exclamation-circle", + "properties": { + "csvtk_concat_opts": { + "type": "string", + "description": "Extra csvtk concat options in quotes", + "help": "", + "fa_icon": "fas fa-font", + "hidden": true + } + } + }, + "optional_parameters": { + "title": "Optional Parameters", + "type": "object", + "description": "These optional parameters can be useful in certain settings.", + "default": "", + "fa_icon": "fa-solid fa-gears", + "properties": { + "outdir": { + "type": "string", + "default": "bactopia", + "description": "Base directory to write results to", + "fa_icon": "fas fa-folder" + }, + "skip_compression": { + "type": "boolean", + "default": false, + "description": "Output files will not be compressed", + "help": "Using this parameter can lead to a significant increase in the size of the outputs", + "fa_icon": "fas fa-expand-arrows-alt", + "hidden": true + }, + "datasets": { + "type": "string", + "fa_icon": "fas fa-folder", + "description": "The path to cache datasets to", + "hidden": true + }, + "keep_all_files": { + "type": "boolean", + "default": false, + "description": "Keeps all analysis files created", + "help": "By default, intermediate files are removed. This will not affect the ability to resume Nextflow runs, and only occurs at the end of the process.", + "fa_icon": "fas fa-trash-restore", + "hidden": true + } + } + }, + "max_job_request_parameters": { + "title": "Max Job Request Parameters", + "type": "object", + "fa_icon": "fa-solid fa-arrow-up-right-dots", + "description": "Set the top limit for requested resources for any single job.", + "hidden": true, + "help_text": "If you are running on a smaller system, a pipeline step requesting more resources than are available may cause the Nextflow to stop the run with an error. These options allow you to cap the maximum resources requested by any single job so that the pipeline will run on your system.\n\nNote that you can not _increase_ the resources requested by any job using these options. For that you will need your own configuration file. See [the nf-core website](https://nf-co.re/usage/configuration) for details.", + "properties": { + "max_retry": { + "type": "integer", + "description": "Maximum times to retry a process before allowing it to fail.", + "default": 3, + "fa_icon": "fas fa-redo", + "hidden": true, + "help_text": "Use to set an upper-limit for the number of retry attempts for each process. Should be an integer e.g. `--max_retry 1`" + }, + "max_cpus": { + "type": "integer", + "description": "Maximum number of CPUs that can be requested for any single job.", + "default": 4, + "fa_icon": "fas fa-microchip", + "hidden": true, + "help_text": "Use to set an upper-limit for the CPU requirement for each process. Should be an integer e.g. `--max_cpus 1`" + }, + "max_memory": { + "type": "string", + "description": "Maximum amount of memory that can be requested for any single job.", + "default": "128.GB", + "fa_icon": "fas fa-memory", + "pattern": "^\\d+(\\.\\d+)?\\.?\\s*(K|M|G|T)?B$", + "hidden": true, + "help_text": "Use to set an upper-limit for the memory requirement for each process. Should be a string in the format integer-unit e.g. `--max_memory '8.GB'`" + }, + "max_time": { + "type": "string", + "description": "Maximum amount of time that can be requested for any single job.", + "default": "240.h", + "fa_icon": "far fa-clock", + "pattern": "^(\\d+\\.?\\s*(s|m|h|d|day)\\s*)+$", + "hidden": true, + "help_text": "Use to set an upper-limit for the time requirement for each process. Should be a string in the format integer-unit e.g. `--max_time '1.h'`" + }, + "max_downloads": { + "type": "integer", + "description": "Maximum number of samples to download at a time", + "default": 3, + "fa_icon": "fas fa-angle-double-up", + "hidden": true, + "help_text": "Use to set an upper-limit for the number of downloads at a time" + } + } + }, + "nextflow_parameters": { + "title": "Nextflow Configuration Parameters", + "type": "object", + "description": "Parameters to fine-tune your Nextflow setup.", + "default": "", + "hidden": true, + "fa_icon": "fa-solid fa-screwdriver-wrench", + "properties": { + "nfconfig": { + "type": "string", + "description": "A Nextflow compatible config file for custom profiles, loaded last and will overwrite existing variables if set.", + "help": "This allows you to create profiles specific to your environment (e.g. SGE, AWS, SLURM, etc...).", + "fa_icon": "fas fa-cog", + "hidden": true + }, + "publish_dir_mode": { + "type": "string", + "default": "copy", + "hidden": true, + "description": "Method used to save pipeline results to output directory.", + "help_text": "The Nextflow `publishDir` option specifies which intermediate files should be saved to the output directory. This option tells the pipeline what method should be used to move these files. See [Nextflow docs](https://www.nextflow.io/docs/latest/process.html#publishdir) for details.", + "fa_icon": "fas fa-copy", + "enum": [ + "symlink", + "rellink", + "link", + "copy", + "copyNoFollow", + "move" + ] + }, + "infodir": { + "type": "string", + "description": "Directory to keep pipeline Nextflow logs and reports.", + "default": "${params.outdir}/pipeline_info", + "fa_icon": "fas fa-cogs", + "hidden": true + }, + "force": { + "type": "boolean", + "default": false, + "description": "Nextflow will overwrite existing output files.", + "fa_icon": "fas fa-recycle", + "hidden": true + }, + "cleanup_workdir": { + "type": "boolean", + "default": false, + "description": "After Bactopia is successfully executed, the `work` directory will be deleted.", + "help": "Warning: by doing this you lose the ability to resume workflows.", + "fa_icon": "fas fa-trash-alt", + "hidden": true + } + } + }, + "institutional_config_options": { + "title": "Institutional config options", + "type": "object", + "fa_icon": "fas fa-university", + "description": "Parameters used to describe centralized config profiles. These should not be edited.", + "help_text": "The centralized nf-core configuration profiles use a handful of pipeline parameters to describe themselves. This information is then printed to the Nextflow log when you run a pipeline. You should not need to change these values when you run a pipeline.", + "properties": { + "custom_config_version": { + "type": "string", + "description": "Git commit id for Institutional configs.", + "default": "master", + "hidden": true, + "fa_icon": "fas fa-users-cog" + }, + "custom_config_base": { + "type": "string", + "description": "Base directory for Institutional configs.", + "default": "https://raw.githubusercontent.com/nf-core/configs/master", + "hidden": true, + "help_text": "If you're running offline, Nextflow will not be able to fetch the institutional config files from the internet. If you don't need them, then this is not a problem. If you do need them, you should download the files from the repo and tell Nextflow where to find them with this parameter.", + "fa_icon": "fas fa-users-cog" + }, + "config_profile_name": { + "type": "string", + "description": "Institutional config name.", + "hidden": true, + "fa_icon": "fas fa-users-cog" + }, + "config_profile_description": { + "type": "string", + "description": "Institutional config description.", + "hidden": true, + "fa_icon": "fas fa-users-cog" + }, + "config_profile_contact": { + "type": "string", + "description": "Institutional config contact information.", + "hidden": true, + "fa_icon": "fas fa-users-cog" + }, + "config_profile_url": { + "type": "string", + "description": "Institutional config URL link.", + "hidden": true, + "fa_icon": "fas fa-users-cog" + } + } + }, + "nextflow_profile_parameters": { + "title": "Nextflow Profile Parameters", + "type": "object", + "description": "Parameters to fine-tune your Nextflow setup.", + "default": "", + "hidden": true, + "fa_icon": "fa-regular fa-address-card", + "properties": { + "condadir": { + "type": "string", + "description": "Directory to Nextflow should use for Conda environments", + "fa_icon": "fas fa-folder", + "hidden": true + }, + "registry": { + "type": "string", + "default": "quay.io", + "hidden": true, + "description": "Registry to pull Docker containers from.", + "fa_icon": "fas fa-box" + }, + "datasets_cache": { + "type": "string", + "default": "/.bactopia/datasets", + "description": "Directory where downloaded datasets should be stored.", + "help": "", + "fa_icon": "fas fa-folder" + }, + "singularity_cache": { + "type": "string", + "description": "Directory where remote Singularity images are stored.", + "help": "If using a cluster, it must be accessible from all compute nodes. The NXF_SINGULARITY_CACHEDIR environment variable overrides this parameter", + "fa_icon": "fas fa-folder", + "hidden": true + }, + "singularity_pull_docker_container": { + "type": "boolean", + "description": "Instead of directly downloading Singularity images for use with Singularity, force the workflow to pull and convert Docker containers instead.", + "hidden": true, + "fa_icon": "fas fa-toolbox", + "help_text": "This may be useful for example if you are unable to directly pull Singularity containers to run the pipeline due to http/https proxy issues." + }, + "force_rebuild": { + "type": "boolean", + "default": false, + "description": "Force overwrite of existing pre-built environments.", + "fa_icon": "fas fa-recycle", + "hidden": true + }, + "queue": { + "type": "string", + "default": "general,high-memory", + "description": "Comma-separated name of the queue(s) to be used by a job scheduler (e.g. AWS Batch or SLURM)", + "fa_icon": "fas fa-clipboard-list", + "hidden": true + }, + "cluster_opts": { + "type": "string", + "default": "", + "description": "Additional options to pass to the executor. (e.g. SLURM: '--account=my_acct_name'", + "fa_icon": "fas fa-clipboard-list", + "hidden": true + }, + "container_opts": { + "type": "string", + "default": "", + "description": "Additional options to pass to Apptainer, Docker, or Singularity. (e.g. Singularity: '-D `pwd`'", + "fa_icon": "fas fa-clipboard-list", + "hidden": true + }, + "disable_scratch": { + "type": "boolean", + "default": false, + "description": "All intermediate files created on worker nodes of will be transferred to the head node.", + "help": "Typically with clusters intermediate results are written to a 'scratch' space and only published result files are transferred back", + "fa_icon": "fas fa-toggle-off", + "hidden": true + } + } + }, + "generic_parameters": { + "title": "Helpful Parameters", + "type": "object", + "fa_icon": "fa-solid fa-reply-all", + "description": "Uncommonly used parameters that might be useful.", + "properties": { + "monochrome_logs": { + "type": "boolean", + "description": "Do not use coloured log outputs.", + "fa_icon": "fas fa-palette", + "hidden": true, + "help_text": "Set to disable colourful command line output and live life in monochrome." + }, + "nfdir": { + "type": "boolean", + "description": "Print directory Nextflow has pulled Bactopia to", + "fa_icon": "fas fa-remove-format", + "hidden": true + }, + "sleep_time": { + "type": "integer", + "description": "The amount of time (seconds) Nextflow will wait after setting up datasets before execution.", + "default": 5, + "fa_icon": "far fa-clock", + "hidden": true + }, + "help": { + "type": "boolean", + "description": "Display help text.", + "hidden": true, + "fa_icon": "fas fa-question-circle" + }, + "wf": { + "type": "string", + "description": "Specify which workflow or Bactopia Tool to execute", + "default": "bactopia", + "fa_icon": "fas fa-bacteria" + }, + "list_wfs": { + "type": "boolean", + "description": "List the available workflows and Bactopia Tools to use with '--wf'", + "fa_icon": "fas fa-list" + }, + "show_hidden_params": { + "type": "boolean", + "help_text": "By default, parameters set as _hidden_ in the schema are not shown on the command line when a user runs with `--help`. Specifying this option will tell the pipeline to show all parameters.", + "description": "Show all params when using `--help`", + "fa_icon": "far fa-eye", + "hidden": true + }, + "help_all": { + "type": "boolean", + "description": "An alias for --help --show_hidden_params", + "fa_icon": "fas fa-question-circle" + }, + "version": { + "type": "boolean", + "description": "Display version text.", + "fa_icon": "fas fa-info" + } + } + } + }, + "allOf": [ + { + "$ref": "#/$defs/input_parameters" + }, + { + "$ref": "#/$defs/filter_parameters" + }, + { + "$ref": "#/$defs/csvtk_concat_parameters" + }, + { + "$ref": "#/$defs/optional_parameters" + }, + { + "$ref": "#/$defs/max_job_request_parameters" + }, + { + "$ref": "#/$defs/nextflow_parameters" + }, + { + "$ref": "#/$defs/nextflow_profile_parameters" + }, + { + "$ref": "#/$defs/generic_parameters" + } + ] +} \ No newline at end of file diff --git a/workflows/bactopia-tools/stxtyper/tests/.nftignore b/workflows/bactopia-tools/stxtyper/tests/.nftignore new file mode 100644 index 000000000..72a5fcb38 --- /dev/null +++ b/workflows/bactopia-tools/stxtyper/tests/.nftignore @@ -0,0 +1,3 @@ +**/*.{err,gz,html,log,pdf,stderr,stdout} +**/nf.command.* +bactopia-runs/**/nf-reports/*.{dot,html} diff --git a/workflows/bactopia-tools/stxtyper/tests/main.nf.test b/workflows/bactopia-tools/stxtyper/tests/main.nf.test new file mode 100644 index 000000000..1251e9e2f --- /dev/null +++ b/workflows/bactopia-tools/stxtyper/tests/main.nf.test @@ -0,0 +1,43 @@ +nextflow_pipeline { + name "Test stxtyper Workflow" + script "../main.nf" + config "../../../../conf/test.config" + tag "workflows" + tag "bactopia-tools" + tag "stxtyper" + + test("stxtyper - GCF_001695515|escherichia_coli|compressed_fasta") { + when { + params { + bactopia_test = "/species/escherichia_coli/compressed" + test_dataset = "" + test_dataset2 = "" + test_dataset3 = "" + test_r1 = "" + test_r2 = "" + test_se = "" + test_ont = "" + is_ci = true + outdir = "$outputDir" + } + } + + then { + // stable_name: All files + folders in ${params.outdir}/ with a stable name + def stable_name = getAllFilesFromDir(params.outdir, relative: true, includeDir: true, ignore: []) + // stable_path: All files in ${params.outdir}/ with stable content + def stable_path = getAllFilesFromDir(params.outdir, ignoreFile: '.nftignore') + assertAll( + { assert workflow.success}, + { assert snapshot( + // Number of successful tasks + workflow.trace.succeeded().size(), + // All stable path name, with a relative path + stable_name, + // All files with stable contents + stable_path + ).match() } + ) + } + } +} diff --git a/workflows/bactopia-tools/stxtyper/tests/main.nf.test.snap b/workflows/bactopia-tools/stxtyper/tests/main.nf.test.snap new file mode 100644 index 000000000..266ae55a4 --- /dev/null +++ b/workflows/bactopia-tools/stxtyper/tests/main.nf.test.snap @@ -0,0 +1,51 @@ +{ + "stxtyper - GCF_001695515|escherichia_coli|compressed_fasta": { + "content": [ + 2, + [ + "GCF_001695515", + "GCF_001695515/tools", + "GCF_001695515/tools/stxtyper", + "GCF_001695515/tools/stxtyper/GCF_001695515.tsv", + "GCF_001695515/tools/stxtyper/logs", + "GCF_001695515/tools/stxtyper/logs/nf.command.begin", + "GCF_001695515/tools/stxtyper/logs/nf.command.err", + "GCF_001695515/tools/stxtyper/logs/nf.command.log", + "GCF_001695515/tools/stxtyper/logs/nf.command.out", + "GCF_001695515/tools/stxtyper/logs/nf.command.run", + "GCF_001695515/tools/stxtyper/logs/nf.command.sh", + "GCF_001695515/tools/stxtyper/logs/nf.command.trace", + "GCF_001695515/tools/stxtyper/logs/versions.yml", + "bactopia-runs", + "bactopia-runs/stxtyper", + "bactopia-runs/stxtyper/merged-results", + "bactopia-runs/stxtyper/merged-results/logs", + "bactopia-runs/stxtyper/merged-results/logs/stxtyper-concat", + "bactopia-runs/stxtyper/merged-results/logs/stxtyper-concat/nf.command.begin", + "bactopia-runs/stxtyper/merged-results/logs/stxtyper-concat/nf.command.err", + "bactopia-runs/stxtyper/merged-results/logs/stxtyper-concat/nf.command.log", + "bactopia-runs/stxtyper/merged-results/logs/stxtyper-concat/nf.command.out", + "bactopia-runs/stxtyper/merged-results/logs/stxtyper-concat/nf.command.run", + "bactopia-runs/stxtyper/merged-results/logs/stxtyper-concat/nf.command.sh", + "bactopia-runs/stxtyper/merged-results/logs/stxtyper-concat/nf.command.trace", + "bactopia-runs/stxtyper/merged-results/logs/stxtyper-concat/versions.yml", + "bactopia-runs/stxtyper/merged-results/stxtyper.tsv", + "bactopia-runs/stxtyper/nf-reports", + "bactopia-runs/stxtyper/nf-reports/stxtyper-dag.dot", + "bactopia-runs/stxtyper/nf-reports/stxtyper-report.html", + "bactopia-runs/stxtyper/nf-reports/stxtyper-timeline.html" + ], + [ + "GCF_001695515.tsv:md5,001feff7db6e3fad984fdc36327122cc", + "versions.yml:md5,32d442d87815f24b2b14886add947195", + "versions.yml:md5,3eac79f1285e1d758e61e2f98bc6a78c", + "stxtyper.tsv:md5,99f9ffe60fe519d684ee7943641022d2" + ] + ], + "timestamp": "2026-07-30T19:25:14.090480976", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + } +} \ No newline at end of file diff --git a/workflows/bactopia-tools/stxtyper/tests/nf-test.config b/workflows/bactopia-tools/stxtyper/tests/nf-test.config new file mode 100644 index 000000000..8f297479d --- /dev/null +++ b/workflows/bactopia-tools/stxtyper/tests/nf-test.config @@ -0,0 +1,11 @@ +config { + testsDir "." + workDir System.getenv("NFT_WORKDIR") ?: ".nf-test" + configFile "../nextflow.config" + profile "" + options "--is_ci --max_memory 8.GB" + + plugins { + load "nft-utils@0.0.5" + } +} diff --git a/workflows/bactopia-tools/sylph/nextflow.config b/workflows/bactopia-tools/sylph/nextflow.config index 73799fca9..b445d995b 100644 --- a/workflows/bactopia-tools/sylph/nextflow.config +++ b/workflows/bactopia-tools/sylph/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/sylph/nextflow_schema.json b/workflows/bactopia-tools/sylph/nextflow_schema.json index 738dcdbee..fde10b7a8 100644 --- a/workflows/bactopia-tools/sylph/nextflow_schema.json +++ b/workflows/bactopia-tools/sylph/nextflow_schema.json @@ -425,13 +425,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/sylph/tests/main.nf.test.snap b/workflows/bactopia-tools/sylph/tests/main.nf.test.snap index 6824afd8d..98c389f50 100644 --- a/workflows/bactopia-tools/sylph/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/sylph/tests/main.nf.test.snap @@ -42,7 +42,7 @@ "sylph.tsv:md5,beb99cbcea3c9c0a90329ae09ee957f3" ] ], - "timestamp": "2026-04-29T11:25:40.903377434", + "timestamp": "2026-07-30T19:26:17.904289519", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/tblastn/nextflow.config b/workflows/bactopia-tools/tblastn/nextflow.config index ed4ca8575..efab0090f 100644 --- a/workflows/bactopia-tools/tblastn/nextflow.config +++ b/workflows/bactopia-tools/tblastn/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/tblastn/nextflow_schema.json b/workflows/bactopia-tools/tblastn/nextflow_schema.json index fe8a66e26..8553e48dd 100644 --- a/workflows/bactopia-tools/tblastn/nextflow_schema.json +++ b/workflows/bactopia-tools/tblastn/nextflow_schema.json @@ -401,13 +401,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/tblastn/tests/main.nf.test.snap b/workflows/bactopia-tools/tblastn/tests/main.nf.test.snap index 5e6b9cb3a..75b605370 100644 --- a/workflows/bactopia-tools/tblastn/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/tblastn/tests/main.nf.test.snap @@ -42,7 +42,7 @@ "tblastn.tsv:md5,cc21dacd4745b135d856a1aa329df046" ] ], - "timestamp": "2026-04-29T11:25:02.939135967", + "timestamp": "2026-07-30T19:25:33.382686646", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -91,7 +91,7 @@ "tblastn.tsv:md5,cc21dacd4745b135d856a1aa329df046" ] ], - "timestamp": "2026-04-29T11:25:25.437151337", + "timestamp": "2026-07-30T19:25:53.805519502", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/tblastx/nextflow.config b/workflows/bactopia-tools/tblastx/nextflow.config index 237ce8a62..74ce46b1e 100644 --- a/workflows/bactopia-tools/tblastx/nextflow.config +++ b/workflows/bactopia-tools/tblastx/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/tblastx/nextflow_schema.json b/workflows/bactopia-tools/tblastx/nextflow_schema.json index 6b7e20c7c..3c98ac92e 100644 --- a/workflows/bactopia-tools/tblastx/nextflow_schema.json +++ b/workflows/bactopia-tools/tblastx/nextflow_schema.json @@ -401,13 +401,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/tblastx/tests/main.nf.test.snap b/workflows/bactopia-tools/tblastx/tests/main.nf.test.snap index ea1f4ea42..3c570ac20 100644 --- a/workflows/bactopia-tools/tblastx/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/tblastx/tests/main.nf.test.snap @@ -42,7 +42,7 @@ "tblastx.tsv:md5,d3b6312d358a7fdb489d347094710033" ] ], - "timestamp": "2026-04-29T11:25:02.164029782", + "timestamp": "2026-07-30T19:25:37.144778827", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -91,7 +91,7 @@ "tblastx.tsv:md5,d3b6312d358a7fdb489d347094710033" ] ], - "timestamp": "2026-04-29T11:25:44.140544124", + "timestamp": "2026-07-30T19:26:20.76983511", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -140,7 +140,7 @@ "tblastx.tsv:md5,4efa1d2d8633246603e06df64e559c4c" ] ], - "timestamp": "2026-04-29T11:25:25.520504118", + "timestamp": "2026-07-30T19:25:58.297393537", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/tbprofiler/nextflow.config b/workflows/bactopia-tools/tbprofiler/nextflow.config index 8062f4194..97e3c3f70 100644 --- a/workflows/bactopia-tools/tbprofiler/nextflow.config +++ b/workflows/bactopia-tools/tbprofiler/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -19,11 +19,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." includeConfig "../../../conf/params.config" includeConfig "../../../conf/params/bactopia-tools.config" @@ -83,7 +86,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/bactopia-tools/tbprofiler/nextflow_schema.json b/workflows/bactopia-tools/tbprofiler/nextflow_schema.json index f4f2c2d5c..625c98958 100644 --- a/workflows/bactopia-tools/tbprofiler/nextflow_schema.json +++ b/workflows/bactopia-tools/tbprofiler/nextflow_schema.json @@ -445,13 +445,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", diff --git a/workflows/bactopia-tools/tbprofiler/tests/main.nf.test.snap b/workflows/bactopia-tools/tbprofiler/tests/main.nf.test.snap index 2ecaf81e5..6229629f1 100644 --- a/workflows/bactopia-tools/tbprofiler/tests/main.nf.test.snap +++ b/workflows/bactopia-tools/tbprofiler/tests/main.nf.test.snap @@ -48,7 +48,7 @@ "versions.yml:md5,d1d08404b1d56899be9ae1cf3c3aff3e" ] ], - "timestamp": "2026-04-29T11:25:39.710272209", + "timestamp": "2026-07-30T19:26:15.580362322", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/bactopia-tools/traitar/main.nf b/workflows/bactopia-tools/traitar/main.nf new file mode 100644 index 000000000..961fe77f7 --- /dev/null +++ b/workflows/bactopia-tools/traitar/main.nf @@ -0,0 +1,91 @@ +#!/usr/bin/env nextflow +/** + * Predict phenotypic traits from microbial genomes + * + * This Bactopia Tool uses [Traitar](https://github.com/nick-youngblut/traitar3/) to predict phenotypic traits from microbial genomes. + * + * @status stable + * @keywords phenotype, traits, pfam, bactopia-tool + * @tags complexity:simple input-type:parameter output-type:multiple features:bactopia-tool,aggregation + * @citation csvtk, traitar + * + * @subworkflows utils_bactopia-tools, traitar + * + * @input rundir + * Directory containing results from a completed Bactopia analysis run + * + * @input traitar_db + * Path to a Pfam-A HMM file (optional) + * + * @input download_traitar + * Boolean flag to trigger automatic database download + * + * @section Per-Sample Results + * @publish *.majority.tsv Majority-vote combined phenotype trait predictions + * @publish *.single_votes.tsv Single-votes combined phenotype trait predictions + * @publish supplemental/* Supplemental Traitar output files + * + * @section Merged Results + * @publish traitar-majority.tsv Merged majority-vote phenotype predictions from all samples + * @publish traitar-single.tsv Merged single-vote phenotype predictions from all samples + * + * @section Execution Logs + * @publish logs/traitar/* Tool execution logs (stdout/stderr) + * @publish logs/nf-* Nextflow execution scripts and logs for debugging + * + * @section Versions + * @publish versions.yml Software version information + */ +nextflow.enable.types = true + +params { + rundir : String + + // Tool-specific parameters + traitar_db : Path? + download_traitar : Boolean +} + +include { BACTOPIATOOL_INIT } from '../../../subworkflows/utils/bactopia-tools/main' +include { TRAITAR } from '../../../subworkflows/traitar/main' +include { collectNextflowLogs } from 'plugin/nf-bactopia' + +workflow { + main: + ch_bactopiatool = BACTOPIATOOL_INIT() + ch_traitar = TRAITAR(ch_bactopiatool.assembly, params.traitar_db, params.download_traitar) + + publish: + // Per-sample + sample_outputs = ch_traitar.sample_outputs + sample_nf_logs = collectNextflowLogs(ch_traitar.sample_outputs) + // Run-level + run_outputs = ch_traitar.run_outputs + run_nf_logs = collectNextflowLogs(ch_traitar.run_outputs) +} + +output { + // Sample-level outputs (stored in ${params.outdir}//) + sample_outputs { + path { r -> + r.results.flatten() >> "${r.meta.output_dir}/" + r.logs.flatten() >> "${r.meta.logs_dir}/" + r.versions.flatten() >> "${r.meta.logs_dir}/" + } + } + sample_nf_logs { + path { meta, f -> f >> "${meta.logs_dir}/nf${f.name}" } + } + + // Run-level outputs (stored in ${params.outdir}/bactopia-runs//) + run_outputs { + path { r -> + r.results.flatten() >> "${params.rundir}/${r.meta.output_dir}/" + r.logs.flatten() >> "${params.rundir}/${r.meta.logs_dir}/" + r.versions.flatten() >> "${params.rundir}/${r.meta.logs_dir}/" + } + } + run_nf_logs { + path { meta, f -> f >> "${params.rundir}/${meta.logs_dir}/nf${f.name}" } + } +} diff --git a/workflows/bactopia-tools/traitar/nextflow.config b/workflows/bactopia-tools/traitar/nextflow.config new file mode 100644 index 000000000..9fae15613 --- /dev/null +++ b/workflows/bactopia-tools/traitar/nextflow.config @@ -0,0 +1,95 @@ +// main script name +manifest { + author = 'Robert A. Petit III' + name = 'bactopia' + homePage = 'https://github.com/bactopia/bactopia' + description = 'An extensive workflow for processing sequencing of bacterial genomes.' + mainScript = 'main.nf' + version = '4.1.0' + nextflowVersion = '>=26.04.0' +} + +params { + workflow { + name = "traitar" + logo_name = "bactopia-tools" + description = "Predict phenotypic traits from microbial genomes" + ext = ['fna'] + } +} + +// Version +params.bactopia_version = '4.1.0' +manifest.version = "${params.bactopia_version}" + +// Includes +params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../../.." +includeConfig "../../../conf/params.config" +includeConfig "../../../conf/params/bactopia-tools.config" + +// Module specific config +includeConfig "../../../modules/csvtk/concat/module.config" +includeConfig "../../../modules/traitar/download/module.config" +includeConfig "../../../modules/traitar/run/module.config" + +// Set output directory +outputDir = params.outdir +workflow.output.mode = params.publish_dir_mode +workflow.output.overwrite = params.force + +// Set up run directory +params.singularity_cache = env("NXF_SINGULARITY_CACHEDIR") ? "${env('NXF_SINGULARITY_CACHEDIR')}" : "${params.singularity_cache}" +params.run_timestamp = new java.util.Date().format('yyyyMMdd-HHmmss') +params.rundir = params.is_ci ? "bactopia-runs/${params.run_name}" : "bactopia-runs/${params.run_name}-${params.run_timestamp}" +params.infodir = "${params.outdir}/${params.rundir}/nf-reports" + +// Load nf-core custom profiles from different Institutions +includeConfig !env('NXF_OFFLINE') && params.custom_config_base ? "${params.custom_config_base}/nfcore_custom.config" : "/dev/null" + +// Load Bactopia custom profiles from different institutions. +// Uncomment in the event a bactopia specific profile is added +//includeConfig !System.getenv('NXF_OFFLINE') && params.custom_config_base ? "${params.custom_config_base}/pipeline/bactopia.config" : "/dev/null" + +// Base Config +includeConfig "../../../conf/base.config" + +// Profiles +includeConfig "../../../conf/profiles.config" + +// Reporting configuration +timeline { + enabled = true + overwrite = true + file = "${params.infodir}/${params.wf}-timeline.html" +} + +report { + enabled = true + overwrite = true + file = "${params.infodir}/${params.wf}-report.html" +} + +trace { + enabled = true + overwrite = true + file = "${params.infodir}/${params.wf}-trace.txt" + fields = 'task_id,hash,native_id,process,tag,name,status,exit,module,container,cpus,time,disk,memory,attempt,start,complete,duration,realtime,queue,%cpu,%mem,rss,vmem' +} + +dag { + enabled = true + overwrite = true + file = "${params.infodir}/${params.wf}-dag.svg" +} + +// Plugins +plugins { + id 'nf-bactopia@2.1.7' +} + +bactopia { + parametersSchema = "${projectDir}/nextflow_schema.json" +} diff --git a/workflows/bactopia-tools/traitar/nextflow_schema.json b/workflows/bactopia-tools/traitar/nextflow_schema.json new file mode 100644 index 000000000..ee43d606f --- /dev/null +++ b/workflows/bactopia-tools/traitar/nextflow_schema.json @@ -0,0 +1,446 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/bactopia/bactopia/master/conf/schema/bactopia-tools.json", + "title": "traitar", + "description": "Predict phenotypic traits from microbial genomes", + "type": "object", + "$defs": { + "input_parameters": { + "title": "Required Parameters", + "type": "object", + "fa_icon": "fas fa-terminal", + "description": "Define where the pipeline should find input data and save output data.", + "help_text": "", + "properties": { + "bactopia": { + "type": "string", + "description": "The path to bactopia results to use as inputs", + "help": "The required inputs will be automatically selected by the subworkflow.", + "fa_icon": "fas fa-bacterium", + "header": "Bactopia Results" + } + } + }, + "filter_parameters": { + "title": "Filtering Parameters", + "type": "object", + "description": "Use these parameters to specify which samples to include or exclude.", + "default": "", + "fa_icon": "fa-solid fa-filter", + "properties": { + "include": { + "type": "string", + "description": "A text file containing sample names (one per line) to include from the analysis", + "help": "The expected format is a single sample per line.", + "fa_icon": "far fa-square-plus" + }, + "exclude": { + "type": "string", + "description": "A text file containing sample names (one per line) to exclude from the analysis", + "help": "The expected format is a single sample per line.", + "fa_icon": "far fa-square-minus" + } + } + }, + "traitar_download_parameters": { + "title": "Traitar Download Parameters", + "type": "object", + "description": "", + "default": "", + "fa_icon": "fas fa-exclamation-circle", + "properties": { + "traitar_db": { + "type": "string", + "description": "Path a Traitar database (should contain the Pfam-A.hmm file)", + "fa_icon": "fas fa-font", + "is_required": true + }, + "download_traitar": { + "type": "boolean", + "description": "Download the Pfam database to the path given by --traitar_db", + "default": false, + "fa_icon": "fas fa-toggle-on" + } + } + }, + "csvtk_concat_parameters": { + "title": "csvtk concat Parameters", + "type": "object", + "description": "", + "default": "", + "fa_icon": "fas fa-exclamation-circle", + "properties": { + "csvtk_concat_opts": { + "type": "string", + "description": "Extra csvtk concat options in quotes", + "help": "", + "fa_icon": "fas fa-font", + "hidden": true + } + } + }, + "optional_parameters": { + "title": "Optional Parameters", + "type": "object", + "description": "These optional parameters can be useful in certain settings.", + "default": "", + "fa_icon": "fa-solid fa-gears", + "properties": { + "outdir": { + "type": "string", + "default": "bactopia", + "description": "Base directory to write results to", + "fa_icon": "fas fa-folder" + }, + "skip_compression": { + "type": "boolean", + "default": false, + "description": "Output files will not be compressed", + "help": "Using this parameter can lead to a significant increase in the size of the outputs", + "fa_icon": "fas fa-expand-arrows-alt", + "hidden": true + }, + "datasets": { + "type": "string", + "fa_icon": "fas fa-folder", + "description": "The path to cache datasets to", + "hidden": true + }, + "keep_all_files": { + "type": "boolean", + "default": false, + "description": "Keeps all analysis files created", + "help": "By default, intermediate files are removed. This will not affect the ability to resume Nextflow runs, and only occurs at the end of the process.", + "fa_icon": "fas fa-trash-restore", + "hidden": true + } + } + }, + "max_job_request_parameters": { + "title": "Max Job Request Parameters", + "type": "object", + "fa_icon": "fa-solid fa-arrow-up-right-dots", + "description": "Set the top limit for requested resources for any single job.", + "hidden": true, + "help_text": "If you are running on a smaller system, a pipeline step requesting more resources than are available may cause the Nextflow to stop the run with an error. These options allow you to cap the maximum resources requested by any single job so that the pipeline will run on your system.\n\nNote that you can not _increase_ the resources requested by any job using these options. For that you will need your own configuration file. See [the nf-core website](https://nf-co.re/usage/configuration) for details.", + "properties": { + "max_retry": { + "type": "integer", + "description": "Maximum times to retry a process before allowing it to fail.", + "default": 3, + "fa_icon": "fas fa-redo", + "hidden": true, + "help_text": "Use to set an upper-limit for the number of retry attempts for each process. Should be an integer e.g. `--max_retry 1`" + }, + "max_cpus": { + "type": "integer", + "description": "Maximum number of CPUs that can be requested for any single job.", + "default": 4, + "fa_icon": "fas fa-microchip", + "hidden": true, + "help_text": "Use to set an upper-limit for the CPU requirement for each process. Should be an integer e.g. `--max_cpus 1`" + }, + "max_memory": { + "type": "string", + "description": "Maximum amount of memory that can be requested for any single job.", + "default": "128.GB", + "fa_icon": "fas fa-memory", + "pattern": "^\\d+(\\.\\d+)?\\.?\\s*(K|M|G|T)?B$", + "hidden": true, + "help_text": "Use to set an upper-limit for the memory requirement for each process. Should be a string in the format integer-unit e.g. `--max_memory '8.GB'`" + }, + "max_time": { + "type": "string", + "description": "Maximum amount of time that can be requested for any single job.", + "default": "240.h", + "fa_icon": "far fa-clock", + "pattern": "^(\\d+\\.?\\s*(s|m|h|d|day)\\s*)+$", + "hidden": true, + "help_text": "Use to set an upper-limit for the time requirement for each process. Should be a string in the format integer-unit e.g. `--max_time '1.h'`" + }, + "max_downloads": { + "type": "integer", + "description": "Maximum number of samples to download at a time", + "default": 3, + "fa_icon": "fas fa-angle-double-up", + "hidden": true, + "help_text": "Use to set an upper-limit for the number of downloads at a time" + } + } + }, + "nextflow_parameters": { + "title": "Nextflow Configuration Parameters", + "type": "object", + "description": "Parameters to fine-tune your Nextflow setup.", + "default": "", + "hidden": true, + "fa_icon": "fa-solid fa-screwdriver-wrench", + "properties": { + "nfconfig": { + "type": "string", + "description": "A Nextflow compatible config file for custom profiles, loaded last and will overwrite existing variables if set.", + "help": "This allows you to create profiles specific to your environment (e.g. SGE, AWS, SLURM, etc...).", + "fa_icon": "fas fa-cog", + "hidden": true + }, + "publish_dir_mode": { + "type": "string", + "default": "copy", + "hidden": true, + "description": "Method used to save pipeline results to output directory.", + "help_text": "The Nextflow `publishDir` option specifies which intermediate files should be saved to the output directory. This option tells the pipeline what method should be used to move these files. See [Nextflow docs](https://www.nextflow.io/docs/latest/process.html#publishdir) for details.", + "fa_icon": "fas fa-copy", + "enum": [ + "symlink", + "rellink", + "link", + "copy", + "copyNoFollow", + "move" + ] + }, + "infodir": { + "type": "string", + "description": "Directory to keep pipeline Nextflow logs and reports.", + "default": "${params.outdir}/pipeline_info", + "fa_icon": "fas fa-cogs", + "hidden": true + }, + "force": { + "type": "boolean", + "default": false, + "description": "Nextflow will overwrite existing output files.", + "fa_icon": "fas fa-recycle", + "hidden": true + }, + "cleanup_workdir": { + "type": "boolean", + "default": false, + "description": "After Bactopia is successfully executed, the `work` directory will be deleted.", + "help": "Warning: by doing this you lose the ability to resume workflows.", + "fa_icon": "fas fa-trash-alt", + "hidden": true + } + } + }, + "institutional_config_options": { + "title": "Institutional config options", + "type": "object", + "fa_icon": "fas fa-university", + "description": "Parameters used to describe centralized config profiles. These should not be edited.", + "help_text": "The centralized nf-core configuration profiles use a handful of pipeline parameters to describe themselves. This information is then printed to the Nextflow log when you run a pipeline. You should not need to change these values when you run a pipeline.", + "properties": { + "custom_config_version": { + "type": "string", + "description": "Git commit id for Institutional configs.", + "default": "master", + "hidden": true, + "fa_icon": "fas fa-users-cog" + }, + "custom_config_base": { + "type": "string", + "description": "Base directory for Institutional configs.", + "default": "https://raw.githubusercontent.com/nf-core/configs/master", + "hidden": true, + "help_text": "If you're running offline, Nextflow will not be able to fetch the institutional config files from the internet. If you don't need them, then this is not a problem. If you do need them, you should download the files from the repo and tell Nextflow where to find them with this parameter.", + "fa_icon": "fas fa-users-cog" + }, + "config_profile_name": { + "type": "string", + "description": "Institutional config name.", + "hidden": true, + "fa_icon": "fas fa-users-cog" + }, + "config_profile_description": { + "type": "string", + "description": "Institutional config description.", + "hidden": true, + "fa_icon": "fas fa-users-cog" + }, + "config_profile_contact": { + "type": "string", + "description": "Institutional config contact information.", + "hidden": true, + "fa_icon": "fas fa-users-cog" + }, + "config_profile_url": { + "type": "string", + "description": "Institutional config URL link.", + "hidden": true, + "fa_icon": "fas fa-users-cog" + } + } + }, + "nextflow_profile_parameters": { + "title": "Nextflow Profile Parameters", + "type": "object", + "description": "Parameters to fine-tune your Nextflow setup.", + "default": "", + "hidden": true, + "fa_icon": "fa-regular fa-address-card", + "properties": { + "condadir": { + "type": "string", + "description": "Directory to Nextflow should use for Conda environments", + "fa_icon": "fas fa-folder", + "hidden": true + }, + "registry": { + "type": "string", + "default": "quay.io", + "hidden": true, + "description": "Registry to pull Docker containers from.", + "fa_icon": "fas fa-box" + }, + "datasets_cache": { + "type": "string", + "default": "/.bactopia/datasets", + "description": "Directory where downloaded datasets should be stored.", + "help": "", + "fa_icon": "fas fa-folder" + }, + "singularity_cache": { + "type": "string", + "description": "Directory where remote Singularity images are stored.", + "help": "If using a cluster, it must be accessible from all compute nodes. The NXF_SINGULARITY_CACHEDIR environment variable overrides this parameter", + "fa_icon": "fas fa-folder", + "hidden": true + }, + "singularity_pull_docker_container": { + "type": "boolean", + "description": "Instead of directly downloading Singularity images for use with Singularity, force the workflow to pull and convert Docker containers instead.", + "hidden": true, + "fa_icon": "fas fa-toolbox", + "help_text": "This may be useful for example if you are unable to directly pull Singularity containers to run the pipeline due to http/https proxy issues." + }, + "force_rebuild": { + "type": "boolean", + "default": false, + "description": "Force overwrite of existing pre-built environments.", + "fa_icon": "fas fa-recycle", + "hidden": true + }, + "queue": { + "type": "string", + "default": "general,high-memory", + "description": "Comma-separated name of the queue(s) to be used by a job scheduler (e.g. AWS Batch or SLURM)", + "fa_icon": "fas fa-clipboard-list", + "hidden": true + }, + "cluster_opts": { + "type": "string", + "default": "", + "description": "Additional options to pass to the executor. (e.g. SLURM: '--account=my_acct_name'", + "fa_icon": "fas fa-clipboard-list", + "hidden": true + }, + "container_opts": { + "type": "string", + "default": "", + "description": "Additional options to pass to Apptainer, Docker, or Singularity. (e.g. Singularity: '-D `pwd`'", + "fa_icon": "fas fa-clipboard-list", + "hidden": true + }, + "disable_scratch": { + "type": "boolean", + "default": false, + "description": "All intermediate files created on worker nodes of will be transferred to the head node.", + "help": "Typically with clusters intermediate results are written to a 'scratch' space and only published result files are transferred back", + "fa_icon": "fas fa-toggle-off", + "hidden": true + } + } + }, + "generic_parameters": { + "title": "Helpful Parameters", + "type": "object", + "fa_icon": "fa-solid fa-reply-all", + "description": "Uncommonly used parameters that might be useful.", + "properties": { + "monochrome_logs": { + "type": "boolean", + "description": "Do not use coloured log outputs.", + "fa_icon": "fas fa-palette", + "hidden": true, + "help_text": "Set to disable colourful command line output and live life in monochrome." + }, + "nfdir": { + "type": "boolean", + "description": "Print directory Nextflow has pulled Bactopia to", + "fa_icon": "fas fa-remove-format", + "hidden": true + }, + "sleep_time": { + "type": "integer", + "description": "The amount of time (seconds) Nextflow will wait after setting up datasets before execution.", + "default": 5, + "fa_icon": "far fa-clock", + "hidden": true + }, + "help": { + "type": "boolean", + "description": "Display help text.", + "hidden": true, + "fa_icon": "fas fa-question-circle" + }, + "wf": { + "type": "string", + "description": "Specify which workflow or Bactopia Tool to execute", + "default": "bactopia", + "fa_icon": "fas fa-bacteria" + }, + "list_wfs": { + "type": "boolean", + "description": "List the available workflows and Bactopia Tools to use with '--wf'", + "fa_icon": "fas fa-list" + }, + "show_hidden_params": { + "type": "boolean", + "help_text": "By default, parameters set as _hidden_ in the schema are not shown on the command line when a user runs with `--help`. Specifying this option will tell the pipeline to show all parameters.", + "description": "Show all params when using `--help`", + "fa_icon": "far fa-eye", + "hidden": true + }, + "help_all": { + "type": "boolean", + "description": "An alias for --help --show_hidden_params", + "fa_icon": "fas fa-question-circle" + }, + "version": { + "type": "boolean", + "description": "Display version text.", + "fa_icon": "fas fa-info" + } + } + } + }, + "allOf": [ + { + "$ref": "#/$defs/input_parameters" + }, + { + "$ref": "#/$defs/filter_parameters" + }, + { + "$ref": "#/$defs/traitar_download_parameters" + }, + { + "$ref": "#/$defs/csvtk_concat_parameters" + }, + { + "$ref": "#/$defs/optional_parameters" + }, + { + "$ref": "#/$defs/max_job_request_parameters" + }, + { + "$ref": "#/$defs/nextflow_parameters" + }, + { + "$ref": "#/$defs/nextflow_profile_parameters" + }, + { + "$ref": "#/$defs/generic_parameters" + } + ] +} \ No newline at end of file diff --git a/workflows/bactopia-tools/traitar/tests/.nftignore b/workflows/bactopia-tools/traitar/tests/.nftignore new file mode 100644 index 000000000..17f86767b --- /dev/null +++ b/workflows/bactopia-tools/traitar/tests/.nftignore @@ -0,0 +1,5 @@ +**/*.{err,gz,html,log,pdf,stderr,stdout} +**/*.tsv +**/nf.command.* +**/supplemental/** +bactopia-runs/**/nf-reports/*.{dot,html} diff --git a/workflows/bactopia-tools/traitar/tests/main.nf.test b/workflows/bactopia-tools/traitar/tests/main.nf.test new file mode 100644 index 000000000..562888cd7 --- /dev/null +++ b/workflows/bactopia-tools/traitar/tests/main.nf.test @@ -0,0 +1,43 @@ +nextflow_pipeline { + name "Test traitar Workflow" + script "../main.nf" + config "../../../../conf/test.config" + tag "workflows" + tag "bactopia-tools" + tag "traitar" + + test("traitar - GCF_000017085|staphylococcus_aureus|compressed_fasta") { + when { + params { + bactopia_test = "/species/staphylococcus_aureus/compressed" + test_dataset = "datasets/traitar" + test_dataset2 = "" + test_dataset3 = "" + test_r1 = "" + test_r2 = "" + test_se = "" + test_ont = "" + is_ci = true + outdir = "$outputDir" + } + } + + then { + // stable_name: All files + folders in ${params.outdir}/ with a stable name + def stable_name = getAllFilesFromDir(params.outdir, relative: true, includeDir: true, ignore: []) + // stable_path: All files in ${params.outdir}/ with stable content + def stable_path = getAllFilesFromDir(params.outdir, ignoreFile: '.nftignore') + assertAll( + { assert workflow.success}, + { assert snapshot( + // Number of successful tasks + workflow.trace.succeeded().size(), + // All stable path name, with a relative path + stable_name, + // All files with stable contents + stable_path + ).match() } + ) + } + } +} diff --git a/workflows/bactopia-tools/traitar/tests/main.nf.test.snap b/workflows/bactopia-tools/traitar/tests/main.nf.test.snap new file mode 100644 index 000000000..550a8ed83 --- /dev/null +++ b/workflows/bactopia-tools/traitar/tests/main.nf.test.snap @@ -0,0 +1,77 @@ +{ + "traitar - GCF_000017085|staphylococcus_aureus|compressed_fasta": { + "content": [ + 3, + [ + "GCF_000017085", + "GCF_000017085/tools", + "GCF_000017085/tools/traitar", + "GCF_000017085/tools/traitar/GCF_000017085.majority.tsv", + "GCF_000017085/tools/traitar/GCF_000017085.single_votes.tsv", + "GCF_000017085/tools/traitar/logs", + "GCF_000017085/tools/traitar/logs/nf.command.begin", + "GCF_000017085/tools/traitar/logs/nf.command.err", + "GCF_000017085/tools/traitar/logs/nf.command.log", + "GCF_000017085/tools/traitar/logs/nf.command.out", + "GCF_000017085/tools/traitar/logs/nf.command.run", + "GCF_000017085/tools/traitar/logs/nf.command.sh", + "GCF_000017085/tools/traitar/logs/nf.command.trace", + "GCF_000017085/tools/traitar/logs/versions.yml", + "GCF_000017085/tools/traitar/supplemental", + "GCF_000017085/tools/traitar/supplemental/annotation", + "GCF_000017085/tools/traitar/supplemental/annotation/pfam", + "GCF_000017085/tools/traitar/supplemental/annotation/pfam/GCF_000017085_domtblout.dat", + "GCF_000017085/tools/traitar/supplemental/annotation/pfam/GCF_000017085_filtered_best.dat", + "GCF_000017085/tools/traitar/supplemental/annotation/pfam/summary.dat", + "GCF_000017085/tools/traitar/supplemental/gene_prediction", + "GCF_000017085/tools/traitar/supplemental/gene_prediction/GCF_000017085.faa", + "GCF_000017085/tools/traitar/supplemental/gene_prediction/GCF_000017085.gff", + "GCF_000017085/tools/traitar/supplemental/phenotype_prediction", + "GCF_000017085/tools/traitar/supplemental/phenotype_prediction/predictions_flat_majority-votes_combined.txt", + "GCF_000017085/tools/traitar/supplemental/phenotype_prediction/predictions_flat_single-votes_combined.txt", + "GCF_000017085/tools/traitar/supplemental/predictions_conservative-vote.txt", + "GCF_000017085/tools/traitar/supplemental/predictions_majority-vote.txt", + "GCF_000017085/tools/traitar/supplemental/predictions_raw.txt", + "GCF_000017085/tools/traitar/supplemental/predictions_single-votes.txt", + "bactopia-runs", + "bactopia-runs/traitar", + "bactopia-runs/traitar/merged-results", + "bactopia-runs/traitar/merged-results/logs", + "bactopia-runs/traitar/merged-results/logs/traitar-majority-concat", + "bactopia-runs/traitar/merged-results/logs/traitar-majority-concat/nf.command.begin", + "bactopia-runs/traitar/merged-results/logs/traitar-majority-concat/nf.command.err", + "bactopia-runs/traitar/merged-results/logs/traitar-majority-concat/nf.command.log", + "bactopia-runs/traitar/merged-results/logs/traitar-majority-concat/nf.command.out", + "bactopia-runs/traitar/merged-results/logs/traitar-majority-concat/nf.command.run", + "bactopia-runs/traitar/merged-results/logs/traitar-majority-concat/nf.command.sh", + "bactopia-runs/traitar/merged-results/logs/traitar-majority-concat/nf.command.trace", + "bactopia-runs/traitar/merged-results/logs/traitar-majority-concat/versions.yml", + "bactopia-runs/traitar/merged-results/logs/traitar-single-concat", + "bactopia-runs/traitar/merged-results/logs/traitar-single-concat/nf.command.begin", + "bactopia-runs/traitar/merged-results/logs/traitar-single-concat/nf.command.err", + "bactopia-runs/traitar/merged-results/logs/traitar-single-concat/nf.command.log", + "bactopia-runs/traitar/merged-results/logs/traitar-single-concat/nf.command.out", + "bactopia-runs/traitar/merged-results/logs/traitar-single-concat/nf.command.run", + "bactopia-runs/traitar/merged-results/logs/traitar-single-concat/nf.command.sh", + "bactopia-runs/traitar/merged-results/logs/traitar-single-concat/nf.command.trace", + "bactopia-runs/traitar/merged-results/logs/traitar-single-concat/versions.yml", + "bactopia-runs/traitar/merged-results/traitar-majority.tsv", + "bactopia-runs/traitar/merged-results/traitar-single.tsv", + "bactopia-runs/traitar/nf-reports", + "bactopia-runs/traitar/nf-reports/traitar-dag.dot", + "bactopia-runs/traitar/nf-reports/traitar-report.html", + "bactopia-runs/traitar/nf-reports/traitar-timeline.html" + ], + [ + "versions.yml:md5,f25ec232bc89b44f8f431a04aee60879", + "versions.yml:md5,0876b2d126e96f86b158fe8dddf4f05f", + "versions.yml:md5,ec4bec02bbfd8002cdc3229b98111f6a" + ] + ], + "timestamp": "2026-07-30T19:30:29.128552053", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + } +} \ No newline at end of file diff --git a/workflows/bactopia-tools/traitar/tests/nf-test.config b/workflows/bactopia-tools/traitar/tests/nf-test.config new file mode 100644 index 000000000..8f297479d --- /dev/null +++ b/workflows/bactopia-tools/traitar/tests/nf-test.config @@ -0,0 +1,11 @@ +config { + testsDir "." + workDir System.getenv("NFT_WORKDIR") ?: ".nf-test" + configFile "../nextflow.config" + profile "" + options "--is_ci --max_memory 8.GB" + + plugins { + load "nft-utils@0.0.5" + } +} diff --git a/workflows/cleanyerreads/main.nf b/workflows/cleanyerreads/main.nf index 145a7c308..a5a7e58e6 100644 --- a/workflows/cleanyerreads/main.nf +++ b/workflows/cleanyerreads/main.nf @@ -4,14 +4,15 @@ * * This workflow performs comprehensive read quality control including trimming, * adapter removal, quality filtering, and optionally removes host contamination - * using [nohuman](https://github.com/mbhall88/nohuman) or [SRA Human Scrubber](https://github.com/ncbi/sra-human-scrubber). + * using [deacon](https://github.com/bede/deacon), [nohuman](https://github.com/mbhall88/nohuman), + * or [SRA Human Scrubber](https://github.com/ncbi/sra-human-scrubber). * It processes raw sequencing reads to produce high-quality clean reads ready * for downstream analysis. * * @status stable * @keywords reads, quality control, trimming, filtering, host removal, preprocessing * @tags complexity:moderate input-type:parameter output-type:multiple features:aggregation,conditional-logic,database-dependent - * @citation bbtools, fastp, fastqc, fastq_scan, kraken2, lighter, nanoplot, nanoq, porechop, rasusa, srahumanscrubber + * @citation bbtools, deacon, fastp, fastqc, fastq_scan, kraken2, lighter, nanoplot, nanoq, porechop, rasusa, srahumanscrubber * * @subworkflows utils_bactopia, bactopia_gather, bactopia_qc, scrubber * @@ -24,6 +25,9 @@ * @input use_srascrubber * Remove host reads using SRA Human Scrubber * + * @input use_deacon + * Remove host reads using deacon with minimizer-based filtering + * * @input nohuman_db * Path to a pre-built nohuman HPRC database * @@ -33,6 +37,12 @@ * @input nohuman_save_as_tarball * Save the downloaded nohuman database as a tarball for reuse * + * @input deacon_db + * Path to a pre-existing deacon minimizer index (.idx) for host read filtering + * + * @input download_deacon + * Download the deacon index to the datasets cache + * * @input adapters * Path to adapter sequences file for removal * @@ -70,11 +80,14 @@ params { // Tool-specific parameters use_nohuman : Boolean use_srascrubber : Boolean + use_deacon : Boolean adapters : Path? phix : Path? nohuman_db : Path? download_nohuman : Boolean nohuman_save_as_tarball : Boolean + deacon_db : Path? + download_deacon : Boolean } // Core @@ -97,14 +110,17 @@ workflow { ch_sample_outputs = ch_gather.sample_outputs ch_run_outputs = ch_gather.run_outputs - if (params.use_nohuman || params.use_srascrubber) { + if (params.use_nohuman || params.use_srascrubber || params.use_deacon) { // Remove host reads ch_scrubber = SCRUBBER( ch_gather.reads, params.use_srascrubber, + params.use_nohuman, params.nohuman_db, params.download_nohuman, - params.nohuman_save_as_tarball + params.nohuman_save_as_tarball, + params.deacon_db, + params.download_deacon ) ch_sample_outputs = ch_sample_outputs.mix(ch_scrubber.sample_outputs) ch_run_outputs = ch_run_outputs.mix(ch_scrubber.run_outputs) diff --git a/workflows/cleanyerreads/nextflow.config b/workflows/cleanyerreads/nextflow.config index 06cd5ea5d..0dace7024 100644 --- a/workflows/cleanyerreads/nextflow.config +++ b/workflows/cleanyerreads/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -18,11 +18,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../.." includeConfig "../../conf/params.config" includeConfig "../../conf/params/bactopia.config" @@ -34,6 +37,8 @@ includeConfig "../../modules/srahumanscrubber/initdb/module.config" includeConfig "../../modules/srahumanscrubber/scrub/module.config" includeConfig "../../modules/nohuman/download/module.config" includeConfig "../../modules/nohuman/run/module.config" +includeConfig "../../modules/deacon/fetch/module.config" +includeConfig "../../modules/deacon/filter/module.config" // Workflow specific params.config includeConfig "../../conf/params/cleanyerreads.config" @@ -90,7 +95,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/cleanyerreads/nextflow_schema.json b/workflows/cleanyerreads/nextflow_schema.json index f1d15e1f4..51e466d46 100644 --- a/workflows/cleanyerreads/nextflow_schema.json +++ b/workflows/cleanyerreads/nextflow_schema.json @@ -78,6 +78,7 @@ "properties": { "skip_fastq_check": { "type": "boolean", + "default": false, "description": "Skip minimum requirement checks for input FASTQs", "help": "This parameter is useful if you are confident your sequences will pass the minimum requirements.", "fa_icon": "fas fa-toggle-on", @@ -135,15 +136,10 @@ }, "use_ena": { "type": "boolean", + "default": false, "description": "Download FASTQs from ENA", "fa_icon": "fas fa-toggle-on", "hidden": true - }, - "no_cache": { - "type": "boolean", - "description": "Skip caching the assembly summary file from ncbi-genome-download", - "fa_icon": "fas fa-toggle-on", - "hidden": true } } }, @@ -172,6 +168,7 @@ "properties": { "use_bbmap": { "type": "boolean", + "default": false, "description": "Illumina reads will be QC'd using BBMap", "help": "", "fa_icon": "fas fa-toggle-on", @@ -187,6 +184,7 @@ }, "skip_qc": { "type": "boolean", + "default": false, "description": "The QC step will be skipped and it will be assumed the inputs sequences have already been QCed.", "help": "This is really only useful if you have already QC'd your reads, or have a specific need", "fa_icon": "fas fa-toggle-on", @@ -194,12 +192,14 @@ }, "skip_qc_plots": { "type": "boolean", + "default": false, "description": "QC Plot creation by FastQC or Nanoplot will be skipped", "fa_icon": "fas fa-toggle-on", "hidden": true }, "skip_error_correction": { "type": "boolean", + "default": false, "description": "FLASH error correction of reads will be skipped.", "fa_icon": "fas fa-toggle-on", "hidden": true @@ -514,6 +514,87 @@ } } }, + "deacon_fetch_parameters": { + "title": "Deacon Fetch Parameters", + "type": "object", + "description": "", + "default": "", + "fa_icon": "fas fa-exclamation-circle", + "properties": { + "deacon_index_name": { + "type": "string", + "default": "panhuman-1", + "description": "Name of the pre-built deacon index to fetch", + "fa_icon": "fas fa-font", + "hidden": true + }, + "download_deacon": { + "type": "boolean", + "default": false, + "description": "Download the deacon index to the datasets cache", + "fa_icon": "fas fa-toggle-on", + "hidden": true + }, + "use_deacon": { + "type": "boolean", + "default": false, + "description": "Use deacon for host read filtering", + "fa_icon": "fas fa-toggle-on", + "hidden": true + } + } + }, + "deacon_filter_parameters": { + "title": "Deacon Filter Parameters", + "type": "object", + "description": "", + "default": "", + "fa_icon": "fas fa-exclamation-circle", + "properties": { + "deacon_abs_threshold": { + "type": "integer", + "default": 2, + "description": "Minimum absolute number of minimizer hits for a match", + "fa_icon": "fas fa-hashtag", + "hidden": true + }, + "deacon_db": { + "type": "string", + "default": "", + "description": "Path to a pre-existing deacon index (.idx) for host read filtering", + "fa_icon": "fas fa-font", + "hidden": true + }, + "deacon_deplete": { + "type": "boolean", + "default": true, + "description": "Discard matching sequences instead of keeping them", + "fa_icon": "fas fa-toggle-on", + "hidden": true + }, + "deacon_opts": { + "type": "string", + "default": "", + "description": "Additional deacon filter options not covered by other parameters", + "fa_icon": "fas fa-font", + "hidden": true + }, + "deacon_prefix_length": { + "type": "integer", + "default": 0, + "description": "Search only the first N nucleotides per sequence (0 for all)", + "fa_icon": "fas fa-hashtag", + "hidden": true + }, + "deacon_rel_threshold": { + "type": "number", + "default": 0.01, + "description": "Minimum relative proportion (0.0-1.0) of minimizer hits for a match", + "fa_icon": "fas fa-percentage", + "hidden": true + } + } + }, "optional_parameters": { "title": "Optional Parameters", "type": "object", @@ -812,13 +893,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", @@ -878,6 +952,12 @@ { "$ref": "#/$defs/nohuman_run_parameters" }, + { + "$ref": "#/$defs/deacon_fetch_parameters" + }, + { + "$ref": "#/$defs/deacon_filter_parameters" + }, { "$ref": "#/$defs/optional_parameters" }, diff --git a/workflows/cleanyerreads/tests/.nftignore b/workflows/cleanyerreads/tests/.nftignore index c83e71878..feb766962 100644 --- a/workflows/cleanyerreads/tests/.nftignore +++ b/workflows/cleanyerreads/tests/.nftignore @@ -2,4 +2,4 @@ **/nf.command.* bactopia-runs/**/nf-reports/*.{dot,html} -**/*.{corrections,hist,histogram,json,msh,sig,txt,tsv,zip} +**/*.{corrections,hist,histogram,json,msh,sig,txt,tsv,yml,zip} diff --git a/workflows/cleanyerreads/tests/main.nf.test.snap b/workflows/cleanyerreads/tests/main.nf.test.snap index 2d681f72a..0d07e5442 100644 --- a/workflows/cleanyerreads/tests/main.nf.test.snap +++ b/workflows/cleanyerreads/tests/main.nf.test.snap @@ -80,14 +80,10 @@ "bactopia-runs/cleanyerreads/nf-reports/cleanyerreads-timeline.html" ], [ - "versions.yml:md5,cd4830d4b299d4776ea68dce5a1c9e73", - "versions.yml:md5,d86b6a7bb7117ed6a86a0bd9f45e0377", - "versions.yml:md5,74fd99ec158fe3e666d2ba871c809827", - "versions.yml:md5,61924107a406c136f55c445d470721f7", - "versions.yml:md5,7c379989d6fecf5c9291326ac25be5e5" + ] ], - "timestamp": "2026-04-29T11:27:05.694544", + "timestamp": "2026-07-30T19:28:21.446025394", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -158,12 +154,10 @@ "bactopia-runs/cleanyerreads/nf-reports/cleanyerreads-timeline.html" ], [ - "versions.yml:md5,cd4830d4b299d4776ea68dce5a1c9e73", - "versions.yml:md5,d86b6a7bb7117ed6a86a0bd9f45e0377", - "versions.yml:md5,61924107a406c136f55c445d470721f7" + ] ], - "timestamp": "2026-04-29T11:26:09.174329984", + "timestamp": "2026-07-30T19:26:54.451358248", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/staphopia/main.nf b/workflows/staphopia/main.nf index b5052aaaf..d7930777c 100644 --- a/workflows/staphopia/main.nf +++ b/workflows/staphopia/main.nf @@ -5,7 +5,8 @@ * This workflow performs complete bacterial analysis including quality control, * assembly, annotation, antimicrobial resistance detection, MLST typing, * and Staphylococcus-specific analysis using [Spatyper](https://github.com/HCGB-IGTP/spaTyper), - * [AgrVATE](https://github.com/VishnuRaghuram94/AgrVATE), and [SCCmecFinder](https://github.com/rpetit3/sccmec). + * [AgrVATE](https://github.com/VishnuRaghuram94/AgrVATE), [SCCmecFinder](https://github.com/rpetit3/sccmec), + * and [StaphSCAN](https://github.com/riccabolla/StaphSCAN). * It processes raw sequencing reads and produces a comprehensive genomic characterization for S. aureus isolates. * * @status stable @@ -58,6 +59,9 @@ * @input spatyper_repeat_order * Path to repeat order file for Spatyper * + * @input staphscan_db_mlst + * Path or tarball to custom MLST database for StaphSCAN + * * @section Quality Control * @publish supplemental/*_fastqc.* FastQC quality control reports for raw and cleaned reads * @publish supplemental/*-NanoPlot.* NanoPlot reports for Nanopore reads @@ -124,6 +128,7 @@ params { prokka_prodigal_tf : Path? spatyper_repeats : Path? spatyper_repeat_order : Path? + staphscan_db_mlst : Path? } // Core @@ -198,7 +203,8 @@ workflow { ch_staphtyper = STAPHTYPER( ch_assembler.assembly, params.spatyper_repeats, - params.spatyper_repeat_order + params.spatyper_repeat_order, + params.staphscan_db_mlst ) // Collect all outputs diff --git a/workflows/staphopia/nextflow.config b/workflows/staphopia/nextflow.config index e69011472..f2267c1ad 100644 --- a/workflows/staphopia/nextflow.config +++ b/workflows/staphopia/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -18,11 +18,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../.." includeConfig "../../conf/params.config" includeConfig "../../conf/params/bactopia.config" @@ -41,6 +44,7 @@ includeConfig "../../modules/prokka/module.config" includeConfig "../../modules/agrvate/module.config" includeConfig "../../modules/spatyper/module.config" includeConfig "../../modules/sccmec/module.config" +includeConfig "../../modules/staphscan/module.config" // Workflow specific params.config includeConfig "../../conf/params/staphopia.config" @@ -97,7 +101,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/staphopia/nextflow_schema.json b/workflows/staphopia/nextflow_schema.json index f4c58f782..d5ac57090 100644 --- a/workflows/staphopia/nextflow_schema.json +++ b/workflows/staphopia/nextflow_schema.json @@ -183,7 +183,6 @@ }, "amrfinderplus_db": { "type": "string", - "default": "", "description": "A custom AMRFinder+ database to use, either a tarball or a folder", "fa_icon": "fas fa-font", "hidden": true @@ -240,6 +239,7 @@ }, "use_unicycler": { "type": "boolean", + "default": false, "description": "Use unicycler for paired end assembly", "fa_icon": "fas fa-toggle-on", "hidden": true @@ -360,18 +360,21 @@ }, "no_polish": { "type": "boolean", + "default": false, "description": "Skip the assembly polishing step", "fa_icon": "fas fa-toggle-on", "hidden": true }, "no_miniasm": { "type": "boolean", + "default": false, "description": "Skip miniasm+Racon bridging", "fa_icon": "fas fa-toggle-on", "hidden": true }, "no_rotate": { "type": "boolean", + "default": false, "description": "Do not rotate completed replicons to start at a standard gene", "fa_icon": "fas fa-toggle-on", "hidden": true @@ -408,6 +411,7 @@ "properties": { "skip_fastq_check": { "type": "boolean", + "default": false, "description": "Skip minimum requirement checks for input FASTQs", "help": "This parameter is useful if you are confident your sequences will pass the minimum requirements.", "fa_icon": "fas fa-toggle-on", @@ -465,15 +469,10 @@ }, "use_ena": { "type": "boolean", + "default": false, "description": "Download FASTQs from ENA", "fa_icon": "fas fa-toggle-on", "hidden": true - }, - "no_cache": { - "type": "boolean", - "description": "Skip caching the assembly summary file from ncbi-genome-download", - "fa_icon": "fas fa-toggle-on", - "hidden": true } } }, @@ -500,6 +499,7 @@ }, "no_winner_take_all": { "type": "boolean", + "default": false, "description": "Disable winner-takes-all strategy for identity estimates", "help": "winner-take-all description: After counting hashes for each query, hashes that appear in multiple queries will be removed from all except the one with the best identity (ties broken by larger query), and other identities will be reduced. This removes output redundancy, providing a rough compositional outline.", "fa_icon": "fas fa-toggle-on", @@ -559,7 +559,6 @@ }, "mlst_db": { "type": "string", - "default": "", "description": "A custom MLST database to use, either a tarball or a directory", "fa_icon": "fas fa-font", "hidden": true @@ -575,6 +574,7 @@ "properties": { "use_bbmap": { "type": "boolean", + "default": false, "description": "Illumina reads will be QC'd using BBMap", "help": "", "fa_icon": "fas fa-toggle-on", @@ -590,6 +590,7 @@ }, "skip_qc": { "type": "boolean", + "default": false, "description": "The QC step will be skipped and it will be assumed the inputs sequences have already been QCed.", "help": "This is really only useful if you have already QC'd your reads, or have a specific need", "fa_icon": "fas fa-toggle-on", @@ -597,12 +598,14 @@ }, "skip_qc_plots": { "type": "boolean", + "default": false, "description": "QC Plot creation by FastQC or Nanoplot will be skipped", "fa_icon": "fas fa-toggle-on", "hidden": true }, "skip_error_correction": { "type": "boolean", + "default": false, "description": "FLASH error correction of reads will be skipped.", "fa_icon": "fas fa-toggle-on", "hidden": true @@ -1003,6 +1006,7 @@ "properties": { "prokka_proteins": { "type": "string", + "default": "${params.bactopia_dir}/data/proteins.faa", "description": "FASTA file of trusted proteins to first annotate from", "fa_icon": "fas fa-font", "hidden": true @@ -1138,6 +1142,28 @@ } } }, + "staphscan_parameters": { + "title": "StaphSCAN Parameters", + "type": "object", + "description": "", + "default": "", + "fa_icon": "fas fa-exclamation-circle", + "properties": { + "staphscan_modules": { + "type": "string", + "default": "", + "description": "Comma-separated list of modules to run", + "fa_icon": "fas fa-font", + "hidden": true + }, + "staphscan_db_mlst": { + "type": "string", + "description": "Path or tarball to custom MLST database", + "fa_icon": "fas fa-font", + "hidden": true + } + } + }, "optional_parameters": { "title": "Optional Parameters", "type": "object", @@ -1436,13 +1462,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", @@ -1526,6 +1545,9 @@ { "$ref": "#/$defs/sccmec_parameters" }, + { + "$ref": "#/$defs/staphscan_parameters" + }, { "$ref": "#/$defs/optional_parameters" }, diff --git a/workflows/staphopia/tests/.nftignore b/workflows/staphopia/tests/.nftignore index 895a010d2..79090ef78 100644 --- a/workflows/staphopia/tests/.nftignore +++ b/workflows/staphopia/tests/.nftignore @@ -2,4 +2,4 @@ **/nf.command.* bactopia-runs/**/nf-reports/*.{dot,html} -**/*.{corrections,hist,histogram,json,msh,sig,tab,txt,tsv,zip} +**/*.{corrections,hist,histogram,json,msh,sig,tab,txt,tsv,yml,zip} diff --git a/workflows/staphopia/tests/main.nf.test.snap b/workflows/staphopia/tests/main.nf.test.snap index 077ef9762..9e4560bbc 100644 --- a/workflows/staphopia/tests/main.nf.test.snap +++ b/workflows/staphopia/tests/main.nf.test.snap @@ -1,7 +1,7 @@ { "Staphopia (pe) - SRR2838702|portiera|illumina": { "content": [ - 17, + 19, [ "SRR2838702", "SRR2838702/main", @@ -167,6 +167,17 @@ "SRR2838702/tools/spatyper/logs/nf.command.sh", "SRR2838702/tools/spatyper/logs/nf.command.trace", "SRR2838702/tools/spatyper/logs/versions.yml", + "SRR2838702/tools/staphscan", + "SRR2838702/tools/staphscan/SRR2838702.tsv", + "SRR2838702/tools/staphscan/logs", + "SRR2838702/tools/staphscan/logs/nf.command.begin", + "SRR2838702/tools/staphscan/logs/nf.command.err", + "SRR2838702/tools/staphscan/logs/nf.command.log", + "SRR2838702/tools/staphscan/logs/nf.command.out", + "SRR2838702/tools/staphscan/logs/nf.command.run", + "SRR2838702/tools/staphscan/logs/nf.command.sh", + "SRR2838702/tools/staphscan/logs/nf.command.trace", + "SRR2838702/tools/staphscan/logs/versions.yml", "bactopia-runs", "bactopia-runs/staphopia", "bactopia-runs/staphopia/merged-results", @@ -237,36 +248,30 @@ "bactopia-runs/staphopia/merged-results/logs/spatyper-concat/nf.command.sh", "bactopia-runs/staphopia/merged-results/logs/spatyper-concat/nf.command.trace", "bactopia-runs/staphopia/merged-results/logs/spatyper-concat/versions.yml", + "bactopia-runs/staphopia/merged-results/logs/staphscan-concat", + "bactopia-runs/staphopia/merged-results/logs/staphscan-concat/nf.command.begin", + "bactopia-runs/staphopia/merged-results/logs/staphscan-concat/nf.command.err", + "bactopia-runs/staphopia/merged-results/logs/staphscan-concat/nf.command.log", + "bactopia-runs/staphopia/merged-results/logs/staphscan-concat/nf.command.out", + "bactopia-runs/staphopia/merged-results/logs/staphscan-concat/nf.command.run", + "bactopia-runs/staphopia/merged-results/logs/staphscan-concat/nf.command.sh", + "bactopia-runs/staphopia/merged-results/logs/staphscan-concat/nf.command.trace", + "bactopia-runs/staphopia/merged-results/logs/staphscan-concat/versions.yml", "bactopia-runs/staphopia/merged-results/meta.tsv", "bactopia-runs/staphopia/merged-results/mlst.tsv", "bactopia-runs/staphopia/merged-results/sccmec.tsv", "bactopia-runs/staphopia/merged-results/spatyper.tsv", + "bactopia-runs/staphopia/merged-results/staphscan.tsv", "bactopia-runs/staphopia/nf-reports", "bactopia-runs/staphopia/nf-reports/staphopia-dag.dot", "bactopia-runs/staphopia/nf-reports/staphopia-report.html", "bactopia-runs/staphopia/nf-reports/staphopia-timeline.html" ], [ - "versions.yml:md5,27f053a0892518f8b0fb60e2100e922e", - "versions.yml:md5,5d00225a5ad24de728e651fdd0d7d1e3", - "versions.yml:md5,cd4830d4b299d4776ea68dce5a1c9e73", - "versions.yml:md5,d86b6a7bb7117ed6a86a0bd9f45e0377", - "versions.yml:md5,e46de3078794860a978e2dd0b390c27c", - "versions.yml:md5,c0b16a8b5ea1a55c72f38545beffb659", - "versions.yml:md5,d4aac41b9e2c72836a9b2a1dfed2226c", - "versions.yml:md5,feb26d507cd4d8f25033d4950ba463ee", - "versions.yml:md5,4d90b86147c4eb115fc93edc4fa484b8", - "versions.yml:md5,32d57feabda90e9fe6e0aeb96e5d2352", - "versions.yml:md5,d203f21af354f31f3d144e58af47cff3", - "versions.yml:md5,c18211bbb02304cba7b3e93cbcaa44c6", - "versions.yml:md5,1913efda4329af168df4ab88555dbeb4", - "versions.yml:md5,61924107a406c136f55c445d470721f7", - "versions.yml:md5,082ad51a2f3d2c0b3a158586edc08efc", - "versions.yml:md5,35f4a9f839e9fd13b2afb63fecea88b4", - "versions.yml:md5,db2a4ba0c195fd025b9a8068ad991793" + ] ], - "timestamp": "2026-04-29T11:29:39.249406285", + "timestamp": "2026-07-30T19:30:52.887024027", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/workflows/teton/main.nf b/workflows/teton/main.nf index d8ba404cb..95d992869 100644 --- a/workflows/teton/main.nf +++ b/workflows/teton/main.nf @@ -4,13 +4,14 @@ * * This workflow performs metagenomic classification using [Kraken2](https://github.com/DerrickWood/kraken2) * and [Bracken](https://github.com/jenniferlu717/Bracken), with optional host read removal - * using SRA Scrubber. It processes metagenomic sequencing reads to estimate bacterial - * genome sizes and separate bacterial from non-bacterial organisms. + * using [deacon](https://github.com/bede/deacon) (default), [nohuman](https://github.com/mbhall88/nohuman), + * or [SRA Human Scrubber](https://github.com/ncbi/sra-human-scrubber). It processes metagenomic + * sequencing reads to estimate bacterial genome sizes and separate bacterial from non-bacterial organisms. * * @status stable * @keywords metagenomics, classification, kraken2, bracken, abundance, profiling * @tags complexity:complex input-type:parameter output-type:multiple features:aggregation,conditional-logic,database-dependent - * @citation bracken, kraken2, srahumanscrubber + * @citation bracken, deacon, kraken2, srahumanscrubber * * @subworkflows utils_bactopia, bactopia_gather, teton * @@ -21,7 +22,10 @@ * Path to Kraken2 database for classification * * @input use_srascrubber - * Remove host reads using SRA scrubber before classification + * Use SRA Human Scrubber for host read removal + * + * @input use_nohuman + * Use nohuman for host read removal * * @input nohuman_db * Path to a pre-built nohuman HPRC database for host read removal @@ -32,6 +36,12 @@ * @input nohuman_save_as_tarball * Save the downloaded nohuman database as a tarball for reuse * + * @input deacon_db + * Path to a pre-existing deacon minimizer index (.idx) for host read filtering + * + * @input download_deacon + * Download the deacon index to the datasets cache + * * @section Per-Sample Results * @publish bacteria.tsv Per-sample TSV files containing bacterial organisms and their properties * @publish nonbacteria.tsv Per-sample TSV files containing non-bacterial organisms @@ -58,9 +68,12 @@ params { // Tool-specific parameters kraken2_db : Path use_srascrubber : Boolean + use_nohuman : Boolean nohuman_db : Path? download_nohuman : Boolean nohuman_save_as_tarball : Boolean + deacon_db : Path? + download_deacon : Boolean } include { BACTOPIA_INIT } from '../../subworkflows/utils/bactopia' @@ -80,9 +93,12 @@ workflow { ch_gather.reads, params.kraken2_db, params.use_srascrubber, + params.use_nohuman, params.nohuman_db, params.download_nohuman, - params.nohuman_save_as_tarball + params.nohuman_save_as_tarball, + params.deacon_db, + params.download_deacon ) // Collect all outputs diff --git a/workflows/teton/nextflow.config b/workflows/teton/nextflow.config index 2fb367714..206f8f3c1 100644 --- a/workflows/teton/nextflow.config +++ b/workflows/teton/nextflow.config @@ -5,7 +5,7 @@ manifest { homePage = 'https://github.com/bactopia/bactopia' description = 'An extensive workflow for processing sequencing of bacterial genomes.' mainScript = 'main.nf' - version = '4.0.0' + version = '4.1.0' nextflowVersion = '>=26.04.0' } @@ -18,11 +18,14 @@ params { } // Version -params.bactopia_version = '4.0.0' +params.bactopia_version = '4.1.0' manifest.version = "${params.bactopia_version}" // Includes params.bactopia_cache = env("BACTOPIA_CACHEDIR") ? "${env('BACTOPIA_CACHEDIR')}" : "${env('HOME')}/.bactopia" +// Absolute anchor to the Bactopia repo root, used by module.config to locate +// vendored data under data/ (a relative path would resolve against launchDir) +params.bactopia_dir = "${projectDir}/../.." includeConfig "../../conf/params.config" includeConfig "../../conf/params/bactopia.config" @@ -35,6 +38,8 @@ includeConfig "../../modules/srahumanscrubber/initdb/module.config" includeConfig "../../modules/srahumanscrubber/scrub/module.config" includeConfig "../../modules/nohuman/download/module.config" includeConfig "../../modules/nohuman/run/module.config" +includeConfig "../../modules/deacon/fetch/module.config" +includeConfig "../../modules/deacon/filter/module.config" includeConfig "../../modules/bracken/module.config" // Workflow specific params.config @@ -92,7 +97,7 @@ dag { // Plugins plugins { - id 'nf-bactopia@2.1.1' + id 'nf-bactopia@2.1.7' } bactopia { diff --git a/workflows/teton/nextflow_schema.json b/workflows/teton/nextflow_schema.json index 43aaef680..30efd0517 100644 --- a/workflows/teton/nextflow_schema.json +++ b/workflows/teton/nextflow_schema.json @@ -78,6 +78,7 @@ "properties": { "skip_fastq_check": { "type": "boolean", + "default": false, "description": "Skip minimum requirement checks for input FASTQs", "help": "This parameter is useful if you are confident your sequences will pass the minimum requirements.", "fa_icon": "fas fa-toggle-on", @@ -135,15 +136,10 @@ }, "use_ena": { "type": "boolean", + "default": false, "description": "Download FASTQs from ENA", "fa_icon": "fas fa-toggle-on", "hidden": true - }, - "no_cache": { - "type": "boolean", - "description": "Skip caching the assembly summary file from ncbi-genome-download", - "fa_icon": "fas fa-toggle-on", - "hidden": true } } }, @@ -269,6 +265,87 @@ } } }, + "deacon_fetch_parameters": { + "title": "Deacon Fetch Parameters", + "type": "object", + "description": "", + "default": "", + "fa_icon": "fas fa-exclamation-circle", + "properties": { + "deacon_index_name": { + "type": "string", + "default": "panhuman-1", + "description": "Name of the pre-built deacon index to fetch", + "fa_icon": "fas fa-font", + "hidden": true + }, + "download_deacon": { + "type": "boolean", + "default": false, + "description": "Download the deacon index to the datasets cache", + "fa_icon": "fas fa-toggle-on", + "hidden": true + }, + "use_deacon": { + "type": "boolean", + "default": false, + "description": "Use deacon for host read filtering", + "fa_icon": "fas fa-toggle-on", + "hidden": true + } + } + }, + "deacon_filter_parameters": { + "title": "Deacon Filter Parameters", + "type": "object", + "description": "", + "default": "", + "fa_icon": "fas fa-exclamation-circle", + "properties": { + "deacon_abs_threshold": { + "type": "integer", + "default": 2, + "description": "Minimum absolute number of minimizer hits for a match", + "fa_icon": "fas fa-hashtag", + "hidden": true + }, + "deacon_db": { + "type": "string", + "default": "", + "description": "Path to a pre-existing deacon index (.idx) for host read filtering", + "fa_icon": "fas fa-font", + "hidden": true + }, + "deacon_deplete": { + "type": "boolean", + "default": true, + "description": "Discard matching sequences instead of keeping them", + "fa_icon": "fas fa-toggle-on", + "hidden": true + }, + "deacon_opts": { + "type": "string", + "default": "", + "description": "Additional deacon filter options not covered by other parameters", + "fa_icon": "fas fa-font", + "hidden": true + }, + "deacon_prefix_length": { + "type": "integer", + "default": 0, + "description": "Search only the first N nucleotides per sequence (0 for all)", + "fa_icon": "fas fa-hashtag", + "hidden": true + }, + "deacon_rel_threshold": { + "type": "number", + "default": 0.01, + "description": "Minimum relative proportion (0.0-1.0) of minimizer hits for a match", + "fa_icon": "fas fa-percentage", + "hidden": true + } + } + }, "kraken2_bracken_parameters": { "title": "Kraken2 and Bracken Parameters", "type": "object", @@ -695,13 +772,6 @@ "fa_icon": "far fa-clock", "hidden": true }, - "validate_params": { - "type": "boolean", - "default": true, - "fa_icon": "fas fa-tasks", - "description": "Boolean whether to validate parameters against the schema at runtime", - "hidden": true - }, "help": { "type": "boolean", "description": "Display help text.", @@ -761,6 +831,12 @@ { "$ref": "#/$defs/nohuman_run_parameters" }, + { + "$ref": "#/$defs/deacon_fetch_parameters" + }, + { + "$ref": "#/$defs/deacon_filter_parameters" + }, { "$ref": "#/$defs/kraken2_bracken_parameters" }, diff --git a/workflows/teton/tests/.nftignore b/workflows/teton/tests/.nftignore index c83e71878..feb766962 100644 --- a/workflows/teton/tests/.nftignore +++ b/workflows/teton/tests/.nftignore @@ -2,4 +2,4 @@ **/nf.command.* bactopia-runs/**/nf-reports/*.{dot,html} -**/*.{corrections,hist,histogram,json,msh,sig,txt,tsv,zip} +**/*.{corrections,hist,histogram,json,msh,sig,txt,tsv,yml,zip} diff --git a/workflows/teton/tests/main.nf.test b/workflows/teton/tests/main.nf.test index 982c847ea..e425b09bb 100644 --- a/workflows/teton/tests/main.nf.test +++ b/workflows/teton/tests/main.nf.test @@ -10,7 +10,7 @@ nextflow_pipeline { params { bactopia_test = "" test_dataset = "/datasets/kraken2/k2_standard_08_GB_20251015" - nohuman_test = "/datasets/nohuman/HPRC.r2" + deacon_test = "/datasets/deacon/panhuman-1.idx" test_dataset2 = "" test_dataset3 = "" test_r1 = "/species/portiera/compressed/SRR2838702/main/qc/SRR2838702_R1.fastq.gz" @@ -44,6 +44,46 @@ nextflow_pipeline { } } + test("teton (pe+nohuman) - SRR2838702|portiera|compressed_fastq") { + when { + params { + bactopia_test = "" + test_dataset = "/datasets/kraken2/k2_standard_08_GB_20251015" + nohuman_test = "/datasets/nohuman/HPRC.r2/db" + test_dataset2 = "" + test_dataset3 = "" + test_r1 = "/species/portiera/compressed/SRR2838702/main/qc/SRR2838702_R1.fastq.gz" + test_r2 = "/species/portiera/compressed/SRR2838702/main/qc/SRR2838702_R2.fastq.gz" + test_se = "" + test_ont = "" + is_ci = true + outdir = "$outputDir" + sample = "SRR2838702" + genome_size = 358242 + min_coverage = 10 + use_nohuman = true + } + } + + then { + // stable_name: All files + folders in ${params.outdir}/ with a stable name + def stable_name = getAllFilesFromDir(params.outdir, relative: true, includeDir: true, ignore: []) + // stable_path: All files in ${params.outdir}/ with stable content + def stable_path = getAllFilesFromDir(params.outdir, ignoreFile: '.nftignore') + assertAll( + { assert workflow.success}, + { assert snapshot( + // Number of successful tasks + workflow.trace.succeeded().size(), + // All stable path name, with a relative path + stable_name, + // All files with stable contents + stable_path + ).match() } + ) + } + } + test("teton (pe+srascrubber) - SRR2838702|portiera|compressed_fastq") { when { params { diff --git a/workflows/teton/tests/main.nf.test.snap b/workflows/teton/tests/main.nf.test.snap index cb6a3b427..c8ded6650 100644 --- a/workflows/teton/tests/main.nf.test.snap +++ b/workflows/teton/tests/main.nf.test.snap @@ -50,19 +50,20 @@ "SRR2838702/teton/tools/bracken/logs/nf.command.trace", "SRR2838702/teton/tools/bracken/logs/versions.yml", "SRR2838702/tools", - "SRR2838702/tools/nohuman", - "SRR2838702/tools/nohuman/SRR2838702.scrub.report.tsv", - "SRR2838702/tools/nohuman/SRR2838702_R1.scrubbed.fastq.gz", - "SRR2838702/tools/nohuman/SRR2838702_R2.scrubbed.fastq.gz", - "SRR2838702/tools/nohuman/logs", - "SRR2838702/tools/nohuman/logs/nf.command.begin", - "SRR2838702/tools/nohuman/logs/nf.command.err", - "SRR2838702/tools/nohuman/logs/nf.command.log", - "SRR2838702/tools/nohuman/logs/nf.command.out", - "SRR2838702/tools/nohuman/logs/nf.command.run", - "SRR2838702/tools/nohuman/logs/nf.command.sh", - "SRR2838702/tools/nohuman/logs/nf.command.trace", - "SRR2838702/tools/nohuman/logs/versions.yml", + "SRR2838702/tools/scrubber", + "SRR2838702/tools/scrubber/SRR2838702.deacon.json", + "SRR2838702/tools/scrubber/SRR2838702.scrub.report.tsv", + "SRR2838702/tools/scrubber/SRR2838702_R1.scrubbed.fastq.gz", + "SRR2838702/tools/scrubber/SRR2838702_R2.scrubbed.fastq.gz", + "SRR2838702/tools/scrubber/logs", + "SRR2838702/tools/scrubber/logs/nf.command.begin", + "SRR2838702/tools/scrubber/logs/nf.command.err", + "SRR2838702/tools/scrubber/logs/nf.command.log", + "SRR2838702/tools/scrubber/logs/nf.command.out", + "SRR2838702/tools/scrubber/logs/nf.command.run", + "SRR2838702/tools/scrubber/logs/nf.command.sh", + "SRR2838702/tools/scrubber/logs/nf.command.trace", + "SRR2838702/tools/scrubber/logs/versions.yml", "bactopia-runs", "bactopia-runs/teton", "bactopia-runs/teton/merged-results", @@ -165,22 +166,10 @@ "merged-results/logs/SRR2838702-join/versions.yml" ], [ - "versions.yml:md5,cd4830d4b299d4776ea68dce5a1c9e73", - "versions.yml:md5,6244b9a467c68aa03fd62d84f370f31a", - "versions.yml:md5,8dc4d8979e0dba7fc7b975f9953a3161", - "versions.yml:md5,0e919355c3b46201c37e019227934b1b", - "versions.yml:md5,044131149bd3aa2556576fb17c9925a3", - "versions.yml:md5,1e53d17af5b9008b9442ff5d18670fbe", - "versions.yml:md5,61924107a406c136f55c445d470721f7", - "versions.yml:md5,b529c3993efa987da9a980fe7c8061f8", - "versions.yml:md5,7365b17a2c11eb3d256b0facd20a197a", - "versions.yml:md5,340e424aa721674cf14433027027114a", - "versions.yml:md5,f27b3200ffeb3e669ad225b87cedf06c", - "versions.yml:md5,fcfb282f67fc93a18b7d921d22e70628", - "versions.yml:md5,e99779aecd8dce47f4bef01bc23da898" + ] ], - "timestamp": "2026-04-29T11:31:16.523191261", + "timestamp": "2026-07-30T19:31:47.758982804", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -352,22 +341,185 @@ "merged-results/logs/SRR2838702-join/versions.yml" ], [ - "versions.yml:md5,cd4830d4b299d4776ea68dce5a1c9e73", - "versions.yml:md5,6244b9a467c68aa03fd62d84f370f31a", - "versions.yml:md5,8dc4d8979e0dba7fc7b975f9953a3161", - "versions.yml:md5,5ccb1a29e9b0dfff5b4a46a6e73facf3", - "versions.yml:md5,044131149bd3aa2556576fb17c9925a3", - "versions.yml:md5,1e53d17af5b9008b9442ff5d18670fbe", - "versions.yml:md5,61924107a406c136f55c445d470721f7", - "versions.yml:md5,b529c3993efa987da9a980fe7c8061f8", - "versions.yml:md5,7365b17a2c11eb3d256b0facd20a197a", - "versions.yml:md5,340e424aa721674cf14433027027114a", - "versions.yml:md5,f27b3200ffeb3e669ad225b87cedf06c", - "versions.yml:md5,fcfb282f67fc93a18b7d921d22e70628", - "versions.yml:md5,e99779aecd8dce47f4bef01bc23da898" + + ] + ], + "timestamp": "2026-07-30T19:43:51.415982337", + "meta": { + "nf-test": "0.9.5", + "nextflow": "26.04.0" + } + }, + "teton (pe+nohuman) - SRR2838702|portiera|compressed_fastq": { + "content": [ + 13, + [ + "SRR2838702", + "SRR2838702/teton", + "SRR2838702/teton/main", + "SRR2838702/teton/main/gather", + "SRR2838702/teton/main/gather/SRR2838702-meta.tsv", + "SRR2838702/teton/main/gather/logs", + "SRR2838702/teton/main/gather/logs/nf.command.begin", + "SRR2838702/teton/main/gather/logs/nf.command.err", + "SRR2838702/teton/main/gather/logs/nf.command.log", + "SRR2838702/teton/main/gather/logs/nf.command.out", + "SRR2838702/teton/main/gather/logs/nf.command.run", + "SRR2838702/teton/main/gather/logs/nf.command.sh", + "SRR2838702/teton/main/gather/logs/nf.command.trace", + "SRR2838702/teton/main/gather/logs/versions.yml", + "SRR2838702/teton/teton-prepare", + "SRR2838702/teton/teton-prepare/SRR2838702-sizemeup.txt", + "SRR2838702/teton/teton-prepare/SRR2838702.bacteria.tsv", + "SRR2838702/teton/teton-prepare/SRR2838702.nonbacteria.tsv", + "SRR2838702/teton/teton-prepare/logs", + "SRR2838702/teton/teton-prepare/logs/nf.command.begin", + "SRR2838702/teton/teton-prepare/logs/nf.command.err", + "SRR2838702/teton/teton-prepare/logs/nf.command.log", + "SRR2838702/teton/teton-prepare/logs/nf.command.out", + "SRR2838702/teton/teton-prepare/logs/nf.command.run", + "SRR2838702/teton/teton-prepare/logs/nf.command.sh", + "SRR2838702/teton/teton-prepare/logs/nf.command.trace", + "SRR2838702/teton/teton-prepare/logs/versions.yml", + "SRR2838702/teton/tools", + "SRR2838702/teton/tools/bracken", + "SRR2838702/teton/tools/bracken/SRR2838702.bracken.abundances.txt", + "SRR2838702/teton/tools/bracken/SRR2838702.bracken.adjusted.abundances.txt", + "SRR2838702/teton/tools/bracken/SRR2838702.bracken.classification.txt", + "SRR2838702/teton/tools/bracken/SRR2838702.bracken.krona.html", + "SRR2838702/teton/tools/bracken/SRR2838702.bracken.report.txt", + "SRR2838702/teton/tools/bracken/SRR2838702.bracken.tsv", + "SRR2838702/teton/tools/bracken/SRR2838702.kraken2.krona.html", + "SRR2838702/teton/tools/bracken/SRR2838702.kraken2.report.txt", + "SRR2838702/teton/tools/bracken/logs", + "SRR2838702/teton/tools/bracken/logs/nf.command.begin", + "SRR2838702/teton/tools/bracken/logs/nf.command.err", + "SRR2838702/teton/tools/bracken/logs/nf.command.log", + "SRR2838702/teton/tools/bracken/logs/nf.command.out", + "SRR2838702/teton/tools/bracken/logs/nf.command.run", + "SRR2838702/teton/tools/bracken/logs/nf.command.sh", + "SRR2838702/teton/tools/bracken/logs/nf.command.trace", + "SRR2838702/teton/tools/bracken/logs/versions.yml", + "SRR2838702/tools", + "SRR2838702/tools/nohuman", + "SRR2838702/tools/nohuman/SRR2838702.scrub.report.tsv", + "SRR2838702/tools/nohuman/SRR2838702_R1.scrubbed.fastq.gz", + "SRR2838702/tools/nohuman/SRR2838702_R2.scrubbed.fastq.gz", + "SRR2838702/tools/nohuman/logs", + "SRR2838702/tools/nohuman/logs/nf.command.begin", + "SRR2838702/tools/nohuman/logs/nf.command.err", + "SRR2838702/tools/nohuman/logs/nf.command.log", + "SRR2838702/tools/nohuman/logs/nf.command.out", + "SRR2838702/tools/nohuman/logs/nf.command.run", + "SRR2838702/tools/nohuman/logs/nf.command.sh", + "SRR2838702/tools/nohuman/logs/nf.command.trace", + "SRR2838702/tools/nohuman/logs/versions.yml", + "bactopia-runs", + "bactopia-runs/teton", + "bactopia-runs/teton/merged-results", + "bactopia-runs/teton/merged-results/bracken-adjusted.tsv", + "bactopia-runs/teton/merged-results/bracken-species-abundance.tsv", + "bactopia-runs/teton/merged-results/logs", + "bactopia-runs/teton/merged-results/logs/bracken-adjusted-concat", + "bactopia-runs/teton/merged-results/logs/bracken-adjusted-concat/nf.command.begin", + "bactopia-runs/teton/merged-results/logs/bracken-adjusted-concat/nf.command.err", + "bactopia-runs/teton/merged-results/logs/bracken-adjusted-concat/nf.command.log", + "bactopia-runs/teton/merged-results/logs/bracken-adjusted-concat/nf.command.out", + "bactopia-runs/teton/merged-results/logs/bracken-adjusted-concat/nf.command.run", + "bactopia-runs/teton/merged-results/logs/bracken-adjusted-concat/nf.command.sh", + "bactopia-runs/teton/merged-results/logs/bracken-adjusted-concat/nf.command.trace", + "bactopia-runs/teton/merged-results/logs/bracken-adjusted-concat/versions.yml", + "bactopia-runs/teton/merged-results/logs/bracken-species-abundance-concat", + "bactopia-runs/teton/merged-results/logs/bracken-species-abundance-concat/nf.command.begin", + "bactopia-runs/teton/merged-results/logs/bracken-species-abundance-concat/nf.command.err", + "bactopia-runs/teton/merged-results/logs/bracken-species-abundance-concat/nf.command.log", + "bactopia-runs/teton/merged-results/logs/bracken-species-abundance-concat/nf.command.out", + "bactopia-runs/teton/merged-results/logs/bracken-species-abundance-concat/nf.command.run", + "bactopia-runs/teton/merged-results/logs/bracken-species-abundance-concat/nf.command.sh", + "bactopia-runs/teton/merged-results/logs/bracken-species-abundance-concat/nf.command.trace", + "bactopia-runs/teton/merged-results/logs/bracken-species-abundance-concat/versions.yml", + "bactopia-runs/teton/merged-results/logs/meta-concat", + "bactopia-runs/teton/merged-results/logs/meta-concat/nf.command.begin", + "bactopia-runs/teton/merged-results/logs/meta-concat/nf.command.err", + "bactopia-runs/teton/merged-results/logs/meta-concat/nf.command.log", + "bactopia-runs/teton/merged-results/logs/meta-concat/nf.command.out", + "bactopia-runs/teton/merged-results/logs/meta-concat/nf.command.run", + "bactopia-runs/teton/merged-results/logs/meta-concat/nf.command.sh", + "bactopia-runs/teton/merged-results/logs/meta-concat/nf.command.trace", + "bactopia-runs/teton/merged-results/logs/meta-concat/versions.yml", + "bactopia-runs/teton/merged-results/logs/scrubber-concat", + "bactopia-runs/teton/merged-results/logs/scrubber-concat/nf.command.begin", + "bactopia-runs/teton/merged-results/logs/scrubber-concat/nf.command.err", + "bactopia-runs/teton/merged-results/logs/scrubber-concat/nf.command.log", + "bactopia-runs/teton/merged-results/logs/scrubber-concat/nf.command.out", + "bactopia-runs/teton/merged-results/logs/scrubber-concat/nf.command.run", + "bactopia-runs/teton/merged-results/logs/scrubber-concat/nf.command.sh", + "bactopia-runs/teton/merged-results/logs/scrubber-concat/nf.command.trace", + "bactopia-runs/teton/merged-results/logs/scrubber-concat/versions.yml", + "bactopia-runs/teton/merged-results/logs/sizemeup-concat", + "bactopia-runs/teton/merged-results/logs/sizemeup-concat/nf.command.begin", + "bactopia-runs/teton/merged-results/logs/sizemeup-concat/nf.command.err", + "bactopia-runs/teton/merged-results/logs/sizemeup-concat/nf.command.log", + "bactopia-runs/teton/merged-results/logs/sizemeup-concat/nf.command.out", + "bactopia-runs/teton/merged-results/logs/sizemeup-concat/nf.command.run", + "bactopia-runs/teton/merged-results/logs/sizemeup-concat/nf.command.sh", + "bactopia-runs/teton/merged-results/logs/sizemeup-concat/nf.command.trace", + "bactopia-runs/teton/merged-results/logs/sizemeup-concat/versions.yml", + "bactopia-runs/teton/merged-results/logs/teton-concat", + "bactopia-runs/teton/merged-results/logs/teton-concat/nf.command.begin", + "bactopia-runs/teton/merged-results/logs/teton-concat/nf.command.err", + "bactopia-runs/teton/merged-results/logs/teton-concat/nf.command.log", + "bactopia-runs/teton/merged-results/logs/teton-concat/nf.command.out", + "bactopia-runs/teton/merged-results/logs/teton-concat/nf.command.run", + "bactopia-runs/teton/merged-results/logs/teton-concat/nf.command.sh", + "bactopia-runs/teton/merged-results/logs/teton-concat/nf.command.trace", + "bactopia-runs/teton/merged-results/logs/teton-concat/versions.yml", + "bactopia-runs/teton/merged-results/logs/teton-prepare-concat", + "bactopia-runs/teton/merged-results/logs/teton-prepare-concat/nf.command.begin", + "bactopia-runs/teton/merged-results/logs/teton-prepare-concat/nf.command.err", + "bactopia-runs/teton/merged-results/logs/teton-prepare-concat/nf.command.log", + "bactopia-runs/teton/merged-results/logs/teton-prepare-concat/nf.command.out", + "bactopia-runs/teton/merged-results/logs/teton-prepare-concat/nf.command.run", + "bactopia-runs/teton/merged-results/logs/teton-prepare-concat/nf.command.sh", + "bactopia-runs/teton/merged-results/logs/teton-prepare-concat/nf.command.trace", + "bactopia-runs/teton/merged-results/logs/teton-prepare-concat/versions.yml", + "bactopia-runs/teton/merged-results/logs/teton-prepare-nonbacteria-concat", + "bactopia-runs/teton/merged-results/logs/teton-prepare-nonbacteria-concat/nf.command.begin", + "bactopia-runs/teton/merged-results/logs/teton-prepare-nonbacteria-concat/nf.command.err", + "bactopia-runs/teton/merged-results/logs/teton-prepare-nonbacteria-concat/nf.command.log", + "bactopia-runs/teton/merged-results/logs/teton-prepare-nonbacteria-concat/nf.command.out", + "bactopia-runs/teton/merged-results/logs/teton-prepare-nonbacteria-concat/nf.command.run", + "bactopia-runs/teton/merged-results/logs/teton-prepare-nonbacteria-concat/nf.command.sh", + "bactopia-runs/teton/merged-results/logs/teton-prepare-nonbacteria-concat/nf.command.trace", + "bactopia-runs/teton/merged-results/logs/teton-prepare-nonbacteria-concat/versions.yml", + "bactopia-runs/teton/merged-results/meta.tsv", + "bactopia-runs/teton/merged-results/scrubber.tsv", + "bactopia-runs/teton/merged-results/sizemeup.tsv", + "bactopia-runs/teton/merged-results/teton-prepare-nonbacteria.tsv", + "bactopia-runs/teton/merged-results/teton-prepare.tsv", + "bactopia-runs/teton/merged-results/teton.tsv", + "bactopia-runs/teton/nf-reports", + "bactopia-runs/teton/nf-reports/teton-dag.dot", + "bactopia-runs/teton/nf-reports/teton-report.html", + "bactopia-runs/teton/nf-reports/teton-timeline.html", + "merged-results", + "merged-results/SRR2838702.tsv", + "merged-results/logs", + "merged-results/logs/SRR2838702-join", + "merged-results/logs/SRR2838702-join/nf.command.begin", + "merged-results/logs/SRR2838702-join/nf.command.err", + "merged-results/logs/SRR2838702-join/nf.command.log", + "merged-results/logs/SRR2838702-join/nf.command.out", + "merged-results/logs/SRR2838702-join/nf.command.run", + "merged-results/logs/SRR2838702-join/nf.command.sh", + "merged-results/logs/SRR2838702-join/nf.command.trace", + "merged-results/logs/SRR2838702-join/versions.yml" + ], + [ + ] ], - "timestamp": "2026-04-29T11:36:04.108243862", + "timestamp": "2026-07-30T19:40:13.1631072", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0"