view pcdl_make_graph_gml.xml @ 0:6d0f91e057f3 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/pcdl/ commit 7c74921b41bd7ab639e5a3f8b54e407f79ed8f16
author iuc
date Mon, 04 Aug 2025 19:01:20 +0000
parents
children
line wrap: on
line source

<tool id="pcdl_make_graph_gml" name="pcdl_make_graph_gml" version="3.0.1+galaxy0" profile="21.05">
    <macros>
        <import>pcdl_macros.xml</import>
    </macros>
    <requirements>
        <expand macro="requirement"/>
    </requirements>
    <command><![CDATA[
        #import re
        mkdir output_pc &&
        #for $file in $path:
            #set $filename = re.sub('[^\w\-\.\s]', '_', str($file.element_identifier))
            ln -s '$file' output_pc/$filename &&
        #end for

        pcdl_make_graph_gml 'output_pc' $graph_type
        --custom_data_type $custom_data_type
        --microenv $microenv
        --physiboss $physiboss
        --settingxml 'none'
        --verbose $verbose
        --edge_attribute $edge_attribute
        --node_attribute $node_attribute
    ]]></command>
    <inputs>
        <section name="essential" title="essential:" expanded="true">
            <expand macro="path"/>
            <expand macro="graph_type"/>
            <expand macro="custom_data_type"/>
            <expand macro="edge_attribute"/>
            <expand macro="node_attribute"/>
        </section>
        <section name="advanced" title="advanced:" expanded="false">
            <expand macro="microenv"/>
            <expand macro="physiboss"/>
            <expand macro="verbose"/>
        </section>
    </inputs>
    <outputs>
        <collection name="graph_gml" type="list">
            <discover_datasets pattern="(?P&lt;designation&gt;.+\.gml)" format="txt" directory="output_pc" visible="false"/>
        </collection>
    </outputs>
    <tests>
        <test expect_num_outputs="1">
            <section name="essential">
                <param name="path">
                    <expand macro="output"/>
                </param>
                <param name="graph_type" value="attached"/>
            </section>
            <section name="advanced">
                <param name="verbose" value="false"/>
            </section>
            <output_collection name="graph_gml" count="2">
                <element name="output00000000_attached.gml">
                    <assert_contents>
                        <has_text text="graph ["/>
                        <has_text text="node ["/>
                        <has_text text="]"/>
                    </assert_contents>
                </element>
                <element name="output00000001_attached.gml">
                    <assert_contents>
                        <has_text text="graph ["/>
                        <has_text text="node ["/>
                        <has_text text="]"/>
                    </assert_contents>
                </element>
            </output_collection>
        </test>
        <test expect_num_outputs="1">
            <section name="essential">
                <param name="path">
                    <expand macro="output"/>
                </param>
                <param name="graph_type" value="neighbor"/>
            </section>
            <section name="advanced">
                <param name="verbose" value="false"/>
            </section>
            <output_collection name="graph_gml" count="2">
                <element name="output00000000_neighbor.gml">
                    <assert_contents>
                        <has_text text="graph ["/>
                        <has_text text="node ["/>
                        <has_text text="]"/>
                    </assert_contents>
                </element>
                <element name="output00000001_neighbor.gml">
                    <assert_contents>
                        <has_text text="graph ["/>
                        <has_text text="node ["/>
                        <has_text text="]"/>
                    </assert_contents>
                </element>
            </output_collection>
        </test>
        <test expect_num_outputs="1">
            <section name="essential">
                <param name="path">
                    <expand macro="output"/>
                </param>
                <param name="graph_type" value="spring"/>
            </section>
            <section name="advanced">
                <param name="verbose" value="false"/>
            </section>
            <output_collection name="graph_gml" count="2">
                <element name="output00000000_spring.gml">
                    <assert_contents>
                        <has_text text="graph ["/>
                        <has_text text="node ["/>
                        <has_text text="]"/>
                    </assert_contents>
                </element>
                <element name="output00000001_spring.gml">
                    <assert_contents>
                        <has_text text="graph ["/>
                        <has_text text="node ["/>
                        <has_text text="]"/>
                    </assert_contents>
                </element>
            </output_collection>
        </test>
    </tests>
    <help><![CDATA[
Function to generate graph files in the gml graph modelling language standard format. Gml was the outcome of an initiative that started at the international symposium on graph drawing 1995 in Passau and ended at Graph Drawing 1996 in Berkeley. The networkx python library (https://networkx.org/) and igraph C and python libraries (https://igraph.org/) for graph analysis are gml compatible and can as such read and write this file format.

Homepage: https://github.com/elmbeech/physicelldataloader
    ]]></help>
    <citations>
        <expand macro="citation"/>
    </citations>
</tool>