From 46465ad38b66d10d97b56ca9d4e18f63b36d63ef Mon Sep 17 00:00:00 2001
From: Arthur Le Bars <arthur.le-bars@sb-roscoff.fr>
Date: Mon, 18 Jan 2021 16:54:12 +0100
Subject: [PATCH] missing argument in README, minor changes to run_workflow

---
 README.md                     |  2 +-
 run_workflow_phaeoexplorer.py | 12 +++++++++---
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/README.md b/README.md
index d24cb05..f36e3fa 100755
--- a/README.md
+++ b/README.md
@@ -119,7 +119,7 @@ inside the repository root will be used if none is precised in the command line
 
 - Copy source data file and load data into the galaxy container: ```$ python3 /path/to/repo/gga_load_data.py your_input_file.yml -c/--config your_config_file [-v/--verbose]```
 
-- Run a workflow (currently for phaeoexplorer only): ```$ python3 /path/to/repo/run_workflow_phaeoexplorer.py your_input_file.yml -c/--config your_config_file [-v/--verbose]``` 
+- Run a workflow (currently for phaeoexplorer only): ```$ python3 /path/to/repo/run_workflow_phaeoexplorer.py your_input_file.yml -c/--config your_config_file [-v/--verbose] ->/--workflow your_workflow``` 
 
 **Warning: the "input file" and "config file" have to be the same for the 3 steps!**
 
diff --git a/run_workflow_phaeoexplorer.py b/run_workflow_phaeoexplorer.py
index 11c2f06..330707b 100644
--- a/run_workflow_phaeoexplorer.py
+++ b/run_workflow_phaeoexplorer.py
@@ -261,7 +261,7 @@ class RunWorkflow(speciesData.SpeciesData):
             # TODO: Uncomment next lines in production
             # workflow = workflow.replace('http://localhost/sp/genus_species/feature/Genus/species/mRNA/{id}',
             #                             "http://abims-gga.sb-roscoff.fr/sp/" + self.genus_lowercase + "_" + self.species + "/feature/" + self.genus + "/mRNA/{id}")
-            workflow = workflow[2:-2]  # if the line under doesn't output a correct json
+            # workflow = workflow[2:-2]  # if the line under doesn't output a correct json
             # workflow = "r'" + workflow
             # workflow = workflow + "'"
             # workflow = workflow[:-2]  # if the line above doesn't output a correct json
@@ -412,8 +412,14 @@ if __name__ == "__main__":
         # Set the instance url attribute
         for env_variable, value in run_workflow_for_current_organism.config.items():
             if env_variable == "custom_host":
-                run_workflow_for_current_organism.instance_url = value + run_workflow_for_current_organism.genus_lowercase + \
-                                                                 "_" + run_workflow_for_current_organism.species + "/galaxy/"
+                # TODO:
+                run_workflow_for_current_organism.instance_url = "http://{0}:8888/sp/{1}_{2}/galaxy/".format(
+                    value, run_workflow_for_current_organism.genus_lowercase, run_workflow_for_current_organism.species)
+                break
+            else:
+                run_workflow_for_current_organism.instance_url = "http://localhost:8888/sp/{0}_{1}/galaxy/".format(
+                    run_workflow_for_current_organism.genus_lowercase,
+                    run_workflow_for_current_organism.species)
 
         run_workflow_for_current_organism.connect_to_instance()
         run_workflow_for_current_organism.set_get_history()
-- 
GitLab