Skip to content
Snippets Groups Projects
Commit 78d90258 authored by Lukas Jelonek's avatar Lukas Jelonek
Browse files

Moved helper scripts to own directory. Use absolute paths for scripts.

parent 67704550
No related branches found
No related tags found
No related merge requests found
......@@ -66,8 +66,8 @@ class Repository:
module['analysis']['parameters'] = {}
if module['converter']['parameters'] is None:
module['converter']['parameters'] = {}
module['analysis']['script'] = os.path.join(self.get_scripts_location(), module['analysis']['script'])
module['converter']['script'] = os.path.join(self.get_scripts_location(), module['converter']['script'])
module['analysis']['script'] = os.path.abspath(os.path.join(self.get_scripts_location(), module['analysis']['script']))
module['converter']['script'] = os.path.abspath(os.path.join(self.get_scripts_location(), module['converter']['script']))
return modules
def normalize_profiles(self, profiles):
......@@ -120,6 +120,7 @@ class Config:
config['app']['script_path'] = repo.get_scripts_location()
config['install_path'] = pkg_resources.resource_filename('psot', '')
config['helpers_path'] = pkg_resources.resource_filename('psot', 'helpers')
config['repository_paths'] = self.repo_paths
return config
......@@ -127,10 +128,14 @@ def load_config(repositories=None):
# always use the installed repository as the first repo
all_repositories = [pkg_resources.resource_filename('psot', '')]
# check for repositories via environment variable
if 'PSOT_REPOSITORIES' in os.environ:
variable = os.environ['PSOT_REPOSITORIES']
env_repos = variable.split(':')
# convert all paths to absolute paths
env_repos = [os.path.abspath(x) for x in env_repos]
os.environ['PSOT_REPOSITORIES'] = ":".join(env_repos)
all_repositories.extend(env_repos)
if repositories:
......
File moved
File moved
......@@ -64,9 +64,9 @@ def generate_execution(config, args):
execution['use_cluster'] = args.use_cluster
execution['fetch_informations'] = args.fetch_informations
execution['mode'] = 'live' if args.live else 'complete'
execution['script_path'] = config['app']['script_path']
execution['fasta'] = os.path.abspath(args.fasta)
execution['output'] = os.path.abspath(args.output)
execution['install_path'] = config['install_path']
if args.execution_dir:
execution['directory'] = os.path.abspath(args.execution_dir)
else:
......
......@@ -166,7 +166,7 @@ def setup_execution_directory(execution):
script_file.write(nextflow_script)
if not os.path.exists(directory + '/bin'):
os.symlink(execution['script_path'], directory + '/bin')
os.symlink(os.path.join(execution['install_path'], 'helpers'), directory + '/bin')
#if not os.path.exists(directory + '/psot'):
# os.symlink(execution['psot_path'], directory + '/psot')
......
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