Repository 'ena_upload'
hg clone https://toolshed.g2.bx.psu.edu/repos/iuc/ena_upload

Changeset 3:59bb6d34fca6 (2021-08-18)
Previous changeset 2:9e2df763086c (2021-07-15) Next changeset 4:26ccb678abc8 (2021-10-19)
Commit message:
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ena_upload commit 28d2a0cfcbb04d88b6e19a7d898a2bada3bce149"
modified:
ena_upload.xml
process_xlsx.py
b
diff -r 9e2df763086c -r 59bb6d34fca6 ena_upload.xml
--- a/ena_upload.xml Thu Jul 15 20:12:34 2021 +0000
+++ b/ena_upload.xml Wed Aug 18 19:42:49 2021 +0000
b
@@ -1,4 +1,4 @@
-<tool id="ena_upload" name="ENA Upload tool" version="0.3.2" profile="20.01" license="MIT">
+<tool id="ena_upload" name="ENA Upload tool" version="0.3.3" profile="20.01" license="MIT">
     <macros>
         <token name="@VERSION@">0.3.1</token>
         <import>samples_macros.xml</import>
b
diff -r 9e2df763086c -r 59bb6d34fca6 process_xlsx.py
--- a/process_xlsx.py Thu Jul 15 20:12:34 2021 +0000
+++ b/process_xlsx.py Wed Aug 18 19:42:49 2021 +0000
[
@@ -209,9 +209,13 @@
                         hour = "{:02d}".format(hour)
                         minute = "{:02d}".format(minute)
                         second = "{:02d}".format(second)
-                        # format it as 2008-01-23T19:23:10
-                        sample[optional_col] = str(year) + '-' + str(month) + '-' + str(day) + \
-                            'T' + str(hour) + ':' + str(minute) + ':' + str(second)
+                        if optional_col in ('collection date'):
+                            # collection date uses the format 2008-01-23T19:23:10
+                            sample[optional_col] = str(year) + '-' + str(month) + '-' + str(day) + \
+                                'T' + str(hour) + ':' + str(minute) + ':' + str(second)
+                        if optional_col in ('receipt date'):
+                            # receipt date uses forma: 2008-01-23
+                            sample[optional_col] = str(year) + '-' + str(month) + '-' + str(day)
                 # excel stores everything as float so I need to check if
                 # the value was actually an int and keep it as int
                 if isinstance(sample[optional_col], float):
@@ -226,10 +230,9 @@
         # (not listed in the samples or study dict)
         # process the experiments for this sample
         if exp['sample_alias'] == sample_alias:
-            lib_alias = 'library_' + exp_alias + '_' + exp['sample_alias']
             experiments_table.write('\t'.join([exp_alias, action, 'accession_ena', exp['title'],
                                                exp['study_alias'], sample_alias,
-                                               exp['design_description'], lib_alias,
+                                               exp['design_description'], exp['library_name'],
                                                exp['library_strategy'], exp['library_source'],
                                                exp['library_selection'],
                                                exp['library_layout'].lower(),