view coreograph.xml @ 3:ee92746d141a draft default tip

planemo upload for repository https://github.com/ohsu-comp-bio/UNetCoreograph commit 72a33d7c3ad18e717ec61c6b845099d69b9b7abd
author goeckslab
date Tue, 20 Sep 2022 17:34:36 +0000
parents 224e0cf4aaeb
children
line wrap: on
line source

<tool id="unet_coreograph" name="UNetCoreograph" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="19.01">
    <description>TMA core detection and dearraying</description>
    <macros>
        <import>macros.xml</import>
    </macros>
 
    <expand macro="requirements"/>
    <expand macro="version_cmd"/>

    <command detect_errors="aggressive"><![CDATA[
        #set $type_corrected = 'image.' + str($source_image.file_ext)
        ln -s '$source_image' '$type_corrected' &&
        
        @CMD_BEGIN@

        python \$UNET_PATH
        --imagePath '$type_corrected'
        --downsampleFactor $downsamplefactor
        --channel $channel
        --buffer $buffer
        --sensitivity $sensitivity
        $cluster
        $tissue
        --outputPath '.'
        
    ]]></command>


    <inputs>
        <param name="source_image" type="data" format="tiff,ome.tiff" label="Registered TIFF"/>
        <param name="downsamplefactor" type="integer" value="5" label="Down Sample Factor"/>
        <param name="channel" type="integer" value="0" label="Channel"/>
        <param name="buffer" type="float" value="2.0" label="Buffer"/>
        <param name="sensitivity" type="float" value="0.3" label="Sensitivity"/>
        <param name="cluster" type="boolean" truevalue="--cluster" falsevalue="" checked="false" label="Cluster"/>
        <param name="tissue" type="boolean" truevalue="--tissue" falsevalue="" checked="false" label="Tissue"/>
    </inputs>

    <outputs>
        <collection name="tma_sections" type="list" label="${tool.name} on ${on_string}: Images">
            <discover_datasets pattern="(?P&lt;designation&gt;[0-9]+)\.tif" format="tiff" visible="false"/>
        </collection>
        <collection name="masks" type="list" label="${tool.name} on ${on_string}: Masks">
            <discover_datasets pattern="(?P&lt;designation&gt;[0-9]+)_mask\.tif" directory="masks" format="tiff" visible="false"/>
        </collection>
        <data name="TMA_MAP" format="tiff" label="${tool.name} on ${on_string}: TMA Map" from_work_dir="TMA_MAP.tif"/>
    </outputs>
    <tests>
        <test>
            <param name="source_image" value="coreograph_test.tiff" />
            <output_collection name="tma_sections" type="list">
                <element name="1" ftype="tiff">
                    <assert_contents>
                        <has_size value="18000" delta="1000" />
                    </assert_contents>
                </element>
                <element name="2" ftype="tiff">
                    <assert_contents>
                        <has_size value="18000" delta="1000" />
                    </assert_contents>
                </element>
            </output_collection>
            <output_collection name="masks" type="list">
                <element name="1" ftype="tiff">
                    <assert_contents>
                        <has_size value="345" delta="100" />
                    </assert_contents>
                </element>
                <element name="2" ftype="tiff">
                    <assert_contents>
                        <has_size value="345" delta="100" />
                    </assert_contents>
                </element>
            </output_collection>
            <output name="TMA_MAP" ftype="tiff">
                <assert_contents>
                    <has_size value="530" delta="100" />
                </assert_contents>
            </output>
        </test>
    </tests>
    <help><![CDATA[
-------------------        
UNet Coreograph
-------------------
**Coreograph** uses UNet, a deep learning model, to identify complete/incomplete tissue cores on a tissue microarray. It has been trained on 9 TMA slides of different sizes and tissue types

Training sets were acquired at 0.2micron/pixel resolution and downsampled 1/32 times to speed up performance. Once the center of each core has been identifed, active contours is used to generate a tissue mask of each core that can aid downstream single cell segmentation. A GPU is not required but will reduce computation time.

**Inputs**
A tif or ome.tiff image multiple tissues, such as a tissue microarray.

**Outputs**
Coreograph exports these files:
1. individual cores as tiff stacks with user-selectable channel ranges
2. binary tissue masks (saved in the 'mask' subfolder)
3. a TMA map showing the labels and outlines of each core for quality control purposes
    ]]></help>
    <expand macro="citations" />
</tool>