diff --git a/conf/modules.config b/conf/modules.config index 1bcde4a..1022027 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -207,13 +207,14 @@ process { ext.args = [ "", "--channel_axis 0", "--no_npy", - params.cellpose_save_flows ? "--save_flows" : "", - params.cellpose_diameter ? "--diameter ${params.cellpose_diameter}" : "", - params.cellpose_chan ? "--chan ${params.cellpose_chan}" : "", - params.cellpose_chan2 ? "--chan2 ${params.cellpose_chan2}" : "", - params.cellpose_custom_model ? "" : params.cellpose_pretrained_model ? "--pretrained_model ${params.cellpose_pretrained_model}" : "", - params.cellpose_flow_threshold ? "--flow_threshold ${params.cellpose_flow_threshold}" : "", - params.cellpose_edge_exclude ? "--exclude_on_edges" : "" + params.cellpose_save_flows ? "--save_flows" : "", + params.cellpose_diameter ? "--diameter ${params.cellpose_diameter}" : "", + params.cellpose_chan ? "--chan ${params.cellpose_chan}" : "", + params.cellpose_chan2 ? "--chan2 ${params.cellpose_chan2}" : "", + params.cellpose_custom_model ? "" : params.cellpose_pretrained_model ? "--pretrained_model ${params.cellpose_pretrained_model}" : "", + params.cellpose_flow_threshold ? "--flow_threshold ${params.cellpose_flow_threshold}" : "", + params.cellpose_edge_exclude ? "--exclude_on_edges" : "", + params.cellpose_cellprob_threshold ? "--cellprob_threshold ${params.cellpose_cellprob_threshold}": "" ].join(" ").trim() publishDir = [ path: "${params.outdir}/segmentation/cellpose", diff --git a/nextflow.config b/nextflow.config index 900c616..f6f81a2 100644 --- a/nextflow.config +++ b/nextflow.config @@ -17,14 +17,15 @@ params { segmentation_min_area = null segmentation_max_area = null // cellpose - cellpose_save_flows = false - cellpose_diameter = 30 - cellpose_chan = 0 - cellpose_chan2 = null - cellpose_pretrained_model = 'cyto' - cellpose_custom_model = null - cellpose_flow_threshold = 0.4 - cellpose_edge_exclude = true + cellpose_save_flows = false + cellpose_diameter = 30 + cellpose_chan = 0 + cellpose_chan2 = null + cellpose_pretrained_model = 'cyto' + cellpose_custom_model = null + cellpose_flow_threshold = 0.4 + cellpose_edge_exclude = true + cellpose_cellprob_threshold = 0 // mesmer mesmer_image_mpp = 0.138 mesmer_compartment = 'whole-cell' diff --git a/nextflow_schema.json b/nextflow_schema.json index 29145b0..e90350e 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -70,8 +70,13 @@ "cellpose_save_flows": { "type": "boolean", "description": "Should flow fields from Cellpose be saved?", - "fa_icon": "fas fa-arrows-alt", - "hidden": true + "fa_icon": "fas fa-arrows-alt" + }, + "cellpose_cellprob_threshold": { + "type": "integer", + "default": 0, + "fa_icon": "fas fa-border-style", + "description": "Cell probability threshold for Cellpose" }, "mesmer_image_mpp": { "type": "number", @@ -164,7 +169,7 @@ }, "clahe_kernel": { "type": "number", - "default": 25.0, + "default": 25, "description": "Kernel size to be used by CLAHE.", "fa_icon": "far fa-object-group" },