changeset 6:9b050fe0a6f4 draft

planemo upload for repository https://github.com/WGS-TB/MentaLiST/tree/master/galaxy commit 19fe25442b374ea0f257838a9acfa8ff5ee3fcf2-dirty
author dfornika
date Fri, 25 May 2018 15:57:15 -0400
parents 2c742bf44180
children 243be7a79d9c
files data_managers/data_manager_mentalist_download_enterobase/data_manager/mentalist_download_enterobase.py
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/data_managers/data_manager_mentalist_download_enterobase/data_manager/mentalist_download_enterobase.py	Thu May 24 18:07:56 2018 -0400
+++ b/data_managers/data_manager_mentalist_download_enterobase/data_manager/mentalist_download_enterobase.py	Fri May 25 15:57:15 2018 -0400
@@ -23,19 +23,19 @@
         'Y': 'Yersinia'
     }
     translation_table = string.maketrans(string.punctuation, ("_" * 32))
-    base_path = char_to_full_organism_name[scheme].lower().replace(" ", "_").translate(translation_table) + "_enterobase"
+    base_path = char_to_full_organism_name[scheme].lower().replace(" ", "_").translate(translation_table) + "_enterobase_" + type + "mlst"
     today = datetime.date.today().isoformat()
     scheme_files_path = base_path + "_scheme_" + today
-    database_path = base_path + "_k" + str(kmer_size) + "_" + today
-    database_name = base_path + "_k" + str(kmer_size) + "_" + today + ".jld"
-    display_name = char_to_full_organism_name[scheme] + " k=" + str(kmer_size) + " (Enterobase) " + today
+    database_value = base_path + "_k" + str(kmer_size) + "_" + today
+    database_name = database_value + ".jld"
+    display_name = char_to_full_organism_name[scheme] + " k=" + str(kmer_size) + " (Enterobase) " + type + "MLST " + today
     args = [ 'mentalist', 'download_enterobase', '-s', scheme, '-t', type, '-k', str(kmer_size), '--db', database_name, '-o', scheme_files_path]
     proc = subprocess.Popen( args=args, shell=False, cwd=target_directory )
     return_code = proc.wait()
     if return_code:
         print("Error building database.", file=sys.stderr)
         sys.exit( return_code )
-    data_table_entry = dict( value=database_path, dbkey='Enterobase', name=display_name, path=database_name )
+    data_table_entry = dict( value=database_value, dbkey='Enterobase', name=display_name, path=database_name )
     for data_table_name in data_table_names:
         _add_data_table_entry( data_manager_dict, data_table_name, data_table_entry )