changeset 5:e3b3794bc806 draft default tip

planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/ocean_data_view_manager commit 9439bd5028eacdaaaff42dd2e095cb6ddc5af56e
author ecology
date Fri, 25 Jul 2025 09:44:10 +0000
parents c15538b093e0
children
files bgc_calib.xml
diffstat 1 files changed, 164 insertions(+), 57 deletions(-) [+]
line wrap: on
line diff
--- a/bgc_calib.xml	Mon Jul 21 15:54:49 2025 +0000
+++ b/bgc_calib.xml	Fri Jul 25 09:44:10 2025 +0000
@@ -1,11 +1,11 @@
 <tool id="tool_biogeochemical_calibration" name="BioGeoChemical calibration" version="@VERSION@+galaxy@VERSION_SUFFIX@" profile="22.05" license="MIT">
     <description>for sensors according to Argo recommendations</description>
     <macros>
-        <token name="@VERSION@">1.0</token>
+        <token name="@VERSION@">2.1</token>
         <token name="@VERSION_SUFFIX@">2</token>
     </macros>
     <requirements>
-        <container type="docker">easyqcvbgc/easy-qcv_calibration-methods_tool:@VERSION@</container>
+        <container type="docker">easyqcvbgc/easy-qcv_calibration-methods_tool:cm@VERSION@</container>
     </requirements>
     <command detect_errors="exit_code"><![CDATA[
         export HOME=\$PWD &&
@@ -15,7 +15,7 @@
         mkdir -p '/runtime/data-out/' &&
         mkdir -p ./outputs &&
 
-	#for $i, $infile in enumerate($input_raw):
+        #for $i, $infile in enumerate($input_raw):
             #set real_name = $infile.element_identifier
             #set extension = $real_name.split('.')[-1]
             #if  $extension == 'nc':
@@ -23,61 +23,111 @@
             #else
                 cp '${infile.file_name}' "/runtime/data-in-raw/${infile.element_identifier}.nc" &&
             #end if
-	#end for	
+        #end for	
         #if $input_ref:
             #for $i, $infile in enumerate($input_ref):            
             	cp '$infile' '/runtime/data-in-ref/${infile.element_identifier}' &&
             #end for
         #end if
-        
+
         #if $config.type == 'yes':
             ## Write YAML content
-            cp '${config_file}' '/runtime/config/config_user_odv_tool.yml' &&
-        #end if 
+            cp '${config_file}' '/runtime/config/config_user_calibration.yml' &&   
+        #end if
+
+        #if $dmfiller.dmfiller_value == 'yes':
+            #for $i, $infile in enumerate($dmfiller.input_origin):
+                #set real_name = $infile.element_identifier
+                #set extension = $real_name.split('.')[-1]
+                #if  $extension == 'nc':
+                    cp '${infile.file_name}' "/runtime/data-in-origin/${infile.element_identifier}" &&
+                #else
+                    cp '${infile.file_name}' "/runtime/data-in-origin/${infile.element_identifier}.nc" &&
+                #end if
+            #end for
+            #if $dmfiller.input_histo:
+                #for $j, $infile in enumerate($dmfiller.input_histo):
+                    #set real_name = $infile.element_identifier
+                    #set extension = $real_name.split('.')[-1]
+                    #if  $extension == 'csv':
+                        cp '${infile.file_name}' "/runtime/data-in-history/${infile.element_identifier}" &&
+                    #else
+                        cp '${infile.file_name}' "/runtime/data-in-history/${infile.element_identifier}.csv" &&
+                    #end if
+                #end for
+            #end if
+        #end if
 
         #set $mode="R_APP_CN"
         /app/launchers/start-app.sh $mode &&
-
+        cp -r '/runtime/log/' './outputs/' &&
         cp -r '/runtime/data-out/' './outputs/'
     ]]></command>
     <configfiles>
         <configfile name="config_file">
         #if $config.type == 'yes':
