changeset 24:6c82d674873b draft

Uploaded
author ieguinoa
date Mon, 16 Nov 2020 14:24:59 +0000
parents fb51bbda07d7
children 758e5bc32bbb
files ena_upload.xml process_xlsx.py
diffstat 2 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/ena_upload.xml	Tue Nov 10 21:35:20 2020 +0000
+++ b/ena_upload.xml	Mon Nov 16 14:24:59 2020 +0000
@@ -10,12 +10,13 @@
   <command detect_errors="exit_code"><![CDATA[
 cwd=\$(pwd);
 #set $use_secret = "False"
-#set $webin_id = $__user__.extra_preferences.get('ena_account|webin_id', "")
-#set $password = $__user__.extra_preferences.get('ena_account|password', "")
+#set $webin_id = $__user__.extra_preferences.get('ena_account|webin_id', "").strip()
+#set $password = $__user__.extra_preferences.get('ena_account|password', "").strip()
+echo $webin_id;
 #if $webin_id == "":
     ## No user defined credentials, try with global webin_id + secret file path
-    #set webin_id = os.environ.get('WEBIN_ID', "")
-    #set webin_secret = os.environ.get('WEBIN_SECRET', None)
+    #set webin_id = os.environ.get('WEBIN_ID', "").strip()
+    #set webin_secret = os.environ.get('WEBIN_SECRET', "").strip()
     #set use_secret = "True"
     #if webin_id == "":
         echo "No ENA credentials defined. Set your credentials via: User -> Preferences -> Manage Information";
--- a/process_xlsx.py	Tue Nov 10 21:35:20 2020 +0000
+++ b/process_xlsx.py	Mon Nov 16 14:24:59 2020 +0000
@@ -62,7 +62,7 @@
 if(xl_sheet.nrows < 3):
     raise ValueError('No entries found in samples')
 if args.viral_submission:
-    samples_cols = ['alias','title','scientific_name','sample_description','collection date','geographic location (country and/or sea)', 'geographic location (region and locality)', 'sample capture status', 'host disease outcome', 'host common name', 'host age', 'host health state', 'host sex', 'host scientific name', 'virus identifier', 'collector name', 'collecting institution', 'isolate','isolation source host-associated']
+    samples_cols = ['alias','title','scientific_name','sample_description','geographic location (country and/or sea)', 'host common name', 'host health state', 'host sex', 'host scientific name', 'collector name', 'collection date','collecting institution', 'isolate']
 else:
     samples_cols = ['alias','title','scientific_name','sample_description']
 samples_dict = extract_data(xl_sheet, samples_cols)
@@ -99,7 +99,7 @@
 
 samples_table = open(pathlib.Path(args.out_path) / 'samples.tsv', 'w')
 if args.viral_submission:
-    samples_table.write('\t'.join(['alias','status','accession','title','scientific_name','taxon_id','sample_description','collection_date','geographic_location','host_common_name','host_subject_id','host_health_state','host_sex','host_scientific_name','collector_name','collecting_institution','isolate','submission_date']) + '\n')
+    samples_table.write('\t'.join(['alias','status','accession','title','scientific_name','taxon_id','sample_description','collection date','geographic_location','host_common_name','host_subject_id','host_health_state','host_sex','host_scientific_name','collector_name','collecting_institution','isolate','submission_date']) + '\n')
 else:
     samples_table.write('\t'.join(['alias','status','accession','title','scientific_name','taxon_id','sample_description','submission_date'])+ '\n')