diff frequency.xml @ 0:f77f7c426d6f 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:18:21 +0000
parents
children b8ecbc50af78
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/frequency.xml	Mon Apr 04 10:18:21 2022 +0000
@@ -0,0 +1,81 @@
+<tool id="ampvis2_frequency" name="ampvis2 frequency 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_frequency(
+                data,
+                #if $group_by
+                    group_by = "$group_by",
+                #end if
+                ## tax_class = NULL,
+                tax_empty = "$tax_empty",
+                tax_aggregate = "$tax_aggregate",
+                weight = $weight,
+                normalise = $normalise,
+                ## TODO
+                detailed_output = FALSE
+            )
+            @OUTPUT_TOKEN@
+        ]]></configfile>
+    </configfiles>
+    <inputs>
+        <expand macro="rds_metadata_input_macro"/>
+        <expand macro="metadata_select_discrete" argument="group_by" label="Group the samples by "/>
+        <expand macro="tax_empty_macro"/>
+        <expand macro="taxlevel_macro" argument="tax_aggregate" label="The taxonomic level to aggregate the OTUs">
+            <option value="OTU" selected="true">OTU/ASV</option>
+        </expand>
+        <param argument="weight" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="true" label="Weight the frequency by abundance"/>
+        <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-frequency.pdf" ftype="pdf"/>
+        </test>
+        <!-- group_by -->
+        <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-frequency-group_by.pdf" ftype="pdf"/>
+        </test>
+    </tests>
+    <help><![CDATA[
+What it does
+============
+
+Generates a barplot with frequency vs read abundance.
+
+The Galaxy tool calls the `amp_frequency
+<https://madsalbertsen.github.io/ampvis2/reference/amp_frequency.html>`_ function
+of the ampvis2 package.
+
+Input
+=====
+
+@HELP_RDS_INPUT@
+
+@HELP_METADATA_LIST_INPUT@
+
+Output
+======
+
+A frequency plot in the chosen output format.
+    ]]></help>
+    <expand macro="citations"/>
+</tool>
\ No newline at end of file