Skip to content

nf: derive --organism from params.genome, gate ARDA on supported assemblies - #76

Merged
mikessh merged 1 commit into
masterfrom
feat/nf-genome-organism
Jul 15, 2026
Merged

nf: derive --organism from params.genome, gate ARDA on supported assemblies#76
mikessh merged 1 commit into
masterfrom
feat/nf-genome-organism

Conversation

@mikessh

@mikessh mikessh commented Jul 15, 2026

Copy link
Copy Markdown
Member

Closes #75.

@EgorGuga requested that the Nextflow module's nextflow.config:

  1. run ARDA only when params.genome is GRCh38 or GRCm39, and
  2. set --organism to human / mouse from the assembly.

The module's main.nf already honours both hooks this needs — task.ext.when (its when: block) and task.ext.args — so the change is entirely in the config, no module edit:

ext.when = { params.genome in ['GRCh38', 'GRCm39'] }
ext.args = {
    params.genome == 'GRCh38' ? '--organism human' :
    params.genome == 'GRCm39' ? '--organism mouse' : ''
}

params.genome is the iGenomes key nf-core sets from --genome, so ARDA follows whatever assembly the rest of the pipeline is already running on — nothing extra to configure. Any other genome (or none) skips ARDA and the pipeline still completes.

Verified end-to-end (not just parsed)

On aldan3 with real Nextflow (21.10.6), the real module + this config, and a fake arda on PATH that records its argv:

--genome ARDA runs? --organism received
GRCh38 human
GRCm39 mouse
GRCh37 skipped
(unset) skipped

The skipped cases complete with no error; the two supported cases publish all four output files.

Docs updated (module README.md + pipeline_integration.rst): the genome→organism mapping, and that a static ext.args string overrides the genome-driven default. Sphinx -W build clean.

…mblies (closes #75)

Requested in #75: run ARDA only on assemblies arda has a reference for, and set
--organism from the assembly rather than hardcoding it.

The module's main.nf already honours `task.ext.when` (its `when:` block) and
`task.ext.args`, so this is entirely in the module's nextflow.config:

  ext.when = { params.genome in ['GRCh38', 'GRCm39'] }
  ext.args = { GRCh38 -> --organism human ; GRCm39 -> --organism mouse ; else '' }

`params.genome` is the iGenomes key nf-core sets from --genome, so ARDA follows
whatever assembly the rest of the pipeline runs on with no extra parameter. Any
other genome (or none) skips ARDA and the pipeline still completes.

Verified end-to-end on aldan3 (Nextflow 21.10.6) with the real module and a fake
`arda` on PATH that records its argv:

  --genome GRCh38 -> ARDA runs, receives --organism human
  --genome GRCm39 -> ARDA runs, receives --organism mouse
  --genome GRCh37 -> ARDA skipped, no error
  (no --genome)   -> ARDA skipped, no error

Docs (module README + pipeline_integration.rst) document the mapping and that a
static ext.args string overrides the genome-driven default.
@mikessh
mikessh merged commit 5edd6ae into master Jul 15, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adding more flexibility to the NextFlow configuration file

1 participant