comparison tool_odv.xml @ 1:49ed0e414360 draft

planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/ocean_data_view_manager commit 1e862e8c40fd4bfe034fc326df5c66247275768d
author ecology
date Wed, 04 Jun 2025 15:33:41 +0000
parents 28400e1abee0
children bdd2d93d99ce
comparison
equal deleted inserted replaced
0:28400e1abee0 1:49ed0e414360
1 <tool id="tool_odv" name="ODV collection manager" version="@VERSION@+galaxy@VERSION_SUFFIX@" profile="22.05" license="MIT"> 1 <tool id="tool_odv" name="ODV collection manager" version="@VERSION@+galaxy@VERSION_SUFFIX@" profile="22.05" license="MIT">
2 <description>tool for qualificiation and validation</description> 2 <description>tool for qualificiation and validation</description>
3 <macros> 3 <macros>
4 <token name="@VERSION@">0.2</token> 4 <token name="@VERSION@">1.1</token>
5 <token name="@VERSION_SUFFIX@">0</token> 5 <token name="@VERSION_SUFFIX@">0</token>
6 </macros> 6 </macros>
7 <requirements> 7 <requirements>
8 <container type="docker">pokapok/qcv-odv-tool:@VERSION@</container> 8 <container type="docker">easyqcvbgc/easy-qcv_odv-coll-manager_tool:@VERSION@</container>
9 </requirements> 9 </requirements>
10 <command detect_errors="exit_code"><![CDATA[ 10 <command detect_errors="exit_code"><![CDATA[
11 export HOME=\$PWD && 11 export HOME=\$PWD &&
12 mkdir -p /runtime/config && 12 mkdir -p /runtime/config &&
13 mkdir -p '/runtime/data-in-raw/' && 13 mkdir -p '/runtime/data-in-raw/' &&
14 mkdir -p '/runtime/data-in-ref/' && 14 mkdir -p '/runtime/data-in-ref/' &&
15 mkdir -p '/runtime/data-out/' && 15 mkdir -p '/runtime/data-out/' &&
16 mkdir -p ./outputs && 16 mkdir -p ./outputs &&
17 17
18 cp '$input_raw' '/runtime/data-in-raw/${input_raw.element_identifier}' && 18 #for $i, $infile in enumerate($input_raw):
19 #if $input_ref: 19 cp '$infile' '/runtime/data-in-raw/${infile.element_identifier}_${i}.nc' &&
20 cp '$input_ref' '/runtime/data-in-ref/${input_ref.element_identifier}' && 20 #end for
21 #if $input_ref:
22 #for $i, $infile in enumerate($input_ref):
23 cp '$infile' '/runtime/data-in-ref/${infile.element_identifier}_${i}' &&
24 #end for
21 #end if 25 #end if
22
23 26
24 #if $config.type == 'yes': 27 #if $config.type == 'yes':
25 ## Write YAML content 28 ## Write YAML content
26 cp '${config_file}' '/runtime/config/config_user_odv_tool.yml' && 29 cp '${config_file}' '/runtime/config/config_user_odv_tool.yml' &&
27 #end if 30 #end if
28 31
29 /app/launchers/start-app.sh '$mode' && 32 /app/launchers/start-app.sh &&
33 cp '/runtime/data-out/odv_collection.txt' '$output' &&
30 34
31 #if $mode == 'R_APP_QV':
32 cp '/runtime/data-out/odv_collection.txt' '$output' &&
33 #else:
34 cp '/runtime/data-out/demo_odv_collection.txt' '$output' &&
35 #end if
36 cp -r '/runtime/data-out/' './outputs/' 35 cp -r '/runtime/data-out/' './outputs/'
37 ]]></command> 36 ]]></command>
38 <configfiles> 37 <configfiles>
39 <configfile name="config_file"> 38 <configfile name="config_file">
40 #if $config.type == 'yes': 39 #if $config.type == 'yes':
41 default: 40 default:
42 file_name_list_raw: '${input_raw.element_identifier}' 41 file_name_list_raw:
43 operator: '${config.operator}' 42 #for $i, $infile in enumerate($input_raw):
44 QV: 43 #set name_raw='${infile.element_identifier}_${i}.nc'
45 file_name_list_ref: '${input_ref.element_identifier}' 44 #end for
46 odv_collection: 45 - ${name_raw}
47 name: "odv_collection.txt" 46 operator: '${config.operator}'
48 qc_convention: '${config.qc_convention}' 47 QV:
49 tool_option: 48 file_name_list_ref:
50 subsetting: '${config.subsetting}' 49 #for $i, $infile in enumerate($input_ref):
51 plt: '${config.plt}' 50 #set name_ref='${infile.element_identifier}_${i}.nc'
52 #end if 51 #end for
52 - ${name_ref}
53 odv_collection:
54 name: "odv_collection.txt"
55 qc_convention: '${config.qc_convention}'
56 tool_option:
57 subsetting: '${config.subsetting}'
58 plt: '${config.plt}'
59 #end if
53 </configfile> 60 </configfile>
54 </configfiles> 61 </configfiles>
55 <inputs> 62 <inputs>
56 <param name="input_raw" type="data" format="netcdf" label="Input raw data"/> 63 <param name="input_raw" type="data" format="netcdf" multiple="true" label="Input raw data"/>
57 <param name="input_ref" type="data" format="netcdf" optional="true" label="Input reference data"/> 64 <param name="input_ref" type="data" format="netcdf" multiple="true" optional="true" label="Input reference data"/>
58 <param name="mode" type="select" label="Select in which mode you want to run the tool">
59 <option value="R_APP_QV">QV that creates a odv collection with raw and ref files to qualify</option>
60 <option value="DEMO">Valide with ODV demo that performes the demo</option>
61 </param>
62 <conditional name="config"> 65 <conditional name="config">
63 <param name="type" type="select" label="Select if you want to write your own configuration file or not."> 66 <param name="type" type="select" label="Select if you want to write your own configuration file or not.">
64 <option value="no">No, I don't want to, I'll use the default one</option> 67 <option value="no">No, I don't want to, I'll use the default one</option>
65 <option value="yes">Yes, I to write my own configuration file</option> 68 <option value="yes">Yes, I to write my own configuration file</option>
66 </param> 69 </param>
98 </outputs> 101 </outputs>
99 <tests> 102 <tests>
100 <test expect_num_outputs="2"> 103 <test expect_num_outputs="2">
101 <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"/> 104 <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"/>
102 <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"/> 105 <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"/>
103 <param name="mode" value="R_APP_QV"/>
104 <conditional name="config"> 106 <conditional name="config">
105 <param name="type" value="no"/> 107 <param name="type" value="no"/>
106 </conditional> 108 </conditional>
107 <output name="output"> 109 <output name="output">
108 <assert_contents> 110 <assert_contents>
109 <has_n_lines n="26377"/> 111 <has_n_lines n="26377"/>
110 </assert_contents> 112 </assert_contents>
111 </output> 113 </output>
112 <output_collection name="files" type="list" count="4"/> 114 <output_collection name="files" type="list" count="3"/>
113 </test> 115 </test>
114 <test expect_num_outputs="2"> 116 <test expect_num_outputs="2">
115 <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"/> 117 <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"/>
116 <param name="mode" value="R_APP_QV"/>
117 <conditional name="config"> 118 <conditional name="config">
118 <param name="type" value="yes"/> 119 <param name="type" value="yes"/>
119 <param name="operator" value="anonymous"/> 120 <param name="operator" value="anonymous"/>
120 <param name="qc_convention" value="ARGO"/> 121 <param name="qc_convention" value="ARGO"/>
121 <param name="subsetting" value="1"/> 122 <param name="subsetting" value="1"/>
124 <output name="output"> 125 <output name="output">
125 <assert_contents> 126 <assert_contents>
126 <has_n_lines n="17966"/> 127 <has_n_lines n="17966"/>
127 </assert_contents> 128 </assert_contents>
128 </output> 129 </output>
129 <output_collection name="files" type="list" count="4"/> 130 <output_collection name="files" type="list" count="3"/>
130 </test>
131 <test expect_num_outputs="2">
132 <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"/>
133 <param name="mode" value="DEMO"/>
134 <conditional name="config">
135 <param name="type" value="no"/>
136 </conditional>
137 <output name="output">
138 <assert_contents>
139 <has_n_lines n="17966"/>
140 </assert_contents>
141 </output>
142 <output_collection name="files" type="list" count="4"/>
143 </test> 131 </test>
144 </tests> 132 </tests>
145 <help><![CDATA[ 133 <help><![CDATA[
146 ====================== 134 ======================
147 ODV collection manager 135 ODV collection manager
150 **What it does** 138 **What it does**
151 139
152 This tool present two type of actions : 140 This tool present two type of actions :
153 141
154 - 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. 142 - 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.
155 - history : the tool report in the input file the ODV history including the change of QC flag (not yet operational)
156 143
157 **Input description** 144 **Input description**
158 145
159 - file_name_raw : nc file to be qualified 146 - file_name_raw : nc file to be qualified
160 - file_name_ref : nc file used for validation / comparison. noted NULL if no files 147 - file_name_ref : nc file used for validation / comparison. noted NULL if no files