comparison cellpose.xml @ 6:6b840482cc25 draft default tip

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/cellpose commit 3f2ba60f101c923896ca95ed62981fcbb0a5ced3
author bgruening
date Fri, 12 Dec 2025 12:36:41 +0000
parents 5251ce4c4a11
children
comparison
equal deleted inserted replaced
5:5251ce4c4a11 6:6b840482cc25
1 <tool id="cellpose" name="Run generalist cell and nucleus segmentation" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="23.02"> 1 <tool id="cellpose" name="Run generalist cell and nucleus segmentation" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="23.02">
2 <description>with Cellpose</description> 2 <description>with Cellpose 3</description>
3 <macros> 3 <macros>
4 <token name="@TOOL_VERSION@">3.1.0</token> 4 <token name="@TOOL_VERSION@">3.1.0</token>
5 <token name="@VERSION_SUFFIX@">1</token> 5 <token name="@VERSION_SUFFIX@">2</token>
6 <xml name="channel">
7 <option value="0" selected="true">grayscale/None</option>
8 <option value="1">red</option>
9 <option value="2">green</option>
10 <option value="3">blue</option>
11 </xml>
12 </macros> 6 </macros>
13 <requirements> 7 <requirements>
14 <container type="docker">quay.io/biocontainers/cellpose:@TOOL_VERSION@</container> 8 <container type="docker">quay.io/biocontainers/cellpose:@TOOL_VERSION@</container>
15 </requirements> 9 </requirements>
16 <stdio> 10 <stdio>
25 ln -s '${img_in}' ./image.${img_in.ext} && 19 ln -s '${img_in}' ./image.${img_in.ext} &&
26 20
27 python '$__tool_directory__/cp_segmentation.py' 21 python '$__tool_directory__/cp_segmentation.py'
28 --inputs '$inputs' 22 --inputs '$inputs'
29 --img_path ./image.${img_in.ext} 23 --img_path ./image.${img_in.ext}
30 --img_format '${img_in.ext}'
31 --output_dir ./segmentation 24 --output_dir ./segmentation
32 ]]> 25 ]]>
33 </command> 26 </command>
34 <configfiles> 27 <configfiles>
35 <inputs name="inputs" /> 28 <inputs name="inputs" />
36 </configfiles> 29 </configfiles>
37 <inputs> 30 <inputs>
38 <param name="img_in" type="data" format="ome.tiff,tiff,jpg,png" label="Choose the image file for segmention (usually after registration)"/> 31 <param name="img_in" type="data" format="ome.tiff,tiff,jpg,png" label="Choose the image file for segmentation (usually after registration)">
32 <validator type="dataset_metadata_in_range" metadata_name="channels" min="0" max="1" message="Input image is not single channel."/>
33 <validator type="dataset_metadata_in_range" metadata_name="frames" min="0" max="1" message="Input image is a multi-frame image sequence, must be a single-frame image."/>
34 </param>
39 <param name="model_type" type="select" label="Choose the pre-trained model type"> 35 <param name="model_type" type="select" label="Choose the pre-trained model type">
40 <option value="nuclei" selected="true">nuclei</option> 36 <option value="nuclei" selected="true">nuclei</option>
41 <option value="cyto">cyto</option> 37 <option value="cyto">cyto</option>
42 <option value="cyto2">cyto2</option> 38 <option value="cyto2">cyto2</option>
43 <option value="cyto3">cyto3</option> 39 <option value="cyto3">cyto3</option>
44 </param> 40 </param>
45 <param argument="chan" type="select" label="Select the channel to segment" help="In this case, the default is grayscale">
46 <expand macro="channel"/>
47 </param>
48 <param argument="chan2" type="select" optional="true" label="Select the channel for nuclei segmatation" help="In this case, the default is None">
49 <expand macro="channel"/>
50 </param>
51 <param name="chan_first" type="boolean" truevalue="booltrue" falsevalue="boolfalse" checked="false" label="Use the reshaped data with channel as the first dimension?"/>
52 <param name="show_segmentation" type="boolean" truevalue="booltrue" falsevalue="boolfalse" checked="true" label="Whether to show segmentation?"/> 41 <param name="show_segmentation" type="boolean" truevalue="booltrue" falsevalue="boolfalse" checked="true" label="Whether to show segmentation?"/>
53 <param name="use_gpu" type="boolean" truevalue="booltrue" falsevalue="boolfalse" checked="false" label="Whether to use GPU?" /> 42 <param name="use_gpu" type="boolean" truevalue="booltrue" falsevalue="boolfalse" checked="false" label="Whether to use GPU?" />
54 <section name="options" title="Advanced Options" expanded="False"> 43 <section name="options" title="Advanced Options" expanded="False">
55 <param argument="diameter" type="float" optional="true" label="Cell or nuclei diameter in pixels" help="Leave blank for automated estimation."/> 44 <param argument="diameter" type="float" optional="true" label="Cell or nuclei diameter in pixels" help="Leave blank for automated estimation."/>
56 <param name="resample" type="boolean" truevalue="booltrue" falsevalue="boolfalse" checked="true" label="Run dynamics on the resampled image?" 45 <param name="resample" type="boolean" truevalue="booltrue" falsevalue="boolfalse" checked="true" label="Run dynamics on the resampled image?"
70 <filter>show_segmentation</filter> 59 <filter>show_segmentation</filter>
71 </data> 60 </data>
72 </outputs> 61 </outputs>
73 <tests> 62 <tests>
74 <test expect_num_outputs="2"> 63 <test expect_num_outputs="2">
75 <param name="img_in" value="img02.png"/> 64 <param name="img_in" value="img01_XY_cyto.png"/>
76 <param name="model_type" value="cyto"/> 65 <param name="model_type" value="cyto"/>
77 <param name="chan" value="2"/> 66 <output name="cp_mask" file="img01_XY_cyto_masks.tiff" compare="image_diff"/>
78 <param name="chan2" value="3"/> 67 <output name="cp_segm" file="img01_XY_cyto_segm.png" compare="image_diff"/>
79 <output name="cp_mask" file="img02_cp_masks_cyto.tif" compare="image_diff"/>
80 <output name="cp_segm" file="img02_cp_segm_cyto.png" compare="image_diff"/>
81 </test> 68 </test>
82 <test expect_num_outputs="2"> 69 <test expect_num_outputs="2">
83 <param name="img_in" value="img02.png"/> 70 <param name="img_in" value="img01_XY_cyto.png"/>
84 <param name="model_type" value="cyto2"/> 71 <param name="model_type" value="cyto2"/>
85 <param name="chan" value="2"/> 72 <output name="cp_mask" file="img01_XY_cyto2_masks.tiff" compare="image_diff"/>
86 <param name="chan2" value="3"/> 73 <output name="cp_segm" file="img01_XY_cyto2_segm.png" compare="image_diff"/>
87 <output name="cp_mask" file="img02_cp_masks_cyto2.tif" compare="image_diff"/>
88 <output name="cp_segm" file="img02_cp_segm_cyto2.png" compare="image_diff"/>
89 </test> 74 </test>
90 <test expect_num_outputs="2"> 75 <test expect_num_outputs="2">
91 <param name="img_in" value="img02.png"/> 76 <param name="img_in" value="img01_XY_cyto.png"/>
92 <param name="model_type" value="cyto3"/> 77 <param name="model_type" value="cyto3"/>
93 <param name="chan" value="2"/> 78 <output name="cp_mask" file="img01_XY_cyto3_masks.tiff" compare="image_diff"/>
94 <param name="chan2" value="3"/> 79 <output name="cp_segm" file="img01_XY_cyto3_segm.png" compare="image_diff"/>
95 <output name="cp_mask" file="img02_cp_masks_cyto3.tif" compare="image_diff"/>
96 <output name="cp_segm" file="img02_cp_segm_cyto3.png" compare="image_diff"/>
97 </test> 80 </test>
98 <test expect_num_outputs="2"> 81 <test expect_num_outputs="2">
99 <param name="img_in" value="img02.png"/> 82 <param name="img_in" value="img02_XY_nuclei.png"/>
100 <param name="model_type" value="nuclei"/> 83 <param name="model_type" value="nuclei"/>
101 <param name="chan" value="2"/> 84 <output name="cp_mask" file="img02_XY_nuclei_masks.tiff" compare="image_diff"/>
102 <param name="chan2" value="3"/> 85 <output name="cp_segm" file="img02_XY_nuclei_segm.png" compare="image_diff"/>
103 <output name="cp_mask" file="img02_cp_masks_nuclei.tif" compare="image_diff"/>
104 <output name="cp_segm" file="img02_cp_segm_nuclei.png" compare="image_diff"/>
105 </test> 86 </test>
106 <test expect_num_outputs="2"> 87 <test expect_num_outputs="2">
107 <param name="img_in" value="img02.png"/> 88 <param name="img_in" value="img01_XY_cyto.png"/>
108 <param name="model_type" value="cyto"/> 89 <param name="model_type" value="cyto"/>
109 <param name="chan" value="2"/>
110 <param name="chan2" value="1"/>
111 <output name="cp_mask" file="img02_cp_masks_chan.tif" compare="image_diff"/>
112 <output name="cp_segm" file="img02_cp_segm_chan.png" compare="image_diff"/>
113 </test>
114 <test expect_num_outputs="2">
115 <param name="img_in" value="img02.png"/>
116 <param name="model_type" value="cyto"/>
117 <param name="chan" value="2"/>
118 <param name="chan2" value="3"/>
119 <section name="options"> 90 <section name="options">
120 <param name="diameter" value="50"/> 91 <param name="diameter" value="50"/>
121 </section> 92 </section>
122 <output name="cp_mask" file="img02_cp_masks_diameter.tif" compare="image_diff"/> 93 <output name="cp_mask" file="img01_XY_cyto_dia_masks.tiff" compare="image_diff"/>
123 <output name="cp_segm" file="img02_cp_segm_diameter.png" compare="image_diff"/> 94 <output name="cp_segm" file="img01_XY_cyto_dia_segm.png" compare="image_diff"/>
124 </test> 95 </test>
125 <test expect_num_outputs="2"> 96 <test expect_num_outputs="2">
126 <param name="img_in" value="img02.png"/> 97 <param name="img_in" value="img01_XY_cyto.png"/>
127 <param name="use_gpu" value="true"/> 98 <param name="use_gpu" value="true"/>
128 <param name="model_type" value="cyto"/> 99 <param name="model_type" value="cyto"/>
129 <param name="chan" value="2"/> 100 <output name="cp_mask" file="img01_XY_cyto_gpu_masks.tiff" compare="image_diff"/>
130 <param name="chan2" value="3"/> 101 <output name="cp_segm" file="img01_XY_cyto_gpu_segm.png" compare="image_diff"/>
131 <output name="cp_mask" file="img02_cp_masks_gpu.tif" compare="image_diff"/>
132 <output name="cp_segm" file="img02_cp_segm_gpu.png" compare="image_diff"/>
133 </test> 102 </test>
134 <test expect_num_outputs="1"> 103 <test expect_num_outputs="1">
135 <param name="img_in" value="img02.png"/> 104 <param name="img_in" value="img01_XY_cyto.png"/>
136 <param name="model_type" value="cyto"/> 105 <param name="model_type" value="cyto"/>
137 <param name="chan" value="2"/>
138 <param name="chan2" value="3"/>
139 <param name="show_segmentation" value="false"/> 106 <param name="show_segmentation" value="false"/>
140 <output name="cp_mask" file="img02_cp_masks_cyto.tif" compare="image_diff"/> 107 <output name="cp_mask" file="img01_XY_cyto_masks.tiff" compare="image_diff"/>
108 </test>
109 <test expect_num_outputs="2">
110 <param name="img_in" value="img03_CXY_nuclei.tiff"/>
111 <param name="model_type" value="nuclei"/>
112 <output name="cp_mask" file="img03_CXY_nuclei_masks.tiff" compare="image_diff"/>
113 <output name="cp_segm" file="img03_CXY_nuclei_segm.png" compare="image_diff"/>
114 </test>
115 <test expect_num_outputs="2">
116 <param name="img_in" value="img04_XYC_nuclei.tiff"/>
117 <param name="model_type" value="nuclei"/>
118 <output name="cp_mask" file="img04_XYC_nuclei_masks.tiff" compare="image_diff"/>
119 <output name="cp_segm" file="img04_XYC_nuclei_segm.png" compare="image_diff"/>
141 </test> 120 </test>
142 </tests> 121 </tests>
143 <help> 122 <help>
144 <![CDATA[ 123 <![CDATA[
145 Cellpose: A generalist algorithm for cell and nucleus segmentation. 124 Cellpose: A generalist algorithm for cell and nucleus segmentation.
125 **Important:**
126 Only singlechannel 2-D images are supported. If a channel axis is present, it must be a singleton axis (axis of length 1) and it must be either the first or the last axis within the axes layout (e.g., YX, YXC, or CYX). Other layouts are not accepted (e.g. CYXZ, XYCZ).
127 In case of multichannel images, it is necessary to priorly extract the channel for segmentation using the `Split image along axes`_ tool.
128
129 .. _Split image along axes: ?tool_id=toolshed.g2.bx.psu.edu%2Frepos%2Fimgteam%2Fsplit_image%2Fip_split_image
146 ]]> 130 ]]>
147 </help> 131 </help>
148 <citations> 132 <citations>
149 <citation type="doi">10.1101/2020.02.02.931238</citation> 133 <citation type="doi">10.1101/2020.02.02.931238</citation>
150 </citations> 134 </citations>