Skip to content

Commit

Permalink
Update for the ena upload tool: added ISA json support, changed phras…
Browse files Browse the repository at this point in the history
…ings, moved macro's,... (galaxyproject#5802)

* added description

* Moved testing options closer to Run button

* Inserted a warning about ENA Webin credential setting

* Working in branch 'First': Added credential warning on bottom

* Changed metadata input title and added .tsv

* Removed idempotent function

* Small wordings changes, Cheetah ISA json implementation (incomplete)

* Nesting changes required dot notation changes

* Updated version

* All tests succeed but tool still fails silently in local Galaxy build

* Added isa JSON test and it's test data (not recognised by $ planemo test yet)

* Added output

* checklist simplification

* some tweaks

* deleted workspace file

* some tweaks

* Added output for ISA json function, changed test

* rephrasing

* Moved 'Center' parameter

* Checklist parameter change for isa_json

* fixke

* lower the min galaxy version to match galaxy docker version

* deleted test file

* Try out matching expression

* shorter description + no duplication

* bring back all expressions

* regex fix

---------

Co-authored-by: bedroesb <bert.droesbeke@vib.be>
Co-authored-by: Bert Droesbeke <44875756+bedroesb@users.noreply.github.com>
  • Loading branch information
3 people authored Mar 23, 2024
1 parent a3f57ea commit c7f54e6
Show file tree
Hide file tree
Showing 6 changed files with 1,754 additions and 109 deletions.
191 changes: 99 additions & 92 deletions tools/ena_upload/ena_upload.xml

Large diffs are not rendered by default.

