comparison s3segmenter.xml @ 0:37acf42a824b draft

"planemo upload for repository https://github.com/ohsu-comp-bio/S3segmenter commit d89a61efd4c465a1e6bf5b99b0f78fb19be5bdea-dirty"
author perssond
date Fri, 12 Mar 2021 00:18:40 +0000
parents
children 41e8efe8df43
comparison
equal deleted inserted replaced
-1:000000000000 0:37acf42a824b
1 <tool id="s3segmenter" name="s3segmenter" version="@VERSION@.3" profile="17.09">
2 <description>S3segmenter is a Python-based set of functions that generates single cell (nuclei and cytoplasm) label masks.</description>
3 <macros>
4 <import>macros.xml</import>
5 </macros>
6
7 <expand macro="requirements"/>
8 @VERSION_CMD@
9
10 <command detect_errors="exit_code"><![CDATA[
11
12 ln -s '${imagePath}' ./image.tif;
13
14 #if $contoursClassProbPath
15 ln -s ${contoursClassProbPath} ./ContoursPM.tif;
16 #end if
17
18 #if $nucleiClassProbPath
19 ln -s ${nucleiClassProbPath} ./NucleiPM.tif;
20 #end if
21
22 #if $stackProbPath
23 ln -s ${stackProbPath} ./Probabilities.tif;
24 #end if
25
26
27 @CMD_BEGIN@
28 --imagePath ./image.tif
29
30 #if $contoursClassProbPath
31 --contoursClassProbPath ./ContoursPM.tif
32 #end if
33
34 #if $nucleiClassProbPath
35 --nucleiClassProbPath ./NucleiPM.tif
36 #end if
37
38 #if $stackProbPath
39 --stackProbPath ./Probabilities.tif
40 #end if
41
42 --mask $mask
43 --probMapChan $probMapChan
44 --crop $crop
45 --cytoMethod $cytoMethod
46 --nucleiFilter $nucleiFilter
47 --nucleiRegion $nucleiRegion
48 --segmentCytoplasm $segmentCytoplasm
49 --cytoDilation $adv.cytoDilation
50 --logSigma $adv.logSigma
51 --CytoMaskChan $adv.CytoMaskChan
52 ##--TissueMaskChan $adv.TissueMaskChan
53 --detectPuncta $adv.detectPuncta
54 --punctaSigma $adv.punctaSigma
55 --punctaSD $adv.punctaSD
56
57 #if not $saveMask
58 --saveMask
59 #end if
60
61 #if not $saveFig
62 --saveFig
63 #end if
64
65 --outputPath .
66 ]]></command>
67
68
69 <inputs>
70
71 <param name="imagePath" type="data" format="tiff" label="Image File"/>
72 <param name="contoursClassProbPath" type="data" format="tiff" optional="true" label="Contours Class Probabilities"/>
73 <param name="nucleiClassProbPath" type="data" format="tiff" optional="true" label="Nuclei Class Probabilities"/>
74 <param name="stackProbPath" type="data" format="tiff" optional="true" label="Stack Probabilities"/>
75 <param name="mask" type="select" label="Choose mask: TMA, tissue, none.">
76 <option selected="true" value="tissue">tissue</option>
77 <option value="TMA">TMA</option>
78 <option value="none">none</option>
79 </param>
80 <param name="probMapChan" type="integer" value="-1" label="Probability Maps Channel"/>
81 <param name="crop" type="select" label="Crop Strategy">
82 <option selected="true" value="noCrop">No Crop</option>
83 <option value="autoCrop">Automatic Crop</option>
84 <option value="dearray">De-array</option>
85 <option value="plate">Plate</option>
86 </param>
87 <param name="cytoMethod" type="select" label="Cyto Method">
88 <option value="hybrid">Hybrid</option>
89 <option selected="true" value="distanceTransform">Distance Transform</option>
90 <option value="bwdistanceTransform">BW Distance Transform</option>
91 <option value="ring">Ring</option>
92 </param>
93 <param name="nucleiFilter" type="select" label="Nuclei Filter">
94 <option selected="true" value="IntPM">IntPM</option>
95 <option value="LoG">LoG</option>
96 <option value="Int">Int</option>
97 <option value="none">none</option>
98 </param>
99 <param name="nucleiRegion" type="select" label="Nuclei Region">
100 <option value="watershedContourDist">watershedContourDist</option>
101 <option selected="true" value="watershedContourInt">watershedContourInt</option>
102 <option value="watershedBWDist">watershedBWDist</option>
103 <option value="dilation">dilation</option>
104 <option value="localThreshold">localThreshold</option>
105 </param>
106 <param name="segmentCytoplasm" type="select" label="Segment Cytoplasm">
107 <option value="segmentCytoplasm">segmentCytoplasm</option>
108 <option selected="true" value="ignoreCytoplasm">ignoreCytoplasm</option>
109 </param>
110 <param name="saveMask" type="boolean" checked="true" label="Save Mask"/>
111 <param name="saveFig" type="boolean" checked="true" label="Save Figure"/>
112
113 <section name="adv" title="Advanced Options" expanded="false">
114 <param name="cytoDilation" type="integer" value="5" label="Cyto Dilation"/>
115 <param name="logSigma" type="text" value="3 60" label="logSigma"/>
116 <param name="CytoMaskChan" type="text" value="1" label="Cyto Mask Channel"/>
117 <!-- Bug with S3Segmenter code, expects int not list
118 <param name="TissueMaskChan" type="text" value="-1" label="Tissue Mask Channel"/>
119 -->
120 <param name="detectPuncta" type="text" value="-1" label="Detect Puncta"/>
121 <param name="punctaSigma" type="text" value="1" label="Puncta Sigma"/>
122 <param name="punctaSD" type="text" value="4" label="Puncta SD"/>
123 </section>
124
125
126 </inputs>
127 <outputs>
128 <data format="tiff" name="cell_mask" from_work_dir="*/cellMask.tif" label="cellMasks">
129 <filter>saveMask is True</filter>
130 </data>
131 <data format="tiff" name="nuclei_mask" from_work_dir="*/nucleiMask.tif" label="nucleiMasks">
132 <filter>saveMask is True</filter>
133 </data>
134 <data format="tiff" name="cell_outlines" from_work_dir="*/cellOutlines.tif" label="cellOutlines">
135 <filter>saveFig is True</filter>
136 </data>
137 <data format="tiff" name="nuclei_outlines" from_work_dir="*/nucleiOutlines.tif" label="nucleiOutlines">
138 <filter>saveFig is True</filter>
139 </data>
140 </outputs>
141 <help><![CDATA[
142 Inputs are:
143
144 1. an .ome.tif (preferably flat field corrected)
145 2. a 3-class probability maps derived from a deep learning model such as UNet. Classes include background, nuclei contours, and nuclei foreground.
146
147 The centers of each nuclei are obtained by finding local maxima from the nuclei foreground. These are used for marker-controlled watershed constrained by the nuclei contours.
148
149 To segment cytoplasm, the nuclei are in turn used for a marker-controlled watershed segmentation constrained by a cytoplasmic marker such as B-catenin. The channel number of this marker must be specified. A 3-pixel annulus around each nucleus will also be used to segment cytoplasm.
150
151 The source repository can be found here: https://github.com/HMS-IDAC/S3segmenter
152 OHSU Wrapper Repo: https://github.com/ohsu-comp-bio/S3segmenter
153 ]]></help>
154 <expand macro="citations" />
155 </tool>