changeset 11:f803a68fc9e5 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ena_upload commit c7f54e6e3b1ffad5631ff7c150449cb79bd3686d
author iuc
date Sat, 23 Mar 2024 22:06:45 +0000
parents 480d9e9d156b
children 29648e5e83a8
files ena_upload.xml samples_macros.xml test-data/ENA_TEST1.R1.fastq.gz test-data/ENA_TEST2.R1.fastq.gz test-data/ENA_TEST2.R2.fastq.gz test-data/simple_test_case_v2.json
diffstat 6 files changed, 1757 insertions(+), 112 deletions(-) [+]
line wrap: on
line diff
--- a/ena_upload.xml	Fri Oct 27 19:44:40 2023 +0000
+++ b/ena_upload.xml	Sat Mar 23 22:06:45 2024 +0000
@@ -1,6 +1,7 @@
-<tool id="ena_upload" name="ENA Upload tool" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.05" license="MIT">
+<tool id="ena_upload" name="ENA Upload tool" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.05" license="MIT">
+    <description>Submission of (meta)data to the European Nucleotide Archive (ENA)</description>
     <macros>
-        <token name="@TOOL_VERSION@">0.6.3</token>
+        <token name="@TOOL_VERSION@">0.7.1</token>
         <token name="@VERSION_SUFFIX@">0</token>
         <import>samples_macros.xml</import>
     </macros>
@@ -48,7 +49,10 @@
 #if $action_options.input_format_conditional.input_format == "excel_tables":
     ln -s '$action_options.input_format_conditional.xlsx_file' ./xlsx_input.xlsx &&
 #end if
-#if $action_options.test_submit_parameters.dry_run == "False" and $action_options.test_submit == "False":
+#if $action_options.input_format_conditional.input_format == "isa_json":
+    ln -s '$action_options.input_format_conditional.isa_json_file' ./isa_json_input.json &&
+#end if
+#if $action_options.test_submit_parameters.dry_run == "False":
     webin_id=`grep 'username' $credentials`;
     if [ "\$webin_id" = "" ]; then
       ## No credentials in user defined preferences    
@@ -171,95 +175,52 @@
     #end if
 #end if
 
-#if $action_options.action == "add":
 ena-upload-cli
     --tool 'ena-upload-cli v@TOOL_VERSION@ @ Galaxy'
     --action '$action_options.action'
-    --center '$action_options.center'
+    --center '$action_options.test_submit_parameters.center'
     --secret \${credentials_path}
     --data
-    #for $dataset in $files_to_upload:
-        '$dataset'
-    #end for
+#for $dataset in $files_to_upload:
+    '$dataset'
+#end for
 #if $action_options.test_submit_parameters.dry_run == "True":
     --draft
 #end if
-#if $action_options.input_format_conditional.input_format != "excel_tables":
+#if $action_options.input_format_conditional.input_format == "excel_tables":
+    --xlsx ./xlsx_input.xlsx 
+#elif $action_options.input_format_conditional.input_format == "user_generated_tables" or $action_options.input_format_conditional.input_format == "build_tables":
     --experiment '$experiments_table_path'
     --study '$studies_table_path'
     --run '$runs_table_path'
     --sample '$samples_table_path'
-#else
-    --xlsx ./xlsx_input.xlsx 
+#elif $action_options.input_format_conditional.input_format == "isa_json":
+    --isa_json ./isa_json_input.json
+    --isa_assay_stream '$isa_assay_stream'
 #end if
---action add
-#if $action_options.input_format_conditional.input_format == "user_generated_tables":
-        --checklist $action_options.input_format_conditional.checklist_id
+#if $action_options.input_format_conditional.input_format == "build_tables":
+    #if $action_options.input_format_conditional.conditional_viral_metadata.viral_sample == "True":
+        --checklist ERC000033
+    #end if
+#elif $action_options.input_format_conditional.input_format == "isa_json":
+    --checklist ERC000011
 #else:
-    #if $action_options.input_format_conditional.input_format == "build_tables":
-        #if $action_options.input_format_conditional.conditional_viral_metadata.viral_sample == "True":
-          --checklist ERC000033
-        #end if
-    #else:
-          --checklist $action_options.input_format_conditional.checklist_id
-    #end if
-#end if
-#if $action_options.idempotent == "True":
-    --auto_action
+    --checklist $action_options.input_format_conditional.checklist_id
 #end if
 #if $action_options.test_submit_parameters.submit_dev == "True":
     -d
 #end if
-    >> '$output';
-#end if
-
+>> '$output';
 
 
-#if $action_options.action == "modify":
-    ena-upload-cli
-    --tool 'ena-upload-cli v@TOOL_VERSION@ @ Galaxy'
-    --action '$action_options.action'
-    --center '$action_options.center'
-    --secret \${credentials_path}
-    --data
-    #for $dataset in $files_to_upload:
-        '$dataset'
-    #end for
-#if $action_options.test_submit_parameters.dry_run == "True":
-    --draft
-#end if
-#if $action_options.input_format_conditional.input_format != "excel_tables":
-    --experiment '$experiments_table_path'
-    --study '$studies_table_path'
-    --run '$runs_table_path'
-    --sample '$samples_table_path'
-#else
-    --xlsx ./xlsx_input.xlsx 
-    --auto_action
-#end if
---action 'modify'
-#if $action_options.input_format_conditional.input_format == "user_generated_tables":
-        --checklist $action_options.input_format_conditional.checklist_id
-#else:
-    #if $action_options.input_format_conditional.input_format == "build_tables":
-        #if $action_options.input_format_conditional.conditional_viral_metadata.viral_sample == "True":
-          --checklist ERC000033
-        #end if
-    #else:
-          --checklist $action_options.input_format_conditional.checklist_id
-    #end if
-#end if
-    >> '$output';
-#end if
-
 #if $action_options.test_submit_parameters.dry_run == "False":
-    echo -e 'center_name\t$action_options.center' >> '$output';
+    echo -e 'center_name\t$action_options.test_submit_parameters.center' >> '$output';
     echo -e 'action_option\t$action_options.action' >> '$output';
 #end if
         
 ## copy updated files
-#if $action_options.input_format_conditional.input_format == "excel_tables":
-    ## for the excel input case, copy the upload-cli generated tables to the output files
+#if $action_options.input_format_conditional.input_format == "excel_tables" or $action_options.input_format_conditional.input_format == "isa_json":
+    ## for the excel/ISA json input case, copy the upload-cli generated tables to the output files
     ## this applies for both draft and real submissions
     cp './ENA_template_experiment_updated.tsv' $experiments_table_out;
     cp './ENA_template_sample_updated.tsv' $samples_table_out;
@@ -321,35 +282,34 @@
     <inputs>
         <conditional name="action_options">
             <param name="action" type="select" label="Action to execute">
-                <option value="add" selected="True">Add new data</option>
+                <option value="add" selected="True">Add new (meta)data</option>
                 <option value="modify">Modify metadata</option>
             </param>
             <when value="add">
