Skip to content

Commit f754fc8

Browse files
authored
Merge pull request #11 from snakemake/fix/Dresden
fix: dresden
2 parents 816b332 + 297dfca commit f754fc8

25 files changed

+812
-69
lines changed

config/config_dresden.yaml

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,28 @@ instructor:
22
name: "Dr. Christian Meesters"
33
affiliation: "Johannes Gutenberg Universität Mainz"
44
affiliation2: "NHR SüdWest" # may be empty
5+
6+
layout:
7+
beamertheme: "CambridgeUS" # you can choose any, the slides are tested
8+
# with 'CambridgeUS'
9+
colortheme: "beaver" # you can choose any, the slides are tested with
10+
# 'beaver'
11+
# choose any preconfigured color or those from the preamble
12+
beamercolor_structure: "fg=UniRot"
13+
beamercolor_title: "fg=UniRot"
14+
beamercolor_title_head: "fg=UniRot"
15+
16+
beamercolor_block_title: "bg=UniRot!20,fg=darkred"
17+
beamercolor_block_body: "fg=black, bg=plightgrey2"
18+
19+
beamercolor_block_title_alerted: "fg=white,bg=UniRot"
20+
beamercolor_block_title_example: "fg=white,bg=PineGreen!80"
521

622
course:
7-
date: "18. April 2024" # maybe: "\today"
23+
# sets the slides aspectratio (if outcommented, the default is 43=4:3)
24+
aspectratio: 1609 # - 169 = 16:9
25+
date: "26.-27. February 2025" # maybe: "\today"
26+
827
#title: "" # specifiy your title here, else a default is used.
928
#subtitle: "" # specifiy your subtitle here, else a default is used.
1029
# Editors recommendations are a matter of taste and technological
@@ -15,19 +34,29 @@ course:
1534
# a condarc file on a cluster, copy and adjust
1635
# for your cluster.
1736
condarcfile: "common/condarc_barnard.tex"
37+
38+
39+
# We provide a common software stack to avoid long
40+
# installation sessions.
41+
softwarepath: "/projects/p_nhr_snakemake/software_stack"
1842
# these are the path names to contain sample data
1943
# see the README for explanations.
20-
pathtosetup: "/projects/p_nhr_snakemake"
21-
pathtosolutions: "solutions"
22-
# This is the selected slide to explain the 'Hello World' script
44+
pathtosetup: "/projects/p_nhr_snakemake/tutorial"
45+
pathtosolutions: "/projects/p_nhr_snakemake/solutions"
46+
# after copying the setup path is:
47+
tutorialpath: "~/tasks"
48+
deploy_url: "https://github.com/snakemake-workflows/rna-seq-kallisto-sleuth"
49+
# This is the selected slide to explain the 'Hello World' script
2350
# to introduce SLURM. It requires different account and partition
2451
# settings on every cluster.
2552
hello_world_script: "common/Hello_World_HPC_Barnard.tex"
2653
cluster:
54+
# the cluster name
2755
name: "Barnard"
56+
# the cluster distro
2857
distro: "RedHat"
2958
# the cluster account and default partition
30-
#account: "m2_jgu-ngstraining"
59+
#account: "p_nhr_snakemake"
3160
partition: "barnard"
3261
# the local and remote storage prefixes on this cluster
3362
remotejoblocalstorageprefix: "/dev/shm/$USER/snakemake"

images/humor/up_to_date.jpg

281 KB
Loading

images/misc/bricks.png

73.7 KB
Loading

setup_creators/copy_script_ZIH_Dresden.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
# This script is used to teach on the cluster "Mogon II"
44

5-
CLUSTER_ALIAS="nhr410@login1.barnard.hpc.tu-dresden.de"
5+
CLUSTER_ALIAS="barnard"
66
BASEPATH="/projects/p_nhr_snakemake"
77

88
# creating remote directory:
99
ssh ${CLUSTER_ALIAS} "mkdir -p ${BASEPATH}"
1010

1111
scp condarc_barnard "${CLUSTER_ALIAS}:${BASEPATH}/condarc"
1212
scp get_tutorial.sh "${CLUSTER_ALIAS}:${BASEPATH}/get_tutorial.sh"
13-
scp install_mamba.sh "${CLUSTER_ALIAS}:${BASEPATH}/install_mamba.sh"
13+
scp install_conda.sh "${CLUSTER_ALIAS}:${BASEPATH}/install_conda.sh"
1414
scp environment.yaml "${CLUSTER_ALIAS}:${BASEPATH}/environment.yaml"
1515

1616
rsync -rtlv --chmod=D755 "tutorial" "${CLUSTER_ALIAS}:${BASEPATH}"

setup_creators/solutions/05_Snakefile_target

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# our samples are pre-configured
2-
SAMPLES = ["A", "B"]
2+
samples = ["A", "B"]
33

