Skip to content

[update] xeniumranger import segemtnation - #12421

Merged
heylf merged 15 commits into
nf-core:masterfrom
heylf:update_xeniumranger
Jul 28, 2026
Merged

[update] xeniumranger import segemtnation#12421
heylf merged 15 commits into
nf-core:masterfrom
heylf:update_xeniumranger

Conversation

@heylf

@heylf heylf commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Add expansion_distance parameter to xeniumranger/import-segmentation

What changed

  • New optional expansion_distance input: the module now accepts an
    expansion_distance value (integer, microns) in the input tuple and passes it to
    xeniumranger as --expansion-distance=<value> when provided.
  • Guarded by nuclei: the flag is only emitted when a nuclei segmentation file
    is also supplied. xeniumranger rejects --expansion-distance for
    transcript-assignment imports (proseg/baysor/segger) and cells-only imports, since
    expansion only makes sense when expanding nuclei into cell boundaries.
  • Tests updated: both nf-test cases in tests/main.nf.test now pass 5 as the
    expansion_distance argument to match the new process input signature.
  • Changing name from import-segementation to importsegmentation: To follow the rule: Module name should not have any punctuation.

Why

--expansion-distance controls how far nuclei are expanded outward to approximate
cell boundaries, so it only applies to nuclei-based imports. Passing it unconditionally
would break transcript-assignment and cells-only import runs, since xeniumranger
errors out when the flag is used without --nuclei. Making the flag conditional keeps
all three import modes working from a single process definition.

Testing

  • Updated the two existing nf-test snapshot tests in
    modules/nf-core/xeniumranger/import-segmentation/tests/main.nf.test to supply the
    new expansion_distance value, keeping them in sync with the updated input tuple.

Files changed

  • modules/nf-core/xeniumranger/import-segmentation/main.nf
  • modules/nf-core/xeniumranger/import-segmentation/meta.yml
  • modules/nf-core/xeniumranger/import-segmentation/tests/main.nf.test

PR checklist

Linked to issue: nf-core/spatialaxe issue #186

  • This comment contains a description of changes (with reason).
  • If you've fixed a bug or added code that should be tested, add tests!
  • Follow the naming conventions.
  • Follow the parameters requirements.
  • Follow the input/output options guidelines.
  • Add a resource label
  • Ensure that the test works with either Docker / Singularity. Conda CI tests can be quite flaky:
    • For modules:
      • nf-core modules test <MODULE> --profile docker
      • nf-core modules test <MODULE> --profile singularity

Comment thread modules/nf-core/xeniumranger/import-segmentation/main.nf Outdated
Comment thread modules/nf-core/xeniumranger/import-segmentation/meta.yml Outdated
@heylf
heylf requested review from a team as code owners July 24, 2026 10:18
Comment thread modules/nf-core/xeniumranger/importsegmentation/tests/nextflow.config Outdated
@heylf
heylf added this pull request to the merge queue Jul 28, 2026
Merged via the queue into nf-core:master with commit 124f2c8 Jul 28, 2026
23 checks passed
@heylf
heylf deleted the update_xeniumranger branch July 28, 2026 07:49
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.

2 participants