-
Notifications
You must be signed in to change notification settings - Fork 865
Add Vizgenpostprocessing/preparesegmentation module #8575
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add Vizgenpostprocessing/preparesegmentation module #8575
Conversation
Snapshots will not match because it contains a timestamp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution.
There is a few modification to make it more nf-core like.
modules/nf-core/vizgenpostprocessing/preparesegmentation/main.nf
Outdated
Show resolved
Hide resolved
modules/nf-core/vizgenpostprocessing/preparesegmentation/main.nf
Outdated
Show resolved
Hide resolved
modules/nf-core/vizgenpostprocessing/preparesegmentation/main.nf
Outdated
Show resolved
Hide resolved
modules/nf-core/vizgenpostprocessing/preparesegmentation/main.nf
Outdated
Show resolved
Hide resolved
modules/nf-core/vizgenpostprocessing/preparesegmentation/main.nf
Outdated
Show resolved
Hide resolved
modules/nf-core/vizgenpostprocessing/preparesegmentation/main.nf
Outdated
Show resolved
Hide resolved
modules/nf-core/vizgenpostprocessing/preparesegmentation/meta.yml
Outdated
Show resolved
Hide resolved
modules/nf-core/vizgenpostprocessing/preparesegmentation/tests/main.nf.test
Outdated
Show resolved
Hide resolved
modules/nf-core/vizgenpostprocessing/preparesegmentation/tests/main.nf.test
Outdated
Show resolved
Hide resolved
Co-authored-by: Louis Le Nézet <[email protected]>
…/main.nf.test Co-authored-by: Louis Le Nézet <[email protected]>
Co-authored-by: Louis Le Nézet <[email protected]>
Thanks you @LouisLeNezet for the review! I've implemented your suggestions. I am getting CI fails now due to an unrelated module. Do you have any suggestions here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing the modules, this is much better !
Just a few comments before merging.
For the CI fail, something bad migth have happen in another PR.
We will look into it.
tuple val(meta), path("*/*.json"), emit: segmentation_files | ||
path "versions.yml" , emit: versions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tuple val(meta), path("*/*.json"), emit: segmentation_files | |
path "versions.yml" , emit: versions | |
tuple val(meta), path("${prefix}/*.json"), emit: segmentation_files | |
path "versions.yml" , emit: versions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using prefix here isn't passing nf-test, I'm not sure why:
╭──────────────────────────────────── nf-test error ────────────────────────────────────╮
│ Assertion failed: │
│ │
│ assert process.success │
│ | | │
│ | false │
│ VIZGENPOSTPROCESSING_PREPARESEGMENTATION │
│ │
│ java.lang.NullPointerException: Cannot invoke method getAt() on null object │
│ Assertion failed: │
│ │
│ assert process.success │
│ | | │
│ | false │
│ VIZGENPOSTPROCESSING_PREPARESEGMENTATION │
│ │
│ java.lang.NullPointerException │
│ │
╰───────────────────────────────────────────────────────────────────────────────────────╯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's strange, it means that the process didn't found the folder "$prefix/".
Is it really created as such ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried locally and didn't had any issue...
You need to also remove the def
from def prefix = ...
output:
tuple val(meta), path("${prefix}/*.json"), emit: segmentation_files
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
...
prefix = task.ext.prefix ?: "${meta.id}"
...
stub:
...
prefix = task.ext.prefix ?: "${meta.id}"
description: | | ||
Groovy Map containing sample information | ||
e.g. `[ id:'sample1', single_end:false ]` | ||
- "*/*.json": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- "*/*.json": | |
- "${prefix}/*.json": |
modules/nf-core/vizgenpostprocessing/preparesegmentation/tests/main.nf.test
Show resolved
Hide resolved
modules/nf-core/vizgenpostprocessing/preparesegmentation/tests/main.nf.test
Outdated
Show resolved
Hide resolved
Co-authored-by: Louis Le Nézet <[email protected]>
Co-authored-by: Louis Le Nézet <[email protected]>
PR checklist
Closes #8441
versions.yml
file.label
nf-core modules test <MODULE> --profile docker
nf-core modules test <MODULE> --profile singularity
nf-core modules test <MODULE> --profile conda
nf-core subworkflows test <SUBWORKFLOW> --profile docker
nf-core subworkflows test <SUBWORKFLOW> --profile singularity
nf-core subworkflows test <SUBWORKFLOW> --profile conda
This PR adds the
preparesegmentation
process for cell segmentation using the vizgen-postprocessing tool for the MERSCOPE spatial omics instrument. The plan would be to addrunsegmentationontile
andcompiletilesegmentation
as subsequent modules to create a segmentation subworkflow for the tool.The test data is prepared within the test module, using generated dummy data plus an existing segmentation image in
nf-core/test-datasets
, which needs to be renamed and put in an images directory to work with this module.I could not find a BioContainer or BioConda package for this tool.