Mercurial > repos > ecology > tool_odv
changeset 0:894b4a8a9a7b draft default tip
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/ocean_data_view_manager commit 3bfe3bf761b2e95bc85e2936dee36f899a3e6393
author | ecology |
---|---|
date | Tue, 18 Mar 2025 11:19:39 +0000 |
parents | |
children | |
files | tool_odv.xml |
diffstat | 1 files changed, 189 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool_odv.xml Tue Mar 18 11:19:39 2025 +0000 @@ -0,0 +1,189 @@ +<tool id="tool_odv" name="ODV collection manager" version="@VERSION@+galaxy@VERSION_SUFFIX@" profile="22.05" license="MIT"> + <description>tool for qualificiation and validation</description> + <macros> + <token name="@VERSION@">0.2</token> + <token name="@VERSION_SUFFIX@">0</token> + </macros> + <requirements> + <container type="docker">pokapok/qcv-odv-tool:@VERSION@</container> + </requirements> + <command detect_errors="exit_code"><![CDATA[ + export HOME=\$PWD && + mkdir -p /runtime/config && + mkdir -p '/runtime/data-in-raw/' && + mkdir -p '/runtime/data-in-ref/' && + mkdir -p '/runtime/data-out/' && + mkdir -p ./outputs && + + cp '$input_raw' '/runtime/data-in-raw/${input_raw.element_identifier}' && + #if $input_ref: + cp '$input_ref' '/runtime/data-in-ref/${input_ref.element_identifier}' && + #end if + + + #if $config.type == 'yes': + ## Write YAML content + cp '${config_file}' '/runtime/config/config_user_odv_tool.yml' && + #end if + + /app/launchers/start-app.sh '$mode' && + + #if $mode == 'R_APP_QV': + cp '/runtime/data-out/odv_collection.txt' '$output' && + #else: + cp '/runtime/data-out/demo_odv_collection.txt' '$output' && + #end if + cp -r '/runtime/data-out/' './outputs/' + ]]></command> + <configfiles> + <configfile name="config_file"> + #if $config.type == 'yes': + default: + file_name_list_raw: '${input_raw.element_identifier}' + operator: '${config.operator}' + QV: + file_name_list_ref: '${input_ref.element_identifier}' + odv_collection: + name: "odv_collection.txt" + qc_convention: '${config.qc_convention}' + tool_option: + subsetting: '${config.subsetting}' + plt: '${config.plt}' + #end if + </configfile> + </configfiles> + <inputs> + <param name="input_raw" type="data" format="netcdf" label="Input raw data"/> + <param name="input_ref" type="data" format="netcdf" optional="true" label="Input reference data"/> + <param name="mode" type="select" label="Select in which mode you want to run the tool"> + <option value="R_APP_QV">QV that creates a odv collection with raw and ref files to qualify</option> + <option value="DEMO">Valide with ODV demo that performes the demo</option> + </param> + <conditional name="config"> + <param name="type" type="select" label="Select if you want to write your own configuration file or not."> + <option value="no">No, I don't want to, I'll use the default one</option> + <option value="yes">Yes, I to write my own configuration file</option> + </param> + <when value="yes"> + <param name="operator" type="text" value="Anonymous" label="Enter operator name"/> + <param name="qc_convention" type="select" label="Enter QC convention for the ODV collection output (default: ARGO)"> + <option value="ARGO">ARGO</option> + <option value="ODV">ODV</option> + <option value="GTSPP">GTSPP</option> + <option value="SEADATANET">SEADATANET</option> + <option value="ESEAS">ESEAS</option> + <option value="WOD">WOD</option> + <option value="WODSTATION">WODSTATION</option> + <option value="WOCEBOTTLE">WOCEBOTTLE</option> + <option value="WOCECTD">WOCECTD</option> + <option value="QARTOD">QARTOD</option> + <option value="BODC">BODC</option> + <option value="PANGAEA">PANGAEA</option> + <option value="SMHI">SMHI</option> + <option value="OceanSITES">OceanSITES</option> + <option value="IODE">IODE</option> + </param> + <param name="subsetting" type="float" min="-1" max="1" value="1" label="Enter subsetting (default: 1)"/> + <param name="plt" type="float" min="0" max="1" value="0" label="Enter plt (default: 0 for QV, 1 for demo)"/> + </when> + <when value="no"> + </when> + </conditional> + </inputs> + <outputs> + <data name="output" format="txt" label="ODV tool output"/> + <collection type="list" name="files" label="ODV tool collection"> + <discover_datasets pattern="(?P<designation>.+)" directory="./outputs" recurse="true" format="txt"/> + </collection> + </outputs> + <tests> + <test expect_num_outputs="2"> + <param name="input_raw" location="https://gitlab.com/pokapok-projects/easy-qcv-bgc/qcv-odv-tool/-/raw/7b3557c89438b7347c601d6959af354103b167a1/galaxy_tool/test-data/data_raw.nc"/> + <param name="input_ref" location="https://gitlab.com/pokapok-projects/easy-qcv-bgc/qcv-odv-tool/-/raw/7b3557c89438b7347c601d6959af354103b167a1/galaxy_tool/test-data/data_ref.nc"/> + <param name="mode" value="R_APP_QV"/> + <conditional name="config"> + <param name="type" value="no"/> + </conditional> + <output name="output"> + <assert_contents> + <has_n_lines n="26377"/> + </assert_contents> + </output> + <output_collection name="files" type="list" count="4"/> + </test> + <test expect_num_outputs="2"> + <param name="input_raw" location="https://gitlab.com/pokapok-projects/easy-qcv-bgc/qcv-odv-tool/-/raw/7b3557c89438b7347c601d6959af354103b167a1/galaxy_tool/test-data/data_raw.nc"/> + <param name="mode" value="R_APP_QV"/> + <conditional name="config"> + <param name="type" value="yes"/> + <param name="operator" value="anonymous"/> + <param name="qc_convention" value="ARGO"/> + <param name="subsetting" value="1"/> + <param name="plt" value="0"/> + </conditional> + <output name="output"> + <assert_contents> + <has_n_lines n="17966"/> + </assert_contents> + </output> + <output_collection name="files" type="list" count="4"/> + </test> + <test expect_num_outputs="2"> + <param name="input_raw" location="https://gitlab.com/pokapok-projects/easy-qcv-bgc/qcv-odv-tool/-/raw/dev_virginie/galaxy_tool/test-data/data_raw.nc?ref_type=heads"/> + <param name="mode" value="DEMO"/> + <conditional name="config"> + <param name="type" value="no"/> + </conditional> + <output name="output"> + <assert_contents> + <has_n_lines n="17966"/> + </assert_contents> + </output> + <output_collection name="files" type="list" count="4"/> + </test> + </tests> + <help><![CDATA[ +====================== +ODV collection manager +====================== + +**What it does** + +This tool present two type of actions : + + - qualificiation & validation : the tool merges various datasets with a common vocabulary and creates a single generic ODV spreadsheet following ODV user’s guide (v5.7.0) in an automatic way. + - history : the tool report in the input file the ODV history including the change of QC flag (not yet operational) + +**Input description** + + - file_name_raw : nc file to be qualified + - file_name_ref : nc file used for validation / comparison. noted NULL if no files + - odv_collection$qc_convention : tool makes mapping when its necessary and when global attribute qc_convention is available and filled in file_name_raw + - tool_option$subsetting : 1 apply a subbsetting to ref data searching the smallest box (default) / 0 no subsetting / -1 apply an inverse subseting + - tool_option$plt : figure option to see the subseted box (0 or 1) - default name subset_box.png + +with default values different from NULL : + + - odv_collection$name : odv_collection.txt + - odv_collection$qc_convention : ARGO + - tool_action : + - tool_option$subsetting : + - tool_option$plt : + +If the list of raw file name is empty, tool stops If the user make an error in the file extension, tool changes it by itself. If the user miss the yaml configuration, tool uses its default config and upload file in data-in-raw and data-in-ref + +**Output** + +This tool creates a single generic ODV spreadsheet following ODV user’s guide + + ]]></help> + <citations> + <citation type="bibtex"> + @Manual{, + title = {ODV tool}, + author = {Pokapok}, + year = {2024}, + note = {https://gitlab.com/pokapok-projects/easy-qcv-bgc/qcv-odv-tool} + </citation> + </citations> +</tool>