Skip to content

Commit 749aab4

Browse files
committed
changes for cell or nucleus segmentation
1 parent 488989d commit 749aab4

File tree

5 files changed

+29
-5
lines changed

5 files changed

+29
-5
lines changed

modules/nf-core/cellpose/cellpose.diff

Lines changed: 17 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nextflow.config

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ params {
2222

2323
// execution specific
2424
sharpen_tiff = false // wether to sharpen the morphology-focus tiff
25-
nucleus_segmentation_only = false // to only run nucleus segmentation while running XR_IMP-SEG
25+
nucleus_segmentation_only = false // to only run nucleus segmentation while running segmentation methods & XR_IMP-SEG
26+
cell_segmentation_only = true // to only run cell segmentation while running segmentation methods & XR_IMP-SEG
2627

2728
// Xeniumranger specific
2829
xeniumranger_only = false // to generate redefined bundle with just changing the xr specific params

subworkflows/local/cellpose_baysor_import_segmentation/main.nf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ workflow CELLPOSE_BAYSOR_IMPORT_SEGMENTATION {
2020
ch_versions = Channel.empty()
2121

2222
// run cellpose to generate segmentation mask
23-
CELLPOSE ( ch_morphology_image, [])
23+
CELLPOSE ( ch_morphology_image, [], [])
2424
ch_versions = ch_versions.mix ( CELLPOSE.out.versions )
2525

2626

subworkflows/local/cellpose_resolift_morphology_ome_tif/main.nf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ workflow CELLPOSE_RESOLIFT_MORPHOLOGY_OME_TIF {
2828

2929
// run cellpose on the enhanced tiff
3030
CELLPOSE_CELLS ( RESOLIFT.out.enhanced_tiff, cellpose_model, 'cells' )
31-
ch_versions = ch_versions.mix( CELLPOSE.out.versions )
31+
ch_versions = ch_versions.mix( CELLPOSE_CELLS.out.versions )
3232

3333
CELLPOSE_NUCLEI ( RESOLIFT.out.enhanced_tiff, 'nuclei', 'nuclei' )
3434
ch_versions = ch_versions.mix( CELLPOSE_NUCLEI.out.versions )

workflows/spatialxe.nf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,14 @@ workflow SPATIALXE {
153153
)
154154
}
155155

156+
// get custom cellpose model if provided with the --cellpose_model for the cellpose method
157+
if ( params.cellpose_model ) {
158+
ch_features = Channel.fromPath (
159+
params.cellpose_model,
160+
checkIfExists: true
161+
)
162+
}
163+
156164
// get gene_panel.json if provided with --gene_panel, sets relabel_genes to true
157165
if (( params.gene_panel )) {
158166

0 commit comments

Comments
 (0)