Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
"""
return ["--" + x + " " for x in req_input]
subdir_path = _make_sub_dir(args.path, args.genome)
dcc = divvy.ComputingConfiguration()
dcc.activate_package("slurm")
cmd_template = "refgenie build -g {g} -a {a} {req_input_str}"
genome = args.genome
to_remove = ["genome", "path"]
data = vars(args)
for i in to_remove:
data.pop(i)
for asset in asset_build_packages:
sub_script = os.path.join(subdir_path, asset + ".sub")
req_input = asset_build_packages[asset]["required_inputs"]
if req_input:
print("{} asset requires additional input in the command ({}), so '{}'"
" requires manual edit".format(asset, req_input, sub_script))
req_str = " ".join(_req_input_to_args(req_input))
else:
req_str = ""
data["CODE"] = cmd_template.format(g=genome, a=asset, req_input_str=req_str)
data["LOGFILE"] = asset + ".log"
data["JOBNAME"] = asset + "Build"
dcc.write_script(sub_script, data)
subdir_path = _make_sub_dir(args.path, args.genome)
dcc = divvy.ComputingConfiguration()
dcc.activate_package("slurm")
cmd_template = "refgenie build -g {g} -a {a} {req_input_str}"
genome = args.genome
to_remove = ["genome", "path"]
data = vars(args)
for i in to_remove:
data.pop(i)
for asset in asset_build_packages:
sub_script = os.path.join(subdir_path, asset + ".sub")
req_input = asset_build_packages[asset]["required_inputs"]
if req_input:
print("{} asset requires additional input in the command ({}), so '{}'"
" requires manual edit".format(asset, req_input, sub_script))
req_str = " ".join(_req_input_to_args(req_input))
else:
req_str = ""
data["CODE"] = cmd_template.format(g=genome, a=asset, req_input_str=req_str)
data["LOGFILE"] = asset + ".log"
data["JOBNAME"] = asset + "Build"
dcc.write_script(sub_script, data)