view rpviz.xml @ 5:ee79539568a3 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/rptools commit 162ee89a8e36033f32973d72dfc1b11ca27da61f
author tduigou
date Fri, 01 Dec 2023 14:30:16 +0000
parents 751dfcc6f663
children 693c335d65e7
line wrap: on
line source

<tool id="rptools_rpviz" name="Visualize pathways" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.09">
    <description>Visualize pathways from the RetroPath Suite</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <command detect_errors="exit_code"><![CDATA[
        #set input_folder="input_folder"
        mkdir -p '$input_folder' &&
        #if str($input_type_conditional.input_type) == "sbml":
            #for $input in $input_type_conditional.input_sbml.keys():
                ln -sf $input_type_conditional.input_sbml[$input] '$input_folder/${input}.xml' &&
            #end for
            python -m rptools.rpviz '$input_folder'
        #elif str($input_type_conditional.input_type) == "tar":
            python -m rptools.rpviz '${input_type_conditional.input_tar}'
        #elif str($input_type_conditional.input_type) == "single_sbml":
            ln -sf '$input_type_conditional.input_single_sbml' '$input_folder/${input_type_conditional.input_single_sbml.name}' &&
            python -m rptools.rpviz '$input_folder'
        #end if
        'out'
        #if $adv.cofactor_file
            --cofactor '$adv.cofactor_file'
        #end if
        --autonomous_html '$html_file' &&
        rm -fr '$input_folder'
    ]]></command>
    <inputs>
        <conditional name="input_type_conditional">
            <param name="input_type" type="select" label="Source SBML format">
                <option value="tar" selected="True">TAR</option>
                <option value="sbml">Collection</option>
                <option value="single_sbml">single SBML</option>
            </param>
            <when value="tar">
                <param name="input_tar" type="data" format="tar" label="Source SBML" />
            </when>
            <when value="sbml">
                <param name="input_sbml" type="data_collection" format="sbml" collection_type="list" label="Source SBML" />
            </when>
            <when value="single_sbml">
                <param name="input_single_sbml" type="data" format="sbml" label="Source SBML" />
            </when>
        </conditional>
        <section name="adv" title="Advanced Options" expanded="false">
            <param name="cofactor_file" type="data" format="tsv" optional="true" label="Cofactor file" help="File listing structures to consider as cofactors."/>
        </section>
    </inputs>
    <outputs>
        <data name="html_file" format="html" label="Rpviz: Pathways Visualization"/>
    </outputs>
    <tests>
        <test>
        <!-- test 1: check if identical html output is produced (single sbml input) -->
            <conditional name="input_type_conditional">
                <param name="input_type" value="single_sbml"/>
                <param name="input_single_sbml" value="lycopene_CrtEBI_from_selenzy.xml" />
            </conditional>
            <output name="html_file" >
                <assert_contents>
                    <has_size value="1296252" delta="1000" />
                </assert_contents>
            </output>
        </test>
        <test>
        <!-- test 2: check if identical html output is produced (tar input) -->
            <conditional name="input_type_conditional">
                <param name="input_type" value="tar"/>
                <param name="input_tar" value="as_tar_inputs.tgz" />
            </conditional>
            <output name="html_file" >
                <assert_contents>
                    <has_size value="1604488" delta="1000" />
                </assert_contents>
            </output>
        </test>
    </tests>
    <help><![CDATA[
RPVIZ
=====

Visualize pathways from the `RetroPath Suite <https://www.sciencedirect.com/science/article/pii/S1096717617301337>`_.

Input
-----

Required:

* **Source SBML**\ : Input file containing rpSBML files in a tar archive, collection or single file.

Optional:

* **Cofactor file**\ : File listing structures to consider as cofactors.

Output
------

* **Pathways Visualization**\ : HTML output for pathway's visualization.
    ]]></help>
    <expand macro="creator"/>
    <citations>
        <citation type="doi">10.1038/s41467-022-32661-x</citation>
    </citations>
</tool>