Mercurial > repos > iuc > ena_upload
comparison ena_upload.xml @ 10:e7995727674f draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ena_upload commit 6428c6a64979e4a1f745066a62280e38ad98d249
| author | iuc |
|---|---|
| date | Mon, 27 Jan 2025 18:12:01 +0000 |
| parents | 69fc9c4a68b7 |
| children | fd7a4d3e07df |
comparison
equal
deleted
inserted
replaced
| 9:69fc9c4a68b7 | 10:e7995727674f |
|---|---|
| 1 <tool id="ena_upload" name="ENA Upload tool" version="@VERSION@" profile="20.01" license="MIT"> | 1 <tool id="ena_upload" name="ENA Upload tool" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.05" license="MIT"> |
| 2 <description>Submission of (meta)data to the European Nucleotide Archive (ENA)</description> | |
| 2 <macros> | 3 <macros> |
| 3 <token name="@VERSION@">0.6.1</token> | 4 <token name="@TOOL_VERSION@">0.7.5</token> |
| 5 <token name="@VERSION_SUFFIX@">1</token> | |
| 4 <import>samples_macros.xml</import> | 6 <import>samples_macros.xml</import> |
| 5 </macros> | 7 </macros> |
| 6 <requirements> | 8 <requirements> |
| 7 <requirement type="package" version="@VERSION@">ena-upload-cli</requirement> | 9 <requirement type="package" version="@TOOL_VERSION@">ena-upload-cli</requirement> |
| 8 </requirements> | 10 </requirements> |
| 9 <stdio> | 11 <stdio> |
| 10 <regex match="Oops" source="stderr" level="fatal"/> | 12 <regex match="Oops" source="stderr" level="fatal"/> |
| 11 <regex match="different file names between command line and RUN table" source="stderr" level="fatal"/> | 13 <regex match="different file names between command line and RUN table" source="stderr" level="fatal"/> |
| 12 </stdio> | 14 </stdio> |
| 45 ln -s '$action_options.input_format_conditional.samples_users_table' $samples_table_path && | 47 ln -s '$action_options.input_format_conditional.samples_users_table' $samples_table_path && |
| 46 #end if | 48 #end if |
| 47 #if $action_options.input_format_conditional.input_format == "excel_tables": | 49 #if $action_options.input_format_conditional.input_format == "excel_tables": |
| 48 ln -s '$action_options.input_format_conditional.xlsx_file' ./xlsx_input.xlsx && | 50 ln -s '$action_options.input_format_conditional.xlsx_file' ./xlsx_input.xlsx && |
| 49 #end if | 51 #end if |
| 50 #if $action_options.test_submit_parameters.dry_run == "false" and $action_options.test_submit == "False": | 52 #if $action_options.input_format_conditional.input_format == "isa_json": |
| 53 ln -s '$action_options.input_format_conditional.isa_json_file' ./isa_json_input.json && | |
| 54 #end if | |
| 55 #if $action_options.test_submit_parameters.dry_run == "False": | |
| 51 webin_id=`grep 'username' $credentials`; | 56 webin_id=`grep 'username' $credentials`; |
| 52 if [ "\$webin_id" = "" ]; then | 57 if [ "\$webin_id" = "" ]; then |
| 53 ## No credentials in user defined preferences | 58 ## No credentials in user defined preferences |
| 54 ## Fallback to global defined credentials (if exist) | 59 ## Fallback to global defined credentials (if exist) |
| 55 #import os | 60 #import os |
| 56 #if os.path.isfile(os.environ.get('GALAXY_ENA_SECRETS', '')): | 61 #if os.path.isfile(os.environ.get('GALAXY_ENA_SECRETS', '')): |
| 57 credentials_path=\${GALAXY_ENA_SECRETS}; | 62 credentials_path=\${GALAXY_ENA_SECRETS}; |
| 58 webin_id=`grep 'username' \$GALAXY_ENA_SECRETS`; | 63 webin_id=`grep 'username' \$GALAXY_ENA_SECRETS`; |
| 59 if [ "\$webin_id" = "" ]; then | 64 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"; | 65 echo "No global credentials defined. Check your GALAXY_ENA_SECRETS file or set your credentials via: User -> Preferences -> Manage Information"; |
| 61 exit 1; | 66 exit 1; |
| 62 fi; | 67 fi; |
| 63 #else: | 68 #else: |
| 64 echo "No ENA credentials defined. Set your credentials via: User -> Preferences -> Manage Information"; | 69 echo "No ENA credentials defined. Set your credentials via: User -> Preferences -> Manage Information"; |
| 65 exit 1; | 70 exit 1; |
| 78 #for $sample in $study.rep_sample: | 83 #for $sample in $study.rep_sample: |
| 79 #for $experiment in $sample.rep_experiment: | 84 #for $experiment in $sample.rep_experiment: |
| 80 #for $run in $experiment.rep_runs: | 85 #for $run in $experiment.rep_runs: |
| 81 #for $file in $run.upload_files: | 86 #for $file in $run.upload_files: |
| 82 #set $safename_reads_file = re.sub('[^\w\-_\.]', '_', $file.element_identifier) | 87 #set $safename_reads_file = re.sub('[^\w\-_\.]', '_', $file.element_identifier) |
| 83 #if $action_options.input_format_conditional.add_extension == "true": | 88 #if $action_options.input_format_conditional.add_extension == "True": |
| 84 #set $extension = '.fastq' | 89 #set $extension = '.fastq' |
| 85 #else | 90 #else |
| 86 #set $extension = '' | 91 #set $extension = '' |
| 87 #end if | 92 #end if |
| 88 #if $file.is_of_type('fastq', 'fastqsanger'): | 93 #if $file.is_of_type('fastq', 'fastqsanger'): |
| 89 ## compression output is defined as safename_reads_file so no need to symlink | 94 ## compression output is defined as safename_reads_file so no need to symlink |
| 90 #set $safename_reads_file = $safename_reads_file + $extension + '.gz' | 95 #set $safename_reads_file = $safename_reads_file + $extension + '.gz' |
| 91 gzip -c '$file' > $safename_reads_file && | 96 gzip -c '$file' > $safename_reads_file && |
| 92 #else: | 97 #else: |
| 93 #if $action_options.input_format_conditional.add_extension == "true": | 98 #if $action_options.input_format_conditional.add_extension == "True": |
| 94 #if $file.is_of_type('fastq.gz', 'fastqsanger.gz'): | 99 #if $file.is_of_type('fastq.gz', 'fastqsanger.gz'): |
| 95 #set $compression = '.gz' | 100 #set $compression = '.gz' |
| 96 #elif $file.is_of_type('fastqsanger.bz2', 'fastq.bz2'): | 101 #elif $file.is_of_type('fastqsanger.bz2', 'fastq.bz2'): |
| 97 #set $compression = '.bz2' | 102 #set $compression = '.bz2' |
| 98 #end if | 103 #end if |
| 146 #if $action_options.input_format_conditional.run_input_format_conditional.run_input_format == 'multiple_selection_list': | 151 #if $action_options.input_format_conditional.run_input_format_conditional.run_input_format == 'multiple_selection_list': |
| 147 #for $file in $action_options.input_format_conditional.run_input_format_conditional.data: | 152 #for $file in $action_options.input_format_conditional.run_input_format_conditional.data: |
| 148 #set $safename_reads_file = re.sub('[^\w\-_\.]', '_', $file.element_identifier) | 153 #set $safename_reads_file = re.sub('[^\w\-_\.]', '_', $file.element_identifier) |
| 149 #if $file.is_of_type('fastq', 'fastqsanger'): | 154 #if $file.is_of_type('fastq', 'fastqsanger'): |
| 150 ## always compress add the gz extension | 155 ## always compress add the gz extension |
| 151 #if $action_options.input_format_conditional.run_input_format_conditional.add_extension == "true": | 156 #if $action_options.input_format_conditional.run_input_format_conditional.add_extension == "True": |
| 152 #set $safename_reads_file = $safename_reads_file + '.fastq.gz' | 157 #set $safename_reads_file = $safename_reads_file + '.fastq.gz' |
| 153 #else | 158 #else |
| 154 #set $safename_reads_file = $safename_reads_file + '.gz' | 159 #set $safename_reads_file = $safename_reads_file + '.gz' |
| 155 #end if | 160 #end if |
| 156 gzip -c '$file' > $safename_reads_file && | 161 gzip -c '$file' > $safename_reads_file && |
| 157 #else | 162 #else |
| 158 #if $action_options.input_format_conditional.run_input_format_conditional.add_extension == "true": | 163 #if $action_options.input_format_conditional.run_input_format_conditional.add_extension == "True": |
| 159 #if $file.is_of_type('fastq.gz', 'fastqsanger.gz'): | 164 #if $file.is_of_type('fastq.gz', 'fastqsanger.gz'): |
| 160 #set $extension = '.fastq.gz' | 165 #set $extension = '.fastq.gz' |
| 161 #elif $file.is_of_type('fastqsanger.bz2', 'fastq.bz2'): | 166 #elif $file.is_of_type('fastqsanger.bz2', 'fastq.bz2'): |
| 162 #set $extension = '.fastq.bz2' | 167 #set $extension = '.fastq.bz2' |
| 163 #end if | 168 #end if |
| 168 $files_to_upload.append(str($safename_reads_file)) | 173 $files_to_upload.append(str($safename_reads_file)) |
| 169 #end for | 174 #end for |
| 170 #end if | 175 #end if |
| 171 #end if | 176 #end if |
| 172 | 177 |
| 173 #if $action_options.action == "add": | |
| 174 ena-upload-cli | 178 ena-upload-cli |
| 175 --tool 'ena-upload-cli v@VERSION@ @ Galaxy' | 179 --tool 'ena-upload-cli v@TOOL_VERSION@ @ Galaxy' |
| 176 --action '$action_options.action' | 180 --action '$action_options.action' |
| 177 --center '$action_options.center' | 181 --center '$action_options.test_submit_parameters.center' |
| 178 --secret \${credentials_path} | 182 --secret \${credentials_path} |
| 179 --data | 183 --data |
| 180 #for $dataset in $files_to_upload: | 184 #for $dataset in $files_to_upload: |
| 181 '$dataset' | 185 '$dataset' |
| 182 #end for | 186 #end for |
| 183 #if $action_options.test_submit_parameters.dry_run == "true": | 187 #if $action_options.test_submit_parameters.dry_run == "True": |
| 184 --draft | 188 --draft |
| 185 #end if | 189 #end if |
| 186 #if $action_options.input_format_conditional.input_format != "excel_tables": | 190 #if $action_options.input_format_conditional.input_format == "excel_tables": |
| 191 --xlsx ./xlsx_input.xlsx | |
| 192 #elif $action_options.input_format_conditional.input_format == "user_generated_tables" or $action_options.input_format_conditional.input_format == "build_tables": | |
| 187 --experiment '$experiments_table_path' | 193 --experiment '$experiments_table_path' |
| 188 --study '$studies_table_path' | 194 --study '$studies_table_path' |
| 189 --run '$runs_table_path' | 195 --run '$runs_table_path' |
| 190 --sample '$samples_table_path' | 196 --sample '$samples_table_path' |
| 191 #else | 197 #elif $action_options.input_format_conditional.input_format == "isa_json": |
| 192 --xlsx ./xlsx_input.xlsx | 198 --isa_json ./isa_json_input.json |
| 193 #end if | 199 --isa_assay_stream '$action_options.input_format_conditional.isa_assay_stream' |
| 194 --action add | 200 #end if |
| 195 #if $action_options.input_format_conditional.input_format == "user_generated_tables": | 201 #if $action_options.input_format_conditional.input_format == "build_tables": |
| 196 --checklist $action_options.input_format_conditional.checklist_id | 202 #if $action_options.input_format_conditional.conditional_viral_metadata.viral_sample == "True": |
| 203 --checklist ERC000033 | |
| 204 #end if | |
| 205 #elif $action_options.input_format_conditional.input_format == "isa_json": | |
| 206 --checklist ERC000011 | |
| 197 #else: | 207 #else: |
| 198 #if $action_options.input_format_conditional.input_format == "build_tables": | 208 --checklist $action_options.input_format_conditional.checklist_id |
| 199 #if $action_options.input_format_conditional.conditional_viral_metadata.viral_sample == "true": | 209 #end if |
| 200 --checklist ERC000033 | 210 #if $action_options.test_submit_parameters.submit_dev == "True": |
| 201 #end if | |
| 202 #else: | |
| 203 --checklist $action_options.input_format_conditional.checklist_id | |
| 204 #end if | |
| 205 #end if | |
| 206 #if $action_options.idempotent == "true": | |
| 207 --auto_action | |
| 208 #end if | |
| 209 #if $action_options.test_submit_parameters.submit_dev == "true": | |
| 210 -d | 211 -d |
| 211 #end if | 212 #end if |
| 212 >> '$output'; | 213 >> '$output'; |
| 213 #end if | 214 |
| 214 | 215 |
| 215 | 216 #if $action_options.test_submit_parameters.dry_run == "False": |
| 216 | 217 echo -e 'center_name\t$action_options.test_submit_parameters.center' >> '$output'; |
| 217 #if $action_options.action == "modify": | |
| 218 ena-upload-cli | |
| 219 --tool 'ena-upload-cli v@VERSION@ @ Galaxy' | |
| 220 --action '$action_options.action' | |
| 221 --center '$action_options.center' | |
| 222 --secret \${credentials_path} | |
| 223 --data | |
| 224 #for $dataset in $files_to_upload: | |
| 225 '$dataset' | |
| 226 #end for | |
| 227 #if $action_options.test_submit_parameters.dry_run == "true": | |
| 228 --draft | |
| 229 #end if | |
| 230 #if $action_options.input_format_conditional.input_format != "excel_tables": | |
| 231 --experiment '$experiments_table_path' | |
| 232 --study '$studies_table_path' | |
| 233 --run '$runs_table_path' | |
| 234 --sample '$samples_table_path' | |
| 235 #else | |
| 236 --xlsx ./xlsx_input.xlsx | |
| 237 --auto_action | |
| 238 #end if | |
| 239 --action 'modify' | |
| 240 #if $action_options.input_format_conditional.input_format == "user_generated_tables": | |
| 241 --checklist $action_options.input_format_conditional.checklist_id | |
| 242 #else: | |
| 243 #if $action_options.input_format_conditional.input_format == "build_tables": | |
| 244 #if $action_options.input_format_conditional.conditional_viral_metadata.viral_sample == "true": | |
| 245 --checklist ERC000033 | |
| 246 #end if | |
| 247 #else: | |
| 248 --checklist $action_options.input_format_conditional.checklist_id | |
| 249 #end if | |
| 250 #end if | |
| 251 >> '$output'; | |
| 252 #end if | |
| 253 | |
| 254 #if $action_options.test_submit_parameters.dry_run == "false": | |
| 255 echo -e 'center_name\t$action_options.center' >> '$output'; | |
| 256 echo -e 'action_option\t$action_options.action' >> '$output'; | 218 echo -e 'action_option\t$action_options.action' >> '$output'; |
| 257 #end if | 219 #end if |
| 258 | 220 |
| 259 ## copy updated files | 221 ## copy updated files |
| 260 #if $action_options.input_format_conditional.input_format == "excel_tables": | 222 #if $action_options.input_format_conditional.input_format == "excel_tables" or $action_options.input_format_conditional.input_format == "isa_json": |
| 261 ## for the excel input case, copy the upload-cli generated tables to the output files | 223 ## for the excel/ISA json input case, copy the upload-cli generated tables to the output files |
| 262 ## this applies for both draft and real submissions | 224 ## this applies for both draft and real submissions |
| 263 cp './ENA_template_experiment_updated.tsv' $experiments_table_out; | 225 cp './ENA_template_experiment_updated.tsv' $experiments_table_out; |
| 264 cp './ENA_template_sample_updated.tsv' $samples_table_out; | 226 cp './ENA_template_sample_updated.tsv' $samples_table_out; |
| 265 cp './ENA_template_study_updated.tsv' $studies_table_out; | 227 cp './ENA_template_study_updated.tsv' $studies_table_out; |
| 266 cp './ENA_template_run_updated.tsv' $runs_table_out; | 228 cp './ENA_template_run_updated.tsv' $runs_table_out; |
| 303 $runs.append((str($run.run_base_name),$run_files)) | 265 $runs.append((str($run.run_base_name),$run_files)) |
| 304 #end for | 266 #end for |
| 305 | 267 |
| 306 $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}) | 268 $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}) |
| 307 #end for | 269 #end for |
| 308 #if $action_options.input_format_conditional.conditional_viral_metadata.viral_sample == "true": | 270 #if $action_options.input_format_conditional.conditional_viral_metadata.viral_sample == "True": |
| 309 | |
| 310 $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}) | 271 $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}) |
| 311 #else: | 272 #else: |
| 312 | 273 $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),'experiments':$experiments}) |
| 313 $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}) | |
| 314 #end if | 274 #end if |
| 315 #end for | 275 #end for |
| 316 $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}) | 276 $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}) |
| 317 #end for | 277 #end for |
| 318 #echo $json.dumps($studies) | 278 #echo $json.dumps($studies) |
| 320 </configfile> | 280 </configfile> |
| 321 </configfiles> | 281 </configfiles> |
| 322 <inputs> | 282 <inputs> |
| 323 <conditional name="action_options"> | 283 <conditional name="action_options"> |
| 324 <param name="action" type="select" label="Action to execute"> | 284 <param name="action" type="select" label="Action to execute"> |
| 325 <option value="add" selected="True">Add new data</option> | 285 <option value="add" selected="True">Add new (meta)data</option> |
| 326 <option value="modify">Modify metadata</option> | 286 <option value="modify">Modify metadata</option> |
| 327 </param> | 287 </param> |
| 328 <when value="add"> | 288 <when value="add"> |
| 329 <param type="boolean" name="idempotent" checked="False" label="Idempotent submissions: only add the elements that were not submitted before" help="NOTE: this feature is based on a beta parameter of the CLI that checks the remote ENA repository for entries using the alias. This remote detection can have false positives, i.e assumes that it's present in the repository but it's not"/> | 289 <param name="test_submit" type="hidden" value="False" /> |
| 330 <expand macro="test_submit_section"/> | 290 <expand macro="table_inputs_macro" /> |
| 291 <expand macro="test_submit_section"/> | |
| 292 </when> | |
| 293 <when value="modify"> | |
| 331 <param name="test_submit" type="hidden" value="False" /> | 294 <param name="test_submit" type="hidden" value="False" /> |
| 332 <expand macro="table_inputs_macro" /> | 295 <expand macro="table_inputs_macro" /> |
| 333 </when> | 296 <expand macro="test_submit_section"/> |
| 334 <when value="modify"> | |
| 335 <expand macro="test_submit_section"/> | |
| 336 <param name="test_submit" type="hidden" value="False" /> | |
| 337 <expand macro="table_inputs_macro" /> | |
| 338 </when> | 297 </when> |
| 339 </conditional> | 298 </conditional> |
| 340 </inputs> | 299 </inputs> |
| 341 <outputs> | 300 <outputs> |
| 342 <data name="output" format="txt" label="ENA submission receipt"/> | 301 <data name="output" format="txt" label="ENA submission receipt"/> |
| 343 <data name="studies_table_out" format="tabular" label="Studies table"> | 302 <data name="studies_table_out" format="tabular" label="Studies table"> |
| 344 <filter> action_options['input_format_conditional']['input_format'] == "build_tables" or action_options['input_format_conditional']['input_format'] == "excel_tables"</filter> | 303 <filter> action_options['input_format_conditional']['input_format'] == "build_tables" or action_options['input_format_conditional']['input_format'] == "excel_tables" or action_options['input_format_conditional']['input_format'] == "isa_json"</filter> |
| 345 </data> | 304 </data> |
| 346 <data name="samples_table_out" format="tabular" label="Samples table"> | 305 <data name="samples_table_out" format="tabular" label="Samples table"> |
| 347 <filter> action_options['input_format_conditional']['input_format'] == "build_tables" or action_options['input_format_conditional']['input_format'] == "excel_tables"</filter> | 306 <filter> action_options['input_format_conditional']['input_format'] == "build_tables" or action_options['input_format_conditional']['input_format'] == "excel_tables" or action_options['input_format_conditional']['input_format'] == "isa_json"</filter> |
| 348 </data> | 307 </data> |
| 349 <data name="experiments_table_out" format="tabular" label="Experiments table"> | 308 <data name="experiments_table_out" format="tabular" label="Experiments table"> |
| 350 <filter> action_options['input_format_conditional']['input_format'] == "build_tables" or action_options['input_format_conditional']['input_format'] == "excel_tables"</filter> | 309 <filter> action_options['input_format_conditional']['input_format'] == "build_tables" or action_options['input_format_conditional']['input_format'] == "excel_tables" or action_options['input_format_conditional']['input_format'] == "isa_json"</filter> |
| 351 </data> | 310 </data> |
| 352 <data name="runs_table_out" format="tabular" label="Runs table"> | 311 <data name="runs_table_out" format="tabular" label="Runs table"> |
| 353 <filter> action_options['input_format_conditional']['input_format'] == "build_tables" or action_options['input_format_conditional']['input_format'] == "excel_tables"</filter> | 312 <filter> action_options['input_format_conditional']['input_format'] == "build_tables" or action_options['input_format_conditional']['input_format'] == "excel_tables" or action_options['input_format_conditional']['input_format'] == "isa_json"</filter> |
| 354 </data> | 313 </data> |
| 355 </outputs> | 314 </outputs> |
| 356 <tests> | 315 <tests> |
| 357 <!--Test 1: excel input of VIRAL samples --> | 316 <!--Test 1: excel input of VIRAL samples --> |
| 358 <test> | 317 <test expect_num_outputs="5"> |
| 359 <conditional name="action_options"> | 318 <conditional name="action_options"> |
| 360 <param name="action" value="add"/> | 319 <param name="action" value="add"/> |
| 361 <section name="test_submit_parameters"> | 320 <section name="test_submit_parameters"> |
| 362 <param name="submit_dev" value="false" /> | 321 <param name="center" value="Some research center"/> |
| 363 <param name="dry_run" value="true" /> | 322 <param name="submit_dev" value="False" /> |
| 323 <param name="dry_run" value="True" /> | |
| 364 </section> | 324 </section> |
| 365 <conditional name="input_format_conditional"> | 325 <conditional name="input_format_conditional"> |
| 366 <param name="input_format" value="excel_tables"/> | 326 <param name="input_format" value="excel_tables"/> |
| 367 <param name="checklist_id" value="ERC000033"/> | 327 <param name="checklist_id" value="ERC000033"/> |
| 368 <param name="xlsx_file" value="metadata_test_viral.xlsx"/> | 328 <param name="xlsx_file" value="metadata_test_viral.xlsx"/> |
| 369 <conditional name="run_input_format_conditional"> | 329 <conditional name="run_input_format_conditional"> |
| 370 <param name="add_extension" value="false"/> | 330 <param name="add_extension" value="False"/> |
| 371 <param name="run_input_format" value="multiple_selection_list"/> | 331 <param name="run_input_format" value="multiple_selection_list"/> |
| 372 <param name="data" value="C030_exp5_clean.fastq,C053_exp5_clean.fastq,C026_exp5_clean.fastq,C067_exp5_clean.fastq"/> | 332 <param name="data" value="C030_exp5_clean.fastq,C053_exp5_clean.fastq,C026_exp5_clean.fastq,C067_exp5_clean.fastq"/> |
| 373 </conditional> | 333 </conditional> |
| 374 </conditional> | 334 </conditional> |
| 375 </conditional> | 335 </conditional> |
| 376 <param name="center" value="Some research center"/> | |
| 377 <output name="experiments_table_out"> | 336 <output name="experiments_table_out"> |
| 378 <assert_contents> | 337 <assert_contents> |
| 379 <has_n_lines n="5"/> | 338 <has_n_lines n="5"/> |
| 380 <has_n_columns n="17"/> | 339 <has_n_columns n="17"/> |
| 381 <has_line_matching expression="alias\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\taccession\tsubmission_date\tstatus"/> | 340 <has_line_matching expression="alias\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\taccession\tsubmission_date\tstatus"/> |
| 397 </output> | 356 </output> |
| 398 <output name="runs_table_out"> | 357 <output name="runs_table_out"> |
| 399 <assert_contents> | 358 <assert_contents> |
| 400 <has_n_lines n="5"/> | 359 <has_n_lines n="5"/> |
| 401 <has_n_columns n="8"/> | 360 <has_n_columns n="8"/> |
| 402 <has_line_matching expression="alias\texperiment_alias\tfile_name\tfile_format\taccession\tsubmission_date\tstatus\tfile_checksum"/> | 361 <has_line_matching expression="alias\texperiment_alias\tfile_name\tfile_format\tfile_checksum\taccession\tsubmission_date\tstatus"/> |
| 403 <has_line_matching expression="r_20201007_026\te_20201007_026\tC026_exp5_clean.fastq.gz\tFASTQ(.*)"/> | 362 <has_line_matching expression="r_20201007_026\te_20201007_026\tC026_exp5_clean.fastq.gz\tFASTQ(.*)"/> |
| 404 </assert_contents> | 363 </assert_contents> |
| 405 </output> | 364 </output> |
| 406 </test> | 365 </test> |
| 407 <!--Test 2: excel input of VIRAL samples with extended columns--> | 366 <!--Test 2: excel input of VIRAL samples with extended columns--> |
| 408 <test> | 367 <test expect_num_outputs="5"> |
| 409 <conditional name="action_options"> | 368 <conditional name="action_options"> |
| 410 <param name="action" value="add"/> | 369 <param name="action" value="add"/> |
| 411 <section name="test_submit_parameters"> | 370 <section name="test_submit_parameters"> |
| 412 <param name="submit_dev" value="false" /> | 371 <param name="center" value="Some research center"/> |
| 413 <param name="dry_run" value="true" /> | 372 <param name="submit_dev" value="False" /> |
| 373 <param name="dry_run" value="True" /> | |
| 414 </section> | 374 </section> |
| 415 <conditional name="input_format_conditional"> | 375 <conditional name="input_format_conditional"> |
| 416 <param name="input_format" value="excel_tables"/> | 376 <param name="input_format" value="excel_tables"/> |
| 417 <param name="checklist_id" value="ERC000033"/> | 377 <param name="checklist_id" value="ERC000033"/> |
| 418 <param name="xlsx_file" value="metadata_test_viral_optional_columns.xlsx"/> | 378 <param name="xlsx_file" value="metadata_test_viral_optional_columns.xlsx"/> |
| 419 <conditional name="run_input_format_conditional"> | 379 <conditional name="run_input_format_conditional"> |
| 420 <param name="add_extension" value="false"/> | 380 <param name="add_extension" value="False"/> |
| 421 <param name="run_input_format" value="multiple_selection_list"/> | 381 <param name="run_input_format" value="multiple_selection_list"/> |
| 422 <param name="data" value="C030_exp5_clean.fastq,C053_exp5_clean.fastq,C026_exp5_clean.fastq,C067_exp5_clean.fastq"/> | 382 <param name="data" value="C030_exp5_clean.fastq,C053_exp5_clean.fastq,C026_exp5_clean.fastq,C067_exp5_clean.fastq"/> |
| 423 </conditional> | 383 </conditional> |
| 424 </conditional> | 384 </conditional> |
| 425 </conditional> | 385 </conditional> |
| 426 <param name="center" value="Some research center"/> | |
| 427 <output name="experiments_table_out"> | 386 <output name="experiments_table_out"> |
| 428 <assert_contents> | 387 <assert_contents> |
| 429 <has_n_lines n="5"/> | 388 <has_n_lines n="5"/> |
| 430 <has_n_columns n="17"/> | 389 <has_n_columns n="17"/> |
| 431 <has_line_matching expression="alias\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\taccession\tsubmission_date\tstatus"/> | 390 <has_line_matching expression="alias\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\taccession\tsubmission_date\tstatus"/> |
| 448 </output> | 407 </output> |
| 449 <output name="runs_table_out"> | 408 <output name="runs_table_out"> |
| 450 <assert_contents> | 409 <assert_contents> |
| 451 <has_n_lines n="5"/> | 410 <has_n_lines n="5"/> |
| 452 <has_n_columns n="8"/> | 411 <has_n_columns n="8"/> |
| 453 <has_line_matching expression="alias\texperiment_alias\tfile_name\tfile_format\taccession\tsubmission_date\tstatus\tfile_checksum"/> | 412 <has_line_matching expression="alias\texperiment_alias\tfile_name\tfile_format\tfile_checksum\taccession\tsubmission_date\tstatus"/> |
| 454 <has_line_matching expression="r_20201007_026\te_20201007_026\tC026_exp5_clean.fastq.gz\tFASTQ(.*)"/> | 413 <has_line_matching expression="r_20201007_026\te_20201007_026\tC026_exp5_clean.fastq.gz\tFASTQ(.*)"/> |
| 455 </assert_contents> | 414 </assert_contents> |
| 456 </output> | 415 </output> |
| 457 <output name="output"> | 416 <output name="output"> |
| 458 <assert_contents> | 417 <assert_contents> |
| 463 <has_line_matching expression="ENA_run:"/> | 422 <has_line_matching expression="ENA_run:"/> |
| 464 </assert_contents> | 423 </assert_contents> |
| 465 </output> | 424 </output> |
| 466 </test> | 425 </test> |
| 467 <!--Test 3: excel input of NON-VIRAL samples--> | 426 <!--Test 3: excel input of NON-VIRAL samples--> |
| 468 <test> | 427 <test expect_num_outputs="5"> |
| 469 <conditional name="action_options"> | 428 <conditional name="action_options"> |
| 470 <param name="action" value="add"/> | 429 <param name="action" value="add"/> |
| 471 <section name="test_submit_parameters"> | 430 <section name="test_submit_parameters"> |
| 472 <param name="submit_dev" value="false" /> | 431 <param name="center" value="Some research center"/> |
| 473 <param name="dry_run" value="true" /> | 432 <param name="submit_dev" value="False" /> |
| 433 <param name="dry_run" value="True" /> | |
| 474 </section> | 434 </section> |
| 475 <conditional name="input_format_conditional"> | 435 <conditional name="input_format_conditional"> |
| 476 <param name="input_format" value="excel_tables"/> | 436 <param name="input_format" value="excel_tables"/> |
| 477 <param name="checklist_id" value="ERC000011"/> | 437 <param name="checklist_id" value="ERC000011"/> |
| 478 <param name="xlsx_file" value="metadata_test_nonviral_1_run.xlsx"/> | 438 <param name="xlsx_file" value="metadata_test_nonviral_1_run.xlsx"/> |
| 479 <conditional name="run_input_format_conditional"> | 439 <conditional name="run_input_format_conditional"> |
| 480 <param name="add_extension" value="true"/> | 440 <param name="add_extension" value="True"/> |
| 481 <param name="run_input_format" value="multiple_selection_list"/> | 441 <param name="run_input_format" value="multiple_selection_list"/> |
| 482 <param name="data" value="sample_no_extension"/> | 442 <param name="data" value="sample_no_extension"/> |
| 483 </conditional> | 443 </conditional> |
| 484 </conditional> | 444 </conditional> |
| 485 </conditional> | 445 </conditional> |
| 486 <param name="center" value="Some research center"/> | |
| 487 <output name="experiments_table_out"> | 446 <output name="experiments_table_out"> |
| 488 <assert_contents> | 447 <assert_contents> |
| 489 <has_n_lines n="2"/> | 448 <has_n_lines n="2"/> |
| 490 <has_n_columns n="17"/> | 449 <has_n_columns n="17"/> |
| 491 <has_line_matching expression="alias\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\taccession\tsubmission_date\tstatus"/> | 450 <has_line_matching expression="alias\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\taccession\tsubmission_date\tstatus"/> |
| 499 </assert_contents> | 458 </assert_contents> |
| 500 </output> | 459 </output> |
| 501 <output name="samples_table_out"> | 460 <output name="samples_table_out"> |
| 502 <assert_contents> | 461 <assert_contents> |
| 503 <has_n_lines n="2"/> | 462 <has_n_lines n="2"/> |
| 463 <has_n_columns n="10"/> | |
| 464 <has_line_matching expression="s_20201007_026\tC026\tSaccharomyces cerevisiae\tSample from beer\t2020-03-25\tAntarctica\t\t\tADDED\t"/> | |
| 465 </assert_contents> | |
| 466 </output> | |
| 467 <output name="runs_table_out"> | |
| 468 <assert_contents> | |
| 469 <has_n_lines n="2"/> | |
| 504 <has_n_columns n="8"/> | 470 <has_n_columns n="8"/> |
| 505 <has_line_matching expression="alias\ttitle\tscientific_name\tsample_description\taccession\tsubmission_date\tstatus\ttaxon_id"/> | 471 <has_line_matching expression="alias\texperiment_alias\tfile_name\tfile_format\tfile_checksum\taccession\tsubmission_date\tstatus"/> |
| 506 </assert_contents> | |
| 507 </output> | |
| 508 <output name="runs_table_out"> | |
| 509 <assert_contents> | |
| 510 <has_n_lines n="2"/> | |
| 511 <has_n_columns n="8"/> | |
| 512 <has_line_matching expression="alias\texperiment_alias\tfile_name\tfile_format\taccession\tsubmission_date\tstatus\tfile_checksum"/> | |
| 513 <has_line_matching expression="r_20201007_026\te_20201007_026\tsample_no_extension.fastq.gz\tFASTQ(.*)"/> | 472 <has_line_matching expression="r_20201007_026\te_20201007_026\tsample_no_extension.fastq.gz\tFASTQ(.*)"/> |
| 514 </assert_contents> | 473 </assert_contents> |
| 515 </output> | 474 </output> |
| 516 </test> | 475 </test> |
| 517 <!--Test 4: failure on excel input of NON-VIRAL samples with runs PAIRED collection --> | 476 <!--Test 4: failure on excel input of NON-VIRAL samples with runs PAIRED collection --> |
| 518 <test expect_failure="true"> | 477 <test expect_failure="True"> |
| 519 <conditional name="action_options"> | 478 <conditional name="action_options"> |
| 520 <param name="action" value="add"/> | 479 <param name="action" value="add"/> |
| 521 <section name="test_submit_parameters"> | 480 <section name="test_submit_parameters"> |
| 522 <param name="submit_dev" value="false" /> | 481 <param name="center" value="Some research center"/> |
| 523 <param name="dry_run" value="false" /> | 482 <param name="submit_dev" value="False" /> |
| 524 </section> | 483 <param name="dry_run" value="False" /> |
| 525 <conditional name="input_format_conditional"> | 484 </section> |
| 526 <param name="add_extension" value="true"/> | 485 <conditional name="input_format_conditional"> |
| 486 <param name="add_extension" value="True"/> | |
| 527 <param name="input_format" value="excel_tables"/> | 487 <param name="input_format" value="excel_tables"/> |
| 528 <param name="checklist_id" value="ERC000011"/> | 488 <param name="checklist_id" value="ERC000011"/> |
| 529 <param name="xlsx_file" value="metadata_test_nonviral.xlsx"/> | 489 <param name="xlsx_file" value="metadata_test_nonviral.xlsx"/> |
| 530 <conditional name="run_input_format_conditional"> | 490 <conditional name="run_input_format_conditional"> |
| 531 <param name="run_input_format" value="paired_list"/> | 491 <param name="run_input_format" value="paired_list"/> |
| 540 </collection> | 500 </collection> |
| 541 </param> | 501 </param> |
| 542 </conditional> | 502 </conditional> |
| 543 </conditional> | 503 </conditional> |
| 544 </conditional> | 504 </conditional> |
| 545 <param name="center" value="Some research center"/> | |
| 546 <assert_command> | 505 <assert_command> |
| 547 <has_text_matching expression="ena-upload-cli"/> | 506 <has_text_matching expression="ena-upload-cli"/> |
| 548 <has_text_matching expression="--data 'paired_run_name_1.fastq.gz' 'paired_run_name_2.fastq.gz'"/> | 507 <has_text_matching expression="--data 'paired_run_name_1.fastq.gz' 'paired_run_name_2.fastq.gz'"/> |
| 549 <has_text_matching expression="--action 'add' --center 'Some research center'"/> | 508 <has_text_matching expression="--action 'add' --center 'Some research center'"/> |
| 550 </assert_command> | 509 </assert_command> |
| 551 </test> | 510 </test> |
| 552 <!--Test 4b: failure on excel input of NON-VIRAL samples with runs PAIRED collection + Idempotent submission --> | 511 <!--Test 4b: failure on excel input of NON-VIRAL samples with runs PAIRED collection --> |
| 553 <test expect_failure="true"> | 512 <test expect_failure="True"> |
| 554 <conditional name="action_options"> | 513 <conditional name="action_options"> |
| 555 <param name="action" value="add"/> | 514 <param name="action" value="add"/> |
| 556 <section name="test_submit_parameters"> | 515 <section name="test_submit_parameters"> |
| 557 <param name="submit_dev" value="false" /> | 516 <param name="center" value="Some research center"/> |
| 558 <param name="dry_run" value="false" /> | 517 <param name="submit_dev" value="False" /> |
| 559 </section> | 518 <param name="dry_run" value="False" /> |
| 560 <param name="idempotent" value="true"/> | 519 </section> |
| 561 <conditional name="input_format_conditional"> | 520 <conditional name="input_format_conditional"> |
| 562 <param name="add_extension" value="true"/> | 521 <param name="add_extension" value="True"/> |
| 563 <param name="input_format" value="excel_tables"/> | 522 <param name="input_format" value="excel_tables"/> |
| 564 <param name="checklist_id" value="ERC000011"/> | 523 <param name="checklist_id" value="ERC000011"/> |
| 565 <param name="xlsx_file" value="metadata_test_nonviral.xlsx"/> | 524 <param name="xlsx_file" value="metadata_test_nonviral.xlsx"/> |
| 566 <conditional name="run_input_format_conditional"> | 525 <conditional name="run_input_format_conditional"> |
| 567 <param name="run_input_format" value="paired_list"/> | 526 <param name="run_input_format" value="paired_list"/> |
| 576 </collection> | 535 </collection> |
| 577 </param> | 536 </param> |
| 578 </conditional> | 537 </conditional> |
| 579 </conditional> | 538 </conditional> |
| 580 </conditional> | 539 </conditional> |
| 581 <param name="center" value="Some research center"/> | |
| 582 <assert_command> | 540 <assert_command> |
| 583 <has_text_matching expression="ena-upload-cli"/> | 541 <has_text_matching expression="ena-upload-cli"/> |
| 584 <has_text_matching expression="--data 'paired_run_name_1.fastq.gz' 'paired_run_name_2.fastq.gz'"/> | 542 <has_text_matching expression="--data 'paired_run_name_1.fastq.gz' 'paired_run_name_2.fastq.gz'"/> |
| 585 <has_text_matching expression="--action 'add' --center 'Some research center'"/> | 543 <has_text_matching expression="--action 'add' --center 'Some research center'"/> |
| 586 <has_text_matching expression="--auto_action"/> | |
| 587 </assert_command> | 544 </assert_command> |
| 588 </test> | 545 </test> |
| 589 <!--Test 5: build tables from user input fields NON-VIRAL samples--> | 546 <!--Test 5: build tables from user input fields NON-VIRAL samples--> |
| 590 <test> | 547 <test expect_num_outputs="5"> |
| 591 <conditional name="action_options"> | 548 <conditional name="action_options"> |
| 592 <param name="action" value="add"/> | 549 <param name="action" value="add"/> |
| 593 <section name="test_submit_parameters"> | 550 <section name="test_submit_parameters"> |
| 594 <param name="submit_dev" value="false" /> | 551 <param name="center" value="Some research center"/> |
| 595 <param name="dry_run" value="true" /> | 552 <param name="submit_dev" value="False" /> |
| 553 <param name="dry_run" value="True" /> | |
| 596 </section> | 554 </section> |
| 597 <conditional name="input_format_conditional"> | 555 <conditional name="input_format_conditional"> |
| 598 <param name="input_format" value="build_tables"/> | 556 <param name="input_format" value="build_tables"/> |
| 599 <param name="add_extension" value="false"/> | 557 <param name="add_extension" value="False"/> |
| 600 <conditional name="conditional_viral_metadata"> | 558 <conditional name="conditional_viral_metadata"> |
| 601 <param name="viral_sample" value="False"/> | 559 <param name="viral_sample" value="False"/> |
| 602 <repeat name="rep_study"> | 560 <repeat name="rep_study"> |
| 603 <param name="study_title" value="Test study title"/> | 561 <param name="study_title" value="Test study title"/> |
| 604 <param name="study_abstract" value="Test study abstract"/> | 562 <param name="study_abstract" value="Test study abstract"/> |
| 607 <repeat name="rep_sample"> | 565 <repeat name="rep_sample"> |
| 608 <param name="sample_title" value="Test Sample title"/> | 566 <param name="sample_title" value="Test Sample title"/> |
| 609 <param name="sample_description" value="Test Sample description"/> | 567 <param name="sample_description" value="Test Sample description"/> |
| 610 <param name="scientific_name" value="Test Sample scientific name"/> | 568 <param name="scientific_name" value="Test Sample scientific name"/> |
| 611 <param name="tax_id" value="2697049"/> | 569 <param name="tax_id" value="2697049"/> |
| 570 <param name="collection_date" value="2020"/> | |
| 571 <param name="geo_location_country" value="Belgium"/> | |
| 612 <repeat name="rep_experiment"> | 572 <repeat name="rep_experiment"> |
| 613 <param name="experiment_title" value="Test experiment title"/> | 573 <param name="experiment_title" value="Test experiment title"/> |
| 614 <param name="experiment_design" value="Test experiment design description"/> | 574 <param name="experiment_design" value="Test experiment design description"/> |
| 615 <param name="library_strategy" value="CTS"/> | 575 <param name="library_strategy" value="CTS"/> |
| 616 <param name="library_source" value="GENOMIC"/> | 576 <param name="library_source" value="GENOMIC"/> |
| 627 </repeat> | 587 </repeat> |
| 628 </repeat> | 588 </repeat> |
| 629 </conditional> | 589 </conditional> |
| 630 </conditional> | 590 </conditional> |
| 631 </conditional> | 591 </conditional> |
| 632 <param name="center" value="Some research center"/> | |
| 633 <output name="experiments_table_out"> | 592 <output name="experiments_table_out"> |
| 634 <assert_contents> | 593 <assert_contents> |
| 635 <has_n_lines n="2"/> | 594 <has_n_lines n="2"/> |
| 636 <has_n_columns n="17"/> | 595 <has_n_columns n="17"/> |
| 637 </assert_contents> | 596 </assert_contents> |
| 644 </assert_contents> | 603 </assert_contents> |
| 645 </output> | 604 </output> |
| 646 <output name="samples_table_out"> | 605 <output name="samples_table_out"> |
| 647 <assert_contents> | 606 <assert_contents> |
| 648 <has_n_lines n="2"/> | 607 <has_n_lines n="2"/> |
| 649 <has_n_columns n="8"/> | 608 <has_n_columns n="10"/> |
| 650 </assert_contents> | 609 </assert_contents> |
| 651 </output> | 610 </output> |
| 652 <output name="runs_table_out"> | 611 <output name="runs_table_out"> |
| 653 <assert_contents> | 612 <assert_contents> |
| 654 <has_n_lines n="3"/> | 613 <has_n_lines n="3"/> |
| 655 <has_n_columns n="8"/> | 614 <has_n_columns n="8"/> |
| 656 <has_line_matching expression="alias\tstatus\texperiment_alias\tfile_name\tfile_format\taccession\tsubmission_date\tfile_checksum"/> | 615 <has_line_matching expression="alias\tstatus\texperiment_alias\tfile_name\tfile_format\tfile_checksum\taccession\tsubmission_date"/> |
| 657 </assert_contents> | 616 </assert_contents> |
| 658 </output> | 617 </output> |
| 659 </test> | 618 </test> |
| 660 <!--Test 6: RUN failing build tables from user input fields NON-VIRAL samples--> | 619 <!--Test 6: with submit_test to skip credentials checksRUN failing build tables from user input fields NON-VIRAL samples |
| 661 <test expect_failure="true"> | 620 also tests compression of uncompressed inputs and adding the .gz suffix --> |
| 621 <test expect_failure="False" expect_num_outputs="5"> | |
| 662 <conditional name="action_options"> | 622 <conditional name="action_options"> |
| 663 <param name="action" value="add"/> | 623 <param name="action" value="add"/> |
| 664 <section name="test_submit_parameters"> | 624 <section name="test_submit_parameters"> |
| 665 <param name="submit_dev" value="true" /> | 625 <param name="center" value="Some research center"/> |
| 666 <param name="dry_run" value="false" /> | 626 <param name="submit_dev" value="True" /> |
| 667 </section> | 627 <param name="dry_run" value="True" /> |
| 668 <conditional name="input_format_conditional"> | 628 </section> |
| 629 <param name="test_submit" value="True"/> | |
| 630 <conditional name="input_format_conditional"> | |
| 631 <param name="add_extension" value="False"/> | |
| 669 <param name="input_format" value="build_tables"/> | 632 <param name="input_format" value="build_tables"/> |
| 670 <param name="add_extension" value="true"/> | |
| 671 <conditional name="conditional_viral_metadata"> | 633 <conditional name="conditional_viral_metadata"> |
| 672 <param name="viral_sample" value="false"/> | 634 <param name="viral_sample" value="False"/> |
| 673 <repeat name="rep_study"> | 635 <repeat name="rep_study"> |
| 674 <param name="study_title" value="Test study title"/> | 636 <param name="study_title" value="Test study title"/> |
| 675 <param name="study_abstract" value="Test study abstract"/> | 637 <param name="study_abstract" value="Test study abstract"/> |
| 676 <param name="study_type" value="Epigenetics"/> | 638 <param name="study_type" value="Epigenetics"/> |
| 677 <param name="study_pubmed_id" value="Test study pubmedID"/> | 639 <param name="study_pubmed_id" value="Test study pubmedID"/> |
| 678 <repeat name="rep_sample"> | 640 <repeat name="rep_sample"> |
| 679 <param name="sample_title" value="Test Sample title"/> | 641 <param name="sample_title" value="Test Sample title"/> |
| 680 <param name="sample_description" value="Test Sample description"/> | 642 <param name="sample_description" value="Test Sample description"/> |
| 681 <param name="scientific_name" value="Test Sample scientific name"/> | 643 <param name="scientific_name" value="Test Sample scientific name"/> |
| 682 <param name="tax_id" value="2697049"/> | 644 <param name="tax_id" value="2697049"/> |
| 683 <repeat name="rep_experiment"> | 645 <param name="collection_date" value="2020"/> |
| 684 <param name="experiment_title" value="Test experiment title"/> | 646 <param name="geo_location_country" value="Belgium"/> |
| 685 <param name="experiment_design" value="Test experiment design description"/> | |
| 686 <param name="library_strategy" value="CTS"/> | |
| 687 <param name="library_source" value="GENOMIC"/> | |
| 688 <param name="library_selection" value="PCR"/> | |
| 689 <param name="library_layout" value="SINGLE"/> | |
| 690 <param name="insert_size" value="150"/> | |
| 691 <param name="library_construction_protocol" value="Test library construction"/> | |
| 692 <param name="platform" value="ILLUMINA"/> | |
| 693 <param name="instrument_model" value="Illumina HiSeq 4000"/> | |
| 694 <repeat name="rep_runs"> | |
| 695 <param name="upload_files" value="1.fastqsanger.gz,sample.fq" ftype="fastqsanger"/> | |
| 696 </repeat> | |
| 697 </repeat> | |
| 698 </repeat> | |
| 699 </repeat> | |
| 700 </conditional> | |
| 701 </conditional> | |
| 702 </conditional> | |
| 703 <param name="center" value="Some research center"/> | |
| 704 <assert_stdout> | |
| 705 <has_text_matching expression="No ENA credentials defined"/> | |
| 706 </assert_stdout> | |
| 707 </test> | |
| 708 <!--Test 7: with submit_test to skip credentials checksRUN failing build tables from user input fields NON-VIRAL samples | |
| 709 also tests compression of uncompressed inputs and adding the .gz suffix --> | |
| 710 <test expect_failure="false"> | |
| 711 <conditional name="action_options"> | |
| 712 <param name="action" value="add"/> | |
| 713 <section name="test_submit_parameters"> | |
| 714 <param name="submit_dev" value="true" /> | |
| 715 <param name="dry_run" value="true" /> | |
| 716 </section> | |
| 717 <param name="test_submit" value="True"/> | |
| 718 <conditional name="input_format_conditional"> | |
| 719 <param name="add_extension" value="false"/> | |
| 720 <param name="input_format" value="build_tables"/> | |
| 721 <conditional name="conditional_viral_metadata"> | |
| 722 <param name="viral_sample" value="false"/> | |
| 723 <repeat name="rep_study"> | |
| 724 <param name="study_title" value="Test study title"/> | |
| 725 <param name="study_abstract" value="Test study abstract"/> | |
| 726 <param name="study_type" value="Epigenetics"/> | |
| 727 <param name="study_pubmed_id" value="Test study pubmedID"/> | |
| 728 <repeat name="rep_sample"> | |
| 729 <param name="sample_title" value="Test Sample title"/> | |
| 730 <param name="sample_description" value="Test Sample description"/> | |
| 731 <param name="scientific_name" value="Test Sample scientific name"/> | |
| 732 <param name="tax_id" value="2697049"/> | |
| 733 <repeat name="rep_experiment"> | 647 <repeat name="rep_experiment"> |
| 734 <param name="experiment_title" value="Test experiment title"/> | 648 <param name="experiment_title" value="Test experiment title"/> |
| 735 <param name="experiment_design" value="Test experiment design description"/> | 649 <param name="experiment_design" value="Test experiment design description"/> |
| 736 <param name="library_strategy" value="CTS"/> | 650 <param name="library_strategy" value="CTS"/> |
| 737 <param name="library_source" value="GENOMIC"/> | 651 <param name="library_source" value="GENOMIC"/> |
| 749 </repeat> | 663 </repeat> |
| 750 </repeat> | 664 </repeat> |
| 751 </conditional> | 665 </conditional> |
| 752 </conditional> | 666 </conditional> |
| 753 </conditional> | 667 </conditional> |
| 754 <param name="center" value="Some research center"/> | |
| 755 <assert_command> | 668 <assert_command> |
| 756 <has_text_matching expression="ena-upload-cli"/> | 669 <has_text_matching expression="ena-upload-cli"/> |
| 757 <has_text_matching expression="--data '1.fastqsanger.gz' '2.fastqsanger.gz'"/> | 670 <has_text_matching expression="--data '1.fastqsanger.gz' '2.fastqsanger.gz'"/> |
| 758 <has_text_matching expression="--action 'add' --center 'Some research center'"/> | 671 <has_text_matching expression="--action 'add' --center 'Some research center'"/> |
| 759 <not_has_text text="modify" /> | 672 <not_has_text text="modify" /> |
| 760 </assert_command> | 673 </assert_command> |
| 761 </test> | 674 </test> |
| 762 <!--Test 8: viral submission - User input metadata - Add extension = False--> | 675 <!--Test 7: viral submission - User input metadata - Add extension = False--> |
| 763 <test expect_failure="false"> | 676 <test expect_failure="False" expect_num_outputs="5"> |
| 764 <conditional name="action_options"> | 677 <conditional name="action_options"> |
| 765 <param name="action" value="add"/> | 678 <param name="action" value="add"/> |
| 766 <section name="test_submit_parameters"> | 679 <section name="test_submit_parameters"> |
| 767 <param name="submit_dev" value="false" /> | 680 <param name="center" value="Some research center"/> |
| 768 <param name="dry_run" value="true" /> | 681 <param name="submit_dev" value="False" /> |
| 682 <param name="dry_run" value="True" /> | |
| 769 </section> | 683 </section> |
| 770 <param name="test_submit" value="True"/> | 684 <param name="test_submit" value="True"/> |
| 771 <conditional name="input_format_conditional"> | 685 <conditional name="input_format_conditional"> |
| 772 <param name="add_extension" value="false"/> | 686 <param name="add_extension" value="False"/> |
| 773 <param name="input_format" value="build_tables"/> | 687 <param name="input_format" value="build_tables"/> |
| 774 <conditional name="conditional_viral_metadata"> | 688 <conditional name="conditional_viral_metadata"> |
| 775 <param name="viral_sample" value="true"/> | 689 <param name="viral_sample" value="True"/> |
| 776 <repeat name="rep_study"> | 690 <repeat name="rep_study"> |
| 777 <param name="study_title" value="Test study title"/> | 691 <param name="study_title" value="Test study title"/> |
| 778 <param name="study_abstract" value="Test study abstract"/> | 692 <param name="study_abstract" value="Test study abstract"/> |
| 779 <param name="study_type" value="Epigenetics"/> | 693 <param name="study_type" value="Epigenetics"/> |
| 780 <param name="study_pubmed_id" value="Test study pubmedID"/> | 694 <param name="study_pubmed_id" value="Test study pubmedID"/> |
| 812 </repeat> | 726 </repeat> |
| 813 </repeat> | 727 </repeat> |
| 814 </conditional> | 728 </conditional> |
| 815 </conditional> | 729 </conditional> |
| 816 </conditional> | 730 </conditional> |
| 817 <param name="center" value="Some research center"/> | |
| 818 <assert_command> | 731 <assert_command> |
| 819 <has_text_matching expression="ena-upload-cli"/> | 732 <has_text_matching expression="ena-upload-cli"/> |
| 820 <has_text_matching expression="--data '1.fastqsanger.gz' '2.fastqsanger.gz'"/> | 733 <has_text_matching expression="--data '1.fastqsanger.gz' '2.fastqsanger.gz'"/> |
| 821 <has_text_matching expression="--action 'add' --center 'Some research center'"/> | 734 <has_text_matching expression="--action 'add' --center 'Some research center'"/> |
| 822 <has_text_matching expression="--checklist ERC000033"/> | 735 <has_text_matching expression="--checklist ERC000033"/> |
| 823 </assert_command> | 736 </assert_command> |
| 824 </test> | 737 </test> |
| 825 <!--Test 9: modify option and auto compression - viral submission - User input metadata--> | 738 <!--Test 8: modify option and auto compression - viral submission - User input metadata--> |
| 826 <test expect_failure="false"> | 739 <test expect_failure="False" expect_num_outputs="5"> |
| 827 <conditional name="action_options"> | 740 <conditional name="action_options"> |
| 828 <param name="action" value="modify"/> | 741 <param name="action" value="modify"/> |
| 829 <section name="test_submit_parameters"> | 742 <section name="test_submit_parameters"> |
| 830 <param name="submit_dev" value="false" /> | 743 <param name="center" value="Some research center"/> |
| 831 <param name="dry_run" value="true" /> | 744 <param name="submit_dev" value="False" /> |
| 745 <param name="dry_run" value="True" /> | |
| 832 </section> | 746 </section> |
| 833 <param name="test_submit" value="True"/> | 747 <param name="test_submit" value="True"/> |
| 834 <conditional name="input_format_conditional"> | 748 <conditional name="input_format_conditional"> |
| 835 <param name="add_extension" value="fasle"/> | 749 <param name="add_extension" value="False"/> |
| 836 <param name="input_format" value="build_tables"/> | 750 <param name="input_format" value="build_tables"/> |
| 837 <conditional name="conditional_viral_metadata"> | 751 <conditional name="conditional_viral_metadata"> |
| 838 <param name="viral_sample" value="True"/> | 752 <param name="viral_sample" value="True"/> |
| 839 <repeat name="rep_study"> | 753 <repeat name="rep_study"> |
| 840 <param name="study_title" value="Test study title"/> | 754 <param name="study_title" value="Test study title"/> |
| 867 <param name="library_construction_protocol" value="Test library construction"/> | 781 <param name="library_construction_protocol" value="Test library construction"/> |
| 868 <param name="platform" value="ILLUMINA"/> | 782 <param name="platform" value="ILLUMINA"/> |
| 869 <param name="instrument_model" value="Illumina HiSeq 4000"/> | 783 <param name="instrument_model" value="Illumina HiSeq 4000"/> |
| 870 <repeat name="rep_runs"> | 784 <repeat name="rep_runs"> |
| 871 <param name="run_base_name" value="run_from_hospital_X"/> | 785 <param name="run_base_name" value="run_from_hospital_X"/> |
| 872 <param name="upload_files" value="1.fastqsanger.gz" ftype="fastqsanger.gz"/> | 786 <param name="upload_files" value="1.fastqsanger.gz,2.fastqsanger.gz" ftype="fastqsanger.gz"/> |
| 873 </repeat> | 787 </repeat> |
| 874 </repeat> | 788 </repeat> |
| 875 </repeat> | 789 </repeat> |
| 876 </repeat> | 790 </repeat> |
| 877 </conditional> | 791 </conditional> |
| 878 </conditional> | 792 </conditional> |
| 879 </conditional> | 793 </conditional> |
| 880 <param name="center" value="Some research center"/> | |
| 881 <assert_command> | 794 <assert_command> |
| 882 <has_text_matching expression="ena-upload-cli"/> | 795 <has_text_matching expression="ena-upload-cli"/> |
| 883 <has_text_matching expression="--data '1.fastqsanger.gz'"/> | 796 <has_text_matching expression="--data '1.fastqsanger.gz' '2.fastqsanger.gz'"/> |
| 884 <has_text_matching expression="--action 'modify' --center 'Some research center'"/> | 797 <has_text_matching expression="--action 'modify' --center 'Some research center'"/> |
| 885 <has_text_matching expression="--checklist ERC000033"/> | 798 <has_text_matching expression="--checklist ERC000033"/> |
| 886 <not_has_text text="add" /> | 799 <not_has_text text="--action 'add'" /> |
| 887 </assert_command> | 800 </assert_command> |
| 888 </test> | 801 </test> |
| 802 <!--Test 9: isa JSON input of NON-VIRAL samples--> | |
| 803 <test expect_num_outputs="5"> | |
| 804 <conditional name="action_options"> | |
| 805 <param name="action" value="add"/> | |
| 806 <section name="test_submit_parameters"> | |
| 807 <param name="center" value="Some research center"/> | |
| 808 <param name="submit_dev" value="True" /> | |
| 809 <param name="dry_run" value="True" /> | |
| 810 </section> | |
| 811 <conditional name="input_format_conditional"> | |
| 812 <param name="input_format" value="isa_json"/> | |
| 813 <param name="isa_json_file" value="simple_test_case_v2.json"/> | |
| 814 <param name="isa_assay_stream" value="Ena stream 1"/> | |
| 815 <conditional name="run_input_format_conditional"> | |
| 816 <param name="add_extension" value="False"/> | |
| 817 <param name="run_input_format" value="multiple_selection_list"/> | |
| 818 <param name="data" value="ENA_TEST1.R1.fastq.gz,ENA_TEST2.R1.fastq.gz,ENA_TEST2.R2.fastq.gz"/> | |
| 819 </conditional> | |
| 820 </conditional> | |
| 821 </conditional> | |
| 822 <output name="experiments_table_out"> | |
| 823 <assert_contents> | |
| 824 <has_n_lines n="4"/> | |
| 825 <has_n_columns n="17"/> | |
| 826 <has_line_matching expression="alias\tstudy_alias\tsample_alias\tlibrary_name\ttitle\taccession\tsubmission date\tstatus\tdesign_description\tlibrary_source\tlibrary_strategy\tlibrary_selection\tlibrary_layout\tinsert_size\tplatform\tinstrument_model\tsubmission_date"/> | |
| 827 </assert_contents> | |
| 828 </output> | |
| 829 <output name="studies_table_out"> | |
| 830 <assert_contents> | |
| 831 <has_n_lines n="2"/> | |
| 832 <has_n_columns n="9"/> | |
| 833 <has_line_matching expression="alias\ttitle\tstudy_type\tstudy_abstract\tnew_study_type\tpubmed_id\taccession\tsubmission_date\tstatus"/> | |
| 834 </assert_contents> | |
| 835 </output> | |
| 836 <output name="samples_table_out"> | |
| 837 <assert_contents> | |
| 838 <has_n_lines n="3"/> | |
| 839 <has_n_columns n="11"/> | |
| 840 </assert_contents> | |
| 841 </output> | |
| 842 <output name="runs_table_out"> | |
| 843 <assert_contents> | |
| 844 <has_n_lines n="4"/> | |
| 845 <has_n_columns n="10"/> | |
| 846 <has_line_matching expression="alias\texperiment_alias\tfile_name\tfile_type\tfile checksum\taccession\tsubmission date\tstatus\tfile_checksum\tsubmission_date"/> | |
| 847 </assert_contents> | |
| 848 </output> | |
| 849 </test> | |
| 889 </tests> | 850 </tests> |
| 890 <help><![CDATA[ | 851 <help><![CDATA[This is a wrapper for the ENA upload tool in https://github.com/usegalaxy-eu/ena-upload-cli. The input metadata can be submitted following the tabular format of the templates or their excel spreadsheet equivalent in https://github.com/ELIXIR-Belgium/ENA-metadata-templates. This template repo provides ready to use sheets for every ENA sample checklist and is automatically updated. |
| 891 This is a wrapper for the ENA upload tool in https://github.com/usegalaxy-eu/ena-upload-cli | 852 |
| 892 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 | 853 .. class:: warningmark |
| 893 It is also possible to submit an excel file by following the template in https://github.com/ELIXIR-Belgium/ENA-metadata-templates | 854 |
| 894 ]]></help> | 855 The ENA upload tool won't work unless you have provided an ENA Webin ID in User > Preferences > Manage Information > ENA Webin account details.]]></help> |
| 895 <citations> | 856 <citations> |
| 857 <citation type="doi">doi:10.1093/bioinformatics/btab421</citation> | |
| 896 </citations> | 858 </citations> |
| 897 </tool> | 859 </tool> |