-                <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"/>
-                <expand macro="test_submit_section"/>    
+                <param name="test_submit" type="hidden" value="False" />
+                <expand macro="table_inputs_macro" />  
+                <expand macro="test_submit_section"/>
+            </when>
+            <when value="modify">
                 <param name="test_submit" type="hidden" value="False" />
                 <expand macro="table_inputs_macro" />
-            </when>
-            <when value="modify">
-                <expand macro="test_submit_section"/>    
-                <param name="test_submit" type="hidden" value="False" />
-                <expand macro="table_inputs_macro" />
+                <expand macro="test_submit_section"/>
             </when>
         </conditional>
     </inputs>
     <outputs>
         <data name="output" format="txt" label="ENA submission receipt"/>
         <data name="studies_table_out" format="tabular" label="Studies table">
-            <filter> action_options['input_format_conditional']['input_format'] == "build_tables" or action_options['input_format_conditional']['input_format'] == "excel_tables"</filter>
+            <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>
         </data>
         <data name="samples_table_out" format="tabular" label="Samples table">
-            <filter> action_options['input_format_conditional']['input_format'] == "build_tables" or action_options['input_format_conditional']['input_format'] == "excel_tables"</filter>
+            <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>
         </data>
         <data name="experiments_table_out" format="tabular" label="Experiments table">
-            <filter> action_options['input_format_conditional']['input_format'] == "build_tables" or action_options['input_format_conditional']['input_format'] == "excel_tables"</filter>
+            <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>
         </data>
         <data name="runs_table_out" format="tabular" label="Runs table">
-            <filter> action_options['input_format_conditional']['input_format'] == "build_tables" or action_options['input_format_conditional']['input_format'] == "excel_tables"</filter>
+            <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>
         </data>
     </outputs>
     <tests>
@@ -358,6 +318,7 @@
             <conditional name="action_options">
                 <param name="action" value="add"/>
                 <section name="test_submit_parameters">
+                    <param name="center" value="Some research center"/>
                     <param name="submit_dev" value="False" />
                     <param name="dry_run" value="True" />
                 </section>
@@ -372,7 +333,6 @@
                     </conditional>
                 </conditional>
             </conditional>
-            <param name="center" value="Some research center"/>
             <output name="experiments_table_out">
                 <assert_contents>
                     <has_n_lines n="5"/>
@@ -408,6 +368,7 @@
             <conditional name="action_options">
                 <param name="action" value="add"/>
                 <section name="test_submit_parameters">
+                    <param name="center" value="Some research center"/>
                     <param name="submit_dev" value="False" />
                     <param name="dry_run" value="True" />
                 </section>
@@ -422,7 +383,6 @@
                     </conditional>
                 </conditional>
             </conditional>
-            <param name="center" value="Some research center"/>
             <output name="experiments_table_out">
                 <assert_contents>
                     <has_n_lines n="5"/>
@@ -468,6 +428,7 @@
             <conditional name="action_options">
                 <param name="action" value="add"/>
                 <section name="test_submit_parameters">
+                    <param name="center" value="Some research center"/>
                     <param name="submit_dev" value="False" />
                     <param name="dry_run" value="True" />
                 </section>
@@ -482,7 +443,6 @@
                     </conditional>
                 </conditional>
             </conditional>
-            <param name="center" value="Some research center"/>
             <output name="experiments_table_out">
                 <assert_contents>
                     <has_n_lines n="2"/>
@@ -518,6 +478,7 @@
             <conditional name="action_options">
                 <param name="action" value="add"/>
                 <section name="test_submit_parameters">
+                    <param name="center" value="Some research center"/>
                     <param name="submit_dev" value="False" />
                     <param name="dry_run" value="False" />
                 </section>
@@ -541,22 +502,21 @@
                     </conditional>
                 </conditional>
             </conditional>
-            <param name="center" value="Some research center"/>
             <assert_command>
                 <has_text_matching expression="ena-upload-cli"/>
                 <has_text_matching expression="--data 'paired_run_name_1.fastq.gz' 'paired_run_name_2.fastq.gz'"/>
                 <has_text_matching expression="--action 'add' --center 'Some research center'"/>
             </assert_command>
         </test>
-        <!--Test 4b: failure on excel input of NON-VIRAL samples with runs PAIRED collection + Idempotent submission -->
+        <!--Test 4b: failure on excel input of NON-VIRAL samples with runs PAIRED collection -->
         <test expect_failure="True">
             <conditional name="action_options">
                 <param name="action" value="add"/>
                 <section name="test_submit_parameters">
+                    <param name="center" value="Some research center"/>
                     <param name="submit_dev" value="False" />
                     <param name="dry_run" value="False" />
                 </section>
-                <param name="idempotent" value="True"/>
                 <conditional name="input_format_conditional">
                     <param name="add_extension" value="True"/>
                     <param name="input_format" value="excel_tables"/>
@@ -577,12 +537,10 @@
                     </conditional>
                 </conditional>
             </conditional>
-            <param name="center" value="Some research center"/>
             <assert_command>
                 <has_text_matching expression="ena-upload-cli"/>
                 <has_text_matching expression="--data 'paired_run_name_1.fastq.gz' 'paired_run_name_2.fastq.gz'"/>
                 <has_text_matching expression="--action 'add' --center 'Some research center'"/>
-                <has_text_matching expression="--auto_action"/>
             </assert_command>
         </test>
         <!--Test 5: build tables from user input fields NON-VIRAL samples-->
@@ -590,6 +548,7 @@
             <conditional name="action_options">
                 <param name="action" value="add"/>
                 <section name="test_submit_parameters">
+                    <param name="center" value="Some research center"/>
                     <param name="submit_dev" value="False" />
                     <param name="dry_run" value="True" />
                 </section>
@@ -630,7 +589,6 @@
                     </conditional>
                 </conditional>
             </conditional>
-            <param name="center" value="Some research center"/>
             <output name="experiments_table_out">
                 <assert_contents>
                     <has_n_lines n="2"/>
@@ -664,6 +622,7 @@
             <conditional name="action_options">
                 <param name="action" value="add"/>
                 <section name="test_submit_parameters">
+                    <param name="center" value="Some research center"/>
                     <param name="submit_dev" value="True" />
                     <param name="dry_run" value="True" />
                 </section>
@@ -706,7 +665,6 @@
                     </conditional>
                 </conditional>
             </conditional>
-            <param name="center" value="Some research center"/>
             <assert_command>
                 <has_text_matching expression="ena-upload-cli"/>
                 <has_text_matching expression="--data '1.fastqsanger.gz' '2.fastqsanger.gz'"/>
@@ -719,6 +677,7 @@
             <conditional name="action_options">
                 <param name="action" value="add"/>
                 <section name="test_submit_parameters">
+                    <param name="center" value="Some research center"/>
                     <param name="submit_dev" value="False" />
                     <param name="dry_run" value="True" />
                 </section>
@@ -769,7 +728,6 @@
                     </conditional>
                 </conditional>
             </conditional>
