From 476f437d4e8640c55fff1d507fae16245dfa3a7c Mon Sep 17 00:00:00 2001
From: Loraine Gueguen <loraine.gueguen@sb-roscoff.fr>
Date: Sun, 30 May 2021 22:44:15 +0200
Subject: [PATCH] fix config

---
 gga_run_workflow_phaeo_jbrowse.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gga_run_workflow_phaeo_jbrowse.py b/gga_run_workflow_phaeo_jbrowse.py
index b7a9a24..f73976f 100644
--- a/gga_run_workflow_phaeo_jbrowse.py
+++ b/gga_run_workflow_phaeo_jbrowse.py
@@ -171,7 +171,7 @@ class RunWorkflowJbrowse(runWorkflowPhaeo.RunWorkflow):
 
         return org_id
 
-    def import_datasets_into_history(self):
+    def import_datasets_into_history(self, config):
         """
         Find datasets in a library, get their ID and import them into the current history if they are not already
         """
@@ -187,8 +187,8 @@ class RunWorkflowJbrowse(runWorkflowPhaeo.RunWorkflow):
         proteins_hda_id = None
 
         gio = GalaxyInstance(url=self.instance_url,
-                             email=self.config[constants.CONF_GALAXY_DEFAULT_ADMIN_EMAIL],
-                             password=self.config[constants.CONF_GALAXY_DEFAULT_ADMIN_PASSWORD]
+                             email=config[constants.CONF_GALAXY_DEFAULT_ADMIN_EMAIL],
+                             password=config[constants.CONF_GALAXY_DEFAULT_ADMIN_PASSWORD]
                              )
         prj_lib = gio.libraries.get_previews(constants.GALAXY_LIBRARY_NAME)
         if len(prj_lib) == 1:
@@ -284,7 +284,7 @@ def prepare_history_and_get_wf_param(sp_dict_list, main_dir, config):
             run_workflow_for_current_organism.set_galaxy_instance(config)
             run_workflow_for_current_organism.set_history()
             run_workflow_for_current_organism.install_individual_tools()
-            run_workflow_for_current_organism.import_datasets_into_history()
+            run_workflow_for_current_organism.import_datasets_into_history(config)
 
             analyses_dict_list = run_workflow_for_current_organism.get_analyses()
 
-- 
GitLab