Skip to content

Commit

Permalink
Merge pull request #55 from RobJY/mesmer_mpp_mod
Browse files Browse the repository at this point in the history
updated mesmer image-mpp to use pixel_size if available
  • Loading branch information
jmuhlich committed Aug 19, 2024
2 parents 561d2b3 + 344dfd6 commit 86e4f50
Show file tree
Hide file tree
Showing 3 changed files with 224 additions and 63 deletions.
2 changes: 1 addition & 1 deletion conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ process {

withName: "DEEPCELL_MESMER" {
ext.prefix = { "mask_${meta.id}" }
ext.args = '--image-mpp=0.215 --nuclear-channel 0 --compartment nuclear'
ext.args = {"--image-mpp=${params.pixel_size ?: 0.65} --nuclear-channel 0 --compartment nuclear"}
ext.when = {params.segmentation && params.segmentation.split(',').contains('mesmer')}
publishDir = [
path: { "${params.outdir}/segmentation/deepcell_mesmer" },
Expand Down
16 changes: 8 additions & 8 deletions tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ nextflow_workflow {
assert snapshot (
path("$outputDir/registration/ashlar/TEST1.ome.tif"),
path("$outputDir/segmentation/deepcell_mesmer/mask_TEST1.tif"),
CsvUtils.roundAndHashCsv("$outputDir/quantification/mcquant/mesmer/TEST1_mask_TEST1.csv"),
CsvUtils.summarizeCsv("$outputDir/quantification/mcquant/mesmer/TEST1_mask_TEST1.csv"),
).match()
},
{ assert workflow.success }
Expand Down Expand Up @@ -129,7 +129,7 @@ nextflow_workflow {
assert snapshot (
path("$outputDir/registration/ashlar/TEST1.ome.tif"),
path("$outputDir/segmentation/deepcell_mesmer/mask_TEST1.tif"),
CsvUtils.roundAndHashCsv("$outputDir/quantification/mcquant/mesmer/TEST1_mask_TEST1.csv")
CsvUtils.summarizeCsv("$outputDir/quantification/mcquant/mesmer/TEST1_mask_TEST1.csv")
).match()
},
{ assert workflow.success }
Expand Down Expand Up @@ -191,7 +191,7 @@ nextflow_workflow {
assert snapshot (
path("$outputDir/registration/ashlar/cycif-tonsil.ome.tif"),
path("$outputDir/segmentation/deepcell_mesmer/mask_cycif-tonsil.tif"),
CsvUtils.roundAndHashCsv("$outputDir/quantification/mcquant/mesmer/cycif-tonsil_mask_cycif-tonsil.csv")
CsvUtils.summarizeCsv("$outputDir/quantification/mcquant/mesmer/cycif-tonsil_mask_cycif-tonsil.csv")
).match()
},
{ assert workflow.success }
Expand Down Expand Up @@ -257,8 +257,8 @@ nextflow_workflow {
path("$outputDir/registration/ashlar/cycif-tonsil2.ome.tif"),
path("$outputDir/segmentation/deepcell_mesmer/mask_cycif-tonsil.tif"),
path("$outputDir/segmentation/deepcell_mesmer/mask_cycif-tonsil2.tif"),
CsvUtils.roundAndHashCsv("$outputDir/quantification/mcquant/mesmer/cycif-tonsil_mask_cycif-tonsil.csv"),
CsvUtils.roundAndHashCsv("$outputDir/quantification/mcquant/mesmer/cycif-tonsil2_mask_cycif-tonsil2.csv"),
CsvUtils.summarizeCsv("$outputDir/quantification/mcquant/mesmer/cycif-tonsil_mask_cycif-tonsil.csv"),
CsvUtils.summarizeCsv("$outputDir/quantification/mcquant/mesmer/cycif-tonsil2_mask_cycif-tonsil2.csv"),
).match()
},
{ assert workflow.success }
Expand Down Expand Up @@ -326,8 +326,8 @@ nextflow_workflow {
path("$outputDir/segmentation/deepcell_mesmer/mask_cycif-tonsil2.tif"),
path("$outputDir/segmentation/cellpose/cycif-tonsil.ome_cp_masks.tif"),
path("$outputDir/segmentation/cellpose/cycif-tonsil2.ome_cp_masks.tif"),
CsvUtils.roundAndHashCsv("$outputDir/quantification/mcquant/mesmer/cycif-tonsil_mask_cycif-tonsil.csv"),
CsvUtils.roundAndHashCsv("$outputDir/quantification/mcquant/mesmer/cycif-tonsil2_mask_cycif-tonsil2.csv"),
CsvUtils.summarizeCsv("$outputDir/quantification/mcquant/mesmer/cycif-tonsil_mask_cycif-tonsil.csv"),
CsvUtils.summarizeCsv("$outputDir/quantification/mcquant/mesmer/cycif-tonsil2_mask_cycif-tonsil2.csv"),
CsvUtils.roundAndHashCsv("$outputDir/quantification/mcquant/cellpose/cycif-tonsil_cycif-tonsil.csv"),
CsvUtils.roundAndHashCsv("$outputDir/quantification/mcquant/cellpose/cycif-tonsil2_cycif-tonsil2.csv"),
).match()
Expand Down Expand Up @@ -464,7 +464,7 @@ nextflow_workflow {
ImageUtils.getImageMetadata("$outputDir/registration/ashlar/cycif-tonsil.ome.tif"),
ImageUtils.getImageMetadata("$outputDir/registration/ashlar/cycif-tonsil2.ome.tif"),
ImageUtils.getImageMetadata("$outputDir/segmentation/deepcell_mesmer/mask_cycif-tonsil.tif"),
path("$outputDir/segmentation/deepcell_mesmer/mask_cycif-tonsil2.tif"),
ImageUtils.getImageMetadata("$outputDir/segmentation/deepcell_mesmer/mask_cycif-tonsil2.tif"),
CsvUtils.summarizeCsv("$outputDir/quantification/mcquant/mesmer/cycif-tonsil_mask_cycif-tonsil.csv"),
CsvUtils.summarizeCsv("$outputDir/quantification/mcquant/mesmer/cycif-tonsil2_mask_cycif-tonsil2.csv"),
ImageUtils.getImageMetadata("$outputDir/illumination_correction/basicpy/cycif-tonsil-cycle1.ome-dfp.tiff"),
Expand Down
Loading

0 comments on commit 86e4f50

Please sign in to comment.