diff --git a/Snakemake.html b/Snakemake.html index af1c68b..8fb6eca 100644 --- a/Snakemake.html +++ b/Snakemake.html @@ -391,36 +391,90 @@
We’ll use parallel processing to speed up the analysis step.
-simulate_data.py:
+configfile: "config.yaml"
+import sys
-rule all:
- input:
- expand("results/analysis_{sample}.txt", sample=config["samples"])
-
-rule simulate_data:
- input:
- configfile = "config.yaml"
- output:
- "data/{sample}.txt"
- shell:
- "python simulate_data.py --sample {wildcards.sample} > {output}"
-
-rule analyze_data:
- input:
- data = "data/{sample}.txt"
- output:
- "results/analysis_{sample}.txt"
- shell:
- "python analyze_data.py {input} > {output}"
+sample = sys.argv[1]
+with open(f"data/{sample}.txt", "w") as f:
+ f.write(f"Simulated data for {sample}\n")
+analyze_data.py:
+import sys
+
+with open(sys.argv[1], "r") as f:
+ data = f.read()
+
+with open(f"results/analysis_{sys.argv[1].split('/')[-1]}", "w") as f:
+ f.write(f"Analysis of {data}\n")
+