41 changes: 24 additions & 17 deletions tools/ena_upload/samples_macros.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<macros>
<xml name="checklist_input_macro">
<param type="select" name="checklist_id" label="Select the metadata checklist" help="You can find metadata templates for each checklist at: https://github.com/ELIXIR-Belgium/ENA-metadata-templates">
<param type="select" name="checklist_id" label="Select the ENA sample checklist" help="You can find metadata templates for each checklist at: https://github.com/ELIXIR-Belgium/ENA-metadata-templates">
<option value="ERC000011">ENA default sample checklist (ERC000011)</option>
<option value="ERC000012">GSC MIxS air (ERC000012)</option>
<option value="ERC000013">GSC MIxS host associated (ERC000013)</option>
Expand Down Expand Up @@ -44,37 +44,39 @@
</param>
</xml>
<xml name="test_submit_section">
<section name="test_submit_parameters" expanded="True" title="Testing options">
<param name="submit_dev" type="boolean" truevalue="True" falsevalue="False" label="Submit to test ENA server?" help="By selecting yes the reads will be submitted to the ENA test server. Uploads to test platform will not be public and will be removed in 24hrs. Performing a preliminary test upload is advised to check for errors with metadata structure. You can find the uploads to the test platform at https://wwwdev.ebi.ac.uk/ena/" />
<param name="dry_run" type="boolean" truevalue="True" falsevalue="False" label="Print the tables but do not submit the datasets" help="If yes is selected then NO submission will be performed."/>
<section name="test_submit_parameters" expanded="True" title="Submissions options">
<param name="center" type="text" optional="False" label="Affiliation center"/>
<param name="submit_dev" type="boolean" truevalue="True" falsevalue="False" label="Submit to ENA test server" help="Uploads to the test server of ENA will not be made public and will be removed automatically in 24 hours. Performing a preliminary test upload is advised to check for errors with metadata structure. You can find these uploads at https://wwwdev.ebi.ac.uk/ena/." />
<param name="dry_run" type="boolean" truevalue="True" falsevalue="False" label="Create test outputs without submitting (meta)data to ENA" help="If yes is selected then NO submission will be performed."/>
</section>
</xml>
<xml name="run_inputs_macro">
<conditional name="run_input_format_conditional">
<param name="run_input_format" type="select" label="Select runs input format">
<option value="multiple_selection_list" selected="True">Select individual datasets or datasets collection</option>
<option value="paired_list" selected="False">Input from a paired collection</option>
<param name="run_input_format" type="select" label="Select input data">
<option value="multiple_selection_list" selected="True">Dataset or dataset collection</option>
<option value="paired_list" selected="False">Paired dataset collection</option>
</param>
<when value="multiple_selection_list">
<param name="add_extension" type="boolean" checked="False" label="Add .fastq.(gz,.bz2) extension to the Galaxy dataset names to match the ones described in the input tables?"/>
<param name="data" type="data" format="fastq,fastqsanger,fastqsanger.gz,fastqsanger.bz2,fastq.gz,fastq.bz2" multiple="True" label="Select individual datasets or a dataset collection" help="Names should match the compressed run's files names defined in the metadata"/>
<param name="add_extension" type="boolean" checked="False" label="Add .fastq (.gz, .bz2) extension to the Galaxy dataset names to match the ones described in the input tables?"/>
<param name="data" type="data" format="fastq,fastqsanger,fastqsanger.gz,fastqsanger.bz2,fastq.gz,fastq.bz2" multiple="True" label="Select dataset or dataset collection" help="Names should match the compressed run's files names defined in the metadata"/>
</when>
<when value="paired_list">
<param name="paired_end_collection" collection_type="list:paired" type="data_collection" format="fastq,fastqsanger,fastqsanger.gz,fastqsanger.bz2,fastq.gz,fastq.bz2" label="List of paired-end runs files" help="Names should match the compressed run's files names defined in the metadata" />
<param name="paired_end_collection" collection_type="list:paired" type="data_collection" format="fastq,fastqsanger,fastqsanger.gz,fastqsanger.bz2,fastq.gz,fastq.bz2" label="List of paired-end sequencing data files" help="Names should match the compressed run's files names defined in the metadata" />
</when>
</conditional>
</xml>
<xml name="table_inputs_macro">
<conditional name="input_format_conditional">
<param name="input_format" type="select" label="Would you like to submit pregenerated table files or interactively define the input structures?">
<option value="excel_tables" selected="True">User generated metadata tables based on Excel template</option>
<option value="build_tables" selected="False">Interactive generation of the study structure (only recommended for small studies)</option>
<option value="user_generated_tables" selected="False">User generated tabular files (studies - samples - experiments - runs) </option>
<param name="input_format" type="select" label="Select the metadata input method">
<option value="excel_tables" selected="True">Excel file</option>
<option value="user_generated_tables" selected="False">Tabular files (studies - samples - experiments - runs)</option>
<option value="isa_json" selected="False">ISA json file</option>
<option value="build_tables" selected="False">Interactively (only recommended for small studies)</option>
</param>
<when value="excel_tables">
<!--<param name="viral_submission" type="boolean" label="Does your submission data belong to a viral sample?" help="If you select yes then your data will be submitted using the ENA virus pathogen reporting standard checklist (see: https://ena-browser-docs.readthedocs.io/en/latest/help_and_guides/sars-cov-2-submissions.html)" />-->
<expand macro="checklist_input_macro"/>
<param name="xlsx_file" type="data" format="xlsx" label="Select Excel (xlsx) file based on template" />
<param name="xlsx_file" type="data" format="xlsx" label="Select Excel (.xlsx) file based on template" />
<expand macro="run_inputs_macro" />
</when>
<when value="user_generated_tables">
Expand All @@ -87,7 +89,7 @@
<param name="runs_users_table" type="data" format="tabular" multiple="False" label="Runs table" help="Runs metadata file"/>
</when>
<when value="build_tables">
<param name="add_extension" type="boolean" checked="False" label="Add .fastq.(gz.bz2) extension to the Galaxy dataset names to match the ones described in the input tables?"/>
<param name="add_extension" type="boolean" checked="False" label="Add .fastq (.gz, .bz2) extension to the Galaxy dataset names to match the ones described in the input tables?"/>
<conditional name="conditional_viral_metadata">
<param name="viral_sample" type="select" label="Select your sample type" help="Non-viral interactive submissions lack specific sample checklist attributes and are suboptimal. It's highly recommended to use Excel or TSV templates as input for a more comprehensive submission.">
<option value="True" selected="True">Viral</option>
Expand All @@ -101,8 +103,13 @@
</when>
</conditional>
</when>
<when value="isa_json">
<param name="isa_json_file" type="data" format="json" label="Select ISA json file" />
<param name="isa_assay_stream" type="text" optional="False" help="List the assay_stream values from the comment field in the assays list of the ISA-json you want to submit." label="Specify the ISA json assay stream(s)" />
<expand macro="run_inputs_macro" />
</when>
</conditional>
<param name="center" type="text" optional="False" label="Affiliation center"/>

</xml>
<xml name="viral_samples">
<repeat name="rep_study" title="Study" min="1">
Expand Down
Binary file added tools/ena_upload/test-data/ENA_TEST1.R1.fastq.gz
Binary file not shown.
Binary file added tools/ena_upload/test-data/ENA_TEST2.R1.fastq.gz
Binary file not shown.
Binary file added tools/ena_upload/test-data/ENA_TEST2.R2.fastq.gz
Binary file not shown.
Loading

0 comments on commit c7f54e6

Please sign in to comment.