comparison presence_abs_abund.xml @ 0:f9bce5117161 draft

"planemo upload for repository https://github.com/Marie59/Data_explo_tools commit 2f883743403105d9cac6d267496d985100da3958"
author ecology
date Tue, 27 Jul 2021 16:56:39 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f9bce5117161
1 <tool id="ecology_presence_abs_abund" name="Presence-absence and abundance" version="@VERSION@" profile="20.01">
2 <description>Community abundance map, presence barplot and rarefaction curves</description>
3 <macros>
4 <import>macro.xml</import>
5 </macros>
6 <expand macro="Explo_requirements">
7 <requirement type="package" version="2.5_7">r-vegan</requirement>
8 </expand>
9 <command detect_errors="exit_code"><![CDATA[
10 Rscript
11 '$__tool_directory__/graph_pres_abs_abund.r'
12 '$input'
13 '$colnames'
14 #if $method.type=='abund':
15 'TRUE'
16 'FALSE'
17 'FALSE'
18 '$method.latitude'
19 '$method.longitude'
20 '$method.individual'
21 ''
22 ''
23 '$method.species'
24 #elif $method.type=='pres_abs':
25 'FALSE'
26 'TRUE'
27 'FALSE'
28 ''
29 ''
30 ''
31 '$method.site'
32 ''
33 '$method.species'
34 #else:
35 'FALSE'
36 'FALSE'
37 'TRUE'
38 ''
39 ''
40 ''
41 ''
42 '$method.number'
43 '$method.species'
44 #end if
45 '$abundance'
46 ]]>
47 </command>
48 <inputs>
49 <expand macro="explo_input"/>
50 <conditional name="method">
51 <param name="type" type="select" label="Variables presence, absence and abundance" display="radio">
52 <option value="abund">Abundance map in the environment </option>
53 <option value="pres_abs">Presence count of taxons (barplot)</option>
54 <option value="rare">Rarefaction curve of species</option>
55 </param>
56 <when value="abund">
57 <param name="latitude" label="Select column containing latitudes " type="data_column" data_ref="input" numerical="true" use_header_names="true"/>
58 <param name="longitude" label="Select column containing longitudes" type="data_column" data_ref="input" numerical="true" use_header_names="true"/>
59 <param name="individual" type="text" label="What do you study in this analysis ?" help="Simply allows you to use any name you want in your plot's title (ex : ''Bats'', ''Chiroptera'')"/>
60 <param name="species" label="Select column containing taxon " type="data_column" data_ref="input" numerical="false" use_header_names="true"/>
61 </when>
62 <when value="pres_abs">
63 <param name="site" label="Select column containing your separation variable" type="data_column" help="ex : location, protection status, ..." data_ref="input" use_header_names="true"/>
64 <param name="species" label="Select column containing taxon " type="data_column" data_ref="input" numerical="false" use_header_names="true"/>
65 </when>
66 <when value="rare">
67 <param name="number" label="Size of subsamples" type="text" help="Rarefaction curves are calculated over random subsamples, you can choose the size you want depending on your data and the analysis you need. Should be smaller than the size of your community"/>
68 <param name="species" label="Select column containing species " type="data_column" data_ref="input" numerical="false" use_header_names="true"/>
69 </when>
70 </conditional>
71 <param name="abundance" label="Select column containing abundances " type="data_column" data_ref="input" numerical="true" use_header_names="true"/>
72 </inputs>
73 <outputs>
74 <data name="output_abund" from_work_dir="Data_abund.txt" format="txt" label="Data used">
75 <expand macro="explo_filter_abund"/>
76 </data>
77 <data name="output_pres_abs" from_work_dir="Locations.txt" format="txt" label="Locations used">
78 <expand macro="explo_filter_pres_abs"/>
79 </data>
80 <data name="output_rare" from_work_dir="Rare.tabular" format="tabular" label="Rare indice">
81 <expand macro="explo_filter_rare"/>
82 </data>
83 <collection type="list" name="plots">
84 <discover_datasets pattern="(?P&lt;designation&gt;.+)\.png" visible="false" format="png"/>
85 </collection>
86 </outputs>
87 <tests>
88 <test>
89 <param name="input" value="Reel_life_survey_fish_modif2.tabular"/>
90 <param name="colnames" value="true"/>
91 <conditional name="method">
92 <param name="abund" value="true"/>
93 <param name="latitute" value="9"/>
94 <param name="longitude" value="10"/>
95 <param name="individual" value="fishes"/>
96 <param name="species" value="15"/>
97 </conditional>
98 <param name="abundance" value="18"/>
99 <output name="output_abund">
100 <assert_contents>
101 <has_n_lines n="12"/>
102 </assert_contents>
103 </output>
104 <output_collection name="plots" type="list" count="1">
105 <element name="mappy" ftype="png">
106 <assert_contents>
107 <has_text text="PNG"/>
108 </assert_contents>
109 </element>
110 </output_collection>
111 </test>
112 </tests>
113 <expand macro="topic"/>
114 <help><![CDATA[
115 =============================================================================
116 Map of community abundance, presence barplot of taxons and rarefaction curves
117 =============================================================================
118
119 **Map of community abundance**
120
121
122 This tool computes abundances of each taxon for each location and plots it according to longitude and latitude. Size of dots permits to get information on the abundance found at the location. Under 10 taxons, colors represents the different taxons and over 10 taxons it represents the abundance as well.
123 Handy to get spatialized view of your abundances and see if some locations can pull results in a certain direction.
124
125
126 Input description :
127
128
129 A tabular file with observation data. Must at least contain four columns abundance, latitude, longitude and taxon (any taxon level : species, family, ...).
130
131
132 +----------+-----------+---------+------------+
133 | latitude | longitude | taxon | number |
134 +==========+===========+=========+============+
135 | lat |long | taxonID | 4 |
136 +----------+-----------+---------+------------+
137 | ... | ... | ... | ... |
138 +----------+-----------+---------+------------+
139
140
141 Output description :
142
143
144 A png file with every abundance dots for each location, a map without base.
145 A text file containing the geographical range of the data.
146
147
148 **Presence count of taxons (barplot)**
149
150
151 This tool computes the number of presence of each taxon according to a separation factor (ex: location, protection status, ...) and produces a barplot representing the relative presence count of each taxon. Handy to see the most ubiquitous taxons in the studied community.
152 If more than 40 different taxons in the separations, plots are hard to read properly so they won't be produced. In that case you can cut your data into smaller parts to get several readable representations for one separation.
153
154
155 Input description :
156
157
158 A tabular file with observation data. Must at least contain three columns species, abundance and the separation variable.
159
160
161 +--------------+------------+------------+
162 | species.code | variable | number |
163 +==============+============+============+
164 | speciesID | site | 4 |
165 +--------------+------------+------------+
166 | ... | ... | ... |
167 +--------------+------------+------------+
168
169
170 Output description :
171
172
173 A png file with barplots separated according to the variable and with multiple parts in different colors according to the different taxons.
174
175
176 **Rarefaction curve of species**
177
178
179 This tool computes the rarefaction curves of each species. Permits you to assess species richness according to the number of samples. If there are more than 30 species in your data you will have one plot for each species and not all the curves on one plot.
180 Using the R function rarefy (https://www.rdocumentation.org/packages/vegan/versions/2.4-2/topics/rarefy).
181
182
183 Input description :
184
185
186 A tabular file with observation data. Must at least contain two columns abundance and species.
187 A numeric value for the rarefaction indice (number of subsamples) must be entered.
188
189
190 +-----------+------------+
191 | species | number |
192 +===========+============+
193 | speciesID | 4 |
194 +-----------+------------+
195 | ... | ... |
196 +-----------+------------+
197
198
199 Output description :
200
201
202 A png file with one or multiple plots showing the rarefaction curves for each species according to the chosen rarefaction indice.
203 ]]> </help>
204 <expand macro="book_bibref"/>
205
206 </tool>