Skip to content

feat: updated Nextflow workflows with profiles, auto-assess, rehoming#108

Open
FIrgolitsch wants to merge 2 commits into
pr-h-allen-atlas-rasfrom
pr-i-nextflow-workflows
Open

feat: updated Nextflow workflows with profiles, auto-assess, rehoming#108
FIrgolitsch wants to merge 2 commits into
pr-h-allen-atlas-rasfrom
pr-i-nextflow-workflows

Conversation

@FIrgolitsch

@FIrgolitsch FIrgolitsch commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

Stacked PR 5/22 — review order: #115#97#98#99#100#101#108#106#107#87#116#110#111#40#112#113#117#118#120#121#122#123#124#125

Base: pr-h-allen-atlas-ras. Retargets to main as upstream PRs merge.


PR #108 — Updated Nextflow Workflows (profiles, auto-assess, rehoming)

Replaces the accidentally-merged-then-reverted #102. Modernises the Nextflow workflows to consume the new library and script outputs from #97#101.

Workflow changes

Nextflow v26 strict-DSL compatibility

The follow-up commit fix(workflows): make Nextflow v26 strict-DSL compatible ensures the workflow runs cleanly under Nextflow ≥ 26.04 (still compatible with the declared >= 23.10 minimum):

  • Inlines getAvailableCpus() into the beforeScript closure (top-level def no longer allowed in v26 config DSL)
  • Replaces C-style (int)(...) casts with as int (v26 parses the C-style form as a method call)
  • Wraps publishDir paths that reference $task.* in closures (lazy eval is now required)
  • Verified with nf-test (3 tests pass) and nextflow lint clean on both reconst_3d and preproc pipelines under Nextflow 26.04.0

Streamline + extract refactor (lives downstream on #110)

The configs are further streamlined on #110 (refactor(workflows): streamline configs, extract cpu_limits.config and Helpers.groovy) — kept there because it depends on the correct_bias_field process introduced by #109. Reviewers reviewing the Nextflow stack should look at #108 first, then #109, then #110.

@FIrgolitsch FIrgolitsch force-pushed the pr-h-allen-atlas-ras branch from a3a7b86 to c19c4d7 Compare April 29, 2026 19:39
@FIrgolitsch FIrgolitsch force-pushed the pr-i-nextflow-workflows branch from 3487c56 to 74f3e60 Compare April 29, 2026 19:39
@FIrgolitsch FIrgolitsch force-pushed the pr-h-allen-atlas-ras branch from c19c4d7 to 5e7482c Compare April 30, 2026 03:21
@FIrgolitsch FIrgolitsch force-pushed the pr-i-nextflow-workflows branch from 74f3e60 to 6c5ef92 Compare April 30, 2026 03:21
@FIrgolitsch FIrgolitsch force-pushed the pr-h-allen-atlas-ras branch from 5e7482c to d47cbd7 Compare April 30, 2026 03:26
@FIrgolitsch FIrgolitsch force-pushed the pr-i-nextflow-workflows branch from 6c5ef92 to 2d467fc Compare April 30, 2026 03:26
@FIrgolitsch FIrgolitsch force-pushed the pr-h-allen-atlas-ras branch from d47cbd7 to 31f7811 Compare April 30, 2026 03:51
@FIrgolitsch FIrgolitsch force-pushed the pr-i-nextflow-workflows branch from 2d467fc to cbafa1b Compare April 30, 2026 03:51
Two fixes that together stop temp zarrs from filling /tmp:

1. Default dir from None (=> tempfile.gettempdir() => /tmp) to '.' (CWD,
   typically the Nextflow task work dir). Even if the temp dir leaks,
   it's reclaimed when the work dir is cleaned, and never lands on
   small /tmp partitions.

2. Replace TemporaryDirectory(...).name (which discards the cleanup
   handle the moment .name is read; cleanup then depends on a fragile
   weakref finalizer that doesn't run on SIGKILL) with mkdtemp() plus
   atexit.register(shutil.rmtree, ..., ignore_errors=True). atexit fires
   on normal interpreter shutdown regardless of which file handles zarr
   still holds open.

Symptom: 14 stale tmp*.zarr dirs (~5 GB) in /tmp on the lab server,
contributing to ENOSPC on /tmp during reconstruction.
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