view starting_modules_nameandtypes.xml @ 1:e8f822eeb9fd draft default tip

"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 7d7a519c3a2cc612d38695b335d0f6c75a099de3"
author bgruening
date Fri, 26 Feb 2021 14:14:56 +0000
parents 4395ea2a01f4
children
line wrap: on
line source

<macros>
    <xml name="macro_image_type" token_thing="images">
        <param name="name_to_assign" type="text" value="DNA" label="Name to assign these @THING@" />
    </xml>
    
    <xml name="image_type_condition"> 
        <conditional name="con_set_intensity">
            <param name="set_intensity_range_from" type="select" label="Set intensity range from" help="This option determines how the image intensity should be rescaled from 0.0 - 1.0.">
                <option value="Image metadata">Image metadata</option>
                <option value="Image bit-depth">Image bit-depth</option>
                <option value="Manual">Manual</option>
            </param>
            <when value="Manual">
                <param name="maximum_intensity" type="float" value="255.0" label="Maximum intensity" help="The pixel value is divided, as read from the image file, by this value to get the loaded image’s per-pixel intensity." />

            </when>
            <when value="Image metadata" />
            <when value="Image bit-depth" />
        </conditional>
    </xml>
    <xml name="name_type_rule_matching_file">
        <param name="operator" type="select">
            <option value="does">Does</option>
            <option value="doesnot">Does not</option>
        </param>
        <param name="contain" type="select">
            <option value="contain">Contain</option>
            <option value="containregexp">Contain regular expression</option>
            <option value="startwith">Start with</option>
            <option value="endwith">End with</option>
            <option value="Exactly match">Exactly match</option>
        </param>
        <param name="match_value" type="text"/>
    </xml>
    <xml name="name_type_rule_image">
        <param name="operator" type="select">
            <option value="does">Is</option>
            <option value="doesnot">Is not</option>
        </param>
        <param name="match_type" type="select">
            <option value="iscolor">Color</option>
            <option value="ismonochrome">Monochrome</option>
            <option value="isstack">Stack</option>
            <option value="isstackframe">Stack frame</option>
        </param>
    </xml>
    <xml name="name_type_rule_metadata">
        <param name="operator" type="select">
            <option value="does">Does</option>
            <option value="doesnot">Does not</option>
        </param>
        <param name="match_type" type="select">
            <option value="FileLocation">Have FileLocation matching</option>
            <option value="Frame">Have Frame matching</option>
            <option value="Screen">Have Screen matching</option>
            <option value="Series">Have Series matching</option>
        </param>
        <param name="match_value" type="text"/>
    </xml>
    <xml name="name_type_rule_ext">
        <param name="operator" type="select">
            <option value="does">Is</option>
            <option value="doesnot">Is not</option>
        </param>
        <param name="match_type" type="select">
            <option value="istif">tif, tiff, ome.tif or ome.tiff</option>
            <option value="isjpeg">jpg, jpeg</option>
            <option value="ispng">png</option>
            <option value="isimage">the extension of an image file</option>
            <option value="isflex">flex</option>
            <option value="ismovie">mov, avi</option>

        </param>
    </xml>
    <xml name="image_matching_rules">
        <repeat name="r_match_rule" title="Another image">
            <param name="match_all_any" type="select" display="radio" label="Match the following rules">
                <option value="and">All</option>
                <option value="or">Any</option>
            </param>
            <repeat name="r_match" title="rule">
                <conditional name="con_match">
                    <param name="rule_type" type="select" label="Select rule criteria">
                        <option value="file">File</option>
                        <option value="directory">Directory</option>
                        <option value="extension">Extension</option>
                        <option value="image">Image</option>
                        <option value="metadata">Metadata</option>
                    </param>
                    <when value="file">
                        <expand macro="name_type_rule_matching_file"/>
                    </when>
                    <when value="directory">
                        <expand macro="name_type_rule_matching_file"/>
                    </when>
                    <when value="extension">
                        <expand macro="name_type_rule_ext" />
                    </when>
                    <when value="image">
                        <expand macro="name_type_rule_image" />
                    </when>
                    <when value="metadata">
                        <expand macro="name_type_rule_metadata" />
                    </when>
                </conditional>
            </repeat>
            <conditional name="con_select_image_type">
                <param name="select_image_type" type="select" label="Select the image type" help="You can specify how these images should be treated">
                    <option value="Grayscale image">Grayscale image</option>
                    <option value="Color image">Color image</option>
                    <option value="Binary mask">Binary mask</option>
                    <option value="Illumination function">Illumination function</option>
                    <option value="Objects">Objects</option>

                </param>
                <when value ="Grayscale image">
                    <expand macro="macro_image_type" thing="images"/>
                    <expand macro="image_type_condition" />
                </when>
                <when value="Color image">
                    <expand macro="macro_image_type" thing="images"/>
                    <expand macro="image_type_condition" />
                </when>
                <when value="Binary mask">
                    <expand macro="macro_image_type" thing="images"/>
                </when>
                <when value="Illumination function">
                    <expand macro="macro_image_type" thing="images"/>
                </when>
                <when value="Objects">
                    <expand macro="macro_image_type" thing="objects"/>
                </when>
            </conditional>
        </repeat>
    </xml>
    <xml name="starting_modules_nameandtypes">
        <section name="nameandtypes" title="NamesAndTypes" expanded="false">
            <conditional name="pixel_space">
                <param name="process_3d" type="select" label="Process 3D" help="If you want to treat the data as three-dimensional, select 'Yes' to load files as volumes. Otherwise, select 'No' to load files as separate, two-dimensional images.">
                    <option value="Yes">Yes, process 3D data</option>
                    <option value="No">No, do not process 3D data</option>
                </param>  
                <when value="Yes">
                    <param name="x_spacing" type="float" value="1.0" label="Enter the spacing between voxels in the X dimension, relative to Y and Z" help="Normally, you will set one of these values to 1 and the others relative to that." />
                    <param name="y_spacing" type="float" value="1.0" label="Enter the spacing between voxels in the Y dimension, relative to X and Z"/>
                    <param name="z_spacing" type="float" value="1.0" label="Enter the spacing between voxels in the Z dimension, relative to X and Y"/>
                </when>
                <when value="No"/>
            </conditional>
            <conditional name="con_assign_a_name_to">
                <param name="assign_a_name_to" type="select" label="Assign a name to" help="This setting allows you to specify a name for types of images or subsets of images so they can be treated separately by downstream tools.">
                    <option value="All images">Give every image the same name</option>
                    <option value="Images matching rules">Give images one of several names depending on the metadata</option>
                </param>
                <when value="All images">
                    <expand macro="macro_image_type" thing="images" />
                    <conditional name="con_select_image_type">
                        <param name="select_image_type" type="select" label="Select the image type">
                            <option value="Grayscale image">Grayscale image</option>
                            <option value="Color image">Color image</option>
                            <option value="Binary mask">Binary mask</option>
                        </param>
                        <when value ="Grayscale image">
                            <expand macro="image_type_condition" />
                        </when>
                        <when value="Color image">
                            <expand macro="image_type_condition" />
                        </when>
                        <when value="Binary mask" />
                    </conditional>
                </when>
            <when value="Images matching rules">
                <expand macro="image_matching_rules"/>
                <param name="matching_method" type="select" label="Image set matching method">
                    <option value="Order">Order</option>
                    <option value="Metadata">Metadata</option>
                </param>
            </when>
        </conditional>
    </section>
</xml>
</macros>