view core.xml @ 0:48e343a308b0 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ampvis2 commit 7c0ecbffdb5e993f5af7e3b52c424c2761fb91d3"
author iuc
date Mon, 04 Apr 2022 10:28:11 +0000
parents
children 7f712eb18230
line wrap: on
line source

<tool id="ampvis2_core" name="ampvis2 core community analysis" 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)
            data <- readRDS("$data")
            #set group_by_list='c("' + '", "'.join(str($group_by).split(",")) + '")'
            plot <- amp_core(
                data,
                group_by = $group_by_list,
                core_pct = $core_pct,
                margin_plots = "$margin_plots",
                margin_plot_values_size = $margin_plot_values_size,
                widths = c($widths, 1),
                heights = c(1, $heights)
            )
            @OUTPUT_TOKEN@
        ]]></configfile>
    </configfiles>
    <inputs>
        <expand macro="rds_metadata_input_macro"/>
        <expand macro="metadata_select_discrete" argument="group_by" optional="false" multiple="true" label="Variable(s) which contain the desired grouping of samples" help="Can also be done by sample, just provide the name of the variable containing unique sample ID's"/>
        <param argument="core_pct" type="float" value="80" min="0" max="100" label="Threshold in percent" help="Threshold for defining abundant (a.k.a. core) OTU's for each group"/>
        <param argument="margin_plots" type="select" label="Margin plots to show" help="Margin plots display the cumulative read abundances of all OTU's per group sharing either x or y axis with the main plot">
            <option value="x">Only show x-axis margin plot</option>
            <option value="y">Only show y-axis margin plot</option>
            <option value="xy" selected="true">Show both x and y-axis margin plots</option>
            <option value="">Don't show any margin plots</option>
        </param>
        <param argument="margin_plot_values_size" type="integer" value="3" min="0" label="The size of the values" help="As indicated in the margin plots on top of the bars. Set to 0 to disable."/>
        <param argument="widths" type="integer" value="5" min="1" label="Relative width of the main and y margin plots"/>
        <param argument="heights" type="integer" value="5" min="1" label="Relative widths of the main and x margin plots"/>
        <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"/> 
            <param name="metadata_list" value="AalborgWWTPs-metadata.list"/> 
            <param name="group_by" value="Period"/> 
            <output name="plot" value="AalborgWWTPs-core.pdf" ftype="pdf"/>
        </test>
        <!--multiple groups + non-default widths / heights-->
        <test expect_num_outputs="1">
            <param name="data" value="AalborgWWTPs.rds" ftype="ampvis2"/> 
            <param name="metadata_list" value="AalborgWWTPs-metadata.list"/> 
            <param name="group_by" value="Plant,Period"/> 
            <param name="core_pct" value="90"/>
            <param name="widths" value="4"/>
            <param name="heights" value="4"/>
            <output name="plot" value="AalborgWWTPs-core-multiple.pdf" ftype="pdf"/>
        </test>
    </tests>
    <help><![CDATA[
What it does
============

Core community plot to investigate how many of the most abundant OTU's comprise
the "core" of groups of samples, their abundances etc.

The Galaxy tool calls the `amp_core
<https://madsalbertsen.github.io/ampvis2/reference/amp_core.html>`_ function
of the ampvis2 package.

This analysis only makes sense without aggregating OTU's to any taxonomic level,
or else it will be biased by taxonomy and only be done on OTU's that have been
classified, which is rarely all.


@HELP_RELATIVE_ABUNDANCES@

Input
=====

@HELP_RDS_INPUT@

@HELP_METADATA_LIST_INPUT@

Output
======

A core community plot in the chosen output format.
    ]]></help>
    <expand macro="citations"/>
</tool>