Commit a8b0f173 authored by Jelle Scholtalbers's avatar Jelle Scholtalbers 🇳🇱

fix indentation and tabs-to-whitespace;

parent 14a3a9ca
rule summarize:
input:
#TODO
output:
#TODO
shell:
"wc -c {input} > {output}"
input:
#TODO
output:
#TODO
shell:
"wc -c {input} > {output}"
rule extract:
input:
#TODO
output:
#TODO
shell:
"sed 's/^[ ]*//' {input} | cut -f1 -d ' ' > {output}"
input:
#TODO
output:
#TODO
shell:
"sed 's/^[ ]*//' {input} | cut -f1 -d ' ' > {output}"
rule all:
input:
"extract.txt"
input:
"extract.txt"
rule summarize:
input:
"A.fasta",
"B.fasta"
output:
"sum.txt"
shell:
"wc -c {input} > {output}"
input:
"A.fasta",
"B.fasta"
output:
"sum.txt"
shell:
"wc -c {input} > {output}"
rule extract:
input:
"sum.txt"
output:
"extract.txt"
shell:
"sed 's/^[ ]*//' {input} | cut -f1 -d ' ' > {output}"
input:
"sum.txt"
output:
"extract.txt"
shell:
"sed 's/^[ ]*//' {input} | cut -f1 -d ' ' > {output}"
rule clean:
shell:
"rm -f extract.txt sum.txt"
shell:
"rm -f extract.txt sum.txt"
SAMPLES = "A B".split()
rule all:
input:
"extract.txt"
input:
"extract.txt"
rule summarize:
input:
expand("{samples}.fasta", samples=SAMPLES)
output:
"sum.txt"
message:
"summarizing counts from {input} and creating {output}"
shell:
"wc -c {input} > {output}"
input:
expand("{samples}.fasta", samples=SAMPLES)
output:
"sum.txt"
message:
"summarizing counts from {input} and creating {output}"
shell:
"wc -c {input} > {output}"
rule extract:
input:
"sum.txt"
output:
"extract.txt"
message:
"extracting the counts"
shell:
"sed 's/^[ ]*//' {input} | cut -f1 -d ' ' > {output}"
input:
"sum.txt"
output:
"extract.txt"
message:
"extracting the counts"
shell:
"sed 's/^[ ]*//' {input} | cut -f1 -d ' ' > {output}"
rule clean:
shell:
"rm -f extract.txt sum.txt"
shell:
"rm -f extract.txt sum.txt"
......@@ -2,29 +2,29 @@
SAMPLES, = glob_wildcards("{samples}.fasta")
rule all:
input:
"extract.txt"
input:
"extract.txt"
rule summarize:
input:
expand("{samples}.fasta", samples=SAMPLES)
output:
temp("sum.txt")
message:
"summarizing counts from {input} and creating {output}"
shell:
"wc -c {input} > {output}"
input:
expand("{samples}.fasta", samples=SAMPLES)
output:
temp("sum.txt")
message:
"summarizing counts from {input} and creating {output}"
shell:
"wc -c {input} > {output}"
rule extract:
input:
"sum.txt"
output:
"extract.txt"
message:
"extracting the counts"
shell:
"sed 's/^[ ]*//' {input} | cut -f1 -d ' ' > {output}"
input:
"sum.txt"
output:
"extract.txt"
message:
"extracting the counts"
shell:
"sed 's/^[ ]*//' {input} | cut -f1 -d ' ' > {output}"
rule clean:
shell:
"rm -f extract.txt sum.txt"
shell:
"rm -f extract.txt sum.txt"
......@@ -3,33 +3,33 @@ localrules: all, extract
SAMPLES, = glob_wildcards("{samples}.fasta")
rule all:
input:
"extract.txt"
input:
"extract.txt"
rule summarize:
input:
expand("{samples}.fasta", samples=SAMPLES)
output:
temp("sum.txt")
message:
"summarizing counts from {input} and creating {output}"
log:
"sum.log"
shell:
"wc -c {input} > {output} 2> {log}"
input:
expand("{samples}.fasta", samples=SAMPLES)
output:
temp("sum.txt")
message:
"summarizing counts from {input} and creating {output}"
log:
"sum.log"
shell:
"wc -c {input} > {output} 2> {log}"
rule extract:
input:
"sum.txt"
output:
"extract.txt"
message:
"extracting the counts"
log:
"sum.log"
shell:
"sed 's/^[ ]*//' {input} | cut -f1 -d ' ' > {output} 2> {log}"
input:
"sum.txt"
output:
"extract.txt"
message:
"extracting the counts"
log:
"sum.log"
shell:
"sed 's/^[ ]*//' {input} | cut -f1 -d ' ' > {output} 2> {log}"
rule clean:
shell:
"rm -f extract.txt sum.txt"
shell:
"rm -f extract.txt sum.txt"
......@@ -3,19 +3,19 @@ localrules: all, extract
SAMPLES, = glob_wildcards("{samples}.fasta")
rule all:
input:
#TODO
input:
#TODO
rule do_summarize:
input:
#TODO
output:
#TODO
message:
"summarizing {input} to {output}"
shell:
"wc -c {input} > {output}"
input:
#TODO
output:
#TODO
message:
"summarizing {input} to {output}"
shell:
"wc -c {input} > {output}"
rule clean:
shell:
"rm -f *.sum"
shell:
"rm -f *.sum"
......@@ -3,19 +3,19 @@ localrules: all, extract
SAMPLES, = glob_wildcards("{samples}.fasta")
rule all:
input:
expand("{samples}.sum", samples=SAMPLES)
input:
expand("{samples}.sum", samples=SAMPLES)
rule do_summarize:
input:
"{samples}.fasta"
output:
"{samples}.sum"
message:
"summarizing {input} to {output}"
shell:
"wc -c {input} > {output}"
input:
"{samples}.fasta"
output:
"{samples}.sum"
message:
"summarizing {input} to {output}"
shell:
"wc -c {input} > {output}"
rule clean:
shell:
"rm -f *.sum"
shell:
"rm -f *.sum"
from snakemake.utils import report
rule all:
input:
"extract.txt"
input:
"extract.txt"
rule summarize:
input:
"A.fasta",
"B.fasta"
output:
"sum.txt"
shell:
"wc -c {input} > {output}"
input:
"A.fasta",
"B.fasta"
output:
"sum.txt"
shell:
"wc -c {input} > {output}"
rule extract:
input:
"sum.txt"
output:
"extract.txt"
shell:
"sed 's/^[ ]*//' {input} | cut -f1 -d ' ' > {output}"
input:
"sum.txt"
output:
"extract.txt"
shell:
"sed 's/^[ ]*//' {input} | cut -f1 -d ' ' > {output}"
rule clean:
shell:
"rm -f extract.txt sum.txt"
shell:
"rm -f extract.txt sum.txt"
rule report:
input:
T1="sum.txt"
output:
html="report.html"
run:
report("""
========
title
========
Something {input.T1}
""", output.html, metadata="Author", **input)
input:
T1="sum.txt"
output:
html="report.html"
run:
report("""
========
title
========
Something {input.T1}
""", output.html, metadata="Author", **input)
......@@ -3,13 +3,14 @@
Presentation and Example files
## Start the tutorial
## Start the tutorial
The folder 00-start contains all files for starting the tutorial.
A.fasta - input file
B.fasta - input file
Snakefile - skeleton Snakefile
- Inputs:
- A.fasta
- B.fasta
- Snakefile (skeleton)
## First example
......@@ -20,7 +21,3 @@ The folder 01-example contains the first simple example
## Report
The folder 02-report contains an example for creating a html report
Markdown is supported
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