comparison mainglm.xml @ 0:df3ce23d0d23 draft

"planemo upload for repository https://github.com/Alanamosse/Galaxy-E/tree/stoctool/tools/stoc commit f82f897ab22464de40c878e17616333855814e25"
author ecology
date Thu, 02 Apr 2020 03:32:56 -0400
parents
children a961be0a964f
comparison
equal deleted inserted replaced
-1:000000000000 0:df3ce23d0d23
1 <tool id="stoceps_glm" name="Estimate temporal population evolution" version="@VERSION@">
2 <description>by species</description>
3 <macros>
4 <import>stoceps_macros.xml</import>
5 </macros>
6 <expand macro="mainglm_requirements"/>
7 <command detect_errors="exit_code"><![CDATA[
8 Rscript
9 '$__tool_directory__/ExeMainGlmGalaxy.r'
10 '$input'
11 '$inputtabSpecies'
12 #if $settings.advanced=='advanced'
13 'mainglm'
14 $settings.sp_code
15 $settings.compute_ic
16 #else
17 'mainglm'
18 ''
19 'TRUE'
20 #end if
21 '$__tool_directory__/FunctTrendSTOCGalaxy.r'
22
23
24 '$yearly_variations'
25 '$global_tendencies'
26 #if $settings.advanced=='advanced'
27 #if $settings.return_plot=='plot'
28 '$plots'
29 #end if
30 #end if
31 ]]>
32 </command>
33 <inputs>
34 <expand macro="stoceps_input_filtered"/>
35 <param name="inputtabSpecies" type="data" format="tabular" label="Species file" help="Input species tabular file, with 5 columns (species ID, species name, species scientific name, specialization status)." />
36 <conditional name="settings">
37 <expand macro="stoceps_advanced_params_select"/>
38 <when value="advanced">
39 <param name="sp_code" type="select" label="Filter species to exclude" help="Create a subsample by selecting species codes you don't want to use." multiple="true" optional="true">
40 <options from_dataset="input">
41 <column name="value" index="2"/>
42 <filter type="unique_value" name="espece" column="2"/>
43 </options>
44 <sanitizer>
45 <valid initial="string.printable">
46 <remove value="&quot;"/>
47 </valid>
48 </sanitizer>
49 </param>
50 <param name="return_plot" type="boolean" truevalue="plot" falsevalue="noplot" checked="yes" help="All the figures will be stocked in a datacollection" label="Return visualizations."/>
51 <expand macro="stoceps_compute_ic"/>
52 </when>
53 </conditional>
54 </inputs>
55 <outputs>
56 <data name="yearly_variations" from_work_dir="Output/mainglm/variationsAnnuellesEspece_mainglm.tabular" format="tabular" label="GLM - Yearly variations on ${on_string}"/>
57 <data name="global_tendencies" from_work_dir="Output/mainglm/tendanceGlobalEspece_mainglm.tabular" format="tabular" label="GLM - Global species tendencies on ${on_string}"/>
58 <collection type="list" name="plots">
59 <filter>return_plot == 'plot'</filter>
60 <discover_datasets pattern="(?P&lt;designation&gt;.+)\.png" visible="false" format="png" directory="Output/mainglm/"/>
61 </collection>
62 </outputs>
63 <tests>
64 <test>
65 <param name="inputtabSpecies" value="tabSpecies.csv"/>
66 <param name="input" value="Datafilteredfortrendanalysis.tabular"/>
67 <param name="advanced" value="simple"/>
68 <output name="yearly_variations">
69 <assert_contents>
70 <has_n_lines n="37"/>
71 <has_n_columns n="14"/>
72 <has_size value="3247" delta="100"/>
73 </assert_contents>
74 </output>
75 <output name="global_tendencies">
76 <assert_contents>
77 <has_n_lines n="3"/>
78 <has_size value="468" delta="50"/>
79 </assert_contents>
80 </output>
81 <output_collection name="plots" type="list" count="2">
82 <element name="ALAARV_mainglm">
83 <assert_contents>
84 <has_text text="PNG"/>
85 </assert_contents>
86 </element>
87 <element name="PARCAE_mainglm">
88 <assert_contents>
89 <has_text text="PNG"/>
90 </assert_contents>
91 </element>
92 </output_collection>
93 </test>
94 </tests>
95 <help><![CDATA[
96 =================================================
97 STOC Estimate species population evolution
98 =================================================
99
100 **What it does**
101
102 Compute and plot evolution of species population, using a glm model.
103
104 |
105
106 **Input description**
107
108 A first mandatory tabular file with species count shaped and filtered with the STOCs 'Preprocess population data' ans 'Filter species' tools.
109
110 A second optional "species details file" containing indicator status of species (Column with TRUE or FALSE), including the species name or ID (one used in the species count data). If you are not analyzing the default STOC data, you need one file of this kind.
111
112 Example dataset ::
113
114 "espece" "nom" "nomscientific" "indicateur" "specialisation"
115 "ACCGEN" "Autour des palombes" "Accipiter gentilis" FALSE ""
116 "ACCNIS" "Epervier d'Europe" "Accipiter nisus" FALSE ""
117 "ACRARU" "Rousserolle turdoïde" "Acrocephalus arundinaceus" FALSE ""
118 "ACRMEL" "Lusciniole à moustaches" "Acrocephalus melanopogon" FALSE ""
119 "ACRPAL" "Phragmite aquatique" "Acrocephalus paludicola" FALSE ""
120 "ACRRIS" "Rousserolle verderolle" "Acrocephalus palustris" FALSE ""
121 "ACRSCH" "Phragmite des joncs" "Acrocephalus schoenobaenus" FALSE ""
122 "ACRSCI" "Rousserolle effarvatte" "Acrocephalus scirpaceus" FALSE ""
123 "ACTHYP" "Chevalier guignette" "Actitis hypoleucos" FALSE ""
124 "AEGCAU" "Mésange à longue queue" "Aegithalos caudatus" FALSE ""
125 "AEGFUN" "Chouette de Tengmalm" "Aegolius funereus" FALSE ""
126 "AIXGAL" "Canard mandarin" "Aix galericulata" FALSE ""
127 "AIXSPO" "Canard carolin" "Aix sponsa" FALSE ""
128 "ALAARV" "Alouette des champs" "Alauda arvensis" TRUE "milieux agricoles"
129
130 |
131
132 **Output**
133
134 For each species present in the data, a plot of populations trend is created and stocked in a common data collection.
135
136 Two tabular files are created, they describe global tendencies and yearly variations.
137
138 |
139
140 **Source**
141
142 UnPublished script available at http://www.vigienature.fr/sites/vigienature/files/atoms/files/analysestoceps_0.zip
143 the first version written by Romain Lorrilliere
144
145 Original script information:
146
147 Estimate temporal evolution of population per species - ExeMainGlmGalaxy.r
148 This script analyse the temporal evolution of species population and create graphical vizualisation.
149
150 Script needs the followings inputs :
151 - stoc or community data filtered with at least 4 columns: year, site, species, and abundance with 0. Corresponding to "observed" or predicted 0 abundance. May come from the tools "Preprocess population data for evolution trend analyzes" (ExemakeTableAnalyseGalaxy.r) followed by "Filter species with rare and low abundances" (ExeFilteringRareLowabundSPGalaxy.r).
152 - species details file with name and indicator status file with at least 2 columns: the species name or species ID (found in the community data or in stoc data) and his status as indicator species
153 - file that stocks functions : "FunctTrendSTOCGalaxy.r"
154
155
156 Arguments are :
157 - spExclude: list of species (using the the species name or ID) that you want to exclude
158 - assessIC : compute and show confidence interval in plots (TRUE / FALSE)
159 - analysis custom id
160
161
162 How to execute, eg :
163 # all files are available in github repo
164 #Exec id=mainglm, return IC on plot, no species excluded
165 $ Rscript ExeMainGlmGalaxy.r' Datafilteredfortrendanalysis.tabular tabSpecies.csv 'mainglm' '' 'TRUE' FunctTrendSTOCGalaxy.r
166
167
168 Outputs are created in an Output repo :
169 GLM gives 1 graph per species and 2 tables:
170 - nameofspecies_id.png (one plot per species)
171 - tendanceGlobalEspece_id.tabular
172 - variationsAnnuellesEspece_id.tabular
173
174
175 R library needed
176 r-lme4 version 1.1.18.1
177 r-ggplot2 version 3.0.0
178 r-speedglm version 0.3.2
179 r-arm version 1.10.1
180 r-reshape version 0.8.8
181 r-data.table version 1.12.0
182 r-reshape2 version 1.4.3
183 ]]></help>
184 <expand macro="stoceps_bibref" />
185 </tool>