Mercurial > repos > perssond > s3segmenter
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/s3segmenter.xml Fri Mar 12 00:18:40 2021 +0000 @@ -0,0 +1,155 @@ +<tool id="s3segmenter" name="s3segmenter" version="@VERSION@.3" profile="17.09"> + <description>S3segmenter is a Python-based set of functions that generates single cell (nuclei and cytoplasm) label masks.</description> + <macros> + <import>macros.xml</import> + </macros> + + <expand macro="requirements"/> + @VERSION_CMD@ + + <command detect_errors="exit_code"><![CDATA[ + + ln -s '${imagePath}' ./image.tif; + + #if $contoursClassProbPath + ln -s ${contoursClassProbPath} ./ContoursPM.tif; + #end if + + #if $nucleiClassProbPath + ln -s ${nucleiClassProbPath} ./NucleiPM.tif; + #end if + + #if $stackProbPath + ln -s ${stackProbPath} ./Probabilities.tif; + #end if + + + @CMD_BEGIN@ + --imagePath ./image.tif + + #if $contoursClassProbPath + --contoursClassProbPath ./ContoursPM.tif + #end if + + #if $nucleiClassProbPath + --nucleiClassProbPath ./NucleiPM.tif + #end if + + #if $stackProbPath + --stackProbPath ./Probabilities.tif + #end if + + --mask $mask + --probMapChan $probMapChan + --crop $crop + --cytoMethod $cytoMethod + --nucleiFilter $nucleiFilter + --nucleiRegion $nucleiRegion + --segmentCytoplasm $segmentCytoplasm + --cytoDilation $adv.cytoDilation + --logSigma $adv.logSigma + --CytoMaskChan $adv.CytoMaskChan + ##--TissueMaskChan $adv.TissueMaskChan + --detectPuncta $adv.detectPuncta + --punctaSigma $adv.punctaSigma + --punctaSD $adv.punctaSD + + #if not $saveMask + --saveMask + #end if + + #if not $saveFig + --saveFig + #end if + + --outputPath . + ]]></command> + + + <inputs> + + <param name="imagePath" type="data" format="tiff" label="Image File"/> + <param name="contoursClassProbPath" type="data" format="tiff" optional="true" label="Contours Class Probabilities"/> + <param name="nucleiClassProbPath" type="data" format="tiff" optional="true" label="Nuclei Class Probabilities"/> + <param name="stackProbPath" type="data" format="tiff" optional="true" label="Stack Probabilities"/> + <param name="mask" type="select" label="Choose mask: TMA, tissue, none."> + <option selected="true" value="tissue">tissue</option> + <option value="TMA">TMA</option> + <option value="none">none</option> + </param> + <param name="probMapChan" type="integer" value="-1" label="Probability Maps Channel"/> + <param name="crop" type="select" label="Crop Strategy"> + <option selected="true" value="noCrop">No Crop</option> + <option value="autoCrop">Automatic Crop</option> + <option value="dearray">De-array</option> + <option value="plate">Plate</option> + </param> + <param name="cytoMethod" type="select" label="Cyto Method"> + <option value="hybrid">Hybrid</option> + <option selected="true" value="distanceTransform">Distance Transform</option> + <option value="bwdistanceTransform">BW Distance Transform</option> + <option value="ring">Ring</option> + </param> + <param name="nucleiFilter" type="select" label="Nuclei Filter"> + <option selected="true" value="IntPM">IntPM</option> + <option value="LoG">LoG</option> + <option value="Int">Int</option> + <option value="none">none</option> + </param> + <param name="nucleiRegion" type="select" label="Nuclei Region"> + <option value="watershedContourDist">watershedContourDist</option> + <option selected="true" value="watershedContourInt">watershedContourInt</option> + <option value="watershedBWDist">watershedBWDist</option> + <option value="dilation">dilation</option> + <option value="localThreshold">localThreshold</option> + </param> + <param name="segmentCytoplasm" type="select" label="Segment Cytoplasm"> + <option value="segmentCytoplasm">segmentCytoplasm</option> + <option selected="true" value="ignoreCytoplasm">ignoreCytoplasm</option> + </param> + <param name="saveMask" type="boolean" checked="true" label="Save Mask"/> + <param name="saveFig" type="boolean" checked="true" label="Save Figure"/> + + <section name="adv" title="Advanced Options" expanded="false"> + <param name="cytoDilation" type="integer" value="5" label="Cyto Dilation"/> + <param name="logSigma" type="text" value="3 60" label="logSigma"/> + <param name="CytoMaskChan" type="text" value="1" label="Cyto Mask Channel"/> + <!-- Bug with S3Segmenter code, expects int not list + <param name="TissueMaskChan" type="text" value="-1" label="Tissue Mask Channel"/> + --> + <param name="detectPuncta" type="text" value="-1" label="Detect Puncta"/> + <param name="punctaSigma" type="text" value="1" label="Puncta Sigma"/> + <param name="punctaSD" type="text" value="4" label="Puncta SD"/> + </section> + + + </inputs> + <outputs> + <data format="tiff" name="cell_mask" from_work_dir="*/cellMask.tif" label="cellMasks"> + <filter>saveMask is True</filter> + </data> + <data format="tiff" name="nuclei_mask" from_work_dir="*/nucleiMask.tif" label="nucleiMasks"> + <filter>saveMask is True</filter> + </data> + <data format="tiff" name="cell_outlines" from_work_dir="*/cellOutlines.tif" label="cellOutlines"> + <filter>saveFig is True</filter> + </data> + <data format="tiff" name="nuclei_outlines" from_work_dir="*/nucleiOutlines.tif" label="nucleiOutlines"> + <filter>saveFig is True</filter> + </data> + </outputs> + <help><![CDATA[ +Inputs are: + +1. an .ome.tif (preferably flat field corrected) +2. a 3-class probability maps derived from a deep learning model such as UNet. Classes include background, nuclei contours, and nuclei foreground. + +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. + +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. + +The source repository can be found here: https://github.com/HMS-IDAC/S3segmenter +OHSU Wrapper Repo: https://github.com/ohsu-comp-bio/S3segmenter + ]]></help> + <expand macro="citations" /> +</tool>