nf-core / nf-core/modules

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

Open
#11,075 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Nextflow
Stars
429
Forks
1.1k
Avg merge
1d 6h
Merged PRs (30d)
153

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the listed subworkflow directories under subworkflows/nf-core, including each README.md and whether main.nf exists. Compare the wrappers, linear pipelines, and utility functions against the stated principles, then comment with a specific keep, remove, consolidate, or plugin-migration recommendation for each item; done means every candidate has a community-backed disposition.

Written by the indexing model from the issue text.

Assessment

Domain
tooling
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.