Commit 956c8710 authored by Yoann Dufresne's avatar Yoann Dufresne
Browse files

modify Snakefile to allow not compressed output

parent 6a6f0950
import glob import glob
WORKDIR = "snake_exec" if "workdir" not in config else config["workdir"] WORKDIR = "snake_experiments" if "workdir" not in config else config["workdir"]
INPUT = ["snake_exec/simu_bar_n1000_d5_m2-dev0.gexf"] if "input" not in config else config["input"] INPUT = ["snake_exec/simu_0_bar_n1000_d10_m2.gexf"] if "input" not in config else config["input"]
COMPRESSED = False if "compressed" not in config else ("True" == config["compressed"] or "true" == config["compressed"])
final_output_suffix = ".tar.gz" if COMPRESSED else "_d2_simplified_maxclq.gexf"
if "," in INPUT: if "," in INPUT:
if INPUT[0] == "[": if INPUT[0] == "[":
INPUT = INPUT[1:-1] INPUT = INPUT[1:-1]
...@@ -9,9 +12,10 @@ if "," in INPUT: ...@@ -9,9 +12,10 @@ if "," in INPUT:
INPUT = INPUT if isinstance(INPUT, list) else [INPUT] INPUT = INPUT if isinstance(INPUT, list) else [INPUT]
SAMPLE_NAME = [name[name.rfind('/')+1:name.rfind('.')] for name in INPUT] SAMPLE_NAME = [name[name.rfind('/')+1:name.rfind('.')] for name in INPUT]
rule all: rule all:
input: input:
expand(f"{WORKDIR}/{{name}}.tar.gz", name=SAMPLE_NAME) expand(f"{WORKDIR}/{{name}}{final_output_suffix}", name=SAMPLE_NAME)
rule compress_data: rule compress_data:
input: input:
......
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