-            #for $i, $file in enumerate($config.section_config):
-                default :
-                    file_name_list_raw:
-                        #for $i, $infile in enumerate($input_raw):
-                            #set real_name = $infile.element_identifier
-                            #set extension = $real_name.split('.')[-1]
-                            #if  $extension == 'nc':
-                                #set name_raw='${infile.element_identifier}'
-                            #else:
-                                #set name_raw='${infile.element_identifier}.nc'
-                            #end if 
-                            - ${name_raw}  
+            default :
+                file_name_list_raw:
+                    #for $infile in $input_raw:
+                        #set real_name = $infile.element_identifier
+                        #set extension = $real_name.split('.')[-1]
+                        #if $extension == 'nc':
+                        - ${infile.element_identifier}
+                        #else
+                        - ${infile.element_identifier}.nc
+                        #end if
+                    #end for
+                param : nitrate
+                param_qc :
+                    bad : ${param_qc_bad}
+                    to_be_replaced : ${param_qc_toreplaced}
+                    replaced_by : ${param_qc_replacedby}
+                #if $dmfiller.dmfiller_value == 'yes':
+                dmfiller : 
+                    active : TRUE
+                    mandating_institution : ${dmfiller.mandating_institution}
+                    dm_operator :
+                        name : ${dmfiller.dm_operator_name}
+                        orcid : ${dmfiller.orcid}
+                        institution : ${dmfiller.institution}
+                    contact_point :   
+                        name : ${dmfiller.contact_point}
+                        orcid : ${dmfiller.orcid_contact}
+                        institution : ${dmfiller.institution_contact}
+                    file_name_list_history :
+                    #if $dmfiller.input_histo
+                        #for $infile in $dmfiller.input_histo:
+                        - ${infile.element_identifier}
                         #end for
-                    param : nitrate
-                    param_qc :
-                        bad : '${param_qc_bad}'
-                        to_be_replaced : '${param_qc_toreplaced}'
-                        replaced_by : '${param_qc_replacedby}'
-                    calib_configs :
-                        - number : '${i}'
-                            method_raw : 
-                                name : method1
-                                options : 
-                                    bypass_P : '${file.bypass.p_value}'
-                                    P : '${file.bypass.p_value}'
-                                    multiple_linear_regression : '${file.regression.reg_value}'
-                                    single_favored : '${file.favored}'
-                            method_ref : 
-                                name : '${file.method_ref.method_ref_name}'
-                                reference : 
-                                    name : '${file.method_ref.reference}'
-                                    #if '${file.method_ref.reference}' == 'woa':
-                                        resolution : '${file.method_ref.resolution}'
-                                    #end if
-            #end for
+                    #end if
+                #else:
+                dmfiller : 
+                    active : FALSE
+                #end if
+                calib_configs :
+                #set number = 1 
+                #for $i, $file in enumerate($config.section_config):
+                    #set number = $number + $i 
+                    - number : ${number}
+                      method_raw :
+                        name : method1
+                        options : 
+                            bypass_P : ${file.bypass.bypass_value}
+                            P : ${file.bypass.p_value}
+                            multiple_linear_regression : ${file.regression.reg_value}
+                            #if $file.favored == 'false:'
+                            single_favored : FALSE
+                            #else
+                            single_favored : TRUE
+                            #end if
+                      method_ref : 
+                        name : ${file.method_ref.method_ref_name}
+                      reference : 
+                        name : ${file.method_ref.reference}
+                        #if $file.method_ref.reference == 'woa':
+                        resolution : ${file.method_ref.resolution}
+                        #end if
+                #end for
         #end if
         </configfile>
     </configfiles>
@@ -87,14 +137,6 @@
         <param name="param_qc_bad" type="text" optional="true" value="4" label="Bad data QC value"/>
         <param name="param_qc_toreplaced" type="text" optional="true" value="3" label="Nitrate QC value to be replaced"/>
         <param name="param_qc_replacedby" type="text" optional="true" value="1" label="QC value of replacement"/>
-        <!--<param name="mode" type="select" label="Select in which mode you want to run the tool">
-            <option value="R_APP_CN">
-                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>
@@ -167,27 +209,83 @@
             <when value="no">
             </when>
         </conditional>