-            <param name="center" value="Some research center"/>
             <assert_command>
                 <has_text_matching expression="ena-upload-cli"/>
                 <has_text_matching expression="--data '1.fastqsanger.gz' '2.fastqsanger.gz'"/>
@@ -782,6 +740,7 @@
             <conditional name="action_options">
                 <param name="action" value="modify"/>
                 <section name="test_submit_parameters">
+                    <param name="center" value="Some research center"/>
                     <param name="submit_dev" value="False" />
                     <param name="dry_run" value="True" />
                 </section>
@@ -832,7 +791,6 @@
                     </conditional>
                 </conditional>
             </conditional>
-            <param name="center" value="Some research center"/>
             <assert_command>
                 <has_text_matching expression="ena-upload-cli"/>
                 <has_text_matching expression="--data '1.fastqsanger.gz' '2.fastqsanger.gz'"/>
@@ -841,11 +799,60 @@
                 <not_has_text text="add" />
             </assert_command>
         </test>
+        <!--Test 9: isa JSON input of NON-VIRAL samples-->
+        <test expect_num_outputs="5">
+            <conditional name="action_options">
+                <param name="action" value="add"/>
+                <section name="test_submit_parameters">
+                    <param name="center" value="Some research center"/>
+                    <param name="submit_dev" value="True" />
+                    <param name="dry_run" value="True" />
+                </section>
+                <conditional name="input_format_conditional">
+                    <param name="input_format" value="isa_json"/>
+                    <param name="isa_json_file" value="simple_test_case_v2.json"/>
+                    <param name="isa_assay_stream" value="Ena stream 1"/>
+                    <conditional name="run_input_format_conditional">
+                        <param name="add_extension" value="False"/>
+                        <param name="run_input_format" value="multiple_selection_list"/>
+                        <param name="data" value="ENA_TEST1.R1.fastq.gz,ENA_TEST2.R1.fastq.gz,ENA_TEST2.R2.fastq.gz"/>
+                    </conditional>
+                </conditional>
+            </conditional>
+            <output name="experiments_table_out">
+                <assert_contents>
+                    <has_n_lines n="4"/>
+                    <has_n_columns n="17"/>
+                    <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"/>
+                </assert_contents>
+            </output>
+            <output name="studies_table_out">
+                <assert_contents>
+                    <has_n_lines n="2"/>
+                    <has_n_columns n="9"/>
+                    <has_line_matching expression="alias\ttitle\tstudy_type\tstudy_abstract\tnew_study_type\tpubmed_id\taccession\tsubmission_date\tstatus"/>
+                </assert_contents>
+            </output>
+            <output name="samples_table_out">
+                <assert_contents>
+                    <has_n_lines n="3"/>
+                    <has_n_columns n="11"/>
+                </assert_contents>
+            </output>
+            <output name="runs_table_out">
+                <assert_contents>
+                    <has_n_lines n="4"/>
+                    <has_n_columns n="10"/>
+                    <has_line_matching expression="alias\texperiment_alias\tfile_name\tfile_type\tfile checksum\taccession\tsubmission date\tstatus\tsubmission_date\tfile_checksum"/>
+                </assert_contents>
+            </output>
+        </test>
     </tests>
-    <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.
-    ]]></help>
+    <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.
+    
+        .. class:: warningmark
+    
+            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>
     <citations>
         <citation type="doi">doi:10.1093/bioinformatics/btab421</citation>
     </citations>
