Mercurial > repos > ecology > xarray_select
comparison xarray_select.xml @ 3:bf595d613af4 draft
"planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit 2166974df82f97557b082a9e55135098e61640c4"
author | ecology |
---|---|
date | Thu, 20 Jan 2022 17:07:19 +0000 |
parents | 123a9a629bef |
children | b393815e4cb7 |
comparison
equal
deleted
inserted
replaced
2:123a9a629bef | 3:bf595d613af4 |
---|---|
1 <tool id="xarray_select" name="NetCDF xarray Selection" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@"> | 1 <tool id="xarray_select" name="NetCDF xarray Selection" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> |
2 <description>extracts variable values with custom conditions on dimensions</description> | 2 <description>extracts variable values with custom conditions on dimensions</description> |
3 <macros> | 3 <macros> |
4 <import>macros.xml</import> | 4 <import>macros.xml</import> |
5 </macros> | 5 </macros> |
6 <expand macro="edam_ontology"/> | 6 <expand macro="edam_ontology"/> |
7 <requirements> | 7 <requirements> |
8 <requirement type="package" version="@TOOL_VERSION@">xarray</requirement> | |
8 <requirement type="package" version="3">python</requirement> | 9 <requirement type="package" version="3">python</requirement> |
9 <requirement type="package" version="1.5.6">netcdf4</requirement> | 10 <requirement type="package" version="1.5.6">netcdf4</requirement> |
10 <requirement type="package" version="@TOOL_VERSION@">xarray</requirement> | |
11 <requirement type="package" version="0.9.0">geopandas</requirement> | 11 <requirement type="package" version="0.9.0">geopandas</requirement> |
12 <requirement type="package" version="1.7.1">shapely</requirement> | 12 <requirement type="package" version="1.7.1">shapely</requirement> |
13 </requirements> | 13 </requirements> |
14 <command detect_errors="exit_code"><![CDATA[ | 14 <command detect_errors="exit_code"><![CDATA[ |
15 mkdir output_dir && | 15 mkdir output_dir && |
16 #if $condi_source_coord.coord_source=="coord_from_file" | 16 #if $condi_source_coord.coord_source=="coord_from_file" |
17 echo "Galaxy xarray version @TOOL_VERSION@" > output_dir/version.tabular && | 17 echo "Galaxy xarray version @TOOL_VERSION@"> output_dir/version.tabular && |
18 #end if | 18 #end if |
19 python '$__tool_directory__/xarray_tool.py' '$input' --select '$var' | 19 python '$__tool_directory__/xarray_tool.py' '$input' --select '$var' |
20 --verbose | 20 --verbose |
21 --filter | 21 --filter |
22 #for $i,$uc in enumerate($user_choice) | 22 #for $i,$uc in enumerate($user_choice) |
63 --lonname $condi_source_coord.condi_coord.lon_dim | 63 --lonname $condi_source_coord.condi_coord.lon_dim |
64 --lonvalE $condi_source_coord.condi_coord.lon_valE | 64 --lonvalE $condi_source_coord.condi_coord.lon_valE |
65 --lonvalW $condi_source_coord.condi_coord.lon_valW | 65 --lonvalW $condi_source_coord.condi_coord.lon_valW |
66 #end if | 66 #end if |
67 #end if | 67 #end if |
68 ]]></command> | 68 ]]> </command> |
69 <inputs> | 69 <inputs> |
70 <param type="data" name="input" label="Input netcdf file" format="netcdf"/> | 70 <param type="data" name="input" label="Input netcdf file" format="netcdf"/> |
71 <param type="data" label="Tabular of variables" name="var_tab" format="tabular" help="Select the tabular file which summarize the available variables and dimensions."/> | 71 <param type="data" label="Tabular of variables" name="var_tab" format="tabular" help="Select the tabular file which summarize the available variables and dimensions."/> |
72 | 72 |
73 <param name="var" type="select" label="Choose the variable to extract"> | 73 <param name="var" type="select" label="Choose the variable to extract"> |
83 <option value="coord_from_file">Use coordinates from input file</option> | 83 <option value="coord_from_file">Use coordinates from input file</option> |
84 </param> | 84 </param> |
85 | 85 |
86 <when value="coord_from_file"> | 86 <when value="coord_from_file"> |
87 <param type="data" label="Tabular of coord" name="coord_tabular" format="tabular" help="Format : Latitude Longitude"/> | 87 <param type="data" label="Tabular of coord" name="coord_tabular" format="tabular" help="Format : Latitude Longitude"/> |
88 <param name="lat_dim" type="select" label="Name of latitude coordinate" > | 88 <param name="lat_dim" type="select" label="Name of latitude coordinate"> |
89 <options from_dataset="var_tab"> | 89 <options from_dataset="var_tab"> |
90 <column name="value" index="0"/> | 90 <column name="value" index="0"/> |
91 </options> | 91 </options> |
92 </param> | 92 </param> |
93 <param name="lon_dim" type="select" label="Name of longitude coordinate" > | 93 <param name="lon_dim" type="select" label="Name of longitude coordinate"> |
94 <options from_dataset="var_tab"> | 94 <options from_dataset="var_tab"> |
95 <column name="value" index="0"/> | 95 <column name="value" index="0"/> |
96 </options> | 96 </options> |
97 </param> | 97 </param> |
98 <param type="float" name="tolerance" optional="true" label="Maximum distance between original and selected value for inexact matches e.g. abs(original, index) is lower or equal to tolerance"/> | 98 <param type="float" name="tolerance" optional="true" label="Maximum distance between original and selected value for inexact matches e.g. abs(original, index) is lower or equal to tolerance"/> |
104 <option value="global">Whole available region</option> | 104 <option value="global">Whole available region</option> |
105 <option value="single">Single location</option> | 105 <option value="single">Single location</option> |
106 <option value="subregion">Sub-region extraction</option> | 106 <option value="subregion">Sub-region extraction</option> |
107 </param> | 107 </param> |
108 <when value="single"> | 108 <when value="single"> |
109 <param name="lat_dim" type="select" label="Name of latitude coordinate" > | 109 <param name="lat_dim" type="select" label="Name of latitude coordinate"> |
110 <options from_dataset="var_tab"> | 110 <options from_dataset="var_tab"> |
111 <column name="value" index="0"/> | 111 <column name="value" index="0"/> |
112 </options> | 112 </options> |
113 </param> | 113 </param> |
114 <param name="lat_val" type="float" value="0" label="Latitude"/> | 114 <param name="lat_val" type="float" value="0" label="Latitude"/> |
115 <param name="lon_dim" type="select" label="Name of longitude coordinate" > | 115 <param name="lon_dim" type="select" label="Name of longitude coordinate"> |
116 <options from_dataset="var_tab"> | 116 <options from_dataset="var_tab"> |
117 <column name="value" index="0"/> | 117 <column name="value" index="0"/> |
118 </options> | 118 </options> |
119 </param> | 119 </param> |
120 <param name="lon_val" type="float" value="0" label="Longitude"/> | 120 <param name="lon_val" type="float" value="0" label="Longitude"/> |
121 <param name="no_missing" type="boolean" value="false" label="Do not handle null/missing values (only valid for single location and multiple columns)"/> | 121 <param name="no_missing" type="boolean" value="false" label="Do not handle null/missing values (only valid for single location and multiple columns)"/> |
122 <param name="tolerance" type="float" optional="true" label="Maximum distance between original and selected value for inexact matches e.g. abs(original, index) is lower or equal to tolerance"/> | 122 <param name="tolerance" type="float" optional="true" label="Maximum distance between original and selected value for inexact matches e.g. abs(original, index) is lower or equal to tolerance"/> |
123 </when> | 123 </when> |
124 <when value="subregion"> | 124 <when value="subregion"> |
125 <param name="lat_dim" type="select" label="Name of latitude coordinate" > | 125 <param name="lat_dim" type="select" label="Name of latitude coordinate"> |
126 <options from_dataset="var_tab"> | 126 <options from_dataset="var_tab"> |
127 <column name="value" index="0"/> | 127 <column name="value" index="0"/> |
128 </options> | 128 </options> |
129 </param> | 129 </param> |
130 <param name="lat_valN" type="float" value="0" label="Latitude North"/> | 130 <param name="lat_valN" type="float" value="0" label="Latitude North"/> |
131 <param name="lat_valS" type="float" value="0" label="Latitude South"/> | 131 <param name="lat_valS" type="float" value="0" label="Latitude South"/> |
132 <param name="lon_dim" type="select" label="Name of longitude coordinate" > | 132 <param name="lon_dim" type="select" label="Name of longitude coordinate"> |
133 <options from_dataset="var_tab"> | 133 <options from_dataset="var_tab"> |
134 <column name="value" index="0"/> | 134 <column name="value" index="0"/> |
135 </options> | 135 </options> |
136 </param> | 136 </param> |
137 <param name="lon_valE" type="float" value="0" label="Longitude East"/> | 137 <param name="lon_valE" type="float" value="0" label="Longitude East"/> |
222 <filter>condi_source_coord['coord_source'] == 'coord_from_stdin'</filter> | 222 <filter>condi_source_coord['coord_source'] == 'coord_from_stdin'</filter> |
223 </data> | 223 </data> |
224 </outputs> | 224 </outputs> |
225 <tests> | 225 <tests> |
226 <test> | 226 <test> |
227 <param name="input" value="dataset-ibi-reanalysis-bio-005-003-monthly-regulargrid_1510914389133.nc"/> | 227 <param name="input" value="dataset-ibi-reanalysis-bio-005-003-monthly-regulargrid_1510914389133.nc"/> |
228 <param name="var" value="phy"/> | 228 <param name="var" value="phy"/> |
229 <param name="var_tab" value="var_tab_dataset-ibi"/> | 229 <param name="var_tab" value="var_tab_dataset-ibi"/> |
230 <conditional name="condi_source_coord"> | 230 <conditional name="condi_source_coord"> |
231 <param name="coord_source" value="coord_from_stdin"/> | 231 <param name="coord_source" value="coord_from_stdin"/> |
232 <conditional name="condi_coord"> | 232 <conditional name="condi_coord"> |
233 <param name="coord" value="single"/> | 233 <param name="coord" value="single"/> |
234 <param name="lat_dim" value="latitude"/> | 234 <param name="lat_dim" value="latitude"/> |
235 <param name="lat_val" value="44.0"/> | 235 <param name="lat_val" value="44.0"/> |
236 <param name="lon_dim" value="longitude"/> | 236 <param name="lon_dim" value="longitude"/> |
237 <param name="lon_val" value="-2.0"/> | 237 <param name="lon_val" value="-2.0"/> |
238 </conditional> | 238 </conditional> |
239 </conditional> | 239 </conditional> |
240 <output name="simpleoutput" value="Test1.tabular"> | 240 <output name="simpleoutput" value="Test1.tabular"> |
241 <assert_contents> | 241 <assert_contents> |
242 <has_text_matching expression="0\t2002-12-15\t0.5"/> | 242 <has_text_matching expression="0\t2002-12-15\t0.5"/> |
243 <has_text_matching expression="144\t2014-12-15\t0.5"/> | 243 <has_text_matching expression="144\t2014-12-15\t0.5"/> |
244 </assert_contents> | 244 </assert_contents> |
245 </output> | 245 </output> |
246 </test> | 246 </test> |
247 <test> | 247 <test> |
248 <param name="input" value="dataset-ibi-reanalysis-bio-005-003-monthly-regulargrid_1510914389133.nc"/> | 248 <param name="input" value="dataset-ibi-reanalysis-bio-005-003-monthly-regulargrid_1510914389133.nc"/> |
249 <param name="var_tab" value="var_tab_dataset-ibi"/> | 249 <param name="var_tab" value="var_tab_dataset-ibi"/> |
250 <param name="var" value="nh4"/> | 250 <param name="var" value="nh4"/> |
251 | 251 |
252 <conditional name="condi_source_coord"> | 252 <conditional name="condi_source_coord"> |
253 <param name="coord_source" value="coord_from_stdin"/> | 253 <param name="coord_source" value="coord_from_stdin"/> |
254 <conditional name="condi_coord"> | 254 <conditional name="condi_coord"> |
255 <param name="coord" value="global"/> | 255 <param name="coord" value="global"/> |
256 </conditional> | 256 </conditional> |
257 </conditional> | 257 </conditional> |
258 <section name="time"> | 258 <section name="time"> |
259 <conditional name="condi_datetime"> | 259 <conditional name="condi_datetime"> |
260 <param name="datetime" value="yes"/> | 260 <param name="datetime" value="yes"/> |
261 <conditional name="condi_between"> | 261 <conditional name="condi_between"> |
262 <param name="comparator" value="sl"/> | 262 <param name="comparator" value="sl"/> |
263 <param name="t1" value="2003-12-15" /> | 263 <param name="t1" value="2003-12-15" /> |
264 <param name="t2" value="2004-12-15" /> | 264 <param name="t2" value="2004-12-15" /> |
265 </conditional> | 265 </conditional> |
266 </conditional> | 266 </conditional> |
267 </section> | 267 </section> |
268 <repeat name="user_choice"> | 268 <repeat name="user_choice"> |
269 <param name="dim" value="nh4"/> | 269 <param name="dim" value="nh4"/> |
270 <conditional name="condi_between"> | 270 <conditional name="condi_between"> |
271 <param name="comparator" value="ge"/> | 271 <param name="comparator" value="ge"/> |
272 <param name="value" value="50."/> | 272 <param name="value" value="50."/> |
273 </conditional> | 273 </conditional> |
274 </repeat> | 274 </repeat> |
275 <output name="simpleoutput" value="Test2.tabular"> | 275 <output name="simpleoutput" value="Test2.tabular"> |
276 <assert_contents> | 276 <assert_contents> |
277 <has_text_matching expression="0\t2003-12-15\t0.5"/> | 277 <has_text_matching expression="0\t2003-12-15\t0.5"/> |
278 <has_text_matching expression="23\t2004-12-15\t0.5"/> | 278 <has_text_matching expression="23\t2004-12-15\t0.5"/> |
279 </assert_contents> | 279 </assert_contents> |
280 </output> | 280 </output> |
281 </test> | 281 </test> |
282 </tests> | 282 </tests> |
283 <help><![CDATA[ | 283 <help><![CDATA[ |
284 **What it does** | 284 **What it does** |
285 | 285 |
310 | 310 |
311 | 311 |
312 ------------------------------------------------- | 312 ------------------------------------------------- |
313 | 313 |
314 The xarray select tool can be used after the xarray Info. | 314 The xarray select tool can be used after the xarray Info. |
315 ]]></help> | 315 ]]> </help> |
316 <expand macro="citations"/> | 316 <expand macro="citations"/> |
317 </tool> | 317 </tool> |