Commit b92405bb authored by mmassaviol's avatar mmassaviol
Browse files

Debug case with no SeOrPe param

parent 39cecd25
import re import re
import sys import sys
from tools import * from tools import read_yaml
config = read_yaml(sys.argv[1]) config = read_yaml(sys.argv[1])
...@@ -21,7 +21,7 @@ def report_section_order(): ...@@ -21,7 +21,7 @@ def report_section_order():
res += " " + "order: " + str(cpt) + "\n" res += " " + "order: " + str(cpt) + "\n"
cpt += -10 cpt += -10
for rule in config["outputs"][tool]: for rule in config["outputs"][tool]:
if ((config["params"]["SeOrPe"] == "SE" and not("_PE" in rule)) or (config["params"]["SeOrPe"] == "PE" and not("_SE" in rule))): if ("SeOrPe" not in config.keys() or (config["params"]["SeOrPe"] == "SE" and not("_PE" in rule)) or (config["params"]["SeOrPe"] == "PE" and not("_SE" in rule))):
for output in config["outputs"][tool][rule]: for output in config["outputs"][tool][rule]:
if("file" in output.keys() and "mqc" in output["file"] and '{' not in output["file"]): # case of dynamic files ({wildcard}_mqc.png) to deal with if("file" in output.keys() and "mqc" in output["file"] and '{' not in output["file"]): # case of dynamic files ({wildcard}_mqc.png) to deal with
section = re.sub('\_mqc.*$', '', output["file"]) section = re.sub('\_mqc.*$', '', output["file"])
......
...@@ -27,7 +27,7 @@ rule prepare_report: ...@@ -27,7 +27,7 @@ rule prepare_report:
tool = config[step["name"]] tool = config[step["name"]]
i=1 i=1
for command in OUTPUTS[tool]: for command in OUTPUTS[tool]:
if ((config["SeOrPe"] == "SE" and not("_PE" in command)) or (config["SeOrPe"] == "PE" and not("_SE" in command))): if ("SeOrPe" not in config.keys() or (config["SeOrPe"] == "SE" and not("_PE" in command)) or (config["SeOrPe"] == "PE" and not("_SE" in command))):
outputs = OUTPUTS[tool][command] outputs = OUTPUTS[tool][command]
for files in outputs: for files in outputs:
name = files["file"] if 'file' in files.keys() else files["directory"] name = files["file"] if 'file' in files.keys() else files["directory"]
...@@ -43,7 +43,7 @@ rule prepare_report: ...@@ -43,7 +43,7 @@ rule prepare_report:
for step in STEPS: for step in STEPS:
tool = config[step["name"]] tool = config[step["name"]]
for key, value in config.items(): for key, value in config.items():
if (tool in key and tool != "null") or (key in ["results_dir","sample_dir","sample_suffix","SeOrPe"]) and ((config["SeOrPe"] == "SE" and not("_PE" in command)) or (config["SeOrPe"] == "PE" and not("_SE" in command))): if (tool in key and tool != "null") or (key in ["results_dir","sample_dir","sample_suffix","SeOrPe"]) and ("SeOrPe" not in config.keys() or (config["SeOrPe"] == "SE" and not("_PE" in command)) or (config["SeOrPe"] == "PE" and not("_SE" in command))):
if (key in PARAMS_INFO.keys() and "label" in PARAMS_INFO[key].keys()): if (key in PARAMS_INFO.keys() and "label" in PARAMS_INFO[key].keys()):
description = PARAMS_INFO[key]["label"] description = PARAMS_INFO[key]["label"]
else: else:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment