diff otu_network.xml @ 0:4bcb464fb3f3 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:24:03 +0000
parents
children f8c8c943245f
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/otu_network.xml	Mon Apr 04 10:24:03 2022 +0000
@@ -0,0 +1,90 @@
+<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,
+                ## TODO
+                detailed_output = FALSE,
+            )
+            @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://madsalbertsen.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>
\ No newline at end of file