Mercurial > repos > iuc > ena_upload
comparison ena_upload.xml @ 1:bd624f0547fc draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ena_upload commit ffea061c1ad6e7291abfe220230dbdbe8d19a2bd"
| author | iuc |
|---|---|
| date | Fri, 30 Apr 2021 12:08:48 +0000 |
| parents | b7356ece7ceb |
| children | 982757f4aa8c |
comparison
equal
deleted
inserted
replaced
| 0:b7356ece7ceb | 1:bd624f0547fc |
|---|---|
| 1 <tool id="ena_upload" name="ENA Upload tool" version="0.3" profile="20.01" license="MIT"> | 1 <tool id="ena_upload" name="ENA Upload tool" version="0.3.1" profile="20.01" license="MIT"> |
| 2 <macros> | 2 <macros> |
| 3 <token name="@VERSION@">0.2.4</token> | 3 <token name="@VERSION@">0.2.7</token> |
| 4 <import>samples_macros.xml</import> | 4 <import>samples_macros.xml</import> |
| 5 </macros> | 5 </macros> |
| 6 <requirements> | 6 <requirements> |
| 7 <requirement type="package" version="@VERSION@">ena-upload-cli</requirement> | 7 <requirement type="package" version="@VERSION@">ena-upload-cli</requirement> |
| 8 <requirement type="package" version="1.2.0">xlrd</requirement> | 8 <requirement type="package" version="1.2.0">xlrd</requirement> |
| 9 </requirements> | 9 </requirements> |
| 10 <stdio> | |
| 11 <regex match="Oops" source="stderr" level="fatal"/> | |
| 12 <regex match="different file names between command line and RUN table" source="stderr" level="fatal"/> | |
| 13 </stdio> | |
| 10 <command detect_errors="exit_code"><![CDATA[ | 14 <command detect_errors="exit_code"><![CDATA[ |
| 11 mkdir ./submission_files; | 15 mkdir ./submission_files; |
| 16 #set $studies_table_path = './submission_files/studies.tsv' | |
| 17 #set $samples_table_path = './submission_files/samples.tsv' | |
| 18 #set $experiments_table_path = './submission_files/experiments.tsv' | |
| 19 #set $runs_table_path = './submission_files/runs.tsv' | |
| 20 | |
| 21 #set $studies_table_path_updated = './submission_files/studies_updated.tsv' | |
| 22 #set $samples_table_path_updated = './submission_files/samples_updated.tsv' | |
| 23 #set $experiments_table_path_updated = './submission_files/experiments_updated.tsv' | |
| 24 #set $runs_table_path_updated = './submission_files/runs_updated.tsv' | |
| 12 | 25 |
| 13 #set working_dir = os.getcwd() | 26 #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": | 27 #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; | 28 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 | 29 #end if |
| 23 | 30 |
| 24 #if $action_options.input_format_conditional.input_format == "excel_tables": | 31 #if $action_options.input_format_conditional.input_format == "excel_tables": |
| 25 python '$__tool_directory__/process_xlsx.py' | 32 python '$__tool_directory__/process_xlsx.py' |
| 26 #if $action_options.input_format_conditional.viral_submission == "true": | 33 #if $action_options.input_format_conditional.viral_submission == "true": |
| 27 --vir | 34 --vir |
| 28 #end if | 35 #end if |
| 29 --action '$action_options.action' --form '$action_options.input_format_conditional.xlsx_file' --out_dir ./submission_files ; | 36 --action '$action_options.action' --form '$action_options.input_format_conditional.xlsx_file' --out_dir ./submission_files --verbose > '$output'; |
| 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 | 37 #end if |
| 38 | 38 |
| 39 #if $action_options.input_format_conditional.input_format != "user_generated_tables": | 39 #if $action_options.input_format_conditional.input_format != "user_generated_tables": |
| 40 cp $studies_table_path $studies_table_out; | 40 cp $studies_table_path $studies_table_out && |
| 41 cp $samples_table_path $samples_table_out; | 41 cp $samples_table_path $samples_table_out && |
| 42 cp $experiments_table_path $experiments_table_out; | 42 cp $experiments_table_path $experiments_table_out && |
| 43 cp $runs_table_path $runs_table_out; | 43 cp $runs_table_path $runs_table_out && |
| 44 #if $action_options.input_format_conditional.dry_run == "true": | 44 #else: |
| 45 #set $dry_run_option = "True" | 45 ln -s '$action_options.input_format_conditional.experiments_users_table' $experiments_table_path && |
| 46 #end if | 46 ln -s '$action_options.input_format_conditional.studies_users_table' $studies_table_path && |
| 47 #end if | 47 ln -s '$action_options.input_format_conditional.runs_users_table' $runs_table_path && |
| 48 | 48 ln -s '$action_options.input_format_conditional.samples_users_table' $samples_table_path && |
| 49 | 49 #end if |
| 50 #if $dry_run_option == "False" and $action_options.test_submit == "False": | 50 |
| 51 | |
| 52 #if $action_options.test_submit_parameters.dry_run == "false" and $action_options.test_submit == "False": | |
| 51 webin_id=`grep 'username' $credentials`; | 53 webin_id=`grep 'username' $credentials`; |
| 52 if [ "\$webin_id" = "" ]; then | 54 if [ "\$webin_id" = "" ]; then |
| 53 ## No credentials in user defined preferences | 55 ## No credentials in user defined preferences |
| 54 ## Fallback to global defined credentials (if exist) | 56 ## Fallback to global defined credentials (if exist) |
| 55 #import os | 57 #import os |
| 56 #if os.path.isfile(os.environ.get('GALAXY_ENA_SECRETS', '')): | 58 #if os.path.isfile(os.environ.get('GALAXY_ENA_SECRETS', '')): |
| 57 credentials_path=\${ENA_SECRETS}; | 59 credentials_path=\${GALAXY_ENA_SECRETS}; |
| 58 webin_id=`grep 'username' \$GALAXY_ENA_SECRETS`; | 60 webin_id=`grep 'username' \$GALAXY_ENA_SECRETS`; |
| 59 if [ "\$webin_id" = "" ]; then | 61 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"; | 62 echo "No global credentials defined. Check your GALAXY_ENA_SECRETS file or set your credentials via: User -> Preferences -> Manage Information"; |
| 61 exit 1; | 63 exit 1; |
| 62 fi; | 64 fi; |
| 89 #end for | 91 #end for |
| 90 #end for | 92 #end for |
| 91 #end for | 93 #end for |
| 92 #end for | 94 #end for |
| 93 #else: | 95 #else: |
| 94 #for $file in $action_options.input_format_conditional.data: | 96 #if $action_options.input_format_conditional.run_input_format_conditional.run_input_format == 'paired_list': |
| 95 #set $safename_reads_file = re.sub('[^\w\-_\.]', '_', $file.element_identifier) | 97 #for $pair in $action_options.input_format_conditional.run_input_format_conditional.paired_end_collection: |
| 96 ln -s '$file' $safename_reads_file && | 98 #set $safename_reads_file = re.sub('[^\w\-_\.]', '_', $pair.name) |
| 97 $files_to_upload.append(str($safename_reads_file)) | 99 #if $pair.forward.is_of_type('fastq.gz', 'fastqsanger.gz'): |
| 98 #end for | 100 #set $safename_fwd_reads_file = $safename_reads_file + '_1.fastq.gz' |
| 99 #end if | 101 #elif $pair.forward.is_of_type('fastqsanger.bz2', 'fastq.bz2'): |
| 100 | 102 #set $safename_fwd_reads_file = $safename_reads_file + '_1.fastq.bz2' |
| 101 | 103 #else: |
| 102 #if $dry_run_option == "False": | 104 #set $safename_fwd_reads_file = $safename_reads_file + '_1.fastq' |
| 105 #end if | |
| 106 #if $pair.reverse.is_of_type('fastq.gz', 'fastqsanger.gz'): | |
| 107 #set $safename_rev_reads_file = $safename_reads_file + '_2.fastq.gz' | |
| 108 #elif $pair.reverse.is_of_type('fastqsanger.bz2', 'fastq.bz2'): | |
| 109 #set $safename_rev_reads_file = $safename_reads_file + '_2.fastq.bz2' | |
| 110 #else: | |
| 111 #set $safename_rev_reads_file = $safename_reads_file + '_2.fastq' | |
| 112 #end if | |
| 113 | |
| 114 ln -s '$pair.forward' $safename_fwd_reads_file && | |
| 115 $files_to_upload.append(str($safename_fwd_reads_file)) | |
| 116 ln -s '$pair.reverse' $safename_rev_reads_file && | |
| 117 $files_to_upload.append(str($safename_rev_reads_file)) | |
| 118 #end for | |
| 119 #end if | |
| 120 #if $action_options.input_format_conditional.run_input_format_conditional.run_input_format == 'multiple_selection_list': | |
| 121 #for $file in $action_options.input_format_conditional.run_input_format_conditional.data: | |
| 122 #set $safename_reads_file = re.sub('[^\w\-_\.]', '_', $file.element_identifier) | |
| 123 ln -s '$file' $safename_reads_file && | |
| 124 $files_to_upload.append(str($safename_reads_file)) | |
| 125 #end for | |
| 126 #end if | |
| 127 #end if | |
| 128 | |
| 129 | |
| 130 #if $action_options.test_submit_parameters.dry_run == "false": | |
| 103 ena-upload-cli | 131 ena-upload-cli |
| 104 --tool 'ena-upload-cli v@VERSION@ @ Galaxy' | 132 --tool 'ena-upload-cli v@VERSION@ @ Galaxy' |
| 105 --action '$action_options.action' | 133 --action '$action_options.action' |
| 106 --center '$action_options.center' | 134 --center '$action_options.center' |
| 107 --secret \${credentials_path} | 135 --secret \${credentials_path} |
| 108 --data | 136 --data |
| 109 #for $dataset in $files_to_upload: | 137 #for $dataset in $files_to_upload: |
| 110 '$dataset' | 138 '$dataset' |
| 111 #end for | 139 #end for |
| 140 --experiment '$experiments_table_path' | |
| 141 --study '$studies_table_path' | |
| 142 --run '$runs_table_path' | |
| 143 --sample '$samples_table_path' | |
| 112 #if $action_options.input_format_conditional.input_format == "user_generated_tables": | 144 #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": | 145 #if "$action_options.input_format_conditional.viral_submission" == "true": |
| 118 --vir | 146 --vir |
| 119 #end if | 147 #end if |
| 120 #else: | 148 #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": | 149 #if $action_options.input_format_conditional.input_format == "build_tables": |
| 126 #if $action_options.input_format_conditional.conditional_viral_metadata.viral_sample == "true": | 150 #if $action_options.input_format_conditional.conditional_viral_metadata.viral_sample == "true": |
| 127 --vir | 151 --vir |
| 128 #end if | 152 #end if |
| 129 #else: | 153 #else: |
| 131 --vir | 155 --vir |
| 132 #end if | 156 #end if |
| 133 #end if | 157 #end if |
| 134 #end if | 158 #end if |
| 135 | 159 |
| 136 #if $action_options.submit_dev == "true": | 160 #if $action_options.test_submit_parameters.submit_dev == "true": |
| 137 -d | 161 -d |
| 138 #end if | 162 #end if |
| 139 > '$output' | 163 >> '$output'; |
| 164 echo -e 'center_name\t$action_options.center' >> '$output'; | |
| 165 echo -e 'action_option\t$action_options.action' >> '$output'; | |
| 166 #if $action_options.input_format_conditional.input_format != "user_generated_tables": | |
| 167 cp $studies_table_path_updated $studies_table_out 2>/dev/null; | |
| 168 cp $samples_table_path_updated $samples_table_out 2>/dev/null; | |
| 169 cp $experiments_table_path_updated $experiments_table_out 2>/dev/null; | |
| 170 cp $runs_table_path_updated $runs_table_out 2>/dev/null; | |
| 171 #end if | |
| 140 #else: | 172 #else: |
| 141 echo "" | |
| 142 exit 0; | 173 exit 0; |
| 143 #end if | 174 #end if |
| 144 | 175 |
| 145 ]]></command> | 176 ]]></command> |
| 146 <configfiles> | 177 <configfiles> |
| 168 #set run_files = list() | 199 #set run_files = list() |
| 169 #for $file in $run.upload_files: | 200 #for $file in $run.upload_files: |
| 170 #set $safename_reads_file = re.sub('[^\w\-_\.]', '_', $file.element_identifier) | 201 #set $safename_reads_file = re.sub('[^\w\-_\.]', '_', $file.element_identifier) |
| 171 $run_files.append(str($safename_reads_file)) | 202 $run_files.append(str($safename_reads_file)) |
| 172 #end for | 203 #end for |
| 173 $runs.append($run_files) | 204 $runs.append((str($run.run_base_name),$run_files)) |
| 174 #end for | 205 #end for |
| 175 | 206 |
| 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}) | 207 $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 | 208 #end for |
| 178 #if $action_options.input_format_conditional.conditional_viral_metadata.viral_sample == "true": | 209 #if $action_options.input_format_conditional.conditional_viral_metadata.viral_sample == "true": |
| 179 | 210 |
| 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}) | 211 $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}) |
| 194 <param name="action" type="select" label="Action to execute"> | 225 <param name="action" type="select" label="Action to execute"> |
| 195 <option value="add" selected="True">Add new data</option> | 226 <option value="add" selected="True">Add new data</option> |
| 196 <option value="modify">Modify metadata</option> | 227 <option value="modify">Modify metadata</option> |
| 197 </param> | 228 </param> |
| 198 <when value="add"> | 229 <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 " /> | 230 <expand macro="test_submit_section"/> |
| 200 <param name="test_submit" type="hidden" value="False" /> | 231 <param name="test_submit" type="hidden" value="False" /> |
| 201 <expand macro="table_inputs_macro" /> | 232 <expand macro="table_inputs_macro" /> |
| 202 </when> | 233 </when> |
| 203 <when value="modify"> | 234 <when value="modify"> |
| 235 <expand macro="test_submit_section"/> | |
| 204 <expand macro="table_inputs_macro" /> | 236 <expand macro="table_inputs_macro" /> |
| 205 </when> | 237 </when> |
| 206 </conditional> | 238 </conditional> |
| 207 </inputs> | 239 </inputs> |
| 208 <outputs> | 240 <outputs> |
| 209 <data name="output" format="data" label="${tool.name} on ${on_string}: Upload summary"/> | 241 <data name="output" format="txt" label="ENA submission receipt"/> |
| 210 <data name="studies_table_out" format="tabular" label="Studies table"> | 242 <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> | 243 <filter> action_options['input_format_conditional']['input_format'] == "build_tables" or action_options['input_format_conditional']['input_format'] == "excel_tables"</filter> |
| 212 </data> | 244 </data> |
| 213 <data name="samples_table_out" format="tabular" label="Samples table"> | 245 <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> | 246 <filter> action_options['input_format_conditional']['input_format'] == "build_tables" or action_options['input_format_conditional']['input_format'] == "excel_tables"</filter> |
| 223 <tests> | 255 <tests> |
| 224 <!--Test excel input of VIRAL samples --> | 256 <!--Test excel input of VIRAL samples --> |
| 225 <test> | 257 <test> |
| 226 <conditional name="action_options"> | 258 <conditional name="action_options"> |
| 227 <param name="action" value="add"/> | 259 <param name="action" value="add"/> |
| 228 <param name="submit_dev" value="False"/> | 260 <section name="test_submit_parameters"> |
| 261 <param name="submit_dev" value="false" /> | |
| 262 <param name="dry_run" value="true" /> | |
| 263 </section> | |
| 229 <conditional name="input_format_conditional"> | 264 <conditional name="input_format_conditional"> |
| 230 <param name="input_format" value="excel_tables"/> | 265 <param name="input_format" value="excel_tables"/> |
| 231 <param name="viral_submission" value="True"/> | 266 <param name="viral_submission" value="True"/> |
| 232 <param name="dry_run" value="True"/> | |
| 233 <param name="xlsx_file" value="metadata_test_viral.xlsx"/> | 267 <param name="xlsx_file" value="metadata_test_viral.xlsx"/> |
| 234 <param name="data" value="sample.fq"/> | 268 <conditional name="run_input_format_conditional"> |
| 269 <param name="run_input_format" value="multiple_selection_list"/> | |
| 270 <param name="data" value="sample.fq"/> | |
| 271 </conditional> | |
| 235 </conditional> | 272 </conditional> |
| 236 </conditional> | 273 </conditional> |
| 237 <param name="center" value="Some research center"/> | 274 <param name="center" value="Some research center"/> |
| 238 <output name="experiments_table_out"> | 275 <output name="experiments_table_out"> |
| 239 <assert_contents> | 276 <assert_contents> |
| 269 </test> | 306 </test> |
| 270 <!--Test excel input of NON-VIRAL samples--> | 307 <!--Test excel input of NON-VIRAL samples--> |
| 271 <test> | 308 <test> |
| 272 <conditional name="action_options"> | 309 <conditional name="action_options"> |
| 273 <param name="action" value="add"/> | 310 <param name="action" value="add"/> |
| 274 <param name="submit_dev" value="False"/> | 311 <section name="test_submit_parameters"> |
| 312 <param name="submit_dev" value="false" /> | |
| 313 <param name="dry_run" value="true" /> | |
| 314 </section> | |
| 275 <conditional name="input_format_conditional"> | 315 <conditional name="input_format_conditional"> |
| 276 <param name="input_format" value="excel_tables"/> | 316 <param name="input_format" value="excel_tables"/> |
| 277 <param name="viral_submission" value="False"/> | 317 <param name="viral_submission" value="False"/> |
| 278 <param name="dry_run" value="True"/> | |
| 279 <param name="xlsx_file" value="metadata_test_nonviral.xlsx"/> | 318 <param name="xlsx_file" value="metadata_test_nonviral.xlsx"/> |
| 280 <param name="data" value="sample.fq"/> | 319 <conditional name="run_input_format_conditional"> |
| 320 <param name="run_input_format" value="multiple_selection_list"/> | |
| 321 <param name="data" value="sample.fq"/> | |
| 322 </conditional> | |
| 281 </conditional> | 323 </conditional> |
| 282 </conditional> | 324 </conditional> |
| 283 <param name="center" value="Some research center"/> | 325 <param name="center" value="Some research center"/> |
| 284 <output name="experiments_table_out"> | 326 <output name="experiments_table_out"> |
| 285 <assert_contents> | 327 <assert_contents> |
| 308 <has_n_columns n="8"/> | 350 <has_n_columns n="8"/> |
| 309 <has_line_matching expression="alias\tstatus\taccession\texperiment_alias\tfile_name\tfile_format\tfile_checksum\tsubmission_date"/> | 351 <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"/> | 352 <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> | 353 </assert_contents> |
| 312 </output> | 354 </output> |
| 355 </test> | |
| 356 <!--Test failure on excel input of NON-VIRAL samples with runs PAIRED collection --> | |
| 357 <test expect_failure="true"> | |
| 358 <conditional name="action_options"> | |
| 359 <param name="action" value="add"/> | |
| 360 <section name="test_submit_parameters"> | |
| 361 <param name="submit_dev" value="false" /> | |
| 362 <param name="dry_run" value="false" /> | |
| 363 </section> | |
| 364 <conditional name="input_format_conditional"> | |
| 365 <param name="input_format" value="excel_tables"/> | |
| 366 <param name="viral_submission" value="False"/> | |
| 367 <param name="xlsx_file" value="metadata_test_nonviral.xlsx"/> | |
| 368 <conditional name="run_input_format_conditional"> | |
| 369 <param name="run_input_format" value="paired_list"/> | |
| 370 <param name="paired_end_collection"> | |
| 371 <collection type="list:paired"> | |
| 372 <element name="paired_run_name"> | |
| 373 <collection type="paired"> | |
| 374 <element name="forward" value="1.fastqsanger.gz" ftype="fastqsanger.gz" /> | |
| 375 <element name="reverse" value="2.fastqsanger.gz" ftype="fastqsanger.gz" /> | |
| 376 </collection> | |
| 377 </element> | |
| 378 </collection> | |
| 379 </param> | |
| 380 </conditional> | |
| 381 </conditional> | |
| 382 </conditional> | |
| 383 <param name="center" value="Some research center"/> | |
| 384 <assert_command> | |
| 385 <has_text_matching expression="ena-upload-cli"/> | |
| 386 <has_text_matching expression="--data 'paired_run_name_1.fastq.gz' 'paired_run_name_2.fastq.gz'"/> | |
| 387 <has_text_matching expression="--action 'add' --center 'Some research center'"/> | |
| 388 </assert_command> | |
| 313 </test> | 389 </test> |
| 314 <!--Test build tables from user input fields NON-VIRAL samples--> | 390 <!--Test build tables from user input fields NON-VIRAL samples--> |
| 315 <test> | 391 <test> |
| 316 <conditional name="action_options"> | 392 <conditional name="action_options"> |
| 317 <param name="action" value="add"/> | 393 <param name="action" value="add"/> |
| 318 <param name="submit_dev" value="False"/> | 394 <section name="test_submit_parameters"> |
| 395 <param name="submit_dev" value="false" /> | |
| 396 <param name="dry_run" value="true" /> | |
| 397 </section> | |
| 319 <conditional name="input_format_conditional"> | 398 <conditional name="input_format_conditional"> |
| 320 <param name="input_format" value="build_tables"/> | 399 <param name="input_format" value="build_tables"/> |
| 321 <param name="dry_run" value="True"/> | |
| 322 <conditional name="conditional_viral_metadata"> | 400 <conditional name="conditional_viral_metadata"> |
| 323 <param name="viral_sample" value="False"/> | 401 <param name="viral_sample" value="False"/> |
| 324 <repeat name="rep_study"> | 402 <repeat name="rep_study"> |
| 325 <param name="study_title" value="Test study title"/> | 403 <param name="study_title" value="Test study title"/> |
| 326 <param name="study_abstract" value="Test study abstract"/> | 404 <param name="study_abstract" value="Test study abstract"/> |
| 381 </test> | 459 </test> |
| 382 <!--Test RUN failing build tables from user input fields NON-VIRAL samples--> | 460 <!--Test RUN failing build tables from user input fields NON-VIRAL samples--> |
| 383 <test expect_failure="true"> | 461 <test expect_failure="true"> |
| 384 <conditional name="action_options"> | 462 <conditional name="action_options"> |
| 385 <param name="action" value="add"/> | 463 <param name="action" value="add"/> |
| 386 <param name="submit_dev" value="True"/> | 464 <section name="test_submit_parameters"> |
| 465 <param name="submit_dev" value="true" /> | |
| 466 <param name="dry_run" value="false" /> | |
| 467 </section> | |
| 387 <conditional name="input_format_conditional"> | 468 <conditional name="input_format_conditional"> |
| 388 <param name="input_format" value="build_tables"/> | 469 <param name="input_format" value="build_tables"/> |
| 389 <param name="dry_run" value="False"/> | |
| 390 <conditional name="conditional_viral_metadata"> | 470 <conditional name="conditional_viral_metadata"> |
| 391 <param name="viral_sample" value="False"/> | 471 <param name="viral_sample" value="false"/> |
| 392 <repeat name="rep_study"> | 472 <repeat name="rep_study"> |
| 393 <param name="study_title" value="Test study title"/> | 473 <param name="study_title" value="Test study title"/> |
| 394 <param name="study_abstract" value="Test study abstract"/> | 474 <param name="study_abstract" value="Test study abstract"/> |
| 395 <param name="study_type" value="Epigenetics"/> | 475 <param name="study_type" value="Epigenetics"/> |
| 396 <param name="study_pubmed_id" value="Test study pubmedID"/> | 476 <param name="study_pubmed_id" value="Test study pubmedID"/> |
| 426 </test> | 506 </test> |
| 427 <!--Test with submit_test to skip credentials checksRUN failing build tables from user input fields NON-VIRAL samples--> | 507 <!--Test with submit_test to skip credentials checksRUN failing build tables from user input fields NON-VIRAL samples--> |
| 428 <test expect_failure="true"> | 508 <test expect_failure="true"> |
| 429 <conditional name="action_options"> | 509 <conditional name="action_options"> |
| 430 <param name="action" value="add"/> | 510 <param name="action" value="add"/> |
| 431 <param name="submit_dev" value="True"/> | 511 <section name="test_submit_parameters"> |
| 512 <param name="submit_dev" value="true" /> | |
| 513 <param name="dry_run" value="false" /> | |
| 514 </section> | |
| 432 <param name="test_submit" value="True"/> | 515 <param name="test_submit" value="True"/> |
| 433 <conditional name="input_format_conditional"> | 516 <conditional name="input_format_conditional"> |
| 434 <param name="input_format" value="build_tables"/> | 517 <param name="input_format" value="build_tables"/> |
| 435 <param name="dry_run" value="False"/> | |
| 436 <conditional name="conditional_viral_metadata"> | 518 <conditional name="conditional_viral_metadata"> |
| 437 <param name="viral_sample" value="False"/> | 519 <param name="viral_sample" value="false"/> |
| 438 <repeat name="rep_study"> | 520 <repeat name="rep_study"> |
| 439 <param name="study_title" value="Test study title"/> | 521 <param name="study_title" value="Test study title"/> |
| 440 <param name="study_abstract" value="Test study abstract"/> | 522 <param name="study_abstract" value="Test study abstract"/> |
| 441 <param name="study_type" value="Epigenetics"/> | 523 <param name="study_type" value="Epigenetics"/> |
| 442 <param name="study_pubmed_id" value="Test study pubmedID"/> | 524 <param name="study_pubmed_id" value="Test study pubmedID"/> |
| 455 <param name="insert_size" value="150"/> | 537 <param name="insert_size" value="150"/> |
| 456 <param name="library_construction_protocol" value="Test library construction"/> | 538 <param name="library_construction_protocol" value="Test library construction"/> |
| 457 <param name="platform" value="ILLUMINA"/> | 539 <param name="platform" value="ILLUMINA"/> |
| 458 <param name="instrument_model" value="Illumina HiSeq 4000"/> | 540 <param name="instrument_model" value="Illumina HiSeq 4000"/> |
| 459 <repeat name="rep_runs"> | 541 <repeat name="rep_runs"> |
| 542 <param name="run_base_name" value="run_from_hospital_X"/> | |
| 460 <param name="upload_files" value="1.fastqsanger.gz,sample.fq" ftype="fastqsanger"/> | 543 <param name="upload_files" value="1.fastqsanger.gz,sample.fq" ftype="fastqsanger"/> |
| 461 </repeat> | 544 </repeat> |
| 462 </repeat> | 545 </repeat> |
| 463 </repeat> | 546 </repeat> |
| 464 </repeat> | 547 </repeat> |
| 470 <has_text_matching expression="ena-upload-cli"/> | 553 <has_text_matching expression="ena-upload-cli"/> |
| 471 <has_text_matching expression="--data '1.fastqsanger.gz' 'sample.fq'"/> | 554 <has_text_matching expression="--data '1.fastqsanger.gz' 'sample.fq'"/> |
| 472 <has_text_matching expression="--action 'add' --center 'Some research center'"/> | 555 <has_text_matching expression="--action 'add' --center 'Some research center'"/> |
| 473 </assert_command> | 556 </assert_command> |
| 474 <assert_stderr> | 557 <assert_stderr> |
| 475 <has_text_matching expression="ENA_upload: error: Oops, the file test_fake_path does not exist"/> | 558 <has_text_matching expression="Oops, the file test_fake_path does not exist"/> |
| 476 </assert_stderr> | 559 </assert_stderr> |
| 477 </test> | 560 </test> |
| 478 <!--test viral submission - User input metadata--> | 561 <!--test viral submission - User input metadata--> |
| 479 <test expect_failure="true"> | 562 <test expect_failure="true"> |
| 480 <conditional name="action_options"> | 563 <conditional name="action_options"> |
| 481 <param name="action" value="add"/> | 564 <param name="action" value="add"/> |
| 482 <param name="submit_dev" value="False"/> | 565 <section name="test_submit_parameters"> |
| 566 <param name="submit_dev" value="false" /> | |
| 567 <param name="dry_run" value="false" /> | |
| 568 </section> | |
| 483 <param name="test_submit" value="True"/> | 569 <param name="test_submit" value="True"/> |
| 484 <conditional name="input_format_conditional"> | 570 <conditional name="input_format_conditional"> |
| 485 <param name="input_format" value="build_tables"/> | 571 <param name="input_format" value="build_tables"/> |
| 486 <param name="dry_run" value="False"/> | |
| 487 <conditional name="conditional_viral_metadata"> | 572 <conditional name="conditional_viral_metadata"> |
| 488 <param name="viral_sample" value="True"/> | 573 <param name="viral_sample" value="True"/> |
| 489 <repeat name="rep_study"> | 574 <repeat name="rep_study"> |
| 490 <param name="study_title" value="Test study title"/> | 575 <param name="study_title" value="Test study title"/> |
| 491 <param name="study_abstract" value="Test study abstract"/> | 576 <param name="study_abstract" value="Test study abstract"/> |
| 516 <param name="insert_size" value="150"/> | 601 <param name="insert_size" value="150"/> |
| 517 <param name="library_construction_protocol" value="Test library construction"/> | 602 <param name="library_construction_protocol" value="Test library construction"/> |
| 518 <param name="platform" value="ILLUMINA"/> | 603 <param name="platform" value="ILLUMINA"/> |
| 519 <param name="instrument_model" value="Illumina HiSeq 4000"/> | 604 <param name="instrument_model" value="Illumina HiSeq 4000"/> |
| 520 <repeat name="rep_runs"> | 605 <repeat name="rep_runs"> |
| 606 <param name="run_base_name" value="run_from_hospital_X"/> | |
| 521 <param name="upload_files" value="1.fastqsanger.gz,sample.fq" ftype="fastqsanger"/> | 607 <param name="upload_files" value="1.fastqsanger.gz,sample.fq" ftype="fastqsanger"/> |
| 522 </repeat> | 608 </repeat> |
| 523 </repeat> | 609 </repeat> |
| 524 </repeat> | 610 </repeat> |
| 525 </repeat> | 611 </repeat> |
| 532 <has_text_matching expression="--data '1.fastqsanger.gz' 'sample.fq'"/> | 618 <has_text_matching expression="--data '1.fastqsanger.gz' 'sample.fq'"/> |
| 533 <has_text_matching expression="--action 'add' --center 'Some research center'"/> | 619 <has_text_matching expression="--action 'add' --center 'Some research center'"/> |
| 534 <has_text_matching expression="--vir"/> | 620 <has_text_matching expression="--vir"/> |
| 535 </assert_command> | 621 </assert_command> |
| 536 <assert_stderr> | 622 <assert_stderr> |
| 537 <has_text_matching expression="ENA_upload: error: Oops, the file test_fake_path does not exist"/> | 623 <has_text_matching expression="Oops, the file test_fake_path does not exist"/> |
| 538 </assert_stderr> | 624 </assert_stderr> |
| 539 </test> | 625 </test> |
| 540 </tests> | 626 </tests> |
| 541 <help><