view omero_get_value.xml @ 1:9a50e57339d8 draft

planemo upload for repository https://github.com/Helmholtz-UFZ/galaxy-tools/tree/main/tools/omero commit d69e684236ce5d36a09e84f1eae6d8c98ed7499b
author ufz
date Tue, 29 Oct 2024 06:59:20 +0000
parents 1ae349b83c08
children 5513b999c56e
line wrap: on
line source

<tool id="omero_get_value" name="OMERO get Object" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@" license="MIT">
    <description> with ezomero </description>
    <macros>
        <import>macros.xml</import>
        <token name="@VERSION_SUFFIX@">0</token>
    </macros>
    <xrefs>
        <xref type="bio.tools">omero</xref>
    </xrefs>
    <expand macro="ezomero_requirements"/>
    <command detect_errors="exit_code"><![CDATA[
        python '$__tool_directory__/omero_get_value.py'
        --credential-file '$credentials'
        @HOST_PORT@
        --obj_type '$obj_type'
        #if $ids_input.ids_format == "values"
            --ids ${str($ids_input.ids).replace(',', ' ')}
        #else
            --ids_path '$ids_input.ids_path'
        #end if
        --tsv_file '$tsv'
    ]]></command>
    <configfiles>
        <expand macro="credentials"/>
    </configfiles>
    <inputs>
        <expand macro="host_port"/>
        <param argument="obj_type" type="select" optional="false" label="Type of object to fetch:">
            <option value="Annotation">Annotation</option>
            <option value="Tag">Tag</option>
            <option value="Table">Table</option>
        </param>
        <conditional name="ids_input">
            <param name="ids_format" type="select" label="How do you provide the ID(s) of the OMERO object?">
                <option value="values">Comma separated values</option>
                <option value="file">From a dataset (one per line)</option>
            </param>
            <when value="values">
                <param argument="--ids" type="text" value="" label="ID(s) of the object(s) to fetch on OMERO separated by comma">
                    <validator type="regex" message="Enter a valid list of IDs (i.e. 2,45,56,67)">^(\d+)(,\d+)*$</validator>
                </param>
            </when>
            <when value="file">
                <param argument="--ids_path" type="data" format="txt,tabular" label="Dataset with ID(s) of the object(s) to fetch on OMERO (one per line)"/>
            </when>
        </conditional>
    </inputs>
    <outputs>
        <data name="tsv" format="tabular"/>
    </outputs>
    <tests>
        <test>
            <param name="omero_host" value="host.docker.internal"/>
            <param name="omero_port" value="6064"/>
            <param name="obj_type" value="Tag"/>
            <conditional name="ids_input">
                <param name="ids_format" value="values"/>
                <param name="ids" value="1"/>
            </conditional>
            <param name="test_username" value="root"/>
            <param name="test_password" value="omero"/>
            <output name="tsv" ftype="tabular">
                <assert_contents>
                    <has_text text="test_tag"/>
                    <has_n_lines n="2"/>
                </assert_contents>
            </output>
        </test>
    </tests>
    <help>
Description
-----------

Tool to fetch Annotation, Tag and Tables from IDs.

The IDs can be obtained with the tool OMERO get IDs with ezomero

@SECURITY_DISCLAIMER@
    </help>
    <citations>
        <citation type="doi">10.1038/nmeth.1896</citation>
    </citations>
</tool>