view coreograph.xml @ 1:57f1260ca94e draft

"planemo upload commit fec9dc76b3dd17b14b02c2f04be9d30f71eba1ae"
author watsocam
date Fri, 11 Mar 2022 23:40:51 +0000
parents 99308601eaa6
children 224e0cf4aaeb
line wrap: on
line source

<tool id="unet_coreograph" name="UNetCoreograph" version="@VERSION@.3" profile="17.09">
    <description>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.</description>
    <macros>
        <import>macros.xml</import>
    </macros>
 
    <expand macro="requirements"/>
    @VERSION_CMD@

    <command detect_errors="exit_code"><![CDATA[
        #set $type_corrected = str($source_image)[:-3]+'ome.tif'
        ln -s $source_image `basename $type_corrected`;

        @CMD_BEGIN@

        python \$UNET_PATH
        --imagePath `basename $type_corrected`
        --downsampleFactor $downsamplefactor
        --channel $channel
        --buffer $buffer
        --sensitivity $sensitivity

        ##if $usegrid
        ##--useGrid
        ##end if

        #if $cluster
        --cluster
        #end if

        #if $tissue
        --tissue
        #end if

        --outputPath .;
        
    ]]></command>


    <inputs>
        <param name="source_image" type="data" format="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="usegrid" type="boolean" label="Use Grid"/>-->
        <param name="cluster" type="boolean" checked="false" label="Cluster"/>
        <param name="tissue" type="boolean" 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>
    <help><![CDATA[
    ]]></help>
    <expand macro="citations" />
</tool>