view tile.xml @ 1:878bafb411dd draft

"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 7d7a519c3a2cc612d38695b335d0f6c75a099de3"
author bgruening
date Fri, 26 Feb 2021 14:13:03 +0000
parents 33bf7aa4e684
children 443638c10c61
line wrap: on
line source

<tool id="cp_tile" name="Tile" version="@CP_VERSION@+galaxy@VERSION_SUFFIX@" python_template_version="3.5">
    <description> tiles images together to form large montage images</description>
    <macros>
        <import>macros.xml</import>
        <token name="@VERSION_SUFFIX@">0</token>
        <xml name="cycles">
            <conditional name="con_calc_no_row">
                <param name="calc_no_row" type="select" label="Automatically calculate number of rows?">
                    <option value="Yes">Yes</option>
                    <option value="No">No</option>
                </param>
                <when value="Yes">
                </when>
                <when value="No">
                    <param name="no_of_row" type="integer" value="8" label="Final number of rows" help = "Specify the number of rows would you like to have in the tiled image. For example, if you want to show your images in a 96-well format, enter 8. "/>
                </when>
            </conditional>
            <conditional name="con_calc_no_cols">
                <param name="calc_no_cols" type="select" label="Automatically calculate number of columns?" help="Specify the number of columns you like to have in the tiled image. For example, if you want to show your images in a 96-well format, enter 12. ">
                    <option value="Yes">Yes</option>
                    <option value="No">No</option>
                </param>
                <when value="Yes">
                </when>
                <when value="No">
                    <param name="no_of_cols" type="integer" value="12" label="Final number of columns" />
                </when>
            </conditional>
            <param name="corner_to_begin" type="select" label="Image corner to begin tiling" >
                <option value="top left">top left</option>
                <option value="top right">top right</option>
                <option value="bottom left">bottom left</option>
                <option value="bottom right">bottom right</option>
            </param>
            <param name="direction" type="select" label="Direction to begin tiling" >
                <option value="row">row</option>
                <option value="column">column</option>
            </param>
            <param name="meander_mode" type="select" label="Use meander mode?" >
                <help>
                    <![CDATA[
                        Select "Yes" to tile adjacent images in one direction, then the next row/column is tiled in the opposite direction. Some microscopes capture images in this fashion. The default mode is "comb", or "typewriter" mode; in this mode, when one row is completely tiled in one direction, the next row starts near where the first row started and tiles again in the same direction. 
                    ]]>
                </help>
                <option value="Yes">Yes</option>
                <option value="No">No</option>
            </param>
        </xml>

    </macros>
    <expand macro="py_requirements"/>
    <command detect_errors="exit_code">
        <![CDATA[
            python '$__tool_directory__/tile.py' -p '$input_pipeline' -i '$input_json'
            ]]>
    </command>
    <configfiles>
        <inputs name="input_json"/>
    </configfiles>
    <inputs>
        <expand macro="input_pipeline_param"/>
        <param name="input_image" type="text" value="DNA" label="Enter the name of an input image" help="Image to be tiled, specified in NameAndTypes" />
        <param name="output_image_name" type="text" value="TiledImage" label="Name the output image" help="Enter a name for the final tiled image." />
        <conditional name="con_assembly_method">
            <param name="assembly_method" type="select" label="Tile assembly method" >
                <option value="Within cycles">Within cycles</option>
                <option value="Across cycles">Across cycles</option>
            </param>
            <when value="Within cycles">
                <expand macro="cycles" />
                <repeat name="rpt_additional_image" title="Another image" min="0">
                    <param name="additional_img" type="text" value="None" label="Enter the name of an additional image to tile" />
                </repeat>

            </when>
            <when value="Across cycles">
                <expand macro="cycles" />
            </when>
        </conditional>
        
    </inputs>
    <outputs>
        <expand macro="output_pipeline_param" />
    </outputs>
    <tests>
        <test>
            <param name="input_pipeline" value="common.cppipe"/>
            <param name="input_image" value="OrigColor" />
            <param name="output_image_name" value="AdjacentImage" />
            <conditional name="con_assembly_method">
                <param name="assembly_method" value="Within cycles" />
            </conditional>
            <conditional name="con_calc_no_row">
                <param name="calc_no_row" value="No"/>
                <param name="no_of_row" value="1"/>
            </conditional>
            <conditional name="con_calc_no_cols">
                <param name="calc_no_cols" value="Yes" />
            </conditional>
            <param name="corner_to_begin" value="top left" />
            <param name="direction" value="row" />

            <param name="meander_mode" value="No" />
            <repeat name="rpt_additional_image">
                <param name="additional_img" value="OutlineImage" />
            </repeat>
            <repeat name="rpt_additional_image">
                <param name="additional_img" value="TrackedCells" />
            </repeat>
            <expand macro="test_out_file" file="tile.cppipe" />
        </test>
        <test>
            <param name="input_pipeline" value="common.cppipe"/>
            <param name="input_image" value="DNA" />
            <conditional name="con_assembly_method">
                <param name="assembly_method" value="Across cycles" />
            </conditional>
            <conditional name="con_calc_no_row">
                <param name="calc_no_row" value="Yes"/>
            </conditional>
            <conditional name="con_calc_no_cols">
                <param name="calc_no_cols" value="No" />
                 <param name="no_of_cols" value="5"/>
            </conditional>
            <param name="corner_to_begin" value="top right" />
            <param name="direction" value="column" />
            <param name="meander_mode" value="No" />
            <expand macro="test_out_file" file="tile_across_cycles.cppipe" />
        </test>
    </tests>
    <help>
        <![CDATA[

            .. class:: infomark

            **What it does**

            This module allows more than one image to be placed next to each other in a grid layout you specify. It might be helpful, for example, to place images adjacent to each other when multiple fields of view have been imaged for the same sample. Images can be tiled either across cycles (multiple fields of view, for example) or within a cycle (multiple channels of the same field of view, for example). 

            @COMMON_HELP@
            ]]>
    </help>
    <expand macro="citations"/>
</tool>