From 51157d97a4601cf61244c630b6b2e345594a1ee4 Mon Sep 17 00:00:00 2001 From: Thomas Schwarzl Date: Thu, 21 Jan 2016 12:38:00 +0100 Subject: [PATCH] added reporting example --- .gitignore | 2 ++ 02-report/Snakefile | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 .gitignore create mode 100644 02-report/Snakefile diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e2ecfaf --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.snakemake + diff --git a/02-report/Snakefile b/02-report/Snakefile new file mode 100644 index 0000000..a89a68e --- /dev/null +++ b/02-report/Snakefile @@ -0,0 +1,41 @@ +from snakemake.utils import report + +rule all: + input: + "extract.txt" + +rule summarize: + input: + "A.fasta", + "B.fasta" + output: + "sum.txt" + shell: + "wc -c {input} > {output}" + +rule extract: + input: + "sum.txt" + output: + "extract.txt" + shell: + "cut -f7 -d ' ' {input} > {output}" + +rule clean: + shell: + "rm extract.txt sum.txt" + + +rule report: + input: + T1="sum.txt" + output: + html="report.html" + run: + report(""" + ======== + title + ======== + + Something {input.T1} + """, output.html, metadata="Thomas Schwarzl", **input) -- GitLab