Skip to content

Review subworkflows: remove thin wrappers, migrate utility functions to plugins #11075

@FriederikeHanssen

Description

@FriederikeHanssen

Summary

We've audited all 113 subworkflows and categorized them by complexity. A number of subworkflows are thin wrappers around 1-2 tools and don't meet the bar of what a subworkflow should provide (3+ tools or reasonably complex channel operations/functions). Additionally, several utility subworkflows contain pure functions that should migrate to plugins.

This issue is for community discussion on which to remove, consolidate, or migrate.


Complexity breakdown

Category Count
TRIVIAL (1 tool, no logic) 2
SIMPLE (1-2 tools, minimal logic) 27
MODERATE (3+ tools or complex ops) 52
COMPLEX (3+ tools + complex logic) 30
Empty/placeholder 2

MODERATE and COMPLEX subworkflows are considered justified and are not listed here.


TRIVIAL — Strong removal candidates

These are single-tool wrappers with no meaningful added logic:


Empty/placeholder directories — Remove


SIMPLE — Review for removal or consolidation

Single tool + sort/stats subworkflow (repeated pattern)

These all follow the same pattern: one aligner call + BAM_SORT_STATS_SAMTOOLS. Could potentially be consolidated into a single parameterized subworkflow, or users can call the aligner module + sort/stats subworkflow directly.

2 tools, linear pipeline (A → B)

These are simple sequential tool calls with basic channel wiring. Users could call the two modules directly.

Minimal logic wrappers

Sort/dedup + stats combos


Utility subworkflows — Plugin migration candidates

These contain pure functions/logic with no tool invocations. Their functions should move to Nextflow plugins:

(utils_nfschema_plugin and utils_nfvalidation_plugin are already plugin-based.)


Guiding principles

  • Subworkflows should have 3+ tools or reasonably complex channel operations/functions
  • Pure functions should live in plugins, not subworkflows
  • Simple linear A→B pipelines can be called as two modules directly in a workflow
  • Repeated patterns (align + sort/stats) could be consolidated

Next steps

Community feedback on each item above. Please comment with 👍/👎 or discussion on specific subworkflows you'd like to keep/remove/consolidate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions