view rankabundance.xml @ 4:d02f4a87eb55 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ampvis2 commit ab75ba7665d7fb5c18ad08dfbba92b273f991dfc
author iuc
date Sat, 16 Mar 2024 11:33:20 +0000
parents f92312c645ea
children
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" compare="sim_size"/>
        </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" compare="sim_size"/>
        </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://kasperskytte.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>