+        <conditional name="dmfiller">
+            <param name="dmfiller_value" type="select" label="Do you want to use the DMfiller option ?" help="To fill the ARGO BD files with DM adjustment according to argo recommendations (scientific calib coef, comment, equations)">
+                <option value="no">No, I don't want to</option>
+                <option value="yes">Yes, I want to use it</option>
+            </param>
+            <when value="yes">
+                <param name="input_origin" type="data" format="netcdf" multiple="true" label="Input original raw netcdf data" help="This netcdf should be te same ones than for the QCV harmonizer."/>
+                <param name="input_histo" type="data" format="csv" optional="true" multiple="true" label="Input csv files" help="This csv should come from the ODV history manager tool."/>
+                <param name="mandating_institution" type="select" label="Data centres and institutions handling or managing Argo data" help="To know more about the institution go there https://vocab.nerc.ac.uk/collection/R04/current/">
+                    <option value="LV">Laboratoire Océanographique de Villefranche</option>
+                    <option value="AO">Atlantic Oceanographic and Meteorological Laboratory (AOML)</option>
+                    <option value="BO">British Oceanographic Data Centre (BODC)</option>
+                    <option value="GE">Federal Maritime and Hydrographic Agency (BSH)</option>
+                    <option value="HZ">China Second Institute of Oceanography (CSIO)</option>
+                    <option value="CS">Commonwealth Scientific and Industrial Research Organisation (CSIRO)</option>
+                    <option value="VL">Far Eastern Regional Hydrometeorological Research Institute of Vladivostock (FERHRI)</option>
+                    <option value="GT">Global Telecommunication System (GTS)</option>
+                    <option value="IN">Indian National Centre for Ocean Information Services (INCOIS)</option>
+                    <option value="PL">Institute of Oceanology Polish Academy of Science (IOPAN)</option>
+                    <option value="IF">French Research Institute for the Sustainable Exploration of the Sea (Ifremer),</option>
+                    <option value="CI">Institute of Ocean Sciences (IOS)</option>
+                    <option value="JA">Japan Meteorological Agency (JMA)</option>
+                    <option value="JM">Japan Agency for Marine-Earth Science and Technology (JAMSTEC)</option>
+                    <option value="KM">Korean Meteorological Administration (KMA)</option>
+                    <option value="KO">Korea Institute of Ocean Science and Technology (KORDI)</option>
+                    <option value="MB">Monterey Bay Aquarium Research Institute (MBARI)</option>
+                    <option value="ME">Marine Environmental Data Service (MEDS)</option>
+                    <option value="NA">Naval Oceanographic Office (NAVO)</option>
+                    <option value="NM">National Marine Data and Information Service (NMDIS)</option>
+                    <option value="PM">Pacific Marine Environmental Laboratory (PMEL), a National Oceanic and Atmospheric Administration (NOAA) laboratory</option>
+                    <option value="RU">Russia</option>
+                    <option value="SI">Scripps Institution of Oceanography (SIO), a division of the University of California San Diego (UCSD)</option>
+                    <option value="SP">Spain</option>
+                    <option value="UW">University of Washington (UW)</option>
+                    <option value="WH">Woods Hole Oceanographic Institution (WHOI)</option>
+                </param>
+                <param name="dm_operator_name" type="text"  optional="false" label="Enter First_name Last_name of the dm operator" help="The dm operator is the person in charge of the dmqc of the float (write the name without accent like é or è...)"/>
+                <param name="orcid" type="text" optional="false" label="Enter its  orcid number"/>
+                <param name="institution" type="text" optional="false" label="Enter its  institution"/>
+                <param name="contact_point" type="text" optional="false" label="Enter First_name Last_name of the contact point" help="This refers to the BGC contact point for the dac (write the name without accent like é or è...)"/>
+                <param name="orcid_contact" type="text" optional="false" label="Enter the contact point's orcid number"/>
+                <param name="institution_contact" type="text" optional="false" label="Enter the contact point's institution"/>
+            </when>
+            <when value="no">
+            </when>
+        </conditional>
     </inputs>
     <outputs>
         <collection type="list" name="nc_files" label="BGC calibration netcdf collection">
             <discover_datasets pattern="(?P&lt;designation&gt;.+)\.nc" directory="./outputs" recurse="true" format="netcdf"/>
         </collection>