44
rule all:
55
input:
@@ -37,8 +37,8 @@ rule samtools_index:
3737
rule bcftools_call:
3838
input:
3939
fa="data/genome.fa",
40-
bam=expand("sorted_reads/{sample}.bam", sample=SAMPLES),
41-
bai=expand("sorted_reads/{sample}.bam.bai", sample=SAMPLES)
40+
bam=expand("sorted_reads/{sample}.bam", sample=samples),
41+
bai=expand("sorted_reads/{sample}.bam.bai", sample=samples)
4242
output:
4343
"calls/all.vcf"
4444
shell:

setup_creators/solutions/06_Snakefile_run

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# our samples are pre-configured
2-
SAMPLES = ["A", "B"]
2+
samples = ["A", "B"]
33

44
rule all:
55
input:
@@ -38,8 +38,8 @@ rule samtools_index:
3838
rule bcftools_call:
3939
input:
4040
fa="data/genome.fa",
41-
bam=expand("sorted_reads/{sample}.bam", sample=SAMPLES),
42-
bai=expand("sorted_reads/{sample}.bam.bai", sample=SAMPLES)
41+
bam=expand("sorted_reads/{sample}.bam", sample=samples),
42+
bai=expand("sorted_reads/{sample}.bam.bai", sample=samples)
4343
output:
4444
"calls/all.vcf"
4545
shell:

setup_creators/solutions/07_Snakefile_script

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# our samples are pre-configured
2-
SAMPLES = ["A", "B"]
2+
samples = ["A", "B"]
33

44

55
rule all:
@@ -40,8 +40,8 @@ rule samtools_index:
4040
rule bcftools_call:
4141
input:
4242
fa="data/genome.fa",
43-
bam=expand("sorted_reads/{sample}.bam", sample=SAMPLES),
44-
bai=expand("sorted_reads/{sample}.bam.bai", sample=SAMPLES)
43+
bam=expand("sorted_reads/{sample}.bam", sample=samples),
44+
bai=expand("sorted_reads/{sample}.bam.bai", sample=samples)
4545
output:
4646
"calls/all.vcf"
4747
shell:

setup_creators/solutions/08_Snakefile_script2

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# our samples are pre-configured
2-
SAMPLES = ["A", "B"]
2+
samples = ["A", "B"]
33

44
configfile: "config/config.yaml"
55

@@ -41,8 +41,8 @@ rule samtools_index:
4141
rule bcftools_call:
4242
input:
4343
fa="data/genome.fa",
44-
bam=expand("sorted_reads/{sample}.bam", sample=SAMPLES),
45-
bai=expand("sorted_reads/{sample}.bam.bai", sample=SAMPLES)
44+
bam=expand("sorted_reads/{sample}.bam", sample=samples),
45+
bai=expand("sorted_reads/{sample}.bam.bai", sample=samples)
4646
output:
4747
"calls/all.vcf"
4848
shell:

setup_creators/solutions/09_Snakefile_config

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# our samples are pre-configured
2-
SAMPLES = ["A", "B"]
2+
samples = ["A", "B"]
33

44
configfile: "config/config.yaml"
55

@@ -41,8 +41,8 @@ rule samtools_index:
4141
rule bcftools_call:
4242
input:
4343
fa="data/genome.fa",
44-
bam=expand("sorted_reads/{sample}.bam", sample=SAMPLES),
45-
bai=expand("sorted_reads/{sample}.bam.bai", sample=SAMPLES)
44+
bam=expand("sorted_reads/{sample}.bam", sample=samples),
45+
bai=expand("sorted_reads/{sample}.bam.bai", sample=samples)
4646
output:
4747
"calls/all.vcf"
4848
shell:
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
configfile: "config/config.yaml"
2+
3+
4+
rule all:
5+
input:
6+
"calls/all.vcf",
7+
"calls/positions.png",
8+
"calls/quals.svg",
9+
10+
11+
def get_bwa_map_input_fastqs(wildcards):
12+
return config["samples"][wildcards.sample]
13+
14+
15+
rule bwa_mem:
16+
input:
17+
reads=get_bwa_map_input_fastqs,
18+
idx=multiext("data/genome.fa", ".amb", ".ann", ".pac", ".sa"),
19+
output:
20+
"sorted_reads/{sample}.bam",
21+
log:
22+
"logs/bwa_mem/{sample}.log",
23+
params:
24+
extra=r"-R '@RG\tID:{sample}\tSM:{sample}'",
25+
sorting="samtools", # Can be 'none', 'samtools' or 'picard'.
26+
sort_order="coordinate", # Can be 'queryname' or 'coordinate'.
27+
sort_extra="", # Extra args for samtools/picard.
28+
threads: 8
29+
wrapper:
30+
"v5.7.0/bio/bwa/mem"
31+
32+
33+
rule samtools_index:
34+
input:
35+
"sorted_reads/{sample}.bam",
36+
output:
37+
"sorted_reads/{sample}.bam.bai",
38+
log:
39+
"logs/samtools_index/{sample}.log",
40+
params:
41+
extra="", # optional params string
42+
threads: 4 # This value - 1 will be sent to -@
43+
wrapper:
44+
"v5.7.0/bio/samtools/index"
45+
46+
rule bcftools_call:
47+
input:
48+
fa="data/genome.fa",
49+
bam=expand("sorted_reads/{sample}.bam", sample=config["samples"]),
50+
bai=expand("sorted_reads/{sample}.bam.bai", sample=config["samples"]),
51+
output:
52+
"calls/all.vcf",
53+
log:
54+
"logs/bcftools_call/bcftools.log",
55+
shell:
56+
"(bcftools mpileup -f {input.fa} {input.bam} | "
57+
"bcftools call -mv - > {output}) 2> {log}"
58+
59+
60+
rule plot_positions:
61+
input:
62+
rules.bcftools_call.output,
63+
output:
64+
"calls/positions.png",
65+
script:
66+
"scripts/plot-positions.py"
67+
68+
69+
rule plot_quals:
70+
input:
71+
"calls/all.vcf",
72+
output:
73+
"calls/quals.svg",
74+
script:
75+
"scripts/plot-quals.py"

