changeset 6:4aab5ae907b6 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ena_upload commit 7eafac9d91b39e43fd3820ab1431cab1c930bb01"
author iuc
date Mon, 15 Nov 2021 11:47:13 +0000
parents e1b3b37aa69f
children 6f6537780379
files check_remote.py ena_upload.xml process_xlsx.py
diffstat 3 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/check_remote.py	Wed Oct 27 16:38:10 2021 +0000
+++ b/check_remote.py	Mon Nov 15 11:47:13 2021 +0000
@@ -12,7 +12,7 @@
     '''
     assert entry_type in ['study', 'sample', 'experiment', 'run']
     params_dict = {}
-    query_str = ' AND '.join(['%s=%s' % (key, value) for (key, value) in query_dict.items()])
+    query_str = ' AND '.join(['%s="%s"' % (key, value) for (key, value) in query_dict.items()])
     params_dict['query'] = query_str
     params_dict['result'] = 'read_' + entry_type
     params_dict['fields'] = entry_type + '_alias'
--- a/ena_upload.xml	Wed Oct 27 16:38:10 2021 +0000
+++ b/ena_upload.xml	Mon Nov 15 11:47:13 2021 +0000
@@ -374,7 +374,7 @@
                     <has_n_lines n="2"/>
                     <has_n_columns n="8"/>
                     <has_line_matching expression="alias\tstatus\taccession\ttitle\tstudy_type\tstudy_abstract\tpubmed_id\tsubmission_date"/>
-                    <has_line_matching expression="SARS-CoV-2_genomes_01\tmodify\tENA_accession\tWhole-genome sequencing of SARS-CoV-2 from Covid-19 patients\tWhole Genome Sequencing\tWhole-genome sequences of SARS-CoV-2 from oro-pharyngeal swabs obtained from Covid-19 patients(.*)"/>
+                    <has_line_matching expression="SARS-CoV-2_genomes_01\tadd\tENA_accession\tWhole-genome sequencing of SARS-CoV-2 from Covid-19 patients\tWhole Genome Sequencing\tWhole-genome sequences of SARS-CoV-2 from oro-pharyngeal swabs obtained from Covid-19 patients(.*)"/>
                 </assert_contents>
             </output>
             <output name="samples_table_out">
@@ -425,7 +425,7 @@
                     <has_n_lines n="2"/>
                     <has_n_columns n="8"/>
                     <has_line_matching expression="alias\tstatus\taccession\ttitle\tstudy_type\tstudy_abstract\tpubmed_id\tsubmission_date"/>
-                    <has_line_matching expression="SARS-CoV-2_genomes_01\tmodify\tENA_accession\tWhole-genome sequencing of SARS-CoV-2 from Covid-19 patients\tWhole Genome Sequencing\tWhole-genome sequences of SARS-CoV-2 from oro-pharyngeal swabs obtained from Covid-19 patients(.*)"/>
+                    <has_line_matching expression="SARS-CoV-2_genomes_01\tadd\tENA_accession\tWhole-genome sequencing of SARS-CoV-2 from Covid-19 patients\tWhole Genome Sequencing\tWhole-genome sequences of SARS-CoV-2 from oro-pharyngeal swabs obtained from Covid-19 patients(.*)"/>
                 </assert_contents>
             </output>
             <output name="samples_table_out">
--- a/process_xlsx.py	Wed Oct 27 16:38:10 2021 +0000
+++ b/process_xlsx.py	Mon Nov 15 11:47:13 2021 +0000
@@ -14,7 +14,7 @@
     ''' define action ['add' | 'modify'] that needs to be perfomed for this entry '''
     query = {entry_type + '_alias': alias}
     remote_accessions = check_remote_entry(entry_type, query)
-    if len(remote_accessions) > 0:
+    if isinstance(remote_accessions, list) and len(remote_accessions) > 0:
         print(f'Found: {entry_type} entry with alias {alias}')
         return 'modify'
     else: