Skip to content

Conversation

@tckumarasekara
Copy link

@tckumarasekara tckumarasekara commented Jan 26, 2026

This PR adds,

  • stainwarpy/extractchannel

stainwarpy
modules for registration of H&E tissue images with their corresponding multiplexed images and to transform the segmentation masks of one image type to be able to use with the other type.

  • As first step, stainwarpy/extractchannel extracts the alignable channel (preferably DAPI) from multiplexed image.
  • As second step, stainwarpy/register registers H&E and multiplexed images and output the registered image, transformation maps and evaluation metrics for the registration performed.
  • As third step, stainwarpy/transformsegmask transforms the segmentation mask of one image using the transformation maps created from the second module.

PR checklist

Closes #9701

  • This comment contains a description of changes (with reason).
  • If you've fixed a bug or added code that should be tested, add tests!
  • If you've added a new tool - have you followed the module conventions in the contribution docs
  • If necessary, include test data in your PR.
  • Remove all TODO statements.
  • Broadcast software version numbers to topic: versions - See version_topics
  • Follow the naming conventions.
  • Follow the parameters requirements.
  • Follow the input/output options guidelines.
  • Add a resource label
  • Use BioConda and BioContainers if possible to fulfil software requirements.
  • 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
      • nf-core modules test <MODULE> --profile conda
    • For subworkflows:
      • nf-core subworkflows test <SUBWORKFLOW> --profile docker
      • nf-core subworkflows test <SUBWORKFLOW> --profile singularity
      • nf-core subworkflows test <SUBWORKFLOW> --profile conda

@tckumarasekara tckumarasekara changed the title Adding new module stainwarpy/extractchannel Add new module stainwarpy/extractchannel Jan 27, 2026
Copy link
Contributor

@itrujnara itrujnara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, the module already looks quite good. I have left some questions to consider. They probably apply to the other subcommand modules as well.

assertAll(
{ assert process.success },
{ assert snapshot(
file(process.out.single_ch_image.get(0).get(1)).exists(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the file in question indeterministic? Is there any data in the channel that is not checked here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, yes, the output file is non-deterministic between runs due to metadata (ef: UUIDs) and minor floating-point differences. This is the case for the other modules also. This module emits just one file in a tuple.

type: file
description: Single channel extracted image file in OME-TIFF format
pattern: "multiplexed_single_channel_img.ome.tif"
ontologies: []
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the correct ontology?
https://edamontology.github.io/edam-browser/#format_3727
Keep in mind that there have been some issues with the ontology server, so linting/CI might misbehave.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, thank you. I`ll update the meta.yml

label 'process_single'

conda "${moduleDir}/environment.yml"
container "community.wave.seqera.io/library/stainwarpy:0.2.3--2c8b18a5e6d93e4a"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a link to a dedicated Singularity container?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I`ll add that, thanks.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and I realized I accidentally pushed some branches (pr-extractchannel, pr-register, pr-transformsegmask) to this repository (nf-core/modules). Could these be safely removed? This won’t affect the PR itself. Thanks a lot!

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.

new modules: stainwarpy/extractchannel

2 participants