view macros_netcdf2netcdf.xml @ 4:9bbaab36a5d4 draft

"planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
author ecology
date Thu, 20 Jan 2022 17:09:40 +0000
parents
children
line wrap: on
line source

<macros>
    <xml name="coord_range">
        <repeat name="user_choice" title="Filter by coordinate values" min="0" max="20" help="Use this option to filter on the values of the selected coordinate">
            <param name="dim" type="select" label="Dimensions">
                <options from_dataset="var_tab">
                    <column name="value" index="0"/>
                </options>
            </param>
            <conditional name="condi_between">
                <param name="comparator" type="select" label="Comparator">
                    <option value="is">is</option>
                    <option value="from">from</option>
                    <option value="to">to</option>
                    <option value="sl">slice(threshold1,threshold2)</option>
                </param>
                <when value="sl">
                    <param name="t1" type="text" value="" label="Choose the start value for slice"/>
                    <param name="t2" type="text" value="" label="Choose the end value for slice"/>
                </when>
                <when value="to">
                    <param name="value" type="text" value="" label="Choose the end value"/>
                </when>
                <when value="from">
                    <param name="value" type="text" value="" label="Choose the start value"/>
                </when>
                <when value="is">
                    <param name="value" type="text" value="" label="Choose the value to select"/>
                    <yield />
                </when>
            </conditional>
        </repeat>
    </xml>
    <xml name="section_variables">
        <section name="variable" title="Select variables">
            <param name="var" type="select" multiple="true" label="Choose variables to extract">
                <options from_dataset="var_tab">
                    <column name="name" index="0"/>
                    <column name="value" index="0"/>
                </options>
            </param>
            <param type="float" name="scale" optional="true" help="scale factor (float) to apply to the selected variable (optional and only if a variable is selected)"/>
            <param name="write_all" type="boolean" checked="false" label="Write all variables to new netCDF file (only if a variable is selected)"/>
            <param name="keep_attributes" type="boolean" checked="true" label="Keep all attributes (only if a variable is selected)"/>
        </section>
    </xml>
    <xml name="section_coords">
        <section name="subset_coords" title="Subset by coordinates">
            <conditional name="tsel">
                <param name="by_click" type="select" optional="true" label="Coordinate values">
                    <option value="sel">Coordinate values (sel)</option>
                    <option value="isel">Coordinate indices (isel)</option>
                    <option value="isel_list" selected="true">Coordinate values from list</option>
                </param>
                <when value="sel">
                    <expand macro="coord_range">
                        <param name="method" type="select" multiple="false" label="Choose selection method">
                            <option value="None">only exact matches</option>
                            <option value="nearest">use nearest valid index value</option>
                            <option value="pad">propagate last valid index value forward</option>
                            <option value="backfill">propagate next valid index value backward</option>
                        </param>
                    </expand>
                </when>
                <when value="isel">
                    <expand macro="coord_range"/>
                </when>
                <when value="isel_list">
                    <repeat name="user_choice" title="Filter by coordinate values" min="0" max="20" help="Use this option to filter on the values of the selected coordinate">
                        <param name="dim" type="select" label="Dimensions">
                            <options from_dataset="var_tab">
                                <column name="value" index="0"/>
                            </options>
                        </param>
                        <param type="data" label="Tabular containing values of this dimension" name="dim_tab" format="tabular" help="File containing values for this dimension."/>
                        <conditional name="condi_between">
                            <param name="comparator" type="select" label="Comparator">
                                <option value="is">is</option>
                                <option value="from">from</option>
                                <option value="to">to</option>
                                <option value="sl">slice(threshold1,threshold2)</option>
                            </param>
                            <when value="sl">
                                <param name="t1" type="select" multiple="false" label="Choose the start value for slice">
                                    <options from_dataset="dim_tab">
                                        <column name="name" index="1"/>
                                        <column name="value" index="0"/>
                                    </options>
                                </param>
                                <param name="t2" type="select" multiple="false" label="Choose the end value for slice">
                                    <options from_dataset="dim_tab">
                                        <column name="name" index="1"/>
                                        <column name="value" index="0"/>
                                    </options>
                                </param>
                            </when>
                            <when value="is">
                                <param name="value" type="select" multiple="false" label="Choose the value to select">
                                    <options from_dataset="dim_tab">
                                        <column name="name" index="1"/>
                                        <column name="value" index="0"/>
                                    </options>
                                </param>
                            </when>
                            <when value="to">
                                <param name="value" type="select" multiple="false" label="Choose the end value">
                                    <options from_dataset="dim_tab">
                                        <column name="name" index="1"/>
                                        <column name="value" index="0"/>
                                    </options>
                                </param>
                            </when>
                            <when value="from">
                                <param name="value" type="select" multiple="false" label="Choose the start value">
                                    <options from_dataset="dim_tab">
                                        <column name="name" index="1"/>
                                        <column name="value" index="0"/>
                                    </options>
                                </param>
                            </when>
                        </conditional>
                    </repeat>
                </when>
            </conditional>
        </section>
    </xml>
    <xml name="section_where">
        <section name="mask_values" title="Advanced options to mask by values">
            <conditional name="mask_condi">
                <param name="mask_option" type="select" multiple="false" label="Option for masked values">
                    <option value="keep" selected="true">Fill with NA</option>
                    <option value="drop">Drop values</option>
                    <option value="other">Set constant</option>
                </param>
                <when value="keep"/>
                <when value="drop"/>
                <when value="other">
                    <param name="set_other" type="float" value="0" label="Value to use for locations in this object where cond is False." />
                </when>
            </conditional>
            <param name="where_condition" type="data" optional="true" format="txt" label="file containing a where expression" />
        </section>
    </xml>
</macros>