--- a/samples_macros.xml	Fri Oct 27 19:44:40 2023 +0000
+++ b/samples_macros.xml	Sat Mar 23 22:06:45 2024 +0000
@@ -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>
@@ -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">
@@ -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>
@@ -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">
Binary file test-data/ENA_TEST1.R1.fastq.gz has changed
Binary file test-data/ENA_TEST2.R1.fastq.gz has changed
Binary file test-data/ENA_TEST2.R2.fastq.gz has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/simple_test_case_v2.json	Sat Mar 23 22:06:45 2024 +0000
@@ -0,0 +1,1631 @@
+{
+  "identifier": "",
+  "title": "Test Case ENA upload tool",
+  "description": "This investigation matches the test case of the ENA upload tool",
+  "submissionDate": "",
+  "publicReleaseDate": "",
+  "ontologySourceReferences": [],
+  "filename": "Test Case ENA upload tool.txt",
+  "comments": [
+    {
+      "name": "ISAjson export time",
+      "value": "2023-11-08T16:27:49Z"
+    },
+    {
+      "name": "SEEK Project name",
+      "value": "Test Project ENA upload Tool"
+    },
+    {
+      "name": "SEEK Project ID",
+      "value": "http://localhost:3000/single_pages/16"
+    },
+    {
+      "name": "SEEK Investigation ID",
+      "value": "27"
+    }
+  ],
+  "publications": [],
+  "people": [
+    {
+      "@id": "#people/4",
+      "lastName": "De Pelseneer",
+      "firstName": "Kevin",
+      "midInitials": "",
+      "email": "kevin.depelseneer@psb.ugent.be",
+      "phone": "",
+      "fax": "",
+      "address": "",
+      "affiliation": "",
+      "roles": [
+        {
+          "termAccession": "",
+          "termSource": "",
+          "annotationValue": ""
+        }
+      ],
+      "comments": [
+        {
+          "@id": "",
+          "value": "",
+          "name": ""
+        }
+      ]
+    }
+  ],
+  "studies": [
+    {
+      "identifier": "",
+      "title": "Study - Test Case ENA",
+      "description": "",
+      "submissionDate": "",
+      "publicReleaseDate": "",
+      "filename": "Study - Test Case ENA.txt",
+      "comments": [
+        {
+          "@id": "#study_comment/25_13_49",
+          "name": "ena_sample_alias_prefix",
+          "value": "sample_alias_"
+        },
+        {
+          "@id": "#study_comment/25_ae7461a0-6081-013c-9ed3-7a163e608de1",
+          "name": "SEEK Study ID",
+          "value": "25"
+        },
+        {
+          "@id": "#study_comment/25_ae7467e0-6081-013c-9ed4-7a163e608de1",
+          "name": "SEEK creation date",
+          "value": "2023-10-20T11:12:23Z"
+        }
+      ],
+      "publications": [],
+      "people": [
+        {
+          "@id": "#people/4",
+          "lastName": "De Pelseneer",
+          "firstName": "Kevin",
+          "midInitials": "",
+          "email": "kevin.depelseneer@psb.ugent.be",
+          "phone": "",
+          "fax": "",
+          "address": "",
+          "affiliation": "",
+          "roles": [
+            {
+              "termAccession": "",
+              "termSource": "",
+              "annotationValue": ""
+            }
+          ],
+          "comments": [
+            {
+              "@id": "",
+              "value": "",
+              "name": ""
+            }
+          ]
+        }
+      ],
+      "studyDesignDescriptors": [],
+      "characteristicCategories": [
+        {
+          "@id": "#characteristic_category/geographic_location_(country_and/or_sea)_657",
+          "characteristicType": {
+            "annotationValue": "geographic location (country and/or sea)",
+            "termAccession": "",
+            "termSource": ""
+          }
+        },
+        {
+          "@id": "#characteristic_category/taxon_id_658",
+          "characteristicType": {
+            "annotationValue": "taxon_id",
+            "termAccession": "",
+            "termSource": ""
+          }
+        },
+        {
+          "@id": "#characteristic_category/title_662",
+          "characteristicType": {
+            "annotationValue": "title",
+            "termAccession": "",
+            "termSource": ""
+          }
+        },
+        {
+          "@id": "#characteristic_category/sample_description_663",
+          "characteristicType": {
+            "annotationValue": "sample_description",
+            "termAccession": "",
+            "termSource": ""
+          }
+        },
+        {
+          "@id": "#characteristic_category/collection_date_664",
+          "characteristicType": {
+            "annotationValue": "collection date",
+            "termAccession": "",
+            "termSource": ""
+          }
+        },
+        {
+          "@id": "#characteristic_category/accession_665",
+          "characteristicType": {
+            "annotationValue": "accession",
+            "termAccession": "",
+            "termSource": ""
+          }
+        },
+        {
+          "@id": "#characteristic_category/submission_date_666",
+          "characteristicType": {
+            "annotationValue": "submission date",
+            "termAccession": "",
+            "termSource": ""
+          }
+        },
+        {
+          "@id": "#characteristic_category/status_667",
+          "characteristicType": {
+            "annotationValue": "status",
+            "termAccession": "",
+            "termSource": ""
+          }
+        }
+      ],
+      "materials": {
+        "sources": [
+          {
+            "@id": "#source/223",
+            "name": "Source 1",
+            "characteristics": [
+              {
+                "category": {
+                  "@id": "#characteristic_category/geographic_location_(country_and/or_sea)_657"
+                },
+                "value": {
+                  "annotationValue": "Argentina",
+                  "termSource": "",
+                  "termAccession": ""
+                },
+                "unit": {
+                  "termSource": "",
+                  "termAccession": "",
+                  "comments": []
+                }
+              },
+              {
+                "category": {
+                  "@id": "#characteristic_category/taxon_id_658"
+                },
+                "value": {
+                  "annotationValue": "9606",
+                  "termSource": "",
+                  "termAccession": ""
+                },
+                "unit": {
+                  "termSource": "",
+                  "termAccession": "",
+                  "comments": []
+                }
+              }
+            ]
+          },
+          {
+            "@id": "#source/226",
+            "name": "Source 2",
+            "characteristics": [
+              {
+                "category": {
+                  "@id": "#characteristic_category/geographic_location_(country_and/or_sea)_657"
+                },
+                "value": {
+                  "annotationValue": "Belgium",
+                  "termSource": "",
+                  "termAccession": ""
+                },
+                "unit": {
+                  "termSource": "",
+                  "termAccession": "",
+                  "comments": []
+                }
+              },
+              {
+                "category": {
+                  "@id": "#characteristic_category/taxon_id_658"
+                },
+                "value": {
+                  "annotationValue": "646099",
+                  "termSource": "",
+                  "termAccession": ""
+                },
+                "unit": {
+                  "termSource": "",
+                  "termAccession": "",
+                  "comments": []
+                }
+              }
+            ]
+          }
+        ],
+        "samples": [
+          {
+            "@id": "#sample/224",
+            "name": "Sample 1",
+            "derivesFrom": [
+              {
+                "@id": "#source/223"
+              }
+            ],
+            "characteristics": [
+              {
+                "category": {
+                  "@id": "#characteristic_category/title_662"
+                },
+                "value": {
+                  "annotationValue": "sample_title_1",
+                  "termSource": "",
+                  "termAccession": ""
+                },
+                "unit": {
+                  "termSource": "",
+                  "termAccession": "",
+                  "comments": []
+                }
+              },
+              {
+                "category": {
+                  "@id": "#characteristic_category/sample_description_663"
+                },
+                "value": {
+                  "annotationValue": "sample_description_1",
+                  "termSource": "",
+                  "termAccession": ""
+                },
+                "unit": {
+                  "termSource": "",
+                  "termAccession": "",
+                  "comments": []
+                }
+              },
+              {
+                "category": {
+                  "@id": "#characteristic_category/collection_date_664"
+                },
+                "value": {
+                  "annotationValue": "2020-10-11",
+                  "termSource": "",
+                  "termAccession": ""
+                },
+                "unit": {
+                  "termSource": "",
+                  "termAccession": "",
+                  "comments": []
+                }
+              },
+              {
+                "category": {
+                  "@id": "#characteristic_category/accession_665"
+                },
+                "value": {
+                  "annotationValue": "",
+                  "termSource": "",
+                  "termAccession": ""
+                },
+                "unit": {
+                  "termSource": "",
+                  "termAccession": "",
+                  "comments": []
+                }
+              },
+              {
+                "category": {
+                  "@id": "#characteristic_category/submission_date_666"
+                },
+                "value": {
+                  "annotationValue": "",
+                  "termSource": "",
+                  "termAccession": ""
+                },
+                "unit": {
+                  "termSource": "",
+                  "termAccession": "",
+                  "comments": []
+                }
+              },
+              {
+                "category": {
+                  "@id": "#characteristic_category/status_667"
+                },
+                "value": {
+                  "annotationValue": "add",
+                  "termSource": "",
+                  "termAccession": ""
+                },
+                "unit": {
+                  "termSource": "",
+                  "termAccession": "",
+                  "comments": []
+                }
+              }
+            ],
+            "factorValues": [
+              {
+                "category": {
+                  "@id": ""
+                },
+                "value": {
+                  "annotationValue": "",
+                  "termSource": "",
+                  "termAccession": ""
+                },
+                "unit": {
+                  "termSource": "",
+                  "termAccession": "",
+                  "comments": []
+                }
+              }
+            ]
+          },
+          {
+            "@id": "#sample/225",
+            "name": "Sample 2",
+            "derivesFrom": [
+              {
+                "@id": "#source/226"
+              }
+            ],
+            "characteristics": [
+              {
+                "category": {
+                  "@id": "#characteristic_category/title_662"
+                },
+                "value": {
+                  "annotationValue": "sample_title_2",
+                  "termSource": "",
+                  "termAccession": ""
+                },
+                "unit": {
+                  "termSource": "",
+                  "termAccession": "",
+                  "comments": []
+                }
+              },
+              {
+                "category": {
+                  "@id": "#characteristic_category/sample_description_663"
+                },
+                "value": {
+                  "annotationValue": "sample_description_2",
+                  "termSource": "",
+                  "termAccession": ""
+                },
+                "unit": {
+                  "termSource": "",
+                  "termAccession": "",
+                  "comments": []
+                }
+              },
+              {
+                "category": {
+                  "@id": "#characteristic_category/collection_date_664"
+                },
+                "value": {
+                  "annotationValue": "2008-01-24",
+                  "termSource": "",
+                  "termAccession": ""
+                },
+                "unit": {
+                  "termSource": "",
+                  "termAccession": "",
+                  "comments": []
+                }
+              },
+              {
+                "category": {
+                  "@id": "#characteristic_category/accession_665"
+                },
+                "value": {
+                  "annotationValue": "",
+                  "termSource": "",
+                  "termAccession": ""
+                },
+                "unit": {
+                  "termSource": "",
+                  "termAccession": "",
+                  "comments": []
+                }
+              },
+              {
+                "category": {
+                  "@id": "#characteristic_category/submission_date_666"
+                },
+                "value": {
+                  "annotationValue": "",
+                  "termSource": "",
+                  "termAccession": ""
+                },
+                "unit": {
+                  "termSource": "",
+                  "termAccession": "",
+                  "comments": []
+                }
+              },
+              {
+                "category": {
+                  "@id": "#characteristic_category/status_667"
+                },
+                "value": {
+                  "annotationValue": "add",
+                  "termSource": "",
+                  "termAccession": ""
+                },
+                "unit": {
+                  "termSource": "",
+                  "termAccession": "",
+                  "comments": []
+                }
+              }
+            ],
+            "factorValues": [
+              {
+                "category": {
+                  "@id": ""
+                },
+                "value": {
+                  "annotationValue": "",
+                  "termSource": "",
+                  "termAccession": ""
+                },
+                "unit": {
+                  "termSource": "",
+                  "termAccession": "",
+                  "comments": []
+                }
+              }
+            ]
+          }
+        ]
+      },
+      "protocols": [
+        {
+          "@id": "#protocol/_25",
+          "name": "sample collection",
+          "protocolType": {
+            "annotationValue": "sample collection",
+            "termAccession": "",
+            "termSource": ""
+          },
+          "description": "",
+          "uri": "",
+          "version": "",
+          "parameters": [],
+          "components": [
+            {
+              "componentName": "",
+              "componentType": {
+                "annotationValue": "",
+                "termSource": "",
+                "termAccession": ""
+              }
+            }
+          ]
+        },
+        {
+          "@id": "#protocol/_48",
+          "name": "library construction",
+          "protocolType": {
+            "annotationValue": "library construction",
+            "termAccession": "",
+            "termSource": ""
+          },
+          "description": "",
+          "uri": "",
+          "version": "",
+          "parameters": [
+            {
+              "@id": "#parameter/672",
+              "parameterName": {
+                "annotationValue": "design_description",
+                "termAccession": "",
+                "termSource": ""
+              }
+            },
+            {
+              "@id": "#parameter/674",
+              "parameterName": {
+                "annotationValue": "library_source",
+                "termAccession": "",
+                "termSource": ""
+              }
+            },
+            {
+              "@id": "#parameter/675",
+              "parameterName": {
+                "annotationValue": "library_strategy",
+                "termAccession": "",
+                "termSource": ""
+              }
+            },
+            {
+              "@id": "#parameter/676",
+              "parameterName": {
+                "annotationValue": "library_selection",
+                "termAccession": "",
+                "termSource": ""
+              }
+            },
+            {
+              "@id": "#parameter/677",
+              "parameterName": {
+                "annotationValue": "library_layout",
+                "termAccession": "",
+                "termSource": ""
+              }
+            },
+            {
+              "@id": "#parameter/678",
+              "parameterName": {
+                "annotationValue": "insert_size",
+                "termAccession": "",
+                "termSource": ""
+              }
+            },
+            {
+              "@id": "#parameter/679",
+              "parameterName": {
+                "annotationValue": "platform",
+                "termAccession": "",
+                "termSource": ""
+              }
+            },
+            {
+              "@id": "#parameter/680",
+              "parameterName": {
+                "annotationValue": "instrument_model",
+                "termAccession": "",
+                "termSource": ""
+              }
+            }
+          ],
+          "components": [
+            {
+              "componentName": "",
+              "componentType": {
+                "annotationValue": "",
+                "termSource": "",
+                "termAccession": ""
+              }
+            }
+          ]
+        },
+        {
+          "@id": "#protocol/_49",
+          "name": "nucleic acid sequencing",
+          "protocolType": {
+            "annotationValue": "nucleic acid sequencing",
+            "termAccession": "",
+            "termSource": ""
+          },
+          "description": "",
+          "uri": "",
+          "version": "",
+          "parameters": [],
+          "components": [
+            {
+              "componentName": "",
+              "componentType": {
+                "annotationValue": "",
+                "termSource": "",
+                "termAccession": ""
+              }
+            }
+          ]
+        }
+      ],
+      "processSequence": [
+        {
+          "@id": "#process/sample_collection/224",
+          "name": "",
+          "executesProtocol": {
+            "@id": "#protocol/_25"
+          },
+          "parameterValues": [],
+          "performer": "",
+          "date": "",
+          "inputs": [
+            {
+              "@id": "#source/223"
+            }
+          ],
+          "outputs": [
+            {
+              "@id": "#sample/224"
+            }
+          ]
+        },
+        {
+          "@id": "#process/sample_collection/225",
+          "name": "",
+          "executesProtocol": {
+            "@id": "#protocol/_25"
+          },
+          "parameterValues": [],
+          "performer": "",
+          "date": "",
+          "inputs": [
+            {
+              "@id": "#source/226"
+            }
+          ],
+          "outputs": [
+            {
+              "@id": "#sample/225"
+            }
+          ]
+        }
+      ],
+      "assays": [
+        {
+          "@id": "#assay/48_49",
+          "filename": "a_ena_stream_1.txt",
+          "measurementType": {
+            "annotationValue": "",
+            "termSource": "",
+            "termAccession": ""
+          },
+          "technologyType": {
+            "annotationValue": "",
+            "termSource": "",
+            "termAccession": ""
+          },
+          "comments": [
+            {
+              "@id": "#assay_comment/25_48_49_14_50",
+              "name": "ena_study_title",
+              "value": "study_title_1"
+            },
+            {
+              "@id": "#assay_comment/25_48_49_14_51",
+              "name": "study_type",
+              "value": "Transcriptome Analysis"
+            },
+            {
+              "@id": "#assay_comment/25_48_49_14_52",
+              "name": "new_study_type",
+              "value": "This should not be submitted!"
+            },
+            {
+              "@id": "#assay_comment/25_48_49_14_53",
+              "name": "ena_study_abstract",
+              "value": "study_abstract_1"
+            },
+            {
+              "@id": "#assay_comment/25_48_49_14_54",
+              "name": "assay_stream",
+              "value": "Ena stream 1"
+            },
+            {
+              "@id": "#assay_comment/25_48_49_14_55",
+              "name": "ena_study_alias_prefix",
+              "value": "study_alias_"
+            },
+            {
+              "@id": "#assay_comment/25_48_49_14_56",
+              "name": "ena_experiment_alias_prefix",
+              "value": "experiment_alias_"
+            },
+            {
+              "@id": "#assay_comment/25_48_49_14_57",
+              "name": "ena_run_alias_prefix",
+              "value": "run_alias_"
+            },
+            {
+              "@id": "#assay_comment/48_49",
+              "name": "linked_assays",
+              "value": "[{\"id\":48,\"title\":\"Assay 1 - Test case ENA upload tool\"},{\"id\":49,\"title\":\"Assay 2 - Test case ENA upload tool\"}]"
+            }
+          ],
+          "technologyPlatform": "",
+          "characteristicCategories": [
+            {
+              "@id": "#characteristic_category/title_671",
+              "characteristicType": {
+                "annotationValue": "title",
+                "termAccession": "",
+                "termSource": ""
+              }
+            },
+            {
+              "@id": "#characteristic_category/library_name_673",
+              "characteristicType": {
+                "annotationValue": "library_name",
+                "termAccession": "",
+                "termSource": ""
+              }
+            },
+            {
+              "@id": "#characteristic_category/accession_681",
+              "characteristicType": {
+                "annotationValue": "accession",
+                "termAccession": "",
+                "termSource": ""
+              }
+            },
+            {
+              "@id": "#characteristic_category/submission_date_682",
+              "characteristicType": {
+                "annotationValue": "submission date",
+                "termAccession": "",
+                "termSource": ""
+              }
+            },
+            {
+              "@id": "#characteristic_category/status_683",
+              "characteristicType": {
+                "annotationValue": "status",
+                "termAccession": "",
+                "termSource": ""
+              }
+            }
+          ],
+          "materials": {
+            "samples": [],
+            "otherMaterials": [
+              {
+                "@id": "#other_material/227",
+                "name": "library_construction_protocol_1",
+                "type": "library_construction_protocol",
+                "characteristics": [
+                  {
+                    "category": {
+                      "@id": "#characteristic_category/title_671"
+                    },
+                    "value": {
+                      "annotationValue": "experiment_title_1",
+                      "termSource": "",
+                      "termAccession": ""
+                    },
+                    "unit": {
+                      "termSource": "",
+                      "termAccession": "",
+                      "comments": []
+                    }
+                  },
+                  {
+                    "category": {
+                      "@id": "#characteristic_category/library_name_673"
+                    },
+                    "value": {
+                      "annotationValue": "library_name_1",
+                      "termSource": "",
+                      "termAccession": ""
+                    },
+                    "unit": {
+                      "termSource": "",
+                      "termAccession": "",
+                      "comments": []
+                    }
+                  },
+                  {
+                    "category": {
+                      "@id": "#characteristic_category/accession_681"
+                    },
+                    "value": {
+                      "annotationValue": "",
+                      "termSource": "",
+                      "termAccession": ""
+                    },
+                    "unit": {
+                      "termSource": "",
+                      "termAccession": "",
+                      "comments": []
+                    }
+                  },
+                  {
+                    "category": {
+                      "@id": "#characteristic_category/submission_date_682"
+                    },
+                    "value": {
+                      "annotationValue": "",
+                      "termSource": "",
+                      "termAccession": ""
+                    },
+                    "unit": {
+                      "termSource": "",
+                      "termAccession": "",
+                      "comments": []
+                    }
+                  },
+                  {
+                    "category": {
+                      "@id": "#characteristic_category/status_683"
+                    },
+                    "value": {
+                      "annotationValue": "add",
+                      "termSource": "",
+                      "termAccession": ""
+                    },
+                    "unit": {
+                      "termSource": "",
+                      "termAccession": "",
+                      "comments": []
+                    }
+                  }
+                ],
+                "derivesFrom": [
+                  {
+                    "@id": "#sample/224"
+                  }
+                ]
+              },
+              {
+                "@id": "#other_material/228",
+                "name": "library_construction_protocol_2",
+                "type": "library_construction_protocol",
+                "characteristics": [
+                  {
+                    "category": {
+                      "@id": "#characteristic_category/title_671"
+                    },
+                    "value": {
+                      "annotationValue": "experiment_title_2",
+                      "termSource": "",
+                      "termAccession": ""
+                    },
+                    "unit": {
+                      "termSource": "",
+                      "termAccession": "",
+                      "comments": []
+                    }
+                  },
+                  {
+                    "category": {
+                      "@id": "#characteristic_category/library_name_673"
+                    },
+                    "value": {
+                      "annotationValue": "library_name_2",
+                      "termSource": "",
+                      "termAccession": ""
+                    },
+                    "unit": {
+                      "termSource": "",
+                      "termAccession": "",
+                      "comments": []
+                    }
+                  },
+                  {
+                    "category": {
+                      "@id": "#characteristic_category/accession_681"
+                    },
+                    "value": {
+                      "annotationValue": "",
+                      "termSource": "",
+                      "termAccession": ""
+                    },
+                    "unit": {
+                      "termSource": "",
+                      "termAccession": "",
+                      "comments": []
+                    }
+                  },
+                  {
+                    "category": {
+                      "@id": "#characteristic_category/submission_date_682"
+                    },
+                    "value": {
+                      "annotationValue": "",
+                      "termSource": "",
+                      "termAccession": ""
+                    },
+                    "unit": {
+                      "termSource": "",
+                      "termAccession": "",
+                      "comments": []
+                    }
+                  },
+                  {
+                    "category": {
+                      "@id": "#characteristic_category/status_683"
+                    },
+                    "value": {
+                      "annotationValue": "add",
+                      "termSource": "",
+                      "termAccession": ""
+                    },
+                    "unit": {
+                      "termSource": "",
+                      "termAccession": "",
+                      "comments": []
+                    }
+                  }
+                ],
+                "derivesFrom": [
+                  {
+                    "@id": "#sample/225"
+                  }
+                ]
+              },
+              {
+                "@id": "#other_material/229",
+                "name": "library_construction_protocol_2",
+                "type": "library_construction_protocol",
+                "characteristics": [
+                  {
+                    "category": {
+                      "@id": "#characteristic_category/title_671"
+                    },
+                    "value": {
+                      "annotationValue": "experiment_title_3",
+                      "termSource": "",
+                      "termAccession": ""
+                    },
+                    "unit": {
+                      "termSource": "",
+                      "termAccession": "",
+                      "comments": []
+                    }
+                  },
+                  {
+                    "category": {
+                      "@id": "#characteristic_category/library_name_673"
+                    },
+                    "value": {
+                      "annotationValue": "library_name_2",
+                      "termSource": "",
+                      "termAccession": ""
+                    },
+                    "unit": {
+                      "termSource": "",
+                      "termAccession": "",
+                      "comments": []
+                    }
+                  },
+                  {
+                    "category": {
+                      "@id": "#characteristic_category/accession_681"
+                    },
+                    "value": {
+                      "annotationValue": "",
+                      "termSource": "",
+                      "termAccession": ""
+                    },
+                    "unit": {
+                      "termSource": "",
+                      "termAccession": "",
+                      "comments": []
+                    }
+                  },
+                  {
+                    "category": {
+                      "@id": "#characteristic_category/submission_date_682"
+                    },
+                    "value": {
+                      "annotationValue": "",
+                      "termSource": "",
+                      "termAccession": ""
+                    },
+                    "unit": {
+                      "termSource": "",
+                      "termAccession": "",
+                      "comments": []
+                    }
+                  },
+                  {
+                    "category": {
+                      "@id": "#characteristic_category/status_683"
+                    },
+                    "value": {
+                      "annotationValue": "add",
+                      "termSource": "",
+                      "termAccession": ""
+                    },
+                    "unit": {
+                      "termSource": "",
+                      "termAccession": "",
+                      "comments": []
+                    }
+                  }
+                ],
+                "derivesFrom": [
+                  {
+                    "@id": "#sample/225"
+                  }
+                ]
+              }
+            ]
+          },
+          "processSequence": [
+            {
+              "@id": "#process/library_construction/227",
+              "name": "",
+              "executesProtocol": {
+                "@id": "#protocol/_48"
+              },
+              "parameterValues": [
+                {
+                  "category": {
+                    "@id": "#parameter/672"
+                  },
+                  "value": {
+                    "annotationValue": "design_description_1",
+                    "termSource": "",
+                    "termAccession": ""
+                  },
+                  "unit": {
+                    "termSource": "",
+                    "termAccession": "",
+                    "comments": []
+                  }
+                },
+                {
+                  "category": {
+                    "@id": "#parameter/674"
+                  },
+                  "value": {
+                    "annotationValue": "GENOMIC",
+                    "termSource": "",
+                    "termAccession": ""
+                  },
+                  "unit": {
+                    "termSource": "",
+                    "termAccession": "",
+                    "comments": []
+                  }
+                },
+                {
+                  "category": {
+                    "@id": "#parameter/675"
+                  },
+                  "value": {
+                    "annotationValue": "WGA",
+                    "termSource": "",
+                    "termAccession": ""
+                  },
+                  "unit": {
+                    "termSource": "",
+                    "termAccession": "",
+                    "comments": []
+                  }
+                },
+                {
+                  "category": {
+                    "@id": "#parameter/676"
+                  },
+                  "value": {
+                    "annotationValue": "RANDOM",
+                    "termSource": "",
+                    "termAccession": ""
+                  },
+                  "unit": {
+                    "termSource": "",
+                    "termAccession": "",
+                    "comments": []
+                  }
+                },
+                {
+                  "category": {
+                    "@id": "#parameter/677"
+                  },
+                  "value": {
+                    "annotationValue": "PAIRED",
+                    "termSource": "",
+                    "termAccession": ""
+                  },
+                  "unit": {
+                    "termSource": "",
+                    "termAccession": "",
+                    "comments": []
+                  }
+                },
+                {
+                  "category": {
+                    "@id": "#parameter/678"
+                  },
+                  "value": {
+                    "annotationValue": "250",
+                    "termSource": "",
+                    "termAccession": ""
+                  },
+                  "unit": {
+                    "termSource": "",
+                    "termAccession": "",
+                    "comments": []
+                  }
+                },
+                {
+                  "category": {
+                    "@id": "#parameter/679"
+                  },
+                  "value": {
+                    "annotationValue": "LS454",
+                    "termSource": "",
+                    "termAccession": ""
+                  },
+                  "unit": {
+                    "termSource": "",
+                    "termAccession": "",
+                    "comments": []
+                  }
+                },
+                {
+                  "category": {
+                    "@id": "#parameter/680"
+                  },
+                  "value": {
+                    "annotationValue": "454 GS 20",
+                    "termSource": "",
+                    "termAccession": ""
+                  },
+                  "unit": {
+                    "termSource": "",
+                    "termAccession": "",
+                    "comments": []
+                  }
+                }
+              ],
+              "performer": "",
+              "date": "",
+              "inputs": [
+                {
+                  "@id": "#sample/224"
+                }
+              ],
+              "outputs": [
+                {
+                  "@id": "#other_material/227"
+                }
+              ],
+              "previousProcess": {
+                "@id": "#process/sample_collection/227"
+              },
+              "nextProcess": {
+                "@id": "#process/nucleic_acid_sequencing/227"
+              }
+            },
+            {
+              "@id": "#process/library_construction/228",
+              "name": "",
+              "executesProtocol": {
+                "@id": "#protocol/_48"
+              },
+              "parameterValues": [
+                {
+                  "category": {
+                    "@id": "#parameter/672"
+                  },
+                  "value": {
+                    "annotationValue": "design_description_2",
+                    "termSource": "",
+                    "termAccession": ""
+                  },
+                  "unit": {
+                    "termSource": "",
+                    "termAccession": "",
+                    "comments": []
+                  }
+                },
+                {
+                  "category": {
+                    "@id": "#parameter/674"
+                  },
+                  "value": {
+                    "annotationValue": "TRANSCRIPTOMIC",
+                    "termSource": "",
+                    "termAccession": ""
+                  },
+                  "unit": {
+                    "termSource": "",
+                    "termAccession": "",
+                    "comments": []
+                  }
+                },
+                {
+                  "category": {
+                    "@id": "#parameter/675"
+                  },
+                  "value": {
+                    "annotationValue": "RNA-Seq",
+                    "termSource": "",
+                    "termAccession": ""
+                  },
+                  "unit": {
+                    "termSource": "",
+                    "termAccession": "",
+                    "comments": []
+                  }
+                },
+                {
+                  "category": {
+                    "@id": "#parameter/676"
+                  },
+                  "value": {
+                    "annotationValue": "repeat fractionation",
+                    "termSource": "",
+                    "termAccession": ""
+                  },
+                  "unit": {
+                    "termSource": "",
+                    "termAccession": "",
+                    "comments": []
+                  }
+                },
+                {
+                  "category": {
+                    "@id": "#parameter/677"
+                  },
+                  "value": {
+                    "annotationValue": "SINGLE",
+                    "termSource": "",
+                    "termAccession": ""
+                  },
+                  "unit": {
+                    "termSource": "",
+                    "termAccession": "",
+                    "comments": []
+                  }
+                },
+                {
+                  "category": {
+                    "@id": "#parameter/678"
+                  },
+                  "value": {
+                    "annotationValue": "None",
+                    "termSource": "",
+                    "termAccession": ""
+                  },
+                  "unit": {
+                    "termSource": "",
+                    "termAccession": "",
+                    "comments": []
+                  }
+                },
+                {
+                  "category": {
+                    "@id": "#parameter/679"
+                  },
+                  "value": {
+                    "annotationValue": "Illumina",
+                    "termSource": "",
+                    "termAccession": ""
+                  },
+                  "unit": {
+                    "termSource": "",
+                    "termAccession": "",
+                    "comments": []
+                  }
+                },
+                {
+                  "category": {
+                    "@id": "#parameter/680"
+                  },
+                  "value": {
+                    "annotationValue": "Illumina Genome Analyzer",
+                    "termSource": "",
+                    "termAccession": ""
+                  },
+                  "unit": {
+                    "termSource": "",
+                    "termAccession": "",
+                    "comments": []
+                  }
+                }
+              ],
+              "performer": "",
+              "date": "",
+              "inputs": [
+                {
+                  "@id": "#sample/225"
+                }
+              ],
+              "outputs": [
+                {
+                  "@id": "#other_material/228"
+                }
+              ],
+              "previousProcess": {
+                "@id": "#process/sample_collection/228"
+              },
+              "nextProcess": {}
+            },
+            {
+              "@id": "#process/library_construction/229",
+              "name": "",
+              "executesProtocol": {
+                "@id": "#protocol/_48"
+              },
+              "parameterValues": [
+                {
+                  "category": {
+                    "@id": "#parameter/672"
+                  },
+                  "value": {
+                    "annotationValue": "design_description_3",
+                    "termSource": "",
+                    "termAccession": ""
+                  },
+                  "unit": {
+                    "termSource": "",
+                    "termAccession": "",
+                    "comments": []
+                  }
+                },
+                {
+                  "category": {
+                    "@id": "#parameter/674"
+                  },
+                  "value": {
+                    "annotationValue": "TRANSCRIPTOMIC",
+                    "termSource": "",
+                    "termAccession": ""
+                  },
+                  "unit": {
+                    "termSource": "",
+                    "termAccession": "",
+                    "comments": []
+                  }
+                },
+                {
+                  "category": {
+                    "@id": "#parameter/675"
+                  },
+                  "value": {
+                    "annotationValue": "RNA-Seq",
+                    "termSource": "",
+                    "termAccession": ""
+                  },
+                  "unit": {
+                    "termSource": "",
+                    "termAccession": "",
+                    "comments": []
+                  }
+                },
+                {
+                  "category": {
+                    "@id": "#parameter/676"
+                  },
+                  "value": {
+                    "annotationValue": "repeat fractionation",
+                    "termSource": "",
+                    "termAccession": ""
+                  },
+                  "unit": {
+                    "termSource": "",
+                    "termAccession": "",
+                    "comments": []
+                  }
+                },
+                {
+                  "category": {
+                    "@id": "#parameter/677"
+                  },
+                  "value": {
+                    "annotationValue": "SINGLE",
+                    "termSource": "",
+                    "termAccession": ""
+                  },
+                  "unit": {
+                    "termSource": "",
+                    "termAccession": "",
+                    "comments": []
+                  }
+                },
+                {
+                  "category": {
+                    "@id": "#parameter/678"
+                  },
+                  "value": {
+                    "annotationValue": "None",
+                    "termSource": "",
+                    "termAccession": ""
+                  },
+                  "unit": {
+                    "termSource": "",
+                    "termAccession": "",
+                    "comments": []
+                  }
+                },
+                {
+                  "category": {
+                    "@id": "#parameter/679"
+                  },
+                  "value": {
+                    "annotationValue": "Illumina",
+                    "termSource": "",
+                    "termAccession": ""
+                  },
+                  "unit": {
+                    "termSource": "",
+                    "termAccession": "",
+                    "comments": []
+                  }
+                },
+                {
+                  "category": {
+                    "@id": "#parameter/680"
+                  },
+                  "value": {
+                    "annotationValue": "Illumina Genome Analyzer",
+                    "termSource": "",
+                    "termAccession": ""
+                  },
+                  "unit": {
+                    "termSource": "",
+                    "termAccession": "",
+                    "comments": []
+                  }
+                }
+              ],
+              "performer": "",
+              "date": "",
+              "inputs": [
+                {
+                  "@id": "#sample/225"
+                }
+              ],
+              "outputs": [
+                {
+                  "@id": "#other_material/229"
+                }
+              ],
+              "previousProcess": {
+                "@id": "#process/sample_collection/229"
+              },
+              "nextProcess": {
+                "@id": "#process/nucleic_acid_sequencing/229"
+              }
+            },
+            {
+              "@id": "#process/nucleic_acid_sequencing/233_234",
+              "name": "",
+              "executesProtocol": {
+                "@id": "#protocol/_49"
+              },
+              "parameterValues": [],
+              "performer": "",
+              "date": "",
+              "inputs": [
+                {
+                  "@id": "#other_material/227"
+                }
+              ],
+              "outputs": [
+                {
+                  "@id": "#data_file/233"
+                },
+                {
+                  "@id": "#data_file/234"
+                }
+              ],
+              "previousProcess": {
+                "@id": "#process/library_construction/233"
+              },
+              "nextProcess": {}
+            },
+            {
+              "@id": "#process/nucleic_acid_sequencing/235",
+              "name": "",
+              "executesProtocol": {
+                "@id": "#protocol/_49"
+              },
+              "parameterValues": [],
+              "performer": "",
+              "date": "",
+              "inputs": [
+                {
+                  "@id": "#other_material/229"
+                }
+              ],
+              "outputs": [
+                {
+                  "@id": "#data_file/235"
+                }
+              ],
+              "previousProcess": {
+                "@id": "#process/library_construction/235"
+              },
+              "nextProcess": {}
+            }
+          ],
+          "dataFiles": [
+            {
+              "@id": "#data_file/233",
+              "name": "RD file 1a",
+              "type": "Raw Data File",
+              "comments": [
+                {
+                  "name": "file_name",
+                  "value": "ENA_TEST2.R1.fastq.gz"
+                },
+                {
+                  "name": "file_type",
+                  "value": "fastq"
+                },
+                {
+                  "name": "file checksum",
+                  "value": ""
+                },
+                {
+                  "name": "accession",
+                  "value": ""
+                },
+                {
+                  "name": "submission date",
+                  "value": ""
+                },
+                {
+                  "name": "status",
+                  "value": "add"
+                }
+              ]
+            },
+            {
+              "@id": "#data_file/234",
+              "name": "RD file 1b",
+              "type": "Raw Data File",
+              "comments": [
+                {
+                  "name": "file_name",
+                  "value": "ENA_TEST2.R2.fastq.gz"
+                },
+                {
+                  "name": "file_type",
+                  "value": "fastq"
+                },
+                {
+                  "name": "file checksum",
+                  "value": ""
+                },
+                {
+                  "name": "accession",
+                  "value": ""
+                },
+                {
+                  "name": "submission date",
+                  "value": ""
+                },
+                {
+                  "name": "status",
+                  "value": "add"
+                }
+              ]
+            },
+            {
+              "@id": "#data_file/235",
+              "name": "RD file 3",
+              "type": "Raw Data File",
+              "comments": [
+                {
+                  "name": "file_name",
+                  "value": "ENA_TEST1.R1.fastq.gz"
+                },
+                {
+                  "name": "file_type",
+                  "value": "fastq"
+                },
+                {
+                  "name": "file checksum",
+                  "value": ""
+                },
+                {
+                  "name": "accession",
+                  "value": ""
+                },
+                {
+                  "name": "submission date",
+                  "value": ""
+                },
+                {
+                  "name": "status",
+                  "value": "add"
+                }
+              ]
+            }
+          ],
+          "unitCategories": []
+        }
+      ],
+      "factors": [],
+      "unitCategories": []
+    }
+  ]
+}
\ No newline at end of file