setup_creators/tutorial/05_Snakefile_target

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# our samples are pre-configured
2-
SAMPLES = ["A", "B"]
2+
samples = ["A", "B"]
33

44
#TASK: Figure out, which your final target is.
55
# This is the final target of our workflow, so far.
@@ -44,8 +44,8 @@ rule samtools_index:
4444
rule bcftools_call:
4545
input:
4646
fa="data/genome.fa",
47-
bam=expand("sorted_reads/{sample}.bam", sample=SAMPLES),
48-
bai=expand("sorted_reads/{sample}.bam.bai", sample=SAMPLES)
47+
bam=expand("sorted_reads/{sample}.bam", sample=samples),
48+
bai=expand("sorted_reads/{sample}.bam.bai", sample=samples)
4949
output:
5050
"calls/all.vcf"
5151
shell:

setup_creators/tutorial/06_Snakefile_run

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# our samples are pre-configured
2-
SAMPLES = ["A", "B"]
2+
samples = ["A", "B"]
33

44
#TASKS: This is an almost working Snakefile!
55
# But it is scrambled and contains a bug.
@@ -36,8 +36,8 @@ rule samtools_sort:
3636
rule bcftools_call:
3737
input:
3838
fa="data/genome.fa",
39-
bam=expand("sorted_reads/{sample}.bam", sample=SAMPLES),
40-
bai=expand("sorted_reads/{sample}.bam.bai", sample=SAMPLES)
39+
bam=expand("sorted_reads/{sample}.bam", sample=samples),
40+
bai=expand("sorted_reads/{sample}.bam.bai", sample=samples)
4141
output:
4242
"calls/all.vcf"
4343
shell:

slides/Snakemake_HPC_User_Creator_Combi.tex

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
\include{common/HPC_101}
6969

7070
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
71-
\include{users/Selecting_Workflows}
71+
\include{creators/Selecting_Workflows}
7272

7373
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7474
\include{creators/Getting_Started}
@@ -102,7 +102,10 @@
102102
\include{common/Reports}
103103

104104
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
105-
\include{common/using_wrappers}
105+
\include{creators/using_wrappers}
106+
107+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
108+
\include{creators/modularization}
106109

107110
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
108111
\include{common/Contributing}

slides/common/HPC_101.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ \section{How does Clustercomputing work?}
66
% source: https://en.m.wikipedia.org/wiki/File:Text-x-python.svg
77
}
88
\frame{
9-
\frametitle{Using Code-Studio}
9+
\frametitle{Running ordinary Batch Scripts}
1010
\begin{mdframed}[tikzsetting={draw=white,fill=white,fill opacity=0.8,
1111
line width=0pt},backgroundcolor=none,leftmargin=0,
1212
rightmargin=150,innertopmargin=4pt,roundcorner=10pt]

slides/common/InTouch.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ \section{Staying Up to Date}
3131
\frametitle{Mastodon Announcement Bot II}
3232
\begin{columns}
3333
\begin{column}{0.5\textwidth}
34-
\includegraphics[width=0.8\textwidth]{contact/announcement_robot_example_screenshot.png}\\
34+
\includegraphics[width=0.8\textwidth]{contact/announcement_robot_example_sreenshot.png}\\
3535
Screenshot from Mastodon
3636
\end{column}
3737
\begin{column}{0.5\textwidth}

slides/common/contributions.tex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
22
\begin{frame}
33
\frametitle{Honour where Honour is due}
4+
The current \Snakemake HPC Teaching Alliance contributors:
45
\begin{columns}
56
\begin{column}{.5\textwidth}
67
\begin{itemize}
@@ -20,6 +21,8 @@
2021
\end{itemize}
2122
\end{column}
2223
\end{columns}
24+
\vfill
25+
The concept article is published in \lhref{https://doi.org/10.14279/eceasst.v83.2600}{the "Electronic Communications of the EASST"} - the European Association for the Study of Science and Technology.
2326

2427
\end{frame}
2528

0 commit comments

Comments
 (0)