view otu_network.xml @ 8:bb054c50a96c draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ampvis2 commit 9fe04d29ea604a152144908dbd20c0754695a025
author iuc
date Sat, 16 Nov 2024 19:53:50 +0000
parents b8f0ee2915d1
children
line wrap: on
line source

<tool id="ampvis2_otu_network" name="ampvis2 OTU network plot" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@" license="MIT">
    <description></description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="header"/>
    <command detect_errors="exit_code"><![CDATA[
        Rscript '$rscript'
    ]]></command>
    <configfiles>
        <configfile name="rscript"><![CDATA[
            library(ampvis2, quietly = TRUE)
            #if $tax_add
                #set ta='c("' + '", "'.join(str($tax_add).split(",")) + '")'
            #else
                #set ta='NULL'
            #end if
            data <- readRDS("$data")
            plot <- amp_otu_network(
                data,
                min_abundance = $min_abundance,
                #if $color_by
                    color_by = "$color_by",
                #end if
                tax_aggregate = "$tax_aggregate",
                tax_add = $ta,
                @TAX_SHOW@
                tax_class = NULL,
                tax_empty = "$tax_empty",
                normalise = $normalise,
            )
            @OUTPUT_TOKEN@
        ]]></configfile>
    </configfiles>
    <inputs>
        <expand macro="rds_metadata_input_macro"/>
        <param argument="min_abundance" type="float" value="0" min="0" label="Minimum taxa abundance" help="per sample"/>
        <expand macro="metadata_select" argument="color_by" label="Color the samples by"/>
        <expand macro="taxlevel_macro" argument="tax_aggregate" label="The taxonomic level to aggregate the OTUs">
            <option value="Phylum" selected="true">Phylum</option>
        </expand>
        <expand macro="taxlevel_macro" argument="tax_add" multiple="true" optional="true" label="Additional taxonomic level(s) to display"/>
        <expand macro="tax_show_macro" value="10"/>
        <expand macro="tax_empty_macro"/>
        <expand macro="normalise_macro" checked="true"/>
        <expand macro="out_format_macro"/>
    </inputs>
    <outputs>
        <expand macro="out_macro"/>
    </outputs>
    <tests>
        <!-- defaults -->
        <test expect_num_outputs="1">
            <param name="data" value="AalborgWWTPs.rds" ftype="ampvis2"/> 
            <output name="plot" value="AalborgWWTPs-otu_network.pdf" ftype="pdf" compare="sim_size"/>
        </test>
        <!-- defaults color -->
        <test expect_num_outputs="1">
            <param name="data" value="AalborgWWTPs.rds" ftype="ampvis2"/> 
            <param name="metadata_list" value="AalborgWWTPs-metadata.list"/> 
            <param name="color_by" value="Plant"/>
            <output name="plot" value="AalborgWWTPs-otu_network-color_by.pdf" ftype="pdf" compare="sim_size"/>
        </test>
    </tests>
    <help><![CDATA[
What it does
============

Generates network plot of taxa and samples.

The Galaxy tool calls the `amp_otu_network
<https://kasperskytte.github.io/ampvis2/reference/amp_otu_network.html>`_ function
of the ampvis2 package (based on ggnet2.).

Input
=====

@HELP_RDS_INPUT@

@HELP_METADATA_LIST_INPUT@

Output
======

An OTU network plot in the chosen output format.
    ]]></help>
    <expand macro="citations"/>
</tool>