Skip to content
Snippets Groups Projects
Commit f579a28a authored by Arthur Le Bars's avatar Arthur Le Bars
Browse files

fix typo, renamed files in 'files' dir, fix for jbrowee menu url

parent ec3f5a55
No related branches found
No related tags found
2 merge requests!3release 1.0.1,!2Corrections cloud
File moved
File moved
File moved
......@@ -79,11 +79,15 @@ class DeploySpeciesStack(speciesData.SpeciesData):
# Create nginx dirs and write/re-write nginx conf
make_dirs(dir_paths_li=["./nginx", "./nginx/conf"])
try:
with open(os.path.abspath("./nginx/conf/default.conf"), 'w') as conf:
conf.write("server {\n\tlisten 80;\n\tserver_name ~.;\n\tlocation /download/ {\n\t\talias /project_data/; \n\t\tautoindex on;\n\t}\n}") # The species nginx conf
except OSError as exc:
logging.critical("Cannot write NginX conf file")
sys.exit(exc)
shutil.copy(os.path.join(self.script_dir, "files/nginx_download.conf"), os.path.abspath("./nginx/conf/default.conf"))
except Exception as exc:
logging.critical("Could not copy nginx configuration file for %s" % self.full_name)
logging.critical(exc)
# with open(os.path.abspath("./nginx/conf/default.conf"), 'w') as conf:
# conf.write("server {\n\tlisten 80;\n\tserver_name ~.;\n\tlocation /download/ {\n\t\talias /project_data/; \n\t\tautoindex on;\n\t}\n}") # The species nginx conf
# except OSError as exc:
# logging.critical("Cannot write NginX conf file")
# sys.exit(exc)
# Return to main directory
os.chdir(self.main_dir)
......@@ -128,7 +132,7 @@ class DeploySpeciesStack(speciesData.SpeciesData):
gspecies_compose_file.write(gspecies_compose_output)
galaxy_nginx_conf_template = env.get_template("galaxy_nginx_conf.j2")
galaxy_nginx_conf_template = env.get_template("galaxy_nginx.conf.j2")
galaxy_nginx_conf_output = galaxy_nginx_conf_template.render(render_vars)
with open(os.path.join(self.main_dir, "galaxy_nginx.conf"), "w") as galaxy_nginx_conf_file:
logging.debug("Writing the galaxy_nginx.conf file for %s" % self.genus_species)
......
......@@ -493,7 +493,7 @@ class RunWorkflow(speciesData.SpeciesData):
# 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 "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}")
jbrowse_menu_url = "https://{hostname}/sp/{genus_sp}/feature/{Genus}/{species}/mRNA/{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"]
if workflow_name == "Jbrowse":
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment