Commit 631f835a authored by Thomas Schwarzl's avatar Thomas Schwarzl

added all examples for the tutorial, reworked the presentation

parent 7d72c6fe
......@@ -4,7 +4,7 @@ rule summarize:
output:
#TODO
shell:
"wc -c #TODO"
"wc -c {input} > {output}"
rule extract:
input:
......@@ -12,5 +12,4 @@ rule extract:
output:
#TODO
shell:
"cut -f7 -d ' ' #TODO"
"sed 's/^[ ]*//' {input} | cut -f1 -d ' ' > {output}"
rule all:
input:
"extract.txt"
......@@ -19,8 +17,8 @@ rule extract:
output:
"extract.txt"
shell:
"cut -f7 -d ' ' {input} > {output}"
"sed 's/^[ ]*//' {input} | cut -f1 -d ' ' > {output}"
rule clean:
shell:
"rm extract.txt sum.txt"
"rm -f extract.txt sum.txt"
>A
ACATATAGAGATATAT
>B
ACACAATCTATCATCTACTACGACGAGCGACGAGCGACGGACGAGGGTATCTATCTAGCAGC
SAMPLES = "A B".split()
rule all:
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}"
rule extract:
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"
>A
ACATATAGAGATATAT
>B
ACACAATCTATCATCTACTACGACGAGCGACGAGCGACGGACGAGGGTATCTATCTAGCAGC
>C
ACAGCGAGCAGCGGCGACGAGCGACGGACGATCTATCATCTACTACGACGAGCGACGAGCGACGGACGAGGGTATCTATCTAGCAGC
SAMPLES, = glob_wildcards("{samples}.fasta")
rule all:
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}"
rule extract:
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"
>A
ACATATAGAGATATAT
>B
ACACAATCTATCATCTACTACGACGAGCGACGAGCGACGGACGAGGGTATCTATCTAGCAGC
>C
ACAGCGAGCAGCGGCGACGAGCGACGGACGATCTATCATCTACTACGACGAGCGACGAGCGACGGACGAGGGTATCTATCTAGCAGC
localrules: all, extract
SAMPLES, = glob_wildcards("{samples}.fasta")
rule all:
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}"
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}"
rule clean:
shell:
"rm -f extract.txt sum.txt"
20 A.fasta
66 B.fasta
91 C.fasta
177 total
>A
ACATATAGAGATATAT
>B
ACACAATCTATCATCTACTACGACGAGCGACGAGCGACGGACGAGGGTATCTATCTAGCAGC
>C
ACAGCGAGCAGCGGCGACGAGCGACGGACGATCTATCATCTACTACGACGAGCGACGAGCGACGGACGAGGGTATCTATCTAGCAGC
localrules: all, extract
SAMPLES, = glob_wildcards("{samples}.fasta")
rule all:
input:
#TODO
rule do_summarize:
input:
#TODO
output:
#TODO
message:
"summarizing {input} to {output}"
shell:
"wc -c {input} > {output}"
rule clean:
shell:
"rm -f *.sum"
>B
ACACAATCTATCATCTACTACGACGAGCGACGAGCGACGGACGAGGGTATCTATCTAGCAGC
>C
ACAGCGAGCAGCGGCGACGAGCGACGGACGATCTATCATCTACTACGACGAGCGACGAGCGACGGACGAGGGTATCTATCTAGCAGC
localrules: all, extract
SAMPLES, = glob_wildcards("{samples}.fasta")
rule all:
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}"
rule clean:
shell:
"rm -f *.sum"
......@@ -19,11 +19,11 @@ rule extract:
output:
"extract.txt"
shell:
"cut -f7 -d ' ' {input} > {output}"
"sed 's/^[ ]*//' {input} | cut -f1 -d ' ' > {output}"
rule clean:
shell:
"rm extract.txt sum.txt"
"rm -f extract.txt sum.txt"
rule report:
......@@ -38,4 +38,4 @@ rule report:
========
Something {input.T1}
""", output.html, metadata="Thomas Schwarzl", **input)
""", output.html, metadata="Author", **input)
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