+        <collection type="list" name="tar_files" label="BGC calibration tar.gz collection">
+            <discover_datasets pattern="(?P&lt;designation&gt;.+)\.tar.gz" directory="./outputs" recurse="true" format="tar.gz"/>
+        </collection>
         <collection type="list" name="png_files" label="BGC calibration figure collection">
             <discover_datasets pattern="(?P&lt;designation&gt;.+)\.png" directory="./outputs" recurse="true" format="png"/>
         </collection>
+        <collection type="list" name="log_files" label="BGC calibration log files">
+            <discover_datasets pattern="(?P&lt;designation&gt;.+)\.log" directory="./outputs" recurse="true" format="txt"/>
+        </collection>
     </outputs>
     <tests>
-        <test expect_num_outputs="2">
+        <test expect_num_outputs="4">
             <param name="input_raw" location="https://gitlab.com/pokapok-projects/easy-qcv-bgc/qcv-bgc-tools/-/raw/3ae832154f55c76a7c95a5dc1e6bb19946917233/galaxy_tool/test-data/QCV_harmonizer_NetCDF_data_0_qced.nc"/>
             <conditional name="config">
                 <param name="type" value="no"/>
             </conditional>
             <output_collection name="nc_files" type="list" count="1"/>
             <output_collection name="png_files" type="list" count="4"/>
-
+            <output_collection name="log_files" type="list" count="3"/>
+            <output_collection name="tar_files" type="list" count="0"/>
         </test>
-        <test expect_num_outputs="2">
+        <test expect_num_outputs="4">
             <param name="input_raw" location="https://gitlab.com/pokapok-projects/easy-qcv-bgc/qcv-bgc-tools/-/raw/3ae832154f55c76a7c95a5dc1e6bb19946917233/galaxy_tool/test-data/QCV_harmonizer_NetCDF_data_0_qced.nc"/>
+            <conditional name="dmfiller">
+                <param name="dmfiller_value" value="no"/>
+            </conditional>
             <conditional name="config">
                 <param name="type" value="yes"/>
 		<repeat name="section_config">
@@ -207,6 +305,8 @@
             </conditional>
             <output_collection name="nc_files" type="list" count="1"/>
             <output_collection name="png_files" type="list" count="4"/>
+            <output_collection name="log_files" type="list" count="3"/>
+            <output_collection name="tar_files" type="list" count="0"/>
         </test>
     </tests>
     <help><![CDATA[
@@ -218,7 +318,7 @@
 
 This tool calibrates BioGeoChemical (BGC) data measured by ARGO or GLIDER network. The BGC variables managed by the tool for the moment are :
 
-- NITRATE using methods published in `archimer <https://archimer.ifremer.fr/doc/00350/46121/>`
+NITRATE using methods published in `archimer <https://archimer.ifremer.fr/doc/00350/46121/>`
 
 
 **Input description**
@@ -238,16 +338,23 @@
 
 If the list of raw file name is empty, the tool stops If the user makes an error in the file extension, tool changes it by itself. If the user misses the yaml configuration, tool uses its default config and upload available files in data-in-raw
 
-compatibility matrix
+compatibility matrix :
 
-- variable / application mode / [method_raw.name, method_ref.name, reference]
-- nitrate / R_APP_CN / [method1, model, canyon_b] & [method1, model, canyon_med] & [method1, clim, woa]
+    - variable / application mode / [method_raw.name, method_ref.name, reference]
+    - nitrate / R_APP_CN / [method1, model, canyon_b] & [method1, model, canyon_med] & [method1, clim, woa]
+
 	    
 **Output**
 
 - an extended nc file including the _adjusted and _adjusted_qc
 - figures helping to understand the adjustment
 
+The folder where to write the ODV generic spreadsheet. the output folder is organized like this :
+    - /<file_name_raw>_C<calib_configs$number>-<param>
+    - /figures
+    - <file_name_raw>_C<calib_configs$number>-<param>.nc
+    - /BDfiles_from_<file_name_raw>_C<calib_configs$number>-<param>.tar.gz (when dmfiller=true)
+
     ]]></help>
     <citations>
         <citation type="bibtex">