view starting_modules_metadata.xml @ 3:7a08edbc790e draft

"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit c3917e27eb1c1deeb381aa0dc8161c07699562fb"
author bgruening
date Mon, 11 May 2020 07:56:06 -0400
parents
children
line wrap: on
line source

<macros>
    <xml name="image_matching_rules_metadata">
        <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="filtering rules">
            <conditional name="con_match">
                <param name="rule_type" type="select" label="Select the filtering criteria">
                    <option value="file">File</option>
                    <option value="directory">Directory</option>
                    <option value="extension">Extension</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>
            </conditional>
        </repeat>
    </xml>
    <xml name="starting_modules_metadata">
        <section name="metadata" title="Metadata" expanded="false">
            <conditional name="con_metadata_extraction">
                <param name="extract" type="select" label="Do you want to extract the metadata?">
                    <option value="Yes">Yes, specify metadata</option>
                    <option value="No" selected="true">No, do not specify metadata</option>
                </param>
                <when value="Yes">
                    <repeat name="extraction_method" title="new metadata" min="1">
                        <param name="metadata_extraction_method" type="select" label="Metadata extraction method" help="Metadata can be stored in either or both of two ways: internally (through the file naming, directory structuring, or the file header information) or externally (external index, such as spreadsheet or database of some kind). " >
                            <option value="Extract from file/folder names">Extract from file/folder names</option>
                            <option value="Import from file">Import from file</option>
                            <option value="Extract from image file headers">Extract from image file headers</option>
                        </param>
                        <conditional name="con_metadata_source">
                            <param name="metadata_source" type="select" label="Metadata source" help="You can extract the metadata from the image file name or from its folder name.">
                                <option value="File name">File name</option>
                                <option value="Folder name">Folder name</option>
                            </param>
                            <when value="File name">
                                <param name="file_name_regex" type="select" label="Select the pattern to extract metadata from the file name" help="Image file names must comply with one of the patterns. For example, plate_reagent_timepoint.tif matches the pattern field1_field2_field3. If none of the patterns is suitable, please use other Galaxy tools to rename your files first.">

                                    <sanitizer sanitize="false"/>
                                    <option value="(?P&lt;field1>.*)">field1</option>
                                    <option value="(?P&lt;field1>.*)-(?P&lt;field2>[a-zA-Z0-9]+)">field1-field2</option>
                                    <option value="(?P&lt;field1>.*)_(?P&lt;field2>[a-zA-Z0-9]+)">field1_field2</option>
                                    <option value="(?P&lt;field1>.*)__(?P&lt;field2>[a-zA-Z0-9]+)">field1__field2</option>
                                    <option value="(?P&lt;field1>.*)-(?P&lt;field2>[a-zA-Z0-9]+)-(?P&lt;field3>[a-zA-Z0-9]+)">field1-field2-field3</option>
                                    <option value="(?P&lt;field1>.*)_(?P&lt;field2>[a-zA-Z0-9]+)_(?P&lt;field3>[a-zA-Z0-9]+)">field1_field2_field3</option>
                                    <option value="(?P&lt;field1>.*)__(?P&lt;field2>[a-zA-Z0-9]+)__(?P&lt;field3>[a-zA-Z0-9]+)">field1__field2__field3</option>
                                    <option value="(?P&lt;field1>.*)-(?P&lt;field2>[a-zA-Z0-9]+)-(?P&lt;field3>[a-zA-Z0-9]+)-(?P&lt;field4>[a-zA-Z0-9]+)">field1-field2-field3-field4</option>
                                    <option value="(?P&lt;field1>.*)_(?P&lt;field2>[a-zA-Z0-9]+)_(?P&lt;field3>[a-zA-Z0-9]+)_(?P&lt;field4>[a-zA-Z0-9]+)">field1_field2_field3_field4</option>
                                    <option value="(?P&lt;field1>.*)__(?P&lt;field2>[a-zA-Z0-9]+)__(?P&lt;field3>[a-zA-Z0-9]+)__(?P&lt;field4>[a-zA-Z0-9]+)">field1__field2__field3__field4</option>
                                    <option value="(?P&lt;field1>.*)-(?P&lt;field2>[a-zA-Z0-9]+)-(?P&lt;field3>[a-zA-Z0-9]+)-(?P&lt;field4>[a-zA-Z0-9]+)-(?P&lt;field5>[a-zA-Z0-9]+)">field1-field2-field3-field4-field5</option>
                                    <option value="(?P&lt;field1>.*)_(?P&lt;field2>[a-zA-Z0-9]+)_(?P&lt;field3>[a-zA-Z0-9]+)_(?P&lt;field4>[a-zA-Z0-9]+)_(?P&lt;field5>[a-zA-Z0-9]+)">field1_field2_field3_field4_field5</option>
                                    <option value="(?P&lt;field1>.*)__(?P&lt;field2>[a-zA-Z0-9]+)__(?P&lt;field3>[a-zA-Z0-9]+)__(?P&lt;field4>[a-zA-Z0-9]+)__(?P&lt;field5>[a-zA-Z0-9]+)">field1__field2__field3__field4__field5</option>
                                    <option value="(?P&lt;field1>.*)-(?P&lt;field2>[a-zA-Z0-9]+)-(?P&lt;field3>[a-zA-Z0-9]+)-(?P&lt;field4>[a-zA-Z0-9]+)-(?P&lt;field5>[a-zA-Z0-9]+)-(?P&lt;field6>[a-zA-Z0-9]+)">field1-field2-field3-field4-field5-field6</option>
                                    <option value="(?P&lt;field1>.*)_(?P&lt;field2>[a-zA-Z0-9]+)_(?P&lt;field3>[a-zA-Z0-9]+)_(?P&lt;field4>[a-zA-Z0-9]+)_(?P&lt;field5>[a-zA-Z0-9]+)_(?P&lt;field6>[a-zA-Z0-9]+)">field1_field2_field3_field4_field5_field6</option>
                                    <option value="(?P&lt;field1>.*)__(?P&lt;field2>[a-zA-Z0-9]+)__(?P&lt;field3>[a-zA-Z0-9]+)__(?P&lt;field4>[a-zA-Z0-9]+)__(?P&lt;field5>[a-zA-Z0-9]+)__(?P&lt;field6>[a-zA-Z0-9]+)">field1__field2__field3__field4__field5__field6</option>
                                </param>
                            </when>
                            <when value="Folder name">
                                <param name="folder_name_regex" type="select" label="Select the pattern to extract metadata from the folder name" help="Folder names must comply with one of the patterns. For example, folder name exp1-channel_name matches the pattern field1-field2. If none of the patterns is suitable, please use other Galaxy tools to rename your folder first.">
                                    <sanitizer sanitize="false"/>
                                    <option value="(?P&lt;folderField1>.*)">field1</option>
                                    <option value="(?P&lt;folderField1>.*)-(?P&lt;folderField2>[a-zA-Z0-9]+)">field1-field2</option>
                                    <option value="(?P&lt;folderField1>.*)_(?P&lt;folderField2>[a-zA-Z0-9]+)">field1_field2</option>
                                </param>
                            </when>
                        </conditional>
                        <conditional name="con_metadata_extract_from">
                            <param name="extract_metadata_from" type="select" label="Extract metadata from">
                                <option value="All images">All images</option>
                                <option value="Images matching a rule">Images matching a rule</option>
                            </param>
                            <when value="Images matching a rule">
                                <expand macro="image_matching_rules_metadata" />
                            </when>
                            <when value="All images" />
                        </conditional>
                    </repeat>
                </when>
                <when value="No" />
            </conditional>
        </section>
    </xml>
</macros>