comparison ena_upload.xml @ 0:382518f24d6d draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ena_upload commit 57b434bcf493554d060a99b65e66f274d5c00e0a"
author iuc
date Sat, 28 Nov 2020 09:45:44 +0000
parents
children 57251c760cab
comparison
equal deleted inserted replaced
-1:000000000000 0:382518f24d6d
1 <tool id="ena_upload" name="ENA Upload tool" version="0.3" profile="20.01" license="MIT">
2 <macros>
3 <token name="@VERSION@">0.2.4</token>
4 <import>samples_macros.xml</import>
5 </macros>
6 <requirements>
7 <requirement type="package" version="@VERSION@">ena-upload-cli</requirement>
8 <requirement type="package" version="1.2.0">xlrd</requirement>
9 </requirements>
10 <command detect_errors="exit_code"><![CDATA[
11 mkdir ./submission_files;
12
13 #set working_dir = os.getcwd()
14 #set $dry_run_option = "False"
15 #set viral_submission = "False"
16 #if $action_options.input_format_conditional.input_format == "build_tables":
17 python '$__tool_directory__/extract_tables.py' --action $action_options.action --out_dir ./submission_files --studies $studies_json;
18 #set $studies_table_path = './submission_files/studies.tsv'
19 #set $samples_table_path = './submission_files/samples.tsv'
20 #set $experiments_table_path = './submission_files/experiments.tsv'
21 #set $runs_table_path = './submission_files/runs.tsv'
22 #end if
23
24 #if $action_options.input_format_conditional.input_format == "excel_tables":
25 python '$__tool_directory__/process_xlsx.py'
26 #if $action_options.input_format_conditional.viral_submission == "true":
27 --vir
28 #end if
29 --action '$action_options.action' --form '$action_options.input_format_conditional.xlsx_file' --out_dir ./submission_files ;
30 #set $studies_table_path = './submission_files/studies.tsv'
31 #set $samples_table_path = './submission_files/samples.tsv'
32 #set $experiments_table_path = './submission_files/experiments.tsv'
33 #set $runs_table_path = './submission_files/runs.tsv'
34 #if $action_options.input_format_conditional.dry_run == "true":
35 #set $dry_run_option = "True"
36 #end if
37 #end if
38
39 #if $action_options.input_format_conditional.input_format != "user_generated_tables":
40 cp $studies_table_path $studies_table_out;
41 cp $samples_table_path $samples_table_out;
42 cp $experiments_table_path $experiments_table_out;
43 cp $runs_table_path $runs_table_out;
44 #if $action_options.input_format_conditional.dry_run == "true":
45 #set $dry_run_option = "True"
46 #end if
47 #end if
48
49
50 #if $dry_run_option == "False" and $action_options.test_submit == "False":
51 webin_id=`grep 'username' $credentials`;
52 if [ "\$webin_id" = "" ]; then
53 ## No credentials in user defined preferences
54 ## Fallback to global defined credentials (if exist)
55 #import os
56 #if os.path.isfile(os.environ.get('GALAXY_ENA_SECRETS', '')):
57 credentials_path=\${ENA_SECRETS};
58 webin_id=`grep 'username' \$GALAXY_ENA_SECRETS`;
59 if [ "\$webin_id" = "" ]; then
60 echo "No global credentials defined. Check your GALAXY_ENA_SECRETS file or set your credentials via: User -> Preferences -> Manage Information";
61 exit 1;
62 fi;
63 #else:
64 echo "No ENA credentials defined. Set your credentials via: User -> Preferences -> Manage Information";
65 exit 1;
66 #end if
67 else
68 credentials_path='$credentials';
69 fi;
70 #end if
71
72 #if $action_options.test_submit == "True":
73 credentials_path='test_fake_path';
74 #end if
75
76 ## create the list of files to upload and make the symlinks
77 #import re
78 #set $files_to_upload = list()
79 #if $action_options.input_format_conditional.input_format == "build_tables":
80 #for $study in $action_options.input_format_conditional.conditional_viral_metadata.rep_study:
81 #for $sample in $study.rep_sample:
82 #for $experiment in $sample.rep_experiment:
83 #for $run in $experiment.rep_runs:
84 #for $file in $run.upload_files:
85 #set $safename_reads_file = re.sub('[^\w\-_\.]', '_', $file.element_identifier)
86 ln -s '$file' $safename_reads_file &&
87 $files_to_upload.append(str($safename_reads_file))
88 #end for
89 #end for
90 #end for
91 #end for
92 #end for
93 #else:
94 #for $file in $action_options.input_format_conditional.data:
95 #set $safename_reads_file = re.sub('[^\w\-_\.]', '_', $file.element_identifier)
96 ln -s '$file' $safename_reads_file &&
97 $files_to_upload.append(str($safename_reads_file))
98 #end for
99 #end if
100
101
102 #if $dry_run_option == "False":
103 ena-upload-cli
104 --tool 'ena-upload-cli v@VERSION@ @ Galaxy'
105 --action '$action_options.action'
106 --center '$action_options.center'
107 --secret \${credentials_path}
108 --data
109 #for $dataset in $files_to_upload:
110 '$dataset'
111 #end for
112 #if $action_options.input_format_conditional.input_format == "user_generated_tables":
113 --experiment '$action_options.input_format_conditional.experiments_users_table'
114 --study '$action_options.input_format_conditional.studies_users_table'
115 --run '$action_options.input_format_conditional.runs_users_table'
116 --sample '$action_options.input_format_conditional.samples_users_table'
117 #if "$action_options.input_format_conditional.viral_submission" == "true":
118 --vir
119 #end if
120 #else:
121 --experiment '$experiments_table_path'
122 --study '$studies_table_path'
123 --run '$runs_table_path'
124 --sample '$samples_table_path'
125 #if $action_options.input_format_conditional.input_format == "build_tables":
126 #if $action_options.input_format_conditional.conditional_viral_metadata.viral_sample == "true":
127 --vir
128 #end if
129 #else:
130 #if $action_options.input_format_conditional.viral_submission == "true":
131 --vir
132 #end if
133 #end if
134 #end if
135
136 #if $action_options.submit_dev == "true":
137 -d
138 #end if
139 > '$output'
140 #else:
141 echo ""
142 exit 0;
143 #end if
144
145 ]]></command>
146 <configfiles>
147 <configfile name="credentials"><![CDATA[
148 #set $webin_id = $__user__.extra_preferences.get('ena_webin_account|webin_id', "").strip()
149 #set $password = $__user__.extra_preferences.get('ena_webin_account|password', "").strip()
150 #if $webin_id != "":
151 username: "$webin_id"
152 password: "$password"
153 #end if
154 ]]></configfile>
155 <configfile name="studies_json">
156 #import json
157 #import re
158 #if $action_options.input_format_conditional.input_format == "build_tables":
159 #set $files_to_upload = list()
160 #set $studies = list()
161 #for $study in $action_options.input_format_conditional.conditional_viral_metadata.rep_study:
162 #set samples = list()
163 #for $sample in $study.rep_sample:
164 #set experiments = list()
165 #for $experiment in $sample.rep_experiment:
166 #set runs = list()
167 #for $run in $experiment.rep_runs:
168 #set run_files = list()
169 #for $file in $run.upload_files:
170 #set $safename_reads_file = re.sub('[^\w\-_\.]', '_', $file.element_identifier)
171 $run_files.append(str($safename_reads_file))
172 #end for
173 $runs.append($run_files)
174 #end for
175
176 $experiments.append({'title':str($experiment.experiment_title),'experiment_design':str($experiment.experiment_design),'library_strategy':str($experiment.library_strategy),'library_source':str($experiment.library_source),'library_selection':str($experiment.library_selection),'library_layout':str($experiment.library_layout),'insert_size':str($experiment.insert_size),'library_construction_protocol':str($experiment.library_construction_protocol),'platform':str($experiment.platform),'instrument_model':str($experiment.instrument_model),'runs':$runs})
177 #end for
178 #if $action_options.input_format_conditional.conditional_viral_metadata.viral_sample == "true":
179
180 $samples.append({'title':str($sample.sample_title),'description':str($sample.sample_description),'tax_name':str($sample.scientific_name),'tax_id':str($sample.tax_id),'collection_date':str($sample.collection_date),'geo_location':str($sample.geo_location_country),'host_common_name':str($sample.host_common_name),'host_subject_id':str($sample.host_subject_id),'host_health_state':str($sample.host_health_state),'host_sex':str($sample.host_sex),'host_scientific_name':str($sample.host_scientific_name),'collector_name':str($sample.collector_name),'collecting_institution':str($sample.collecting_institution),'isolate':str($sample.isolate),'experiments':$experiments})
181 #else:
182
183 $samples.append({'title':str($sample.sample_title),'description':str($sample.sample_description),'tax_name':str($sample.scientific_name),'tax_id':str($sample.tax_id),'experiments':$experiments})
184 #end if
185 #end for
186 $studies.append({'title':str($study.study_title),'type':str($study.study_type),'abstract':str($study.study_abstract),'pubmed_id':str($study.study_pubmed_id),'samples':$samples})
187 #end for
188 #echo $json.dumps($studies)
189 #end if
190 </configfile>
191 </configfiles>
192 <inputs>
193 <conditional name="action_options">
194 <param name="action" type="select" label="Action to execute">
195 <option value="add" selected="True">Add new data</option>
196 <option value="modify">Modify metadata</option>
197 </param>
198 <when value="add">
199 <param name="submit_dev" type="boolean" label="Submit to test ENA server?" help="By selecting yes the reads will be submitted " />
200 <param name="test_submit" type="hidden" value="False" />
201 <expand macro="table_inputs_macro" />
202 </when>
203 <when value="modify">
204 <expand macro="table_inputs_macro" />
205 </when>
206 </conditional>
207 </inputs>
208 <outputs>
209 <data name="output" format="data" label="${tool.name} on ${on_string}: Upload summary"/>
210 <data name="studies_table_out" format="tabular" label="Studies table">
211 <filter> action_options['input_format_conditional']['input_format'] == "build_tables" or action_options['input_format_conditional']['input_format'] == "excel_tables"</filter>
212 </data>
213 <data name="samples_table_out" format="tabular" label="Samples table">
214 <filter> action_options['input_format_conditional']['input_format'] == "build_tables" or action_options['input_format_conditional']['input_format'] == "excel_tables"</filter>
215 </data>
216 <data name="experiments_table_out" format="tabular" label="Experiments table">
217 <filter> action_options['input_format_conditional']['input_format'] == "build_tables" or action_options['input_format_conditional']['input_format'] == "excel_tables"</filter>
218 </data>
219 <data name="runs_table_out" format="tabular" label="Runs table">
220 <filter> action_options['input_format_conditional']['input_format'] == "build_tables" or action_options['input_format_conditional']['input_format'] == "excel_tables"</filter>
221 </data>
222 </outputs>
223 <tests>
224 <!--Test excel input of VIRAL samples -->
225 <test>
226 <conditional name="action_options">
227 <param name="action" value="add"/>
228 <param name="submit_dev" value="False"/>
229 <conditional name="input_format_conditional">
230 <param name="input_format" value="excel_tables"/>
231 <param name="viral_submission" value="True"/>
232 <param name="dry_run" value="True"/>
233 <param name="xlsx_file" value="metadata_test_viral.xlsx"/>
234 <param name="data" value="sample.fq"/>
235 </conditional>
236 </conditional>
237 <param name="center" value="Some research center"/>
238 <output name="experiments_table_out">
239 <assert_contents>
240 <has_n_lines n="5"/>
241 <has_n_columns n="17"/>
242 <has_line_matching expression="alias\tstatus\taccession\ttitle\tstudy_alias\tsample_alias\tdesign_description\tlibrary_name\tlibrary_strategy\tlibrary_source\tlibrary_selection\tlibrary_layout\tinsert_size\tlibrary_construction_protocol\tplatform\tinstrument_model\tsubmission_date" />
243 <has_line_matching expression="e_(.*)_026\tadd\taccession_ena\tNanopore sequencing\tSARS-CoV-2_genomes_01\ts_(.*)"/>
244 </assert_contents>
245 </output>
246 <output name="studies_table_out">
247 <assert_contents>
248 <has_n_lines n="2"/>
249 <has_n_columns n="8"/>
250 <has_line_matching expression="alias\tstatus\taccession\ttitle\tstudy_type\tstudy_abstract\tpubmed_id\tsubmission_date"/>
251 <has_line_matching expression="SARS-CoV-2_genomes_01\tadd\tENA_accession\tWhole-genome sequencing of SARS-CoV-2 from Covid-19 patients\tWhole Genome Sequencing\tWhole-genome sequences of SARS-CoV-2 from oro-pharyngeal swabs obtained from Covid-19 patients(.*)"/>
252 </assert_contents>
253 </output>
254 <output name="samples_table_out">
255 <assert_contents>
256 <has_n_lines n="5"/>
257 <has_n_columns n="18"/>
258 <has_line_matching expression="alias\tstatus\taccession\ttitle\tscientific_name\ttaxon_id\tsample_description\tcollection_date\tgeographic_location\thost_common_name\thost_subject_id\thost_health_state\thost_sex\thost_scientific_name\tcollector_name\tcollecting_institution\tisolate\tsubmission_date"/>
259 </assert_contents>
260 </output>
261 <output name="runs_table_out">
262 <assert_contents>
263 <has_n_lines n="5"/>
264 <has_n_columns n="8"/>
265 <has_line_matching expression="alias\tstatus\taccession\texperiment_alias\tfile_name\tfile_format\tfile_checksum\tsubmission_date"/>
266 <has_line_matching expression="r_(.*)_026\tadd\tena_run_accession\te_(.*)_026\tC026_exp5_clean.fastq.gz\tfastq\tfile_checksum\tsubmission_date_ENA"/>
267 </assert_contents>
268 </output>
269 </test>
270 <!--Test excel input of NON-VIRAL samples-->
271 <test>
272 <conditional name="action_options">
273 <param name="action" value="add"/>
274 <param name="submit_dev" value="False"/>
275 <conditional name="input_format_conditional">
276 <param name="input_format" value="excel_tables"/>
277 <param name="viral_submission" value="False"/>
278 <param name="dry_run" value="True"/>
279 <param name="xlsx_file" value="metadata_test_nonviral.xlsx"/>
280 <param name="data" value="sample.fq"/>
281 </conditional>
282 </conditional>
283 <param name="center" value="Some research center"/>
284 <output name="experiments_table_out">
285 <assert_contents>
286 <has_n_lines n="5"/>
287 <has_n_columns n="17"/>
288 <has_line_matching expression="alias\tstatus\taccession\ttitle\tstudy_alias\tsample_alias\tdesign_description\tlibrary_name\tlibrary_strategy\tlibrary_source\tlibrary_selection\tlibrary_layout\tinsert_size\tlibrary_construction_protocol\tplatform\tinstrument_model\tsubmission_date" />
289 </assert_contents>
290 </output>
291 <output name="studies_table_out">
292 <assert_contents>
293 <has_n_lines n="2"/>
294 <has_n_columns n="8"/>
295 <has_line_matching expression="alias\tstatus\taccession\ttitle\tstudy_type\tstudy_abstract\tpubmed_id\tsubmission_date"/>
296 </assert_contents>
297 </output>
298 <output name="samples_table_out">
299 <assert_contents>
300 <has_n_lines n="5"/>
301 <has_n_columns n="8"/>
302 <has_line_matching expression="alias\tstatus\taccession\ttitle\tscientific_name\ttaxon_id\tsample_description\tsubmission_date"/>
303 </assert_contents>
304 </output>
305 <output name="runs_table_out">
306 <assert_contents>
307 <has_n_lines n="5"/>
308 <has_n_columns n="8"/>
309 <has_line_matching expression="alias\tstatus\taccession\texperiment_alias\tfile_name\tfile_format\tfile_checksum\tsubmission_date"/>
310 <has_line_matching expression="r_(.*)_026\tadd\tena_run_accession\te_(.*)_026\tC026_exp5_clean.fastq.gz\tfastq\tfile_checksum\tsubmission_date_ENA"/>
311 </assert_contents>
312 </output>
313 </test>
314 <!--Test build tables from user input fields NON-VIRAL samples-->
315 <test>
316 <conditional name="action_options">
317 <param name="action" value="add"/>
318 <param name="submit_dev" value="False"/>
319 <conditional name="input_format_conditional">
320 <param name="input_format" value="build_tables"/>
321 <param name="dry_run" value="True"/>
322 <conditional name="conditional_viral_metadata">
323 <param name="viral_sample" value="False"/>
324 <repeat name="rep_study">
325 <param name="study_title" value="Test study title"/>
326 <param name="study_abstract" value="Test study abstract"/>
327 <param name="study_type" value="Epigenetics"/>
328 <param name="study_pubmed_id" value="Test study pubmedID"/>
329 <repeat name="rep_sample">
330 <param name="sample_title" value="Test Sample title"/>
331 <param name="sample_description" value="Test Sample description"/>
332 <param name="scientific_name" value="Test Sample scientific name"/>
333 <param name="tax_id" value="Test Sample tax_id"/>
334 <repeat name="rep_experiment">
335 <param name="experiment_title" value="Test experiment title"/>
336 <param name="experiment_design" value="Test experiment design description"/>
337 <param name="library_strategy" value="CTS"/>
338 <param name="library_source" value="GENOMIC"/>
339 <param name="library_selection" value="PCR"/>
340 <param name="library_layout" value="SINGLE"/>
341 <param name="insert_size" value="150"/>
342 <param name="library_construction_protocol" value="Test library construction"/>
343 <param name="platform" value="ILLUMINA"/>
344 <param name="instrument_model" value="Illumina HiSeq 4000"/>
345 <repeat name="rep_runs">
346 <param name="upload_files" value="1.fastqsanger.gz,sample.fq" ftype="fastqsanger"/>
347 </repeat>
348 </repeat>
349 </repeat>
350 </repeat>
351 </conditional>
352 </conditional>
353 </conditional>
354 <param name="center" value="Some research center"/>
355 <output name="experiments_table_out">
356 <assert_contents>
357 <has_n_lines n="2"/>
358 <has_n_columns n="17"/>
359 </assert_contents>
360 </output>
361 <output name="studies_table_out">
362 <assert_contents>
363 <has_n_lines n="2"/>
364 <has_n_columns n="8"/>
365 <has_line_matching expression="alias\tstatus\taccession\ttitle\tstudy_type\tstudy_abstract\tpubmed_id\tsubmission_date"/>
366 </assert_contents>
367 </output>
368 <output name="samples_table_out">
369 <assert_contents>
370 <has_n_lines n="2"/>
371 <has_n_columns n="8"/>
372 </assert_contents>
373 </output>
374 <output name="runs_table_out">
375 <assert_contents>
376 <has_n_lines n="3"/>
377 <has_n_columns n="8"/>
378 <has_line_matching expression="alias\tstatus\taccession\texperiment_alias\tfile_name\tfile_format\tfile_checksum\tsubmission_date"/>
379 </assert_contents>
380 </output>
381 </test>
382 <!--Test RUN failing build tables from user input fields NON-VIRAL samples-->
383 <test expect_failure="true">
384 <conditional name="action_options">
385 <param name="action" value="add"/>
386 <param name="submit_dev" value="True"/>
387 <conditional name="input_format_conditional">
388 <param name="input_format" value="build_tables"/>
389 <param name="dry_run" value="False"/>
390 <conditional name="conditional_viral_metadata">
391 <param name="viral_sample" value="False"/>
392 <repeat name="rep_study">
393 <param name="study_title" value="Test study title"/>
394 <param name="study_abstract" value="Test study abstract"/>
395 <param name="study_type" value="Epigenetics"/>
396 <param name="study_pubmed_id" value="Test study pubmedID"/>
397 <repeat name="rep_sample">
398 <param name="sample_title" value="Test Sample title"/>
399 <param name="sample_description" value="Test Sample description"/>
400 <param name="scientific_name" value="Test Sample scientific name"/>
401 <param name="tax_id" value="Test Sample tax_id"/>
402 <repeat name="rep_experiment">
403 <param name="experiment_title" value="Test experiment title"/>
404 <param name="experiment_design" value="Test experiment design description"/>
405 <param name="library_strategy" value="CTS"/>
406 <param name="library_source" value="GENOMIC"/>
407 <param name="library_selection" value="PCR"/>
408 <param name="library_layout" value="SINGLE"/>
409 <param name="insert_size" value="150"/>
410 <param name="library_construction_protocol" value="Test library construction"/>
411 <param name="platform" value="ILLUMINA"/>
412 <param name="instrument_model" value="Illumina HiSeq 4000"/>
413 <repeat name="rep_runs">
414 <param name="upload_files" value="1.fastqsanger.gz,sample.fq" ftype="fastqsanger"/>
415 </repeat>
416 </repeat>
417 </repeat>
418 </repeat>
419 </conditional>
420 </conditional>
421 </conditional>
422 <param name="center" value="Some research center"/>
423 <assert_stdout>
424 <has_text_matching expression="No ENA credentials defined"/>
425 </assert_stdout>
426 </test>
427 <!--Test with submit_test to skip credentials checksRUN failing build tables from user input fields NON-VIRAL samples-->
428 <test expect_failure="true">
429 <conditional name="action_options">
430 <param name="action" value="add"/>
431 <param name="submit_dev" value="True"/>
432 <param name="test_submit" value="True"/>
433 <conditional name="input_format_conditional">
434 <param name="input_format" value="build_tables"/>
435 <param name="dry_run" value="False"/>
436 <conditional name="conditional_viral_metadata">
437 <param name="viral_sample" value="False"/>
438 <repeat name="rep_study">
439 <param name="study_title" value="Test study title"/>
440 <param name="study_abstract" value="Test study abstract"/>
441 <param name="study_type" value="Epigenetics"/>
442 <param name="study_pubmed_id" value="Test study pubmedID"/>
443 <repeat name="rep_sample">
444 <param name="sample_title" value="Test Sample title"/>
445 <param name="sample_description" value="Test Sample description"/>
446 <param name="scientific_name" value="Test Sample scientific name"/>
447 <param name="tax_id" value="Test Sample tax_id"/>
448 <repeat name="rep_experiment">
449 <param name="experiment_title" value="Test experiment title"/>
450 <param name="experiment_design" value="Test experiment design description"/>
451 <param name="library_strategy" value="CTS"/>
452 <param name="library_source" value="GENOMIC"/>
453 <param name="library_selection" value="PCR"/>
454 <param name="library_layout" value="SINGLE"/>
455 <param name="insert_size" value="150"/>
456 <param name="library_construction_protocol" value="Test library construction"/>
457 <param name="platform" value="ILLUMINA"/>
458 <param name="instrument_model" value="Illumina HiSeq 4000"/>
459 <repeat name="rep_runs">
460 <param name="upload_files" value="1.fastqsanger.gz,sample.fq" ftype="fastqsanger"/>
461 </repeat>
462 </repeat>
463 </repeat>
464 </repeat>
465 </conditional>
466 </conditional>
467 </conditional>
468 <param name="center" value="Some research center"/>
469 <assert_command>
470 <has_text_matching expression="ena-upload-cli"/>
471 <has_text_matching expression="--data '1.fastqsanger.gz' 'sample.fq'"/>
472 <has_text_matching expression="--action 'add' --center 'Some research center'"/>
473 </assert_command>
474 <assert_stderr>
475 <has_text_matching expression="ENA_upload: error: Oops, the file test_fake_path does not exist"/>
476 </assert_stderr>
477 </test>
478 <!--test viral submission - User input metadata-->
479 <test expect_failure="true">
480 <conditional name="action_options">
481 <param name="action" value="add"/>
482 <param name="submit_dev" value="False"/>
483 <param name="test_submit" value="True"/>
484 <conditional name="input_format_conditional">
485 <param name="input_format" value="build_tables"/>
486 <param name="dry_run" value="False"/>
487 <conditional name="conditional_viral_metadata">
488 <param name="viral_sample" value="True"/>
489 <repeat name="rep_study">
490 <param name="study_title" value="Test study title"/>
491 <param name="study_abstract" value="Test study abstract"/>
492 <param name="study_type" value="Epigenetics"/>
493 <param name="study_pubmed_id" value="Test study pubmedID"/>
494 <repeat name="rep_sample">
495 <param name="sample_title" value="Test Sample title"/>
496 <param name="sample_description" value="Test Sample description"/>
497 <param name="scientific_name" value="Test Sample scientific name"/>
498 <param name="tax_id" value="Test Sample tax_id"/>
499 <param name="collection_date" value="2020"/>
500 <param name="geo_location_country" value="Belgium"/>
501 <param name="host_common_name" value="Human"/>
502 <param name="host_subject_id" value="Patient_001"/>
503 <param name="host_health_state" value="healthy"/>
504 <param name="host_sex" value="female"/>
505 <param name="host_scientific_name" value="homo sapiens"/>
506 <param name="collector_name" value="John The Collector"/>
507 <param name="collecting_institution" value="Hospital 01"/>
508 <param name="isolate" value="sample_001"/>
509 <repeat name="rep_experiment">
510 <param name="experiment_title" value="Test experiment title"/>
511 <param name="experiment_design" value="Test experiment design description"/>
512 <param name="library_strategy" value="CTS"/>
513 <param name="library_source" value="GENOMIC"/>
514 <param name="library_selection" value="PCR"/>
515 <param name="library_layout" value="SINGLE"/>
516 <param name="insert_size" value="150"/>
517 <param name="library_construction_protocol" value="Test library construction"/>
518 <param name="platform" value="ILLUMINA"/>
519 <param name="instrument_model" value="Illumina HiSeq 4000"/>
520 <repeat name="rep_runs">
521 <param name="upload_files" value="1.fastqsanger.gz,sample.fq" ftype="fastqsanger"/>
522 </repeat>
523 </repeat>
524 </repeat>
525 </repeat>
526 </conditional>
527 </conditional>
528 </conditional>
529 <param name="center" value="Some research center"/>
530 <assert_command>
531 <has_text_matching expression="ena-upload-cli"/>
532 <has_text_matching expression="--data '1.fastqsanger.gz' 'sample.fq'"/>
533 <has_text_matching expression="--action 'add' --center 'Some research center'"/>
534 <has_text_matching expression="--vir"/>
535 </assert_command>
536 <assert_stderr>
537 <has_text_matching expression="ENA_upload: error: Oops, the file test_fake_path does not exist"/>
538 </assert_stderr>
539 </test>
540 </tests>
541 <help><![CDATA[
542 This is a wrapper for the ENA upload tool in https://github.com/usegalaxy-eu/ena-upload-cli
543 The input metadata can be submitted following the tabular format of the templates in https://github.com/usegalaxy-eu/ena-upload-cli/tree/master/example_tables
544 It is also possible to submit an excel file by following the template in https://drive.google.com/file/d/1ncC22--tW2v-EI-te_r86sAZujIPAjlX/view?usp=sharing
545 For viral submissions a larger set of metadata is required, you can find the template in https://drive.google.com/file/d/1U4VdcczsIecIXxseV8svE1zO_CBUadog/view?usp=sharing
546 ]]></help>
547 <citations>
548 </citations>
549 </tool>