view BRT_model.xml @ 3:a56c413f3a98 draft

planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/Ecoregionalization_workflow commit e03df85746a3b61a382a5ee7e3357a8bf42a5097
author ecology
date Wed, 11 Sep 2024 09:19:41 +0000
parents f8962f1c832a
children 2129484beb61
line wrap: on
line source

<tool id="ecoregion_brt_analysis" name="BRT tool prediction" version="0.1.0+galaxy0" profile="22.05">
    <description>for species distribution modelling</description>
    <requirements>
       <requirement type="package" version="4.3.3">r-base</requirement>
       <requirement type="package" version="2.1.8">r-gbm</requirement>
       <requirement type="package" version="3.4.2">r-ggplot2</requirement>
       <requirement type="package" version="1.3-14">r-dismo</requirement>
    </requirements>
    <command detect_errors="exit_code"><![CDATA[
        Rscript
         '$__tool_directory__/brt.R'
         '$enviro'
         '$species_files'
         '$abioticname'
         '$outputpred'
         '$outputval'
         '$outputspdistri'
         '$outputplots'
         '$dec_env'
         '$dec_species'
    ]]></command>
    <inputs>
      <param name="enviro" type="data" format="tabular" label="Input your environment data file of your study area (tabular format only)" help="See example below"/>
      <param name="dec_env" type="select" label="What's the decimal separator of your environement data file ?">
              <option value=".">Dot</option>
              <option value=",">Comma</option>
      </param>
      <param type="data" name="species_files" label="Input your occurrences data file(s) containing also the environemental caracteristics where the species has been observe (tabular format only)" format="tabular" multiple="True" help="See example below"/>
      <param name="dec_species" type="select" label="What's the decimal separator of your occurrences data file(s) ?" help="It must be the same for all your occurences data files" >
              <option value=".">Dot</option>
              <option value=",">Comma</option>
      </param>
      <param name="abioticname" type="data_column" label="Choose column(s) where your abiotic parameter are in your environment data file." data_ref="enviro" multiple="true" use_header_names="true"/>
    </inputs>
    <outputs>
      <collection name="outputpred" type="list" label="Prediction files">
            <discover_datasets pattern="(?P&lt;designation&gt;.+_brts_pred_ceamarc)\.tsv" format="tabular"/>
      </collection>
      <collection name="outputval" type="list" label="Validation files (Taxa, AUC, Tree complexity, Total deviance explained)">
            <discover_datasets pattern="(?P&lt;designation&gt;.+_brts_validation_ceamarc)\.tsv" format="tabular" />
      </collection>
      <collection name="outputspdistri" type="list" label="Species distribution prediction maps" >
            <discover_datasets pattern="(?P&lt;designation&gt;.+)\.png" format="png" />
      </collection>  
      <collection name="outputplots" type="list" label="Partial dependence plots" >
            <discover_datasets pattern="(?P&lt;designation&gt;.+)\.pdf" format="pdf" />  
      </collection>
    </outputs>
    <tests>
        <test>
            <param name="enviro" value="ceamarc_env.tsv"/>
            <param name="species_files" value="cnidaria_filtered.tsv"/>
            <param name="abioticname" value="3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19"/>
            <param name="dec_env" value="Dot"/>
            <param name="dec_species" value="Comma"/>
            <output_collection name='outputpred' type = "list" count="1"/>
            <output_collection name='outputval' type = "list" count="1"/>
            <output_collection name='outputspdistri' type = "list" count="2"/>
            <output_collection name='outputplots' type = "list" count="2"/>
        </test>
    </tests>
    <help><![CDATA[
==================    
**What it does ?**
==================

This Galaxy tool is made to characterize the distribution of each taxon by giving a probability indicator taxon presence for each environmental layer pixel. To do this, the boosted regression trees (BRT) method (Elith *et al*., 2008) is used to fit the relationship between the presence of a single taxon and the environmental conditions where the taxon has been detected. 
Two steps are performed in this script: the creation of the taxon distribution model and the use of this model to obtain a predictive index. The prediction index obtained from each BRT model for each pixel of the environmental layers is an approximation of the probability of detection of the presence of the taxon.

===================         
**How to use it ?**
===================
        
This tool takes in input the environmental data (for all the study areas) as well as the species occurrence data and the environmental characteristics where the species has been observed. See examples of inputs below. These files need to be in tabular format. You also need to select the column where your abiotic parameters are in your environment data file.
 
 .. class:: infomark 
    Your abiotic parameters must be present in your occurrence data file(s) and must be named the same as in your environment file. This file can be obtain with the tool called GeoNearestNeighbor.
    GeoNearestNeighbor tool allows you to merge two data tables according to their latitude and longitude coordinates, finding the closest points.
 
This tool gives in output a file containing the predictions of the probability of the presence of each taxon for each pixel (latitude, longitude) environmental, a visualization of these pixels for each taxon and graphs showing the percentage of model explanation for each environmental parameter.

**Example of environmental data input :** 
-----------------------------------------

+------+------+---------+------+--------------+-----+
| long | lat  |  Carbo  | Grav |  Maxbearing  | ... |
+------+------+---------+------+--------------+-----+
|139.22|-65.57|   0.88  |28.59 |     3.67     | ... |
+------+------+---------+------+--------------+-----+
|139.22|-65.57|   0.88  |28.61 |     3.64     | ... |
+------+------+---------+------+--------------+-----+
| ...  | ...  |   ...   | ...  |     ...      | ... |
+------+------+---------+------+--------------+-----+

**Example of occurence data input :** 
-------------------------------------

+---------+----------+-----------+------------------------+-----------+-----+------+--------------+-----+
| station |   lat    |   long    |Acanthorhabdus_fragilis | Acarnidae | ... | Grav |  Maxbearing  | ... |
+---------+----------+-----------+------------------------+-----------+-----+------+--------------+-----+
|    1    |-65,999946|142,3360535|           0            |     1     | ... |28.59 |     3.67     | ... |
+---------+----------+-----------+------------------------+-----------+-----+------+--------------+-----+
|   10    |-66,335407| 141,3028  |           0            |     1     | ... |28.61 |     3.64     | ... |
+---------+----------+-----------+------------------------+-----------+-----+------+--------------+-----+
|   ...   |   ...    |   ...     |          ...           |    ...    | ... | ...  |     ...      | ... |
+---------+----------+-----------+------------------------+-----------+-----+------+--------------+-----+

    ]]></help>
    <citations>
       <citation type="doi">10.32614/CRAN.package.dismo</citation>
       <citation type="doi">10.32614/CRAN.package.gbm</citation>
       <citation type="doi">10.32614/CRAN.package.ggplot2</citation>
    </citations>
</tool>