From 8862f78ffaf500c6a7fb375b64143ccf6ede2b7d Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Thu, 31 Oct 2024 14:37:55 +0000 Subject: [PATCH] site deploy Auto-generated via `{sandpaper}` Source : 32541075b474181d277724e3e9ae41645925c4fd Branch : md-outputs Author : GitHub Actions Time : 2024-10-31 14:37:46 +0000 Message : markdown source builds Auto-generated via `{sandpaper}` Source : 2dab93419a1c9e7239953d4ff2cb92a072007e51 Branch : main Author : Alejandro Gomez Espinosa Time : 2024-10-31 14:37:05 +0000 Message : update --- Snakemake.html | 104 ++++++++++++++++++++++-------- aio.html | 117 ++++++++++++++++++++++++++-------- instructor/Snakemake.html | 104 ++++++++++++++++++++++-------- instructor/aio.html | 119 ++++++++++++++++++++++++++--------- instructor/introduction.html | 8 +-- introduction.html | 6 +- md5sum.txt | 2 +- pkgdown.yml | 2 +- 8 files changed, 348 insertions(+), 114 deletions(-) diff --git a/Snakemake.html b/Snakemake.html index af1c68b..8fb6eca 100644 --- a/Snakemake.html +++ b/Snakemake.html @@ -391,36 +391,90 @@

Objectives

  1. Data Simulation: Simulate some data.
  2. Data Analysis: Analyze the simulated data.

We’ll use parallel processing to speed up the analysis step.

-
  1. Create the Snakefile:
  2. -
-

YAML +
  1. Create the Python Scripts:
  2. +

simulate_data.py:

+
+

PYTHON

-
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:

+
+

PYTHON +

+
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")
+
+
  1. Create the Config File (config.yaml):
  2. +
+

YAML +

+
samples:
+  - sample1
+  - sample2
+  - sample3
+  - sample4
+  - sample5
- + -->

+