view PAMPA_GLM.xml @ 6:b40fecef616b draft default tip

"planemo upload for repository https://github.com/ColineRoyaux/PAMPA-Galaxy commit 65ab5b6fe84871db0fe18244d805cea19a44e830"
author ecology
date Sat, 26 Jun 2021 07:20:12 +0000
parents 8db02073b671
children
line wrap: on
line source

<tool id="pampa_glmcomm" name="Compute GLM on community data" version="@VERSION@">
    <description>Compute a GLM of your choice on community data</description>
    <macros>
        <import>pampa_macros.xml</import>
    </macros>
    <expand macro="GLM_requirements"/>
    <command detect_errors="exit_code"><![CDATA[
        Rscript 
         '$__tool_directory__/FunctExeCalcGLMGalaxy.r' 
         '$input_metric'
         '$input_unitobs'
         '$varint'
         '$varrep'
         '$varrand'
         '$sep'
         #if $settings.advanced=='advanced' 
             $settings.distrib
             $settings.rdata
         #else
             'None'
             'false'
         #end if
         'unit'
         '$__tool_directory__/FunctPAMPAGalaxy.r' 
         '$output_summary'
         '$output_recap'
         '$output_rate'
         #if $settings.advanced=='advanced'
             #if $settings.rdata=='true'
                 '$output_GLM'
             #end if
         #end if
    ]]>
    </command>
    <inputs>
        <expand macro="pampa_input_GLM"/>
        <param name="sep" type="data_column" data_ref="input_unitobs" use_header_names="true" force_select="false" label="Separation factor of your analysis from unitobs file" help= "Choose the field of the separation factor, for each level of this factor, one GLM will be computed."/>
        <expand macro="pampa_var_GLM"/>
        <conditional name="settings">
            <expand macro="pampa_advanced_params_select_GLM"/>
        </conditional>
    </inputs>
    <outputs>
        <data name="output_summary" from_work_dir="GLMSummary.tabular" format="tabular" label="GLM - Results from your community analysis on ${on_string}"/>
        <expand macro="pampa_output_GLM"/>
    </outputs>
    <tests>
        <test expect_num_outputs="4">
            <param name="input_metric" value="Community_metrics_cropped.tabular"/>
            <param name="input_unitobs" value="Unitobs.tabular"/>
            <param name="varint" value="4"/>
            <param name="varrep" value="year,site,habitat"/>
            <param name="varrand" value="site"/>
            <param name="sep" value="22"/>
            <param name="advanced" value="advanced"/>
            <param name="distrib" value="None"/>
            <param name="rdata" value="true"/>
            <output name="output_summary">
                <assert_contents> 
                    <has_n_lines n="9"/>
                </assert_contents> 
            </output>
            <output name="output_recap">
                <assert_contents>
                    <has_n_lines n="412"/>
                </assert_contents> 
            </output>
            <output name="output_rate">
                <assert_contents> 
                    <has_n_lines n="50"/>
                </assert_contents> 
            </output>
            <output_collection name="output_GLM"  type="list" count="3">
                <element name="GLM_HR" ftype="Rdata">
                    <assert_contents> 
                        <has_size value="185018" delta="10000"/>
                    </assert_contents> 
                </element>
                <element name="GLM_RE" ftype="Rdata">
                    <assert_contents> 
                        <has_size value="168685" delta="10000"/>
                    </assert_contents> 
                </element>
                <element name="global_GLM" ftype="Rdata">
                    <assert_contents> 
                        <has_size value="195910" delta="10000"/>
                    </assert_contents> 
                </element>
            </output_collection>
        </test>
    </tests>
    <edam_topics>
       <edam_topic>topic_0610</edam_topic>
       <edam_topic>topic_3050</edam_topic>
    </edam_topics>
    <help><![CDATA[
==============================================================
Compute GLM on community data with selected interest variables
==============================================================

**What it does**

This tool from PAMPA toolsuite computes Generalized Linear Models on community data. 

It allows user to choose composition of the model :

- Response variable among numeric or integer variables of the input file

- Explanatory variables among year, site and/or habitat

- Allocation of random effect on year and/or site

- (optional) Separation factor to compute several GLMs

|

**Input description**

A tabular file with community data. Must at least contain two or three columns depending on the case : 

- ['year' and 'location'] or ['observation.unit'] 

- At least one community metric 

+----------------------+---------+---------+-----+       
|   observation.unit   | metric1 | metric2 | ... |            
+======================+=========+=========+=====+        
|   year_locationID    |    2    |   0.4   | ... |            
+----------------------+---------+---------+-----+        
|          ...         |   ...   |   ...   | ... |       
+----------------------+---------+---------+-----+           

OR

+------+----------+---------+---------+-----+
| year | location | metric1 | metric2 | ... |
+======+==========+=========+=========+=====+
| 2000 |locationID|    2    |   0.4   | ... |
+------+----------+---------+---------+-----+
|  ... |    ...   |   ...   |   ...   | ... |
+------+----------+---------+---------+-----+

The first input may be extracted from the 'Calculate community metrics' tool.

A tabular file with observation unit data which contains at least as much columns as used explanatory variables and separation factor in addition with the 'observation.unit' column.

+----------------------+---------+--------+------------+-----+       
|   observation.unit   |   site  |  year  |  habitat   | ... |            
+======================+=========+========+============+=====+        
|    year_locationID   | site ID |  2000  | habitatID  | ... |            
+----------------------+---------+--------+------------+-----+        
|          ...         |   ...   |   ...  |     ...    | ... |       
+----------------------+---------+--------+------------+-----+ 

The site may represent the same entity as the location or represent an aggregation of several locations

|

**Output**

Three text files : 

- A first tabular file with GLM results. When a separation factor is selected, one analysis is computed for every level and the last analysis is on the whole dataset.

- A second text file with simple statistics on the whole dataset.

- A third text file with ratings of your analysis based on several criterias.

|

**Source**

Derived from PAMPA scripts (https://wwz.ifremer.fr/pampa/Meth.-Outils/Outils) written by Yves Reecht.

  ]]></help>
  <expand macro="pampa_bibref" />
</tool>