view rankabundance.xml @ 0:132d2a794152 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:20:48 +0000
parents
children f92312c645ea
line wrap: on
line source

<tool id="ampvis2_rankabundance" name="ampvis2 rank abundance 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)
            data <- readRDS("$data")
            plot <- amp_rankabundance(
                data,
                group_by = "$group_by",
                showSD = $showSD,
                log10_x = $log10_x
            )
            @OUTPUT_TOKEN@
        ]]></configfile>
    </configfiles>
    <inputs>
        <expand macro="rds_metadata_input_macro"/>
        <expand macro="metadata_select_discrete" argument="group_by" optional="false" label="Group the samples by"/>
        <param argument="showSD" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="true" label="Show standard deviation"/>
        <param argument="log10_x" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="true" label="Log10-transform the x-axis" help="Often most variation is observed among the most abundant OTU's, log10-transforming the x-axis will highlight this better."/>
        <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="Plant"/>
            <output name="plot" value="AalborgWWTPs-rankabundance.pdf" ftype="pdf"/>
        </test>
        <!-- non-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="Plant"/>
            <param name="showSD" value="false"/>
            <param name="log10_x" value="false"/>
            <output name="plot" value="AalborgWWTPs-rankabundance-nondefault.pdf" ftype="pdf"/>
        </test>
    </tests>
    <help><![CDATA[
What it does
============

Generates a rank abundance curve (rank abundance vs cumulative read abundance),
optionally with standard deviation from mean intervals.

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

Currently only OTU level is supported.

Input
=====

@HELP_RDS_INPUT@

@HELP_METADATA_LIST_INPUT@

Output
======

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