Mercurial > repos > ecology > timeseries_extraction
comparison timeseries_plot.xml @ 0:810820a0d45c draft default tip
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/data_manipulation/xarray/ commit fd8ad4d97db7b1fd3876ff63e14280474e06fdf7
| author | ecology |
|---|---|
| date | Sun, 31 Jul 2022 21:23:21 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:810820a0d45c |
|---|---|
| 1 <tool id="timeseries_extraction" name="NetCDF timeseries Extractor" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" python_template_version="3.5" profile="@PROFILE@"> | |
| 2 <description>Extract and plot time series</description> | |
| 3 <macros> | |
| 4 <import>macros.xml</import> | |
| 5 <import>macros_timeseries.xml</import> | |
| 6 </macros> | |
| 7 <expand macro="edam_ontology"/> | |
| 8 <requirements> | |
| 9 <requirement type="package" version="@TOOL_VERSION@">xarray</requirement> | |
| 10 <requirement type="package" version="3">python</requirement> | |
| 11 <requirement type="package" version="1.6.0">netcdf4</requirement> | |
| 12 <requirement type="package" version="3.5.2">matplotlib</requirement> | |
| 13 <requirement type="package" version="2022.7.0">dask</requirement> | |
| 14 <requirement type="package" version="1.4.3">pandas</requirement> | |
| 15 <requirement type="package" version="1.6.1">cftime</requirement> | |
| 16 </requirements> | |
| 17 <command detect_errors="exit_code"><![CDATA[ | |
| 18 mkdir output_dir && | |
| 19 mkdir -p `pwd`/mlp_tmpdir && | |
| 20 MPLCONFIGDIR=`pwd`/mlp_tmpdir && | |
| 21 python '$__tool_directory__/timeseries.py' '$input' '$var' | |
| 22 --config '$series_customization' | |
| 23 --output timeseries.png | |
| 24 --save $timeseries_tabular | |
| 25 --verbose && | |
| 26 mv timeseries.png $timeseries_plot | |
| 27 ]]></command> | |
| 28 <expand macro="config_series"/> | |
| 29 <inputs> | |
| 30 <param type="data" name="input" label="Input netcdf file" format="netcdf" help="Select the input netCDF file."/> | |
| 31 <param type="data" label="Tabular of variables" name="var_tab" format="tabular" help="Select the tabular file which summarize the available variables and dimensions."/> | |
| 32 <param name="var" type="select" label="Choose the variable to plot"> | |
| 33 <options from_dataset="var_tab"> | |
| 34 <column name="name" index="0"/> | |
| 35 <column name="value" index="0"/> | |
| 36 </options> | |
| 37 </param> | |
| 38 <conditional name="condi_datetime"> | |
| 39 <param name="datetime" type="select" label="Datetime selection" help="Use this option to set the start and end values for plotting."> | |
| 40 <option value="no">No</option> | |
| 41 <option value="yes">Yes</option> | |
| 42 </param> | |
| 43 <when value="no"></when> | |
| 44 <when value="yes"> | |
| 45 <param name="time_name" type="select" label="Choose the name for date and time values"> | |
| 46 <options from_dataset="var_tab"> | |
| 47 <column name="name" index="0"/> | |
| 48 <column name="value" index="0"/> | |
| 49 </options> | |
| 50 </param> | |
| 51 <param name="time_start_value" type="text" value="" label="Choose the beginning date/time to plot (YYY-MM-DD)"/> | |
| 52 <param name="time_end_value" type="text" value="" label="Choose the ending date/time to plot (YYYY-MM-DD)"/> | |
| 53 </when> | |
| 54 </conditional> | |
| 55 <param name="lat_value" type="float" optional="true" label="latitude value for limited geographical area" /> | |
| 56 <param name="lat_name" type="select" label="Choose the name for latitudes" optional="true"> | |
| 57 <options from_dataset="var_tab"> | |
| 58 <column name="name" index="0"/> | |
| 59 <column name="value" index="0"/> | |
| 60 </options> | |
| 61 </param> | |
| 62 <param name="lon_value" type="float" optional="true" label="longitude value for limited geographical area " /> | |
| 63 <param name="lon_name" type="select" label="Choose the name for longitudes" optional="true"> | |
| 64 <options from_dataset="var_tab"> | |
| 65 <column name="name" index="0"/> | |
| 66 <column name="value" index="0"/> | |
| 67 </options> | |
| 68 </param> | |
| 69 <section name="adv" title="Advanced Plotting Options" expanded="false"> | |
| 70 <param name="plot_title" type="text" value="" label="Plot title" /> | |
| 71 <param name="xlabel" type="text" value="" label="Label for x-axis" /> | |
| 72 <param name="ylabel" type="text" value="" label="Label for y-axis" /> | |
| 73 <param name="format_date" type="text" value="" label="format date/time for plotting" /> | |
| 74 </section> | |
| 75 </inputs> | |
| 76 <outputs> | |
| 77 <data name="timeseries_tabular" format="tabular" label="Timeseries table"/> | |
| 78 <data name="timeseries_plot" format="png" label="Timeseries plot"/> | |
| 79 </outputs> | |
| 80 <tests> | |
| 81 <test> | |
| 82 <param name="input" value="dataset-ibi-reanalysis-bio-005-003-monthly-regulargrid_1510914389133.nc"/> | |
| 83 <param name="var" value="chl"/> | |
| 84 <param name="var_tab" value="var_tab_dataset-ibi"/> | |
| 85 <param name="lon_value" value="-5.0"/> | |
| 86 <param name="lat_value" value="43.50"/> | |
| 87 <param name="lon_name" value="longitude"/> | |
| 88 <param name="lat_name" value="latitude"/> | |
| 89 <conditional name="condi_datetime"> | |
| 90 <param name="datetime" value="no"/> | |
| 91 </conditional> | |
| 92 <section name="adv"> | |
| 93 <param name="plot_title" value="Timeseries of Chlorophyll concentration"/> | |
| 94 <param name="format_date" value="%Y"/> | |
| 95 <param name="xlabel" value="Year"/> | |
| 96 <param name="ylabel" value="Chl"/> | |
| 97 </section> | |
| 98 <output name="timeseries_tabular" ftype="tabular" file="time_series_customized.tabular"/> | |
| 99 <output name="timeseries_plot" ftype="png" file="time_series_customized.png"/> | |
| 100 </test> | |
| 101 <test> | |
| 102 <param name="input" value="dataset-ibi-reanalysis-bio-005-003-monthly-regulargrid_1510914389133.nc"/> | |
| 103 <param name="var" value="chl"/> | |
| 104 <param name="var_tab" value="var_tab_dataset-ibi"/> | |
| 105 <param name="lon_value" value="-7.0"/> | |
| 106 <param name="lat_value" value="44.75"/> | |
| 107 <param name="lon_name" value="longitude"/> | |
| 108 <param name="lat_name" value="latitude"/> | |
| 109 <conditional name="condi_datetime"> | |
| 110 <param name="datetime" value="yes"/> | |
| 111 <param name="time_start_value" value="2010-12-15"/> | |
| 112 <param name="time_end_value" value="2013-12-31"/> | |
| 113 </conditional> | |
| 114 <output name="timeseries_tabular" ftype="tabular" file="time_series.tabular"/> | |
| 115 <output name="timeseries_plot" ftype="png" file="time_series.png"/> | |
| 116 </test> | |
| 117 </tests> | |
| 118 <help><![CDATA[ Extracts time series for a given variable in a .csv format file. This file can be used to plot the timeseries easily. ]]></help> | |
| 119 <expand macro="citations"/> | |
| 120 </tool> |
