Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Thomas Schwarzl
snakemake-tutorial
Commits
a8b0f173
Commit
a8b0f173
authored
Feb 04, 2016
by
Jelle Scholtalbers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix indentation and tabs-to-whitespace;
parent
14a3a9ca
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
151 additions
and
154 deletions
+151
-154
00-start/Snakefile
00-start/Snakefile
+12
-12
01-example/Snakefile
01-example/Snakefile
+17
-17
02-expand/Snakefile
02-expand/Snakefile
+20
-20
03-dynamic/Snakefile
03-dynamic/Snakefile
+20
-20
04-cluster/Snakefile
04-cluster/Snakefile
+24
-24
05-foreach/Snakefile
05-foreach/Snakefile
+12
-12
06-foreach-complete/Snakefile
06-foreach-complete/Snakefile
+12
-12
07-report/Snakefile
07-report/Snakefile
+29
-29
README.md
README.md
+5
-8
Snakemake-introduction.pptx
Snakemake-introduction.pptx
+0
-0
No files found.
00-start/Snakefile
View file @
a8b0f173
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}"
01-example/Snakefile
View file @
a8b0f173
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"
02-expand/Snakefile
View file @
a8b0f173
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"
03-dynamic/Snakefile
View file @
a8b0f173
...
...
@@ -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"
04-cluster/Snakefile
View file @
a8b0f173
...
...
@@ -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"
05-foreach/Snakefile
View file @
a8b0f173
...
...
@@ -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"
06-foreach-complete/Snakefile
View file @
a8b0f173
...
...
@@ -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"
07-report/Snakefile
View file @
a8b0f173
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)
README.md
View file @
a8b0f173
...
...
@@ -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
Snakemake-introduction.pptx
View file @
a8b0f173
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment