view stat_presence_abs.xml @ 1:9a2e0195bb43 draft default tip

"planemo upload for repository https://github.com/Marie59/Data_explo_tools commit 60627aba07951226c8fd6bb3115be4bd118edd4e"
author ecology
date Fri, 13 Aug 2021 18:18:21 +0000
parents e5552099d0e3
children
line wrap: on
line source

<tool id="ecology_stat_presence_abs" name="Statistics on presence-absence" version="@VERSION@" profile = "20.01">
    <description>of a numeric variable</description>
    <macros>
        <import>macro.xml</import>
    </macros>
    <expand macro="Explo_requirements">
        <requirement type="package" version="1.1.1">r-cowplot</requirement>
        <requirement type="package" version="0.1.3">r-ggcorrplot</requirement>
        <requirement type="package" version="1.0.5">r-dplyr</requirement>
    </expand>
    <command detect_errors="exit_code"><![CDATA[
        Rscript
            '$__tool_directory__/graph_stat_presence_abs.r'
            '$input'
            '$colnames'
            '$variable1'
            '$species'
            '$location'
            '$time'
            '$__tool_directory__/functions.r'
            '$output_md'
        ]]>
    </command>
    <inputs>
        <expand macro="explo_input"/>
        <param name="variable1" label="Select a column containing numerical values (such as the abundance) " type="data_column" data_ref="input" numerical="true" use_header_names="true"/>
         <param name="species" label="Select the column of the x-axis : most commonly species" type="data_column" data_ref="input" use_header_names="true" help= "Variable for dispersion plot and to see the correlation between zeros"/>
        <param name="location" label="Select column containing locations " type="data_column" data_ref="input" use_header_names="true"/>
        <param name="time" label="Select column containing temporal data (year, date, ...) " type="data_column" data_ref="input" use_header_names="true"/>
    </inputs>
    <outputs>
        <data name="output_md" from_work_dir="Med_Disp.png" format="png" label="Boxplot and dispersion plot"/>
        <data name="output_0" from_work_dir="0_pb.png" format="png" label="Absence-correlation plot"/>
    </outputs>
    <tests>
        <test>
            <param name="input" value="Reel_life_survey_fish_modif.tabular"/>
            <param name="colnames" value="true"/>
            <param name="variable1" value="18"/>
            <param name="variable2" value="15"/>
            <output name="output_md" ftype="png">
                <assert_contents>
                    <has_text text="PNG"/>
                </assert_contents>
            </output>
            <output name="output_0" ftype="png">
                <assert_contents>
                    <has_text text="PNG"/>
                </assert_contents>
            </output>
        </test>
    </tests>
    <expand macro="topic"/>
    <help><![CDATA[
===================================================================================================================
Create a boxplot, visualize the dispersion of a numeric variable and visualize correlation between species absences
===================================================================================================================


**What it does**


This tool creates:

- A boxplot of a numerical value (like the abundance) and a dispersion plot of this value according to a variable such as species.

- A correlation plot using the presence of zeros in the numerical value. Handy to see if there is a correlation between the absence of two species and suggest a co-dependency.

Don't use datasets with too much species, it won't be readable.

**Input description**

A tabular file with observation data. Must at least contain four columns a numerical value (ex: abundance), a temporal referential (year, date, ...), locations and species.

+-------------+------------+---------------+-------------+
|   number    |    time    | species.code  |   location  |
+=============+============+===============+=============+
|      2      |    date    |   speciesID   |     site    |
+-------------+------------+---------------+-------------+
|     ...     |     ...    |      ...      |     ...     |
+-------------+------------+---------------+-------------+

**Output**

Two png files containing the three plots.
    ]]>    </help>
    <expand macro="explo_bibref"/>

</tool>