From a42920d63ca707f35dc537e0a3608b4e350f17dd Mon Sep 17 00:00:00 2001
From: Arthur Le Bars <arthur.le-bars@sb-roscoff.fr>
Date: Wed, 14 Apr 2021 11:58:07 +0200
Subject: [PATCH] parameters fix

---
 run_workflow_phaeoexplorer.py | 2 +-
 speciesData.py                | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/run_workflow_phaeoexplorer.py b/run_workflow_phaeoexplorer.py
index e97f1fe..fe77cef 100755
--- a/run_workflow_phaeoexplorer.py
+++ b/run_workflow_phaeoexplorer.py
@@ -492,7 +492,7 @@ class RunWorkflow(speciesData.SpeciesData):
             # In case of the Jbrowse workflow, we unfortunately have to manually edit the parameters instead of setting them
             # as runtime values, using runtime parameters makes the tool throw an internal critical error ("replace not found" error)
             # Scratchgmod test: need "http" (or "https"), the hostname (+ port)
-            if not self.config["menu_url"]:
+            if "menu_url" not in self.config.keys():
                 jbrowse_menu_url = "https://{hostname}/sp/{genus_sp}/feature/{Genus}/{species}/{id}".format(hostname=self.config["hostname"], genus_sp=self.genus_species, Genus=self.genus_uppercase, species=self.species, id="{id}")
             else:
                 jbrowse_menu_url = self.config["menu_url"]
diff --git a/speciesData.py b/speciesData.py
index cf9da39..a2fcbdb 100755
--- a/speciesData.py
+++ b/speciesData.py
@@ -80,6 +80,7 @@ class SpeciesData:
         self.datasets = dict()
         self.config = None  # Custom config used to set environment variables inside containers
         self.species_folder_name = "_".join(utilities.filter_empty_not_empty_items([self.genus_lowercase.lower(), self.species.lower(), self.strain.lower(), self.sex.lower()])["not_empty"])
+        self.species_folder_name  = self.species_folder_name .replace("-", "_")
         self.existing_folders_cache = {}
         self.bam_metadata_cache = {}
 
-- 
GitLab