diff div_index.xml @ 0:abc8da8c12ba draft

planemo upload for repository https://github.com/Marie59/champ_blocs commit 0d86db7d42b608c386a54500064f5f9c9d7019a4
author ecology
date Wed, 04 Jan 2023 13:21:41 +0000
parents
children 5b31641e6d30
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/div_index.xml	Wed Jan 04 13:21:41 2023 +0000
@@ -0,0 +1,83 @@
+<tool id="cb_div" name="Diversity" version="@VERSION@" profile = "20.01">
+    <description>indicators</description>
+    <macros>
+        <import>macro.xml</import>
+    </macros>
+    <expand macro="cb_requirements">
+        <requirement type="package" version="1.3.2">r-tidyverse</requirement>
+        <requirement type="package" version="1.7_20">r-ade4</requirement>
+        <requirement type="package" version="2.2">r-adiv</requirement>
+        <requirement type="package" version="3.4.0">r-ggplot2</requirement>
+    </expand>
+    <required_files>
+        <include type="literal" path="div_index.r"/>
+    </required_files>
+    <command detect_errors="exit_code"><![CDATA[
+        Rscript
+            '$__tool_directory__/div_index.r'
+            '$input_data'
+            '$output_div'
+            '$output_rdata'
+            '$plots'
+        ]]>
+    </command>
+    <inputs>
+        <param name="input_data" type="data" format="rdata" label="Input Clean data"/>
+    </inputs>
+    <outputs>
+        <data name="output_div" from_work_dir="Valeurs_stat.tabular" format="tabular" label="Diversity index"/>
+        <data name="output_rdata" from_work_dir="div_df.RDS" format="rdata" label="Diversity Rdata"/>
+        <collection type="list" name="plots" label="Diversity plot">
+            <discover_datasets pattern="(?P&lt;designation&gt;.+)\.png" visible="false" format="png"/>
+        </collection>
+    </outputs>
+    <tests>
+        <test expect_num_outputs="3">
+            <param name="input_data" value="Clean_Rdata.rdata"/>
+            <output name="output_div">
+                <assert_contents>
+                    <has_n_columns n="20"/>
+                </assert_contents>
+            </output>
+            <output name="output_rdata">
+                <assert_contents>
+                    <has_text text="no"/>
+                </assert_contents>
+            </output>
+            <output_collection name="plots" type="list" count="14"/>
+        </test>
+    </tests>
+    <help><![CDATA[
+====================
+Diversity indicators
+====================
+
+
+**What it does**
+
+Calculates the diversity indicators (Shannon, Simpson, ...). 
+
+**Input description**
+
+Clean Rdata file from the previous tool Dissimilarity.
+
++----------------+
+|      Rdata     |
++================+
+|   Clean data   |
++----------------+
+|       ...      |
++----------------+
+
+
+**Output**
+
+- 1 .RDS file
+- 1 tabular file for all the diversity indices
+- Multiple png plots one for each indices
+
+
+
+    ]]>    </help>
+        <expand macro="cb_bibref"/>
+</tool>