Skip to content

Move inline R from modules to bin/ scripts - #80

Merged
cjfields merged 1 commit into
devfrom
feature/migrate-rscripts-v2
Nov 30, 2026
Merged

cjfields merged 1 commit into
devfrom
feature/migrate-rscripts-v2

Conversation

@cjfields

Copy link
Copy Markdown
Member

Summary

Moves the inline R from 35 modules/local processes into standalone scripts under bin/. Each script takes its inputs through optparse instead of Nextflow string interpolation. The modules now just call the script with CLI flags.

This is the change from feature/migrate-rscripts (April 2026), which was never merged. That branch has the change twice, 1dead19 and a rebased copy 82e1519, plus a merge commit joining them. This PR cherry-picks only 82e1519 onto current dev, giving one commit.

Checks before opening

  • The cherry-pick applied cleanly. The result is identical to merging the old branch into dev.
  • All 36 R modules keep the pinned image from Pinned R image: R 4.6.2, Bioconductor 3.24, dada2 1.42.0 (#76) #79 (ghcr.io/hpcbio/tada:r4.6.2-dada2-1.42.0@sha256:e7fd9fe1…). No module still contains an inline #!/usr/bin/env Rscript block.
  • The 35 new bin/*.R scripts are executable.
  • The old branch passed CI in April and May, but with the previous image and the dog stool test data. This PR's CI is the first run of these scripts on R 4.6.2 / dada2 1.42.0 with the MiSeq SOP subset.

Relation to #78

Small effect on strict-syntax lint: 97 → 95 errors, both in checkfastqqualities. Merging before #78 avoids conflicts, since #78 touches nearly every module. Unrelated cleanup noticed along the way, left for #78: bin/PlotMergePairs.R is unused and not executable.

🤖 Generated with Claude Code

Extract all inline R code from 35 modules/local/*.nf files into
standalone R scripts under bin/. Each script uses optparse for
parameter handling where Nextflow variables were previously
interpolated directly. Modules updated to call the external scripts
with appropriate CLI flags.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

(cherry picked from commit 82e1519, feature/migrate-rscripts)
@cjfields
cjfields merged commit f8e7b8d into dev Nov 30, 2026
4 of 6 checks 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.

1 participant