diff --git a/config/config.yaml b/config/config.yaml index 75afad3..9b32d58 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -3,8 +3,25 @@ instructor: affiliation: "Institution Line" affiliation2: "2nd Institution line, if wanted" # may be empty +layout: + beamertheme: "CambridgeUS" # you can choose any, the slides are tested + # with 'CambridgeUS' + colortheme: "beaver" # you can choose any, the slides are tested with + # 'beaver' + # choose any preconfigured color or those from the preamble + beamercolor_structure: "fg=UniRot" + beamercolor_title: "fg=UniRot" + beamercolor_title_head: "fg=UniRot" + + beamercolor_block_title: "bg=UniRot!20,fg=darkred" + beamercolor_block_body: "fg=black, bg=plightgrey2" + + beamercolor_block_title_alerted: "fg=white,bg=UniRot" + beamercolor_block_title_example: "fg=white,bg=PineGreen!80" + course: date: "datestring" # maybe: "\today" + edition: "edition 4" # Editors recommendations are a matter of taste and technological # setups (e.g. on-demand setups). Hence, specify an editor-slide, # here: diff --git a/config/config_Mainz_NHR.yaml b/config/config_Mainz_NHR.yaml index 899c391..5bb25bc 100644 --- a/config/config_Mainz_NHR.yaml +++ b/config/config_Mainz_NHR.yaml @@ -2,6 +2,22 @@ instructor: name: "Dr. Christian Meesters" affiliation: "Johannes Gutenberg Universität Mainz" affiliation2: "NHR SüdWest" # may be empty + +layout: + beamertheme: "CambridgeUS" # you can choose any, the slides are tested + # with 'CambridgeUS' + colortheme: "beaver" # you can choose any, the slides are tested with + # 'beaver' + # choose any preconfigured color or those from the preamble + beamercolor_structure: "fg=UniRot" + beamercolor_title: "fg=UniRot" + beamercolor_title_head: "fg=UniRot" + + beamercolor_block_title: "bg=UniRot!20,fg=darkred" + beamercolor_block_body: "fg=black, bg=plightgrey2" + + beamercolor_block_title_alerted: "fg=white,bg=UniRot" + beamercolor_block_title_example: "fg=white,bg=PineGreen!80" course: date: "datestring" # maybe: "\today" @@ -14,6 +30,9 @@ course: # a condarc file on a cluster, copy and adjust # for your cluster. condarcfile: "common/condarc_mogon.tex" + # We provide a common software stack to avoid long + # installation sessions. + softwarepath: "/lustre/project/m2\_jgu-ngstraining/software" # these are the path names to contain sample data # see the README for explanations. pathtosetup: "/lustre/project/m2\_jgu-ngstraining/workflows" diff --git a/config/config_for_github.yaml b/config/config_for_github.yaml index 7e104cc..d47037d 100644 --- a/config/config_for_github.yaml +++ b/config/config_for_github.yaml @@ -2,6 +2,22 @@ instructor: name: "N.N." affiliation: "Snakemake Teaching Alliance" affiliation2: "" # may be empty + +layout: + beamertheme: "CambridgeUS" # you can choose any, the slides are tested + # with 'CambridgeUS' + colortheme: "beaver" # you can choose any, the slides are tested with + # 'beaver' + # choose any preconfigured color or those from the preamble + beamercolor_structure: "fg=UniRot" + beamercolor_title: "fg=UniRot" + beamercolor_title_head: "fg=UniRot" + + beamercolor_block_title: "bg=UniRot!20,fg=darkred" + beamercolor_block_body: "fg=black, bg=plightgrey2" + + beamercolor_block_title_alerted: "fg=white,bg=UniRot" + beamercolor_block_title_example: "fg=white,bg=PineGreen!80" # The configuration for github needs valid file strings! diff --git a/setup/README.txt b/setup_creators/README.txt similarity index 100% rename from setup/README.txt rename to setup_creators/README.txt diff --git a/setup/condarc_barnard b/setup_creators/condarc_barnard similarity index 100% rename from setup/condarc_barnard rename to setup_creators/condarc_barnard diff --git a/setup/condarc_mogon b/setup_creators/condarc_mogon similarity index 100% rename from setup/condarc_mogon rename to setup_creators/condarc_mogon diff --git a/setup/copy_script_ZIH_Dresden.sh b/setup_creators/copy_script_ZIH_Dresden.sh similarity index 100% rename from setup/copy_script_ZIH_Dresden.sh rename to setup_creators/copy_script_ZIH_Dresden.sh diff --git a/setup/copy_script_mogonII.sh b/setup_creators/copy_script_mogonII.sh similarity index 100% rename from setup/copy_script_mogonII.sh rename to setup_creators/copy_script_mogonII.sh diff --git a/setup/copy_script_template.sh b/setup_creators/copy_script_template.sh similarity index 100% rename from setup/copy_script_template.sh rename to setup_creators/copy_script_template.sh diff --git a/setup/environment.yaml b/setup_creators/environment.yaml similarity index 100% rename from setup/environment.yaml rename to setup_creators/environment.yaml diff --git a/setup/get_tutorial.sh b/setup_creators/get_tutorial.sh similarity index 100% rename from setup/get_tutorial.sh rename to setup_creators/get_tutorial.sh diff --git a/setup/install_mamba.sh b/setup_creators/install_mamba.sh similarity index 100% rename from setup/install_mamba.sh rename to setup_creators/install_mamba.sh diff --git a/setup/install_micromamba.sh b/setup_creators/install_micromamba.sh similarity index 100% rename from setup/install_micromamba.sh rename to setup_creators/install_micromamba.sh diff --git a/setup/solutions/02_Snakefile b/setup_creators/solutions/02_Snakefile similarity index 100% rename from setup/solutions/02_Snakefile rename to setup_creators/solutions/02_Snakefile diff --git a/setup/solutions/03_Snakefile b/setup_creators/solutions/03_Snakefile similarity index 100% rename from setup/solutions/03_Snakefile rename to setup_creators/solutions/03_Snakefile diff --git a/setup/solutions/04_Snakefile b/setup_creators/solutions/04_Snakefile similarity index 100% rename from setup/solutions/04_Snakefile rename to setup_creators/solutions/04_Snakefile diff --git a/setup/solutions/05_Snakefile b/setup_creators/solutions/05_Snakefile similarity index 100% rename from setup/solutions/05_Snakefile rename to setup_creators/solutions/05_Snakefile diff --git a/setup/solutions/06_Snakefile b/setup_creators/solutions/06_Snakefile similarity index 100% rename from setup/solutions/06_Snakefile rename to setup_creators/solutions/06_Snakefile diff --git a/setup/solutions/08_Snakefile b/setup_creators/solutions/08_Snakefile similarity index 100% rename from setup/solutions/08_Snakefile rename to setup_creators/solutions/08_Snakefile diff --git a/setup/solutions/09_Snakefile b/setup_creators/solutions/09_Snakefile similarity index 100% rename from setup/solutions/09_Snakefile rename to setup_creators/solutions/09_Snakefile diff --git a/setup/solutions/10_Snakefile b/setup_creators/solutions/10_Snakefile similarity index 100% rename from setup/solutions/10_Snakefile rename to setup_creators/solutions/10_Snakefile diff --git a/setup/solutions/scripts/plot-quals.py b/setup_creators/solutions/scripts/plot-quals.py similarity index 100% rename from setup/solutions/scripts/plot-quals.py rename to setup_creators/solutions/scripts/plot-quals.py diff --git a/setup/tutorial/01_Snakefile b/setup_creators/tutorial/01_Snakefile similarity index 100% rename from setup/tutorial/01_Snakefile rename to setup_creators/tutorial/01_Snakefile diff --git a/setup/tutorial/02_Snakefile b/setup_creators/tutorial/02_Snakefile similarity index 100% rename from setup/tutorial/02_Snakefile rename to setup_creators/tutorial/02_Snakefile diff --git a/setup/tutorial/03_Snakefile b/setup_creators/tutorial/03_Snakefile similarity index 100% rename from setup/tutorial/03_Snakefile rename to setup_creators/tutorial/03_Snakefile diff --git a/setup/tutorial/04_Snakefile b/setup_creators/tutorial/04_Snakefile similarity index 100% rename from setup/tutorial/04_Snakefile rename to setup_creators/tutorial/04_Snakefile diff --git a/setup/tutorial/05_Snakefile b/setup_creators/tutorial/05_Snakefile similarity index 100% rename from setup/tutorial/05_Snakefile rename to setup_creators/tutorial/05_Snakefile diff --git a/setup/tutorial/06_Snakefile b/setup_creators/tutorial/06_Snakefile similarity index 100% rename from setup/tutorial/06_Snakefile rename to setup_creators/tutorial/06_Snakefile diff --git a/setup/tutorial/08_Snakefile b/setup_creators/tutorial/08_Snakefile similarity index 100% rename from setup/tutorial/08_Snakefile rename to setup_creators/tutorial/08_Snakefile diff --git a/setup/tutorial/09_Snakefile b/setup_creators/tutorial/09_Snakefile similarity index 100% rename from setup/tutorial/09_Snakefile rename to setup_creators/tutorial/09_Snakefile diff --git a/setup/tutorial/config/config.yaml b/setup_creators/tutorial/config/config.yaml similarity index 100% rename from setup/tutorial/config/config.yaml rename to setup_creators/tutorial/config/config.yaml diff --git a/setup/tutorial/profile/config.yaml b/setup_creators/tutorial/profile/config.yaml similarity index 100% rename from setup/tutorial/profile/config.yaml rename to setup_creators/tutorial/profile/config.yaml diff --git a/setup_users/Snakefiles/Snakefile b/setup_users/Snakefiles/Snakefile new file mode 100644 index 0000000..d926a1d --- /dev/null +++ b/setup_users/Snakefiles/Snakefile @@ -0,0 +1,68 @@ +configfile: "config/config.yaml" + +rule all: + input: + "plots/quals.svg", + "calls/all.vcf" + + +def get_bwa_map_input_fastqs(wildcards): + return config["samples"][wildcards.sample] + +rule bwa_map: + input: + "data/genome.fa", + get_bwa_map_input_fastqs + output: + temp("mapped_reads/{sample}.bam") + params: + rg=config["bwa_map"]["rg"] + log: "logs/bwa_mem/{sample}.log" + threads: 8 + shell: + "(bwa mem -R '{params.rg}' -t {threads} {input} | " + "samtools view -Sb - > {output}) 2> {log}" + + +rule samtools_sort: + input: + "mapped_reads/{sample}.bam" + output: + temp("sorted_reads/{sample}.bam") + log: "logs/samtools_sort/{sample}.log" + shell: + "samtools sort -T sorted_reads/{wildcards.sample} " + "-O bam {input} > {output} 2> {log}" + + +rule samtools_index: + input: + "sorted_reads/{sample}.bam" + output: + "sorted_reads/{sample}.bam.bai" + log: "logs/samtools_index/{sample}.log + shell: + "samtools index {input} &> {log}" + + +rule bcftools_call: + input: + fa="data/genome.fa", + bam=expand("sorted_reads/{sample}.bam", sample=config["samples"]), + bai=expand("sorted_reads/{sample}.bam.bai", sample=config["samples"]) + output: + "calls/all.vcf" + log: "logs/bcftools_call.log" + shell: + "(bcftools mpileup -f {input.fa} {input.bam} | " + "bcftools call -mv - > {output}) &> {log}" + + +rule plot_quals: + input: + "calls/all.vcf" + output: + "plots/quals.svg" + log: "logs/plot_quals.log" + script: + "scripts/plot-quals.py" diff --git a/setup_users/Snakefiles/config/config.yaml b/setup_users/Snakefiles/config/config.yaml new file mode 100644 index 0000000..fd839f5 --- /dev/null +++ b/setup_users/Snakefiles/config/config.yaml @@ -0,0 +1,6 @@ +samples: + A: A.fastq + B: B.fastq + +bwa_map: + rg=r"@RG\tID:{sample}\tSM:{sample}" diff --git a/setup_users/Snakefiles/profile/config.yaml b/setup_users/Snakefiles/profile/config.yaml new file mode 100644 index 0000000..5229ca3 --- /dev/null +++ b/setup_users/Snakefiles/profile/config.yaml @@ -0,0 +1,19 @@ +default-resources: + slurm_partition=barnard + +set-resources: + bwa_map: + runtime: 5 # real scenarios will take more + mem_mb_per_cpu: 1800 + + samtools_sort: + runtime: 5 + mem_mb_per_cpu: 1800 + + samtools_index: + runtime: 5 + mem_mb_per_cpu: 1800 + + bcftools_call: + runtime: 15 + mem_mb_per_cpu: 1800 diff --git a/setup_users/install_mamba.sh b/setup_users/install_mamba.sh new file mode 100644 index 0000000..64457e5 --- /dev/null +++ b/setup_users/install_mamba.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh + +bash Miniforge3-Linux-x86_64.sh + +rm Miniforge3-Linux-x86_64.sh diff --git a/slides/common/preamble.tex b/slides/common/preamble.tex index c3859d8..54f4f3a 100644 --- a/slides/common/preamble.tex +++ b/slides/common/preamble.tex @@ -37,8 +37,8 @@ \definecolor{UrlColor}{rgb}{0,0.08,0.45} \definecolor{links}{rgb}{0,0,0} -\usetheme{CambridgeUS} % Pittsburgh, CambridgeUS -\usecolortheme{beaver} %wolverine | crane | beaver | seahorse +\usetheme{<++layout.theme++>} % Pittsburgh, CambridgeUS +\usecolortheme{<++layout.colortheme++>} %wolverine | crane | beaver | seahorse \useinnertheme{rounded} \useoutertheme{default} \usefonttheme{default} @@ -51,7 +51,7 @@ % side margins \setbeamersize{text margin left=0.5cm, text margin right=0.5cm} -\setbeamercolor{structure}{fg=UniRot}% to modify immediately all palettes +\setbeamercolor{structure}{<++layout.beamercolor_structure++>}% to modify immediately all palettes \setbeamercolor{title}{fg=UniRot} \setbeamercolor{title in head/foot}{fg